query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
MODIFIES: this EFFECTS: return the information of the agent searched
public void searchRecruited(String name) throws ImpossibleAgentInListException, ImpossibleAgentException, IOException { recruitedAgents.load(file); if (recruitedAgents.contains(recruitedAgents.getAgent(name))) { searchAgent(name); } else { throw new ImpossibleAgentInListException(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void searchAgent(String name) throws ImpossibleAgentException {\n if (rhineLifeAgents.contains(rhineLifeAgents.getAgent(name))) {\n Agent a = rhineLifeAgents.getAgent(name);\n a.getInfo();\n } else if (rhodeIslandAgent.contains(rhodeIslandAgent.getAgent(name))) {\n Agent a1 = rhodeIslandAgent.getAgent(name);\n a1.getInfo();\n } else {\n throw new ImpossibleAgentException();\n }\n\n }", "Agent getAgent();", "public void show( Agent agent, Percept percept );", "void onAgentSelected(int agentPosition);", "ReagentSearch getReagentSearch();", "public String getAgentName ()\n {\n return agentName;\n\n }", "private String getAgentLista() {\n return agentLista;\n }", "public void doSearch(){\n boolean possible=currPlanet.searchForArtifact();\n if(possible==true){\n System.out.println(\"the spaceship \"+this.name+\" found an artifact!\");\n numberOfArtifacts=numberOfArtifacts+1;\n \n }else{\n System.out.println(\"the spaceship \"+ this.name+\" did not find an artifact\");\n }\n //Call the getDamageTaken method on the current planet to find out how much damage the spaceship took while \n //performing the search\n double damageTaken=currPlanet.getDamageTaken();\n //Print a message saying that the spaceship took that much damage\n String damageStr = String.format(\"%1$.2f\", damageTaken);\n System.out.println(\"The spaceship \"+this.name+\" took \"+damageStr+\" damage while searching for an artifact on \"+currPlanet.getName());\n //Subtract the damage from the current health of the spaceship\n currentHealth=currentHealth-damageTaken;\n String currHealth=String.format(\"%1$.2f\", currentHealth);\n System.out.println(\"Name: \"+this.name+\" Current Health: \"+currHealth+\" Artifacts: \"+this.numberOfArtifacts);\n //If the current health is below zero, print a message that the spaceship explodes\n if(currentHealth<0){\n System.out.println(\"The spaceship \"+this.name+\" explodes\");\n }\n }", "public String getAgent() {\n return agent;\n }", "@Override\r\n\tpublic List<Agent> agentWhole() {\n\t\treturn agentMapper.agentWhole();\r\n\t}", "@Override\r\n\tpublic List<Map<String, Object>> agentOriginal(String agentname) {\n\t\treturn agentMapper.agentOriginal(agentname);\r\n\t}", "public String getAgent() {\n return this.agent;\n }", "public String getAgent() {\r\n\t\treturn agent;\r\n\t}", "public List<Agent> findAgentsActifs() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') ORDER BY A.personne.name\");\n List<Agent> list = q.getResultList();\n return list;\n }", "@Override\n public String getEntLS() {\n return \"Enemies\";\n }", "public List<Agent> findAgentsInterne() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastDirection IN(SELECT D.code FROM Direction D WHERE D.internExtern=?1) ORDER BY A.personne.name\");\n q.setParameter(1, InterneExterne.Interne);\n List<Agent> list = q.getResultList();\n return list;\n }", "protected abstract Simulate collectAgentData ();", "public Integer getAgent() {\r\n return agent;\r\n }", "protected void setup() {\n\t\tSystem.out.println(\" Searching \" + getAID().getName() + \"starts\");\n\t\taddBehaviour(new WakerBehaviour(this, 1000) {\n\t\t\tprotected void handleElapsedTimeout() {\n\t\t\t\t// perform operation X\n\t\t\t\tDFAgentDescription template = new DFAgentDescription();\n\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\tsd.setType(\"Cloth adviser\");\n\t\t\t\ttemplate.addServices(sd);\n\t\t\t\ttry {\n\t\t\t\t\tDFAgentDescription[] resultOfAdviser = DFService.search(myAgent, template);\n\t\t\t\t\tadviser= resultOfAdviser[0].getName();\n\t\t\t\t} catch (FIPAException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\t\n\t\t\t\tACLMessage recMessage = blockingReceive();\n\t\t\t\tif (recMessage != null) {\n\t\t\t\t\tString senderName = recMessage.getSender().getName();\n\t\t\t\t\tSystem.out.println(getName()+\" receive message from \" + senderName);\n\t\t\t\t\tString rec = recMessage.getContent();\n\t\t\t\t\tSystem.out.println(\"receive message is \" + rec);\n\t\t\t\t\tACLMessage sendMessage = new ACLMessage(ACLMessage.INFORM);\n\t\t\t\t\tsendMessage.setContent(rec);\n\t\t\t\t\tsendMessage.addReceiver(adviser);\n\t\t\t\t\tsend(sendMessage);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"null exception\");\n\t\t\t\t\tblock();\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void actionPerformed(final ActionEvent evt)\n {\n final String txt = searchBox.getText();\n\n /* Only do something if they user has entered some text */\n if (!txt.trim().isEmpty())\n {\n Actor u = new Actor(txt);\n\n /* Create our GetParameter to do the search */\n GetParameter gp = new GetParameter(u.getKey(), u.getType());\n\n /* Now lets search for content */\n JSocialKademliaStorageEntry val = null;\n try\n {\n val = ConnectionAddPanel.this.systemObjects.getDataManager().get(gp);\n u = (Actor) new Actor().fromSerializedForm(val.getContent());\n ConnectionAddPanel.this.setResult(u);\n }\n catch (ContentNotFoundException | IOException ex)\n {\n System.err.println(\"Ran into a prob when searching for person. Message: \" + ex.getMessage());\n }\n\n if (val != null)\n {\n\n }\n }\n }", "@Override\r\n\tpublic List<Map<String, Object>> agentActive() {\n\t\treturn agentMapper.agentActive();\r\n\t}", "public RobotInfo senseRobotInfo(Robot r) throws GameActionException;", "public void agentEscaped(Simulation simulation, IAgent agent) {\n }", "public void act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }", "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "public ArrayList<Literal> lookAround(String agName){\r\n\t\tperceptModel = MapEnv.model;\r\n\t\tArrayList<Literal> lookArr = new ArrayList<Literal>();\r\n\t\tint \t id \t \t = perceptModel.getAgentID(agName);\r\n\t\tLocation lplayer \t = perceptModel.getAgPos(id); \r\n\t\tif(agName != null){\r\n\t\t\t/** Searching direct neighbours to the Agent's location*/\r\n\t\t\tfor(int y = -1; y <= 1; y++){\r\n\t\t\t\tfor(int x = -1; x <= 1; x++){\r\n\t\t\t\t\tif(!(x == 0 && y == 0)){\r\n\t\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n//\t\t\t\t\t\tSystem.out.println(\"Player 1 Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1){\r\n\t\t\t\t\t\t\tint agt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close(\" + plyr + \")\"); \r\n\t\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Searching an single space further in the cardinal directions*/\r\n\t\t\tfor(int y = -2; y <= 2; y+=4){\r\n\t\t\t\tfor(int x = -2; x <= 2; x+=4){\r\n\t\t\t\t\tLocation l = new Location(lplayer.x + x, lplayer.y + y);\r\n\t//\t\t\t\tSystem.out.println(\"Player Loc: (\" + lplayer.x + \",\" + lplayer.y + \"):: See Loc (\" + l.x + \",\" + l.y + \")\");\r\n\t\t\t\t\tif(perceptModel.getAgAtPos(l) != -1 ){\r\n\t\t\t\t\t\tint \tagt = perceptModel.getAgAtPos(l);\r\n\t\t\t\t\t\tString plyr = perceptModel.getAgName(agt);\r\n\t\t\t\t\t\t/** Detects and adds nearby agents flagholder status perception */\r\n\t\t\t\t\t\tif(perceptModel.flag.agentCarrying == perceptModel.getAgentID(plyr)){\r\n\t\t\t\t\t\t\tLiteral nfh = Literal.parseLiteral(\"flagholder(\" + plyr + \")\");\r\n\t\t\t\t\t\t\tlookArr.add(nfh);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tLiteral np = Literal.parseLiteral(\"close\" + plyr + \")\"); \r\n\t\t\t\t\t\t\tlookArr.add(np);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t/** Returns completed ArrayList */ \r\n\t\t\treturn lookArr;\r\n\t\t} else return null;\r\n\t}", "protected int extraHits(Conveyer info, Combatant striker, Combatant victim) {\n return 0;\n }", "public void action() {\n try {\n //System.out.println(\"LoadAgent\"+neighId[i]);\n DFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n sd.setName(\"DSO agent\");\n template.addServices(sd);\n DFAgentDescription[] result = DFService.search(myAgent, template);\n AgentAIDs[0] = result[0].getName();\n sd.setName(\"PV Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[2] = result[0].getName();\n sd.setName(\"Load Agent\");\n template.addServices(sd);\n result = DFService.search(myAgent, template);\n AgentAIDs[3] = result[0].getName();\n\n } catch (FIPAException ex) {\n Logger.getLogger(CurtailAgent.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //initializa GUI and add listeners\n appletVal = new SetCellValues();\n appletVal.playButton.addActionListener(new listener());\n appletVal.playButton.setEnabled(true);\n appletVal.resetButton.addActionListener(new listener());\n appletVal.resetButton.setEnabled(true);\n //operate microgrid\n addBehaviour(operate);\n\n }", "public void doItemEffect(RobotPeer robot){\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\trobot.updateEnergy(-15);\n\t\t//System.out.println(\"Poison item USED\");\n\t\t//System.out.println(\"Energy = \" + robot.getEnergy());\n\t\t\n\t}", "void keywordsMenuItem_actionPerformed(ActionEvent e) {\n\n Class<?> customizerClass = filterAgent.getCustomizerClass();\n\n if (customizerClass == null) {\n trace(\"Error can't find FilterAgent customizer class\");\n return;\n }\n\n // found a customizer, now open it\n Customizer customizer = null;\n\n try {\n customizer = (Customizer) customizerClass.newInstance();\n } catch (Exception exc) {\n System.out.println(\"Error opening customizer - \" + exc.toString());\n return; // bail out\n }\n Point pos = this.getLocation();\n JDialog dlg = (JDialog) customizer;\n\n dlg.setLocation(pos.x + 20, pos.y + 20);\n customizer.setObject(filterAgent);\n dlg.show();\n\n }", "java.lang.String getAgentName();", "public void getEnemyBattleEffects(Enemy enemy) {\n try {\n Ability chosenAbility = enemy.getLastUsableAbility().clone();\n ArrayList<Entity> players = new ArrayList<>();\n players.add(playerInCombat);\n addEffect(enemy.parse(chosenAbility,players,true));\n } catch (InsufficientResourceException ignored) {\n ;\n }\n }", "public Agent getAgent() {\n\t\treturn agent;\n\t}", "protected AID searchWaiterAgent(String service_name) {\r\n\t\t\r\n\t\tAID waiterAgent = null;\r\n\t\tDFAgentDescription template = new DFAgentDescription();\r\n\t\tServiceDescription sd = new ServiceDescription();\r\n\t\tsd.setType(service_name);\r\n\t\ttemplate.addServices(sd);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tDFAgentDescription[] result = DFService.search(this, template);\r\n\t\t\t\r\n\t\t\tif (result.length == 1) {\r\n\t\t\t\twaiterAgent = result[0].getName();\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\tgetAID().getName()\r\n\t\t\t\t\t\t+ \" found waiter \"\r\n\t\t\t\t\t\t+ waiterAgent.getName());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (FIPAException fe) {\r\n\t\t\tfe.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn waiterAgent;\r\n\t}", "@Override\n protected void performActionResults(Action targetingAction) {\n PhysicalCard finalTarget = action.getPrimaryTargetCard(targetGroupId);\n\n // Perform result(s)\n action.appendEffect(\n new FindMissingCharacterEffect(action, finalTarget, false));\n }", "public Entity getDamageDealer();", "@Override\n\tpublic String attack(Entity e) {\n\t\tRandom rand = new Random();\n\t\tint randomDamage = rand.nextInt(4); \n\t\te.takeDamage(randomDamage);\n\t\treturn \"hits \" + e.getName() + \" for \" + randomDamage + \" damage \";\n\t}", "@Override\n public String menuDescription(Actor actor) {\n return \"Dinosaur dies\";\n }", "public void setAgent(String agent)\n {\n this.agent = agent;\n }", "@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)\r\n public void onPlayerDamagedByPlayer(final EntityDamageByEntityEvent event) {\n if (!(event.getEntity() instanceof Player)) {\r\n return;\r\n }\r\n if (!(event.getDamager() instanceof Player)) {\r\n return;\r\n }\r\n \r\n final Player target = (Player)event.getEntity();\r\n final Player attacker = (Player)event.getDamager();\r\n final ItemStack is = attacker.getItemInHand();\r\n \r\n if (is != null){\r\n switch (is.getType()){\r\n case EMERALD:\r\n attacker.setItemInHand(ItemUtil.decrementItem(is, 1));\r\n \r\n // 体力・空腹回復、燃えてたら消化\r\n target.setHealth(target.getMaxHealth());\r\n target.setFoodLevel(20);\r\n target.setFireTicks(0);\r\n \r\n // ポーション効果付与\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.REGENERATION, 45 * 20, 0)); // 45 secs\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FIRE_RESISTANCE, 7 * 60 * 20, 0)); // 7 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.INCREASE_DAMAGE, 9 * 60 * 20, 1)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.SPEED, 9 * 60 * 20, 0)); // 9 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.FAST_DIGGING, 5 * 60 * 20, 1)); // 5 mins\r\n target.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 3 * 60 * 20, 0)); // 3 mins\r\n \r\n // effect, messaging\r\n target.getWorld().playEffect(target.getLocation(), Effect.ENDER_SIGNAL, 0, 10);\r\n Util.message(target, PlayerManager.getPlayer(attacker).getName() + \" &aから特殊効果を与えられました!\");\r\n Util.message(attacker, PlayerManager.getPlayer(target).getName() + \" &aに特殊効果を与えました!\");\r\n \r\n event.setCancelled(true);\r\n event.setDamage(0);\r\n break;\r\n default: break;\r\n }\r\n }\r\n }", "@Override\n public String performSpecialEffect() {\n this.health += HEALTH_STEAL_AMOUNT;\n return \"The vampire stole a bit of health after it attacked.\";\n }", "public void buffDeBuff(Pokemon agent, Moves move, Pokemon patient){\n double modifier = 1;\n if(move.getCategory().equalsIgnoreCase(\"buff\")||move.getCategory().equalsIgnoreCase(\"debuff\")) {\n System.out.println(agent.getName() + \" used \" + move.getName());\n }\n switch(move.getBuffDebuffType()){\n case \"Attack\":\n if(patient.getAttackInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getAttackInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setAttackInteger(patient.getAttackInteger()+move.getBuffDebuffInteger());\n System.out.println(patient.getName() + \"'s attack\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = integerConverter(patient.getAttackInteger());\n patient.setBattleAttack((int) (patient.getAttack()*modifier));\n break;\n case \"Defense\":\n if(patient.getDefenseInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getDefenseInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setDefenseInteger(patient.getDefenseInteger()+move.getBuffDebuffInteger());\n System.out.println(patient.getName() + \"'s defense\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = integerConverter(patient.getDefenseInteger());\n patient.setBattleDefense((int) (patient.getDefense()*modifier));\n break;\n case \"SpecAttack\":\n if(patient.getSpecialAttackInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getSpecialAttackInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setSpecialAttackInteger(patient.getSpecialAttackInteger()+move.getBuffDebuffInteger());\n System.out.println(patient.getName() + \"'s special attack\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = integerConverter(patient.getSpecialAttackInteger());\n patient.setBattleSpecialAttack((int) (patient.getSpecialAttack()*modifier));\n break;\n case \"SpecDefense\":\n if(patient.getSpecialDefenseInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getSpecialDefenseInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setSpecialDefenseInteger(patient.getSpecialDefenseInteger()+move.getBuffDebuffInteger());\n System.out.println(patient.getName() + \"'s special defense\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = integerConverter(patient.getSpecialAttackInteger());\n patient.setBattleSpecialDefense((int) (patient.getSpecialDefense()*modifier));\n break;\n case \"Speed\":\n if(patient.getSpeedInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getSpeedInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setSpeedInteger((patient.getSpeedInteger()+move.getBuffDebuffInteger()));\n System.out.println(patient.getName() + \"'s speed\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = integerConverter(patient.getSpeedInteger());\n patient.setBattleSpeed((int) (patient.getSpeed()*modifier));\n break;\n case \"Evasion\":\n if(patient.getEvasionInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getEvasionInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setSpeedInteger((patient.getEvasionInteger()+move.getBuffDebuffInteger()));\n System.out.println(patient.getName() + \"'s evasion\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = evasionConverter(patient.getEvasionInteger());\n patient.setBattleEvasion((int) (patient.getEvasion()*modifier));\n break;\n case \"Accuracy\":\n if(patient.getAccuracyInteger()==-6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be lowered any further!\"); }\n if(patient.getAccuracyInteger()==6){\n System.out.println(patient.getName() + \"'s \" + move.getBuffDebuffType() + \" can't be raised any further!\"); }\n patient.setAccuracyInteger((patient.getAccuracyInteger()+move.getBuffDebuffInteger()));\n System.out.println(patient.getName() + \"'s accuracy\" + buffDebuffMessage(move.getBuffDebuffInteger()));\n modifier = accuracyConverter(patient.getAccuracyInteger());\n patient.setBattleAccuracy((int) (patient.getAccuracy()*modifier));\n break;\n\n }\n }", "public interface Agent {\n void search(String keyword,Result<List<LyricCandidate>> callback);\n void topLyric(Result<List<Lyric>> callback);\n void lyric(String url,Result<Lyric> callback);\n}", "@Override\r\n\tpublic List<Map<String, Object>> saleCapability(String agentname) {\n\t\treturn agentMapper.saleCapability(agentname);\r\n\t}", "public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}", "protected String method_4193() {\r\n String[] var10000 = field_3418;\r\n return \"mob.enderdragon.hit\";\r\n }", "private meterMaidPerception getPerceptions() {\n\t\t\r\n\t\tMessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\r\n\t\tACLMessage msg = receive(mt);\r\n\t\tif (msg != null && msg.getContent() != null) {\r\n\t\t\tString[] perceptions = msg.getContent().split(\";\");\r\n\t\t\tif (perceptions.length < 2)\r\n\t\t\t\treturn meterMaidPerception.NOTHING_TO_SAY;\r\n\t\t\tcar = perceptions[1];\r\n\t\t\tif (CAR_PASSED_ON_RED_SIGN.equals(perceptions[0]))\r\n\t\t\t\treturn meterMaidPerception.CAR_IGNORED_RED_SIGN;\r\n\t\t\telse if (CAR_IN_ZEBRA_CROSSING.equals(perceptions[0]))\r\n\t\t\t\treturn meterMaidPerception.CAR_STOP_ON_ZEBRA_CROSSING;\r\n\t\t}\r\n\t\t\r\n\t\treturn meterMaidPerception.NOTHING_TO_SAY;\r\n\t}", "public GameList getSearchResult(){ return m_NewSearchResult;}", "public void onScannedRobot(ScannedRobotEvent e)\n {\n BadBoy en = (BadBoy)enemies.get(e.getName());\n \n if(en == null){\n en = new BadBoy();\n enemies.put(e.getName(), en);\n }\n \n \n en.hp = true;\n en.energy = e.getEnergy();\n en.pos = hallarPunto(myPos, e.getDistance(), getHeadingRadians() + e.getBearingRadians());\n \n // normal target selection: the one closer to you is the most dangerous so attack him\n //si no le queda vida al objetivo actual CHANGE TARGET m8\n \n if(!objetivo.hp || e.getDistance() < myPos.distance(objetivo.pos)) {\n objetivo = en;\n }\n \n \n }", "@Override\n\tprotected void enterEffect() {\n\t\t\n\t}", "public void toSelectingAttackTarget() {\n }", "@Override\n public String menuDescription(Actor actor) {\n return actor + \" visits store\";\n }", "private void searchMenu(){\n\t\t\n\t}", "protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }", "@Override\n protected void search() {\n \n obtainProblem();\n if (prioritizedHeroes.length > maxCreatures){\n frame.recieveProgressString(\"Too many prioritized creatures\");\n return;\n }\n bestComboPermu();\n if (searching){\n frame.recieveDone();\n searching = false;\n }\n }", "public void addAgent(String name)\r\n {\n \r\n }", "public void result(EnemyInfo[] enemies) {\r\n\t\t//nothing. This robot does not care about results.\r\n\t}", "public void setAgent(String agent) {\n this.agent = agent;\n }", "public void setAgent(String agent) {\n this.agent = agent;\n }", "org.beangle.security.session.protobuf.Model.Agent getAgent();", "public void getAttackedByDarknessMagicBook(IEquipableItem item){item.strongAttackTo(this.getOwner());}", "public Agent getAgent() {\r\n\t\treturn this.AGENT;\r\n\t}", "@Override\n\tpublic String menuDescription(Actor actor) {\n\t\treturn actor + \" says \" + speach;\n\t}", "@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatMEN();\n\t\t\t}\n\t\t}", "public String getAgentName() {\n return agentName;\n }", "@Override\r\n\tpublic void searchObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "void ponderhit();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "int getDamage();", "public void setAgent(String agent) {\r\n\t\tthis.agent = agent;\r\n\t}", "public ArrayList<Effect> getEnemyEffects(int index){\n return enemyController.seeEnemyEffect(index);\n }", "List<AgentReference> getCurrentAgents();", "@Override\r\n\tpublic void recieveHit() {\n\t\tif(armour <= 0) {\r\n\t\t\tSystem.out.println(\"Enemy Destroyed\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdouble calculateHitDamage = shot * basicDamage;\r\n\t\t\tif(calculateHitDamage == armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy Armour Destroyed!!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage > armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy is Dead!!\");\r\n\t\t\t}\r\n\t\t\telse if(calculateHitDamage < armour) {\r\n\t\t\t\tarmour = armour - calculateHitDamage;\r\n\t\t\t\tSystem.out.println(\"Enemy not detroyed!! \\n\");\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Current Enemy life: \"+ armour);\r\n\t\t}\r\n\t}", "private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }", "private int findBidders() {\r\n try {\r\n agents = new ArrayList<AMSAgentDescription>();\r\n //definisce i vincoli di ricerca, in questo caso tutti i risultati\r\n SearchConstraints searchConstraints = new SearchConstraints();\r\n searchConstraints.setMaxResults(Long.MAX_VALUE);\r\n //tutti gli agenti dell'AMS vengono messi in un array\r\n AMSAgentDescription [] allAgents = AMSService.search(this, new AMSAgentDescription(), searchConstraints);\r\n //scorre la lista degli agenti trovati al fine di filtrare solo quelli di interesse\r\n for (AMSAgentDescription a: allAgents) {\r\n //aggiunge l'agente partecipante all'ArrayList se e' un partecipante\r\n if(a.getName().getLocalName().contains(\"Participant\")) {\r\n agents.add(a);\r\n } \r\n }\r\n } catch (Exception e) {\r\n System.out.println( \"Problema di ricerca dell'AMS: \" + e );\r\n e.printStackTrace();\r\n }\r\n return agents.size();\r\n }", "public String getAgentsName()\n {\n return this.agentsName;\n }", "@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}", "public java.util.List<org.biocatalogue.x2009.xml.rest.Agent> getAgentList()\r\n {\r\n final class AgentList extends java.util.AbstractList<org.biocatalogue.x2009.xml.rest.Agent>\r\n {\r\n public org.biocatalogue.x2009.xml.rest.Agent get(int i)\r\n { return AgentsResultsImpl.this.getAgentArray(i); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent set(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.setAgentArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.biocatalogue.x2009.xml.rest.Agent o)\r\n { AgentsResultsImpl.this.insertNewAgent(i).set(o); }\r\n \r\n public org.biocatalogue.x2009.xml.rest.Agent remove(int i)\r\n {\r\n org.biocatalogue.x2009.xml.rest.Agent old = AgentsResultsImpl.this.getAgentArray(i);\r\n AgentsResultsImpl.this.removeAgent(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return AgentsResultsImpl.this.sizeOfAgentArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new AgentList();\r\n }\r\n }", "@Override\n\t\tpublic void calc(Env env)\n\t\t{\n\t\t\tL2PcInstance pc = (L2PcInstance) env.player;\n\t\t\tif (pc != null)\n\t\t\t{\n\t\t\t\tenv.value += pc.getHennaStatDEX();\n\t\t\t}\n\t\t}", "public List<Agent> listAgentNotMappedwithDevice();", "@Override\n\tpublic void act() {\n\n\t\t//Location symbol of a Droid (Stack Overflow 2010)\n\t\tchar locationSymbol = this.world.getEntityManager().whereIs(this).getSymbol();\n\t\t\n\t\t//Begin act\n\t\tsay(describeLocation());\t\t\n\t\t\n\t\t//Check for the lose condition that R2 is disassembled\n\t\t//If R2's HP is <=0\n\t\tif (this.isDead())\n\t\t{\n\t\t\t//If R2 is disassembled\n\t\t\tif(this.getIsDisassembled())\n\t\t\t{\n\t\t\t\t//Is the symbol of the disassembled Droid is R2's\n\t\t\t\tif(this.getSymbol().contains(\"{R2}\"))\n\t\t\t\t{\n\t\t\t\t\t//Message stating R2 was disassembled\n\t\t\t\t\tthis.messageRenderer.render(\"\\n\\nR2-D2 has been disassembled!\");\n\t\t\t\t\t\n\t\t\t\t\t//Scheduler schedules the loss\n\t\t\t\t\tscheduler.lossSchedule(this.messageRenderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//If a Droid is immobile (Dead)\n\t\tif (this.getIsImmobile() == true) {\n\t\t\tsay(this.getShortDescription() + \" is immobile. \");\n\t\t\t\t\t\t\n\t\t\tif(this.getOwner() != null)\n\t\t\t{\n\t\t\t\tsay(\"Owned. checking in owners follow list\");\n\t\t\t\t\n\t\t\t\tString thisDroidNoBraces = this.getSymbol().substring(1, this.getSymbol().length()-1);\n\n\t\t\t\tint indexofDroid = this.getOwner().getFollowerList().indexOf(thisDroidNoBraces);\n\t\t\t\t\n\t\t\t\tif (this.getOwner().getFollowerList().get(indexofDroid).equals(thisDroidNoBraces))\n\t\t\t\t{\n\t\t\t\t\tsay(\"Removing\");\n\t\t\t\t\tthis.getOwner().getFollowerList().remove(thisDroidNoBraces);\n\t\t\t\t\tthis.getOwner().getFollowerListSWActors().remove(this);\n\t\t\t\t\tthis.setOwner(null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If a Droid is mobile and human controlled\n\t\telse if (this.humanControlled == true) {\n\t\t\t\n\t\t\t//Following Owner - since humancontrolled.\n\t\t\t\n\t\t\t\n\t\t\tif (isDead()) \n\t\t\t{\n\t\t\t\tthis.setIsImmobile(true);\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Get owners' location\n\t\t\t\tSWLocation ownerloc = this.world.getEntityManager().whereIs(this.getOwner());\n\t\t\t\t\n\t\t\t\t//Set Droids' position to owners' location (follow)\n\t\t\t\tthis.world.getEntityManager().setLocation(this, ownerloc);\n\t\t\t\t\n\t\t\t\t//Take damage if moving to the Badlands\n\t\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\t\n\t\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tselfHeal();\n\t\t\t}\t\n\t\t} \n\t\t\n\t\t//C-3PO Droid specific act ()code\n\t\telse if (this.getSymbol() == \"C3\") {\n\t\t\t\n\t\t\t//Double precision number to represenet C-3PO's chance of speaking\n\t\t\tdouble c3Speak = Math.random();\n\t\t\t\n\t\t\t//10% chance of occuring a 0.9 or above\n\t\t\tif (c3Speak >= 0.9) {\n\t\t\t\t//Call C-3PO speak method (he talks!)\n\t\t\t\tc3POSpeaks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//R2-D2 Repair droid specific act() code\n\t\telse if (this.getSymbol() == \"R2\") {\n\t\t\t\n\t\t\tthis.messageRenderer.render(\"R2 DISS: \" + this.isDisassembled);\n\t\t\t\n\t\t\t//Describe who R2 can see\n\t\t\t//get the contents of the location\n\t\t\tList<SWEntityInterface> r2contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (r2contents.size() > 1) { // if it is equal to one, the only thing here is R2, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface r2entity : r2contents) {\n\t\t\t\t\tif (r2entity.getSymbol().contains(\"D\")) { // If R2 comes across a Droid (Stack Overflow 2010)\n\t\t\t\t\t\tsay(this.getShortDescription() + \" has come accross a Droid!\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Cast target entity as a Droid for checking what it needs from R2\n\t\t\t\t\t\tDroid targetr2 = (Droid) r2entity;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to disassemble the Droid if its immobile\n\t\t\t\t\t\tif (targetr2.isImmobile && targetr2.isDisassembled == false) {\n\t\t\t\t\t\t\tDisassemble r2diss = new Disassemble(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2diss, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 tries to repair a droid who is immobile and disassembled\n\t\t\t\t\t\telse if (targetr2.isImmobile && targetr2.isDisassembled) {\n\t\t\t\t\t\t\tif (this.getItemCarried() != null) {\n\t\t\t\t\t\t\t\tRepair r2rep = new Repair(r2entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(r2rep, this, 1);\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to Heal a Droid if active and not disassembled\n\t\t\t\t\t\telse if (targetr2.isDisassembled == false && targetr2.isImmobile == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tHealDroid r2heal = new HealDroid(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2heal, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\t//Heals himself if he can\n\t\t\t\n\t\t\tHealDroid droidHealR2 = new HealDroid(this, messageRenderer);\n\t\t\tscheduler.schedule(droidHealR2, this, 1);\n\t\t\t\n\t\t\t//R2 moves\n\t\t\tDirection R2Direction = this.getDroidPatrol().getNext();\n\t\t\tsay(getShortDescription() + \" moves \" + R2Direction);\n\t\t\tMove myMove = new Move(R2Direction, messageRenderer, world);\n\n\t\t\tscheduler.schedule(myMove, this, 1);\n\t\n\t\t}\n\t\t\n\t\t//If a Droid is not immobile, and not human controlled (roaming)\n\t\telse {\t\n\t\t\t\n\t\t\t//Picking up an oil can\n\t\t\t//Get contents of the current location\n\t\t\tList<SWEntityInterface> contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (contents.size() > 1) { // if it is equal to one, the only thing here is this Player, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface entity : contents) {\n\t\t\t\t\tif (entity != this) { // don't include self in scene description\n\t\t\t\t\t\tif (entity.getSymbol() == \"x\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//The Droid is standing over a oil can. Does it pick it up?\n\t\t\t\t\t\t\tif (Math.random() > 0.5){ //Half a chance...\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided to pick up \" + entity.getShortDescription());\n\t\n\t\t\t\t\t\t\t\t//Droid takes the oil can. Scheduler implements the Take.\n\t\t\t\t\t\t\t\tTake droidTakes = new Take(entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(droidTakes, this, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse { //The Droid passes over the oil can.\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided not to pick up\" + entity.getShortDescription());\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (Math.random() > 0.8){\n\t\t\t\trandomMovement();\n\t\t\t}\n\t\t\t\n\t\t\t//If a Roaming Droid is at the Badlands, they lose health\n\t\t\t\n\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\n\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t}\n\t\t\t\n\t\t\t/*Self healing\n\t\t\tImplementation that if a Droids' health gets below half, they will attempt to heal themselves IF they \n\t\t\tare carrying an oil can\n\t\t\t*/\n\t\t\tselfHeal();\n\t\t\t\n\t\t\t\n\t\t}\t\n\t}", "public String getAgentContactor() {\n return agentContactor;\n }", "@Override\n\t\tpublic String answeredBy(Actor actor) {\n\t\t\treturn GoogleResultPage.SEARCH_BAR.resolveFor(actor).waitUntilVisible().getValue();\n\t\t}", "public int giveDamage();", "int aggroHitTimer(IGeneticMob geneticMob, EntityLiving attacker);", "private void getAI(){\n\n }", "public void setAgentName (String agentName)\n {\n this.agentName = agentName;\n\n }", "private static void checkForEnemies() throws GameActionException {\n //No need to hijack code for structure\n if (rc.isWeaponReady()) {\n // basicAttack(enemies);\n HQPriorityAttack(enemies, attackPriorities);\n }\n \n //Old splash damage code\n //Preserve because can use to improve current splash damage code\n //But not so simple like just checking directions, since there are many more \n //locations to consider hitting.\n /*if (numberOfTowers > 4) {\n //can do splash damage\n RobotInfo[] enemiesInSplashRange = rc.senseNearbyRobots(37, enemyTeam);\n if (enemiesInSplashRange.length > 0) {\n int[] enemiesInDir = new int[8];\n for (RobotInfo info: enemiesInSplashRange) {\n enemiesInDir[myLocation.directionTo(info.location).ordinal()]++;\n }\n int maxDirScore = 0;\n int maxIndex = 0;\n for (int i = 0; i < 8; i++) {\n if (enemiesInDir[i] >= maxDirScore) {\n maxDirScore = enemiesInDir[i];\n maxIndex = i;\n }\n }\n MapLocation attackLoc = myLocation.add(directions[maxIndex],5);\n if (rc.isWeaponReady() && rc.canAttackLocation(attackLoc)) {\n rc.attackLocation(attackLoc);\n }\n }\n }//*/\n \n }", "@EventHandler\n void OnEntityDeath(EntityDeathEvent e){\n Entity killer = e.getEntity().getKiller();\n int exp = e.getDroppedExp();\n if(killer instanceof Player){\n GuildMCFunctions functions = new GuildMCFunctions();\n functions.spawnExperiencesInfos((Player) killer, exp);\n }\n\n }", "void doEffect(Skill castSkill, double power, Creature performer, Item target) {\n/* 87 */ if ((!target.isMailBox() && !target.isSpringFilled() && !target.isPuppet() && \n/* 88 */ !target.isUnenchantedTurret() && !target.isEnchantedTurret()) || (target\n/* 89 */ .hasDarkMessenger() && !target.isEnchantedTurret())) {\n/* */ \n/* 91 */ performer.getCommunicator().sendNormalServerMessage(\"The spell fizzles.\", (byte)3);\n/* */ return;\n/* */ } \n/* 94 */ if (target.isUnenchantedTurret() || target.isEnchantedTurret()) {\n/* */ \n/* 96 */ int spirit = Zones.getSpiritsForTile(performer.getTileX(), performer.getTileY(), performer.isOnSurface());\n/* 97 */ String sname = \"no spirits\";\n/* 98 */ int templateId = 934;\n/* 99 */ if (spirit == 4) {\n/* */ \n/* 101 */ templateId = 942;\n/* 102 */ sname = \"There are plenty of air spirits at this height.\";\n/* */ } \n/* 104 */ if (spirit == 2) {\n/* */ \n/* 106 */ templateId = 968;\n/* 107 */ sname = \"Some water spirits were closeby.\";\n/* */ } \n/* 109 */ if (spirit == 3) {\n/* */ \n/* 111 */ templateId = 940;\n/* 112 */ sname = \"Earth spirits are everywhere below ground.\";\n/* */ } \n/* 114 */ if (spirit == 1) {\n/* */ \n/* 116 */ sname = \"Some nearby fire spirits are drawn to your contraption.\";\n/* 117 */ templateId = 941;\n/* */ } \n/* 119 */ if (templateId == 934) {\n/* */ \n/* 121 */ performer.getCommunicator().sendAlertServerMessage(\"There are no spirits nearby. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* 125 */ if (target.isUnenchantedTurret()) {\n/* */ \n/* 127 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* 128 */ target.setTemplateId(templateId);\n/* 129 */ target.setAuxData(performer.getKingdomId());\n/* */ }\n/* 131 */ else if (target.isEnchantedTurret()) {\n/* */ \n/* 133 */ if (target.getTemplateId() != templateId) {\n/* */ \n/* 135 */ performer.getCommunicator().sendAlertServerMessage(\"The nearby spirits ignore your contraption. Nothing happens.\", (byte)3);\n/* */ \n/* */ return;\n/* */ } \n/* */ \n/* 140 */ performer.getCommunicator().sendSafeServerMessage(sname);\n/* */ } \n/* */ } \n/* */ \n/* 144 */ ItemSpellEffects effs = target.getSpellEffects();\n/* 145 */ if (effs == null)\n/* 146 */ effs = new ItemSpellEffects(target.getWurmId()); \n/* 147 */ SpellEffect eff = effs.getSpellEffect(this.enchantment);\n/* 148 */ if (eff == null) {\n/* */ \n/* 150 */ performer.getCommunicator().sendNormalServerMessage(\"You summon nearby spirits into the \" + target\n/* 151 */ .getName() + \".\", (byte)2);\n/* */ \n/* 153 */ eff = new SpellEffect(target.getWurmId(), this.enchantment, (float)power, 20000000);\n/* 154 */ effs.addSpellEffect(eff);\n/* 155 */ Server.getInstance().broadCastAction(performer\n/* 156 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 157 */ .getName() + \".\", performer, 5);\n/* 158 */ if (!target.isEnchantedTurret()) {\n/* 159 */ target.setHasCourier(true);\n/* */ \n/* */ }\n/* */ }\n/* 163 */ else if (eff.getPower() > power) {\n/* */ \n/* 165 */ performer.getCommunicator().sendNormalServerMessage(\"You frown as you fail to summon more spirits into the \" + target\n/* 166 */ .getName() + \".\", (byte)3);\n/* */ \n/* 168 */ Server.getInstance().broadCastAction(performer.getName() + \" frowns.\", performer, 5);\n/* */ }\n/* */ else {\n/* */ \n/* 172 */ performer.getCommunicator().sendNormalServerMessage(\"You succeed in summoning more spirits into the \" + this.name + \".\", (byte)2);\n/* */ \n/* */ \n/* 175 */ eff.improvePower(performer, (float)power);\n/* 176 */ if (!target.isEnchantedTurret())\n/* 177 */ target.setHasCourier(true); \n/* 178 */ Server.getInstance().broadCastAction(performer\n/* 179 */ .getName() + \" looks pleased as \" + performer.getHeSheItString() + \" summons some spirits into the \" + target\n/* 180 */ .getName() + \".\", performer, 5);\n/* */ } \n/* */ }", "private void searchFunction() {\n\t\t\r\n\t}", "Agent findById(String id);", "@EventHandler\n\tpublic void attackMobs(EntityDamageByEntityEvent e) {\n\t\tMessages messagesConfig = plugin.getMsgs();\n\n\t\tif (e.getCause().equals(EntityDamageEvent.DamageCause.PROJECTILE)) { //Just my magic code w(o.o)w\n\t\t\treturn;\n\t\t}else if (e.getDamager() instanceof Player) {\n\t\t\tPlayer p = (Player) e.getDamager();\n\t\t\tItemStack pInv = p.getInventory().getItemInMainHand();\n\n\t\t\tif (!pInv.getType().name().contains(\"SWORD\") && !pInv.getType().name().contains(\"AXE\")) {\n\t\t\t\tif (!(e.getEntity() instanceof Chicken)) {\n\t\t\t\t\te.setCancelled(true);\n\n\t\t\t\t\tif (canSendMessage(p.getUniqueId()))\n\t\t\t\t\t\tp.sendMessage(StringUtil.inColor(messagesConfig.getCantHitWithoutSword()));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void gettingAttacked(HitByBulletEvent e) {\r\n\t\tif (gotTarget) {\r\n\t\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(e.getName()) && (!e.getName().equals(radarTarget.getName()))) {\r\n\t\t\t\t\t\tmrRobot.sendMessage(5, \"2\");\r\n\t\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(getIndexForEnemy(e.getName()));\r\n\t\t\t\t\t\ttargetTracking.get(getIndexForName(mrRobot.getName())).updateTarget(radarTarget);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Agent getAgent(String agentId) {\n return agentMap.get(agentId);\n }", "void onOtherInfoToolCard(int id, Match match);", "public void action() throws Exception {\n // Cop move to another place\n move();\n\n // Search for agents nearby\n ArrayList<Position> occupiedNeighbor = this.getPosition().getOccupiedNeighborhood();\n ArrayList<Agent> arrestList = new ArrayList<>();\n for (Position neighbor : occupiedNeighbor) {\n Person person = neighbor.getOccupiedPerson();\n String className = person.getClass().getName();\n // if this is a agent and is active\n if (className.equals(Person.AGENT)) {\n if (((Agent) person).isActive()) {\n arrestList.add((Agent) person);\n }\n }\n }\n\n // If there at least one agent nearby\n if (0 != arrestList.size()) {\n // Randomly pick active agent to jail\n Random random = new Random();\n int maxIndex = arrestList.size();\n int randomIndex = random.nextInt(maxIndex);\n Agent arrestAgent = arrestList.get(randomIndex);\n int jailTerm = random.nextInt(getPersonEnvironment().getMaxJailTerm());\n arrestAgent.beArrested(jailTerm, this);\n }\n }", "public List<Agente> getAllAgentes(){\r\n\t\treturn resAgenteDAO.getAllAgentes();\r\n\t}" ]
[ "0.5797074", "0.5643062", "0.56214124", "0.55864406", "0.5512807", "0.54693806", "0.5444098", "0.5440309", "0.54208416", "0.5414219", "0.53796494", "0.53231055", "0.5309439", "0.53027093", "0.52747273", "0.52382225", "0.52283645", "0.5211649", "0.51818776", "0.51641953", "0.51512575", "0.5129339", "0.5122538", "0.5121275", "0.5117395", "0.509849", "0.5087262", "0.50835603", "0.5053189", "0.5052876", "0.5046993", "0.5045036", "0.5040649", "0.5029161", "0.5009903", "0.5007933", "0.50066984", "0.50064975", "0.49963033", "0.4975979", "0.4975184", "0.4967116", "0.496179", "0.49617067", "0.4951905", "0.49504432", "0.4936943", "0.49348867", "0.49223608", "0.49208394", "0.4918875", "0.49168608", "0.49130479", "0.49123037", "0.49075657", "0.49055815", "0.48984843", "0.4897637", "0.4897637", "0.4893225", "0.48855907", "0.4871712", "0.48673046", "0.48601574", "0.4856917", "0.485537", "0.48550785", "0.48475137", "0.48475137", "0.48475137", "0.48475137", "0.48475137", "0.48471245", "0.48413306", "0.48352775", "0.48229533", "0.4812956", "0.48104942", "0.48004198", "0.4788504", "0.47859612", "0.4775888", "0.47724357", "0.47696507", "0.4769479", "0.47664553", "0.47658876", "0.47631803", "0.47598347", "0.4758592", "0.47577903", "0.4752614", "0.4748902", "0.47452348", "0.4743075", "0.47425774", "0.47395742", "0.4735198", "0.4733379", "0.47311753", "0.4729412" ]
0.0
-1
TODO it need adding dates checking in condition
public List<Property> findAllForReport(List<KufType> value, UUID balanceHolder, UUID orgCat, Date from, Date to) { EntityManager em = getEntityManagerFactory().createEntityManager(); CriteriaBuilder cb = em.getCriteriaBuilder(); try { CriteriaQuery<Property> cq = cb.createQuery(Property.class); Root<Property> c = cq.from(Property.class); cq.select(c); Predicate condition = null; if (value != null) { condition = c.get("kuf").in(value); } if (user.getId() != SuperUser.ID) { if (condition != null) { condition = cb.and(c.get("readers").in(user.getId()), condition); } else { condition = c.get("readers").in(user.getId()); } } if (balanceHolder != null) { if (condition != null) { condition = cb.and(cb.equal(c.get("balanceHolder").get("id"), balanceHolder), condition); } else { condition = cb.equal(c.get("balanceHolder").get("id"), balanceHolder); } } else if (orgCat != null) { try { OrgCategoryDAO ocDao = new OrgCategoryDAO(getSession()); OrgCategory orgCatEntity = ocDao.findById(orgCat); OrganizationDAO oDao = new OrganizationDAO(getSession()); List<OrgCategory> cats = new ArrayList<OrgCategory>(); cats.add(orgCatEntity); ViewPage<Organization> orgs = oDao.findAllByOrgCategory(cats, 0, 0); if (condition != null) { condition = cb.and(c.get("balanceHolder").in(orgs.getResult()), condition); } else { condition = c.get("balanceHolder").in(orgs); } } catch (DAOException e) { Server.logger.errorLogEntry(e); } } cq.where(condition); Query query = em.createQuery(cq); return query.getResultList(); } finally { em.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isFilterByDate();", "private boolean checkdates(java.util.Date date,java.util.Date date2)\n\t{\n\t\tif (date==null||date2==null) return true;\n\t\tif (!date.after(date2)&&!date.before(date2))return true;\n\t\treturn date.before(date2);\n\t}", "public boolean checkDate(){\n Calendar c = Calendar.getInstance();\n Date currentDate = new Date(c.get(Calendar.DAY_OF_MONTH),c.get(Calendar.MONTH)+1, c.get(Calendar.YEAR));\n return (isEqualOther(currentDate) || !isEarlyThanOther(currentDate));\n\n }", "boolean isSetFoundingDate();", "private boolean hasDateThreshold() {\r\n if (entity.getExpirationDate() == null) {\r\n return false;\r\n }\r\n Calendar calendar = Calendar.getInstance();\r\n calendar.add(Calendar.MONTH, 1);\r\n if (entity.getExpirationDate().before(calendar.getTime())) {\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }", "boolean hasDate();", "String formatDateCondition(Date date);", "boolean hasStartDate();", "void checkForValidDate(String dateTime) {\n\n int daysOfMonth[] = {31,28,31,30,31,30,31,31,30,31,30,31};\n\n Timestamp now = new Timestamp(new java.util.Date().getTime());\n Timestamp date = Timestamp.valueOf(startDateTime);\n if (date.after(now)) {\n outputError(lineCount + \" - Fatal - \" +\n \"Date / Time later than today's date : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (date.after(now))\n\n StringTokenizer t = new StringTokenizer(dateTime, \"- :.\");\n int year = Integer.parseInt(t.nextToken());\n int month = Integer.parseInt(t.nextToken());\n int day = Integer.parseInt(t.nextToken());\n int hour = Integer.parseInt(t.nextToken());\n int minute = Integer.parseInt(t.nextToken());\n boolean isLeapYear = ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0));\n if (isLeapYear) daysOfMonth[1] += 1;\n if (year < 1850) {\n outputError(lineCount + \" - Fatal - \" +\n \"Year before 1850 : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (year < 1850)\n\n if (month > 12) {\n outputError(lineCount + \" - Fatal - \" +\n \"Month invalid ( > 12) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (month > 12)\n\n if (day > daysOfMonth[month-1]) {\n outputError(lineCount + \" - Fatal - \" +\n \"Day invalid ( > no of days in month) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (day > (daysOfMonth[month-1])\n\n if (hour > 23) {\n outputError(lineCount + \" - Fatal - \" +\n \"Hour invalid ( > 23) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (hour > 23)\n\n if (minute > 59) {\n outputError(lineCount + \" - Fatal - \" +\n \"Minute invalid ( > 59) : \" +\n startDateTime + \" : \" + station.getStationId(\"\"));\n } // if (minute > 59)\n\n }", "private boolean checkProjectTaskDates(Project pr)\n\t{\n\t\tfor(Task ts:taskManager.get(\"toInsert\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t}\n\t\tfor(Task ts:taskManager.get(\"toEdit\"))\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\tArrayList<Task> tasks=null;\n\t\ttry \n\t\t{\n\t\t\ttasks=db.selectTaskforProjID(project.getProjectID());\n\t\t}\n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tErrorWindow wind = new ErrorWindow(e); \n\t\t\tUI.getCurrent().addWindow(wind);\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor(Task ts:tasks)\n\t\t{\n\t\t\tif(\n\t\t\t\tcheckdates(ts.getTask_STARDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_STARDATE())&&\n\t\t\t\tcheckdates(ts.getTask_ENDDATE(),pr.getEndDate())&&\n\t\t\t\tcheckdates(pr.getStartDate(),ts.getTask_ENDDATE()))\n\t\t\t\t\t continue;\n\t\t\telse\n\t\t\t\t\treturn false;\n\t\t\t\t\t\n\t\t}\n\t\treturn true;\n\t }", "public void test_DATE_HHmmss_conditionBean() { // *Important!\r\n // ## Arrange ##\r\n Calendar cal = Calendar.getInstance();\r\n cal.set(2008, 5, 15, 12, 34, 56);\r\n cal.set(Calendar.MILLISECOND, 123);\r\n Member member = new Member();\r\n member.setMemberId(3);\r\n LocalDate targetDate = toLocalDate(cal);\r\n member.setBirthdate(targetDate);\r\n memberBhv.updateNonstrict(member);\r\n\r\n // ## Act ##\r\n cal.set(2008, 5, 15, 12, 34, 57); // plus one second\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because java.sql.Date is converted to java.util.Date in ConditionBean. \r\n //}\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n assertEquals(targetDate, actual.getBirthdate());\r\n // treated as date\r\n //try {\r\n // memberBhv.selectEntityWithDeletedCheck(cb);\r\n // // ## Assert ##\r\n // fail();\r\n //} catch (EntityAlreadyDeletedException e) {\r\n // // OK\r\n // // Because Oracle Date type have time parts. \r\n //}\r\n }\r\n cal.set(2008, 5, 15, 12, 34, 56); // just time\r\n cal.set(Calendar.MILLISECOND, 0); // Don't format!\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n {\r\n MemberCB cb = new MemberCB();\r\n cb.query().setMemberId_Equal(3);\r\n cb.query().setBirthdate_GreaterEqual(targetDate);\r\n\r\n // ## Act ##\r\n Member actual = memberBhv.selectEntityWithDeletedCheck(cb);\r\n\r\n // ## Assert ##\r\n LocalDate actualValue = actual.getBirthdate();\r\n String formatted = DfTypeUtil.toString(actualValue, \"yyyy/MM/dd\");\r\n log(\"actualValue = \" + formatted);\r\n assertEquals(\"2008/06/15\", formatted);\r\n }\r\n }", "private void checksOldExpense() {\n DateUtils dateUtils = new DateUtils();\n\n // Breaking date string from date base\n String[] expenseDate = dateDue.getText().toString().split(\"-\");\n\n if((Integer.parseInt(expenseDate[GET_MONTH]) < Integer.parseInt(dateUtils.currentMonth))\n && (Integer.parseInt(expenseDate[GET_YEAR]) <= Integer.parseInt(dateUtils.currentYear))){\n\n }\n }", "boolean hasEndDate();", "String isOoseChangeDateAllowed(Record inputRecord);", "@Test\n public void test0() {\n chkDate(\"> '2013'\", true);\n\n }", "private static void checkForParsableDate(AnalysisResults.Builder analysisBuilder) {\n Stream<String> dates =\n getTokensFromRawText(analysisBuilder.getRawText().get()).filter(ReceiptAnalysis::isDate);\n // Assume that the first date on the receipt is the transaction date.\n Optional<String> firstDate = dates.findFirst();\n\n firstDate.ifPresent(date -> ReceiptAnalysis.addDateIfValid(analysisBuilder, date));\n }", "boolean isSetDate();", "public Boolean checkPeriod( ){\r\n\r\n Date dstart = new Date();\r\n Date dend = new Date();\r\n Date dnow = new Date();\r\n\r\n\r\n\r\n // this part will read the openndate file in specific formate\r\n try (BufferedReader in = new BufferedReader(new FileReader(\"opendate.txt\"))) {\r\n String str;\r\n while ((str = in.readLine()) != null) {\r\n // splitting lines on the basis of token\r\n String[] tokens = str.split(\",\");\r\n String [] d1 = tokens[0].split(\"-\");\r\n String [] d2 = tokens[1].split(\"-\");\r\n \r\n int a = Integer.parseInt(d1[0]);\r\n dstart.setDate(a);\r\n a = Integer.parseInt(d1[1]);\r\n dstart.setMonth(a);\r\n a = Integer.parseInt(d1[2]);\r\n dstart.setYear(a);\r\n\r\n a = Integer.parseInt(d2[0]);\r\n dend.setDate(a);\r\n a = Integer.parseInt(d2[1]);\r\n dend.setMonth(a);\r\n a = Integer.parseInt(d2[2]);\r\n dend.setYear(a);\r\n\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"File Read Error\");\r\n }\r\n\r\n \r\n\r\n if ( dnow.before(dend) && dnow.after(dstart) )\r\n return true; \r\n\r\n return true;\r\n }", "boolean hasOrderDate();", "private void checkDateBounds(PortfolioRecord portRecord) {\n List<DataPoint> history = portRecord.getHistory();\n\n if (!userSetDates) {\n fromDateBound = null;\n toDateBound = null;\n }\n\n if (history.size() > 0) {\n LocalDate minDate = history.get(0).getDate();\n LocalDate maxDate = history.get(history.size() - 1).getDate();\n\n if (fromDateBound == null && toDateBound == null) {\n fromDateBound = minDate;\n toDateBound = maxDate;\n } else if (toDateBound.compareTo(maxDate) < 0) {\n toDateBound = maxDate;\n }\n } else {\n fromDateBound = null;\n toDateBound = null;\n userSetDates = false;\n }\n }", "@Override\n public boolean isDateAllowed(LocalDate date) {\n \n return startDates.contains(date) || endDates.contains(date);\n }", "private boolean CheckAvailableDate(TimePeriod tp)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\tString query = \"SELECT * FROM Available WHERE available_hid = '\"+hid+\"' AND \"+\n\t\t\t\t\t\t\t\"startDate = '\"+tp.stringStart+\"' AND endDate = '\"+tp.stringEnd+\"'\"; \n\t\t\t\n\t\t\tResultSet rs = con.stmt.executeQuery(query); \n\t\t\t\n\t\t\tcon.closeConnection();\n\t\t\tif(rs.next())\n\t\t\t{\n\t\t\t\treturn true; \n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn false;\n\t}", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "public boolean checkTimePeriod(String from, String to) throws ParseException{\r\n\t\r\n\tDateFormat df = new SimpleDateFormat (\"yyyy-MM-dd\");\r\n boolean b = true;\r\n // Get Date 1\r\n Date d1 = df.parse(from);\r\n\r\n // Get Date 2\r\n Date d2 = df.parse(to);\r\n\r\n //String relation=\"\";\r\n if (d1.compareTo(d2)<=0){\r\n \t b=true;\r\n // relation = \"the date is less\";\r\n }\r\n else {\r\n b=false;\r\n }\r\n return b;\r\n}", "private static void checkDate(String date) {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n if (!date.matches(RegexPattern.DATE_PATTERN)) {\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.DATE_PATTERN_ERROR));\n }\n try {\n Date formatDate = simpleDateFormat.parse(date);\n if (formatDate.getTime() + TIME_IN_DAY < new Date().getTime()) {\n throw new DaoException(\"Date must be in Future\");\n }\n } catch (ParseException ex) {\n throw new DaoException(ex.getMessage());\n }\n }", "public boolean isSelected(Date date)\n/* */ {\n/* 200 */ Contract.asNotNull(date, \"date must not be null\");\n/* 201 */ return this.selectedDates.contains(date);\n/* */ }", "private boolean checkValidDay() {\n return numDays >= 0 && numDays <= 7;\n }", "boolean hasFromDay();", "public boolean validateDate(TradeModel tradeModel)\n {\n int i = tradeModel.getMaturityDate().compareTo(LocalDate.now());\n if (i<0)\n return false;\n else\n return true;\n }", "private void givenExchangeRateExistsForABaseAndDate() {\n }", "protected final boolean ok_date (int year, int month, int day)\n {\n return ((year >= FIRST_YEAR) &&\n (1 <= month && month <= getLastMonthOfYear(year)) &&\n (1 <= day && day <= getLengthOfMonth (year, month)));\n }", "@Test\n @Disabled\n public void testValidateFecha() {\n assertTrue(RegExprMain.validateFecha(\"10/06/2022\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2011\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2015\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2016\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2021\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/1999\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2007\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2000\"));\n assertTrue(RegExprMain.validateFecha(\"10/06/2002\"));\n assertFalse(RegExprMain.validateFecha(\"38/06/2009\"));\n assertFalse(RegExprMain.validateFecha(\"10/20/2010\"));\n \n \n\n }", "@Test\n public void testDateRangeValidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"12/31/1981\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"does not contain valid date range \" + fields.get(\"generatedTimestamp\"),\n \"12/31/1981..01/01/1982\", fields.get(\"generatedTimestamp\"));\n }", "public void verifyDate(){\n\n // currentDateandTime dataSingleton.getDay().getDate();\n\n }", "public boolean DateValidation(String date, String startTime, String currentTime) {\n\n boolean state = false;\n\n //String x = dateChooser.getDate().toString();\n String Hyear = date.substring(24, 28); // get user input date\n String Hmonth = monthToCompare(date);\n String Hdate = date.substring(8, 10);\n String stHr = startTime.substring(0, 2);\n String stMin = startTime.substring(3, 5);\n\n int userYr, userMnth, userDate, userHour, userMin = 0;\n userYr = Integer.parseInt(Hyear); // conversion of user entered year to int\n userMnth = Integer.parseInt(Hmonth);\n userDate = Integer.parseInt(Hdate);\n userHour = Integer.parseInt(stHr);\n userMin = Integer.parseInt(stMin);\n\n String yyr = currentTime.substring(0, 4); // get currrent year from the string f\n String mmnth = currentTime.substring(5, 7);\n String ddt = currentTime.substring(8, 10); // get current date from the string f\n String hours = currentTime.substring(11, 13);\n String mins = currentTime.substring(14, 16);\n\n int yr, mnth, dt, shr, smin = 0;\n yr = Integer.parseInt(yyr); // convert current year from string to int\n mnth = Integer.parseInt(mmnth);\n dt = Integer.parseInt(ddt);\n shr = Integer.parseInt(hours);\n smin = Integer.parseInt(mins);\n\n if ((userYr == yr) || (userYr > yr)) { // if user entered year is the current year or future year, ok \n if (((userYr == yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth >= mnth)) || ((userYr > yr) && (userMnth < mnth))) {\n if (((userYr == yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt)) || ((userYr == yr) && (userMnth > mnth) && (userDate >= dt))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr))) {\n if (((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour == shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate == dt) && (userHour > shr) && (userMin < smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth == mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour >= shr) && (userMin < smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin)) || ((userYr == yr) && (userMnth > mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))\n || ((userYr == yr) && (userMnth > mnth) && (userDate > dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth >= mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate >= dt) && (userHour < shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour >= shr) && (userMin < smin)) || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin >= smin))\n || ((userYr > yr) && (userMnth < mnth) && (userDate < dt) && (userHour < shr) && (userMin < smin))) {\n state = true;\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid time!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid day!\");\n state = false;\n }\n\n } else {\n JOptionPane.showMessageDialog(null, \"Invalid month!\");\n state = false;\n }\n } else {// if the user entered year is already passed\n JOptionPane.showMessageDialog(null, \"Invalid year\");\n state = false;\n }\n return state;\n }", "public void CheckAvail(LocalDate indate, LocalDate outdate)\r\n {\n if (Days.daysBetween(lastupdate, outdate).getDays() > 30)\r\n {\r\n System.out.println(\"more than 30\");\r\n return;\r\n }//Check if checkin date is before today\r\n if (Days.daysBetween(lastupdate, indate).getDays() < 0)\r\n {\r\n System.out.println(\"Less than 0\");\r\n return;\r\n }\r\n int first = Days.daysBetween(lastupdate, indate).getDays();\r\n int last = Days.daysBetween(lastupdate, outdate).getDays();\r\n for (int i = 0; i < roomtypes.size(); i++)\r\n {\r\n boolean ispossible = true;\r\n for (int j = first; j < last; j++)\r\n {\r\n if (roomtypes.get(i).reserved[j] >= roomtypes.get(i).roomcount)\r\n {\r\n ispossible = false;\r\n }\r\n } \r\n \r\n if (ispossible)\r\n System.out.println(roomtypes.get(i).roomname);\r\n }\r\n }", "public Boolean validarFecha(LocalDate fechaIngresada);", "public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }", "boolean hasOrderByDay();", "public boolean checkFutureOrCurrentDate()\n {\n boolean valid = this.check();\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n if (date != null\n &&\n (date.before(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future or in present date!\");\n\n return valid && false;\n }\n return valid;\n\n }", "private boolean dateAvailable(List<DateGroup> dateGroups) {\n final int NOT_AVAILABLE = 0;\n return dateGroups.size() > NOT_AVAILABLE;\n }", "boolean hasTradeDate();", "private static void isDateTime(String filters[]) throws WrongQueryFormatException {\n\t\tSimpleDateFormat format = new SimpleDateFormat(DateOperations.dateFormat);\n\t\ttry {\n\t\t\tDate startDate = format.parse(filters[3] + \" \" + filters[4]);\n\t\t\tDate endDate = format.parse(filters[5] + \" \" + filters[6]);\n\t\t\tif (startDate.after(endDate)) {\n\t\t\t\tthrow new WrongQueryFormatException(\"Start date,time should be before the end date/time\");\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tthrow new WrongQueryFormatException(\"Wrong format of date, format is yyyy-MM-dd HH:MM\");\n\t\t}\n\t}", "private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }", "boolean hasDeliveryDateBefore();", "private Bool checkCreditReviewDate(Person person) {\n\t\tBool holdProcessSwitch = Bool.FALSE;\n\t\tQuery<Date> query = createQuery(CmDelinquencyProcessConstant.PER_COL_FROM_PERSON_QUERY.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\tquery.bindEntity(\"person\", person);\n\t\tquery.addResult(\"postponeCreditRevieDate\", \"PERCOL.postponeCreditReviewUntil\");\n\t\tDate postponeCreditRevieDate = query.firstRow();\n\t\t\n\t\t// If credit review date is after process date time\n\t\tif (notNull(postponeCreditRevieDate) && postponeCreditRevieDate.isAfter(getProcessDateTime().getDate())) {\n\t\t\tholdProcessSwitch = Bool.TRUE;\n\t\t\n\t\t\t// Fetch existing delinquency process log for particular char value\n\t\t\tQuery<QueryResultRow> existingLogQuery = createQuery(CmHoldDelinquencyProcessConstants.FETCH_EXISTING_DEL_PROC_LOG.toString(), \"CmHoldDelinquencyProcessCriteriaDueToCreditReviewDtAlgComp_Impl\");\n\t\t\texistingLogQuery.bindId(\"delProcId\", delinquencyProcessId);\n\t\t\texistingLogQuery.bindStringProperty(\"boStatus\", CmDelinquencyProcess.properties.status, delinquencyProcessId.getEntity().getStatus());\n\t\t\texistingLogQuery.bindId(\"msgCategoryNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageCategoryId());\n\t\t\texistingLogQuery.bindBigInteger(\"msgNumber\", MessageRepository.addDelProcLogForCharVal(getPostponeCreditReviewDateHoldReason()).getMessageId().getMessageNumber());\n\t\t\texistingLogQuery.bindEntity(\"charType\", getHoldReasonCharacteristicType());\n\t\t\texistingLogQuery.bindStringProperty(\"charValue\", CmDelinquencyProcessCharacteristic.properties.characteristicValue, getPostponeCreditReviewDateHoldReason());\n\t\t\texistingLogQuery.addResult(\"delProcessId\", \"DPL.id.delinquencyProcess.id\");\n\t\t\texistingLogQuery.addResult(\"sequence\", \"DPL.id.sequence\");\n\t\t\t\n\t\t\t// If no existing log entry found\n\t\t\tif(existingLogQuery.list().isEmpty()){\n\t\t\t\t\n\t\t\t\t// No existing log entry add new log entry \n\t\t\t\tCharacteristicValue_Id charValId = new CharacteristicValue_Id(getHoldReasonCharacteristicType(), getPostponeCreditReviewDateHoldReason());\n\t\t\t\tMaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog> logHelper = new MaintenanceObjectLogHelper<CmDelinquencyProcess, CmDelinquencyProcessLog>(\n\t\t\t\t\t\tdelinquencyProcessId.getEntity().getBusinessObject().getMaintenanceObject(), delinquencyProcessId.getEntity());\n\t\t\t\tlogHelper.addLogEntry(LogEntryTypeLookup.constants.SYSTEM, MessageRepository.addDelProcLogForCharVal(charValId.getEntity().fetchLanguageDescription()), null, charValId.getEntity());\n\t\t\t} \n\t\t\t\n\t\t}\n\t\t\n\t\treturn holdProcessSwitch;\n\t}", "boolean isSetAppliesDateTime();", "boolean hasToDay();", "public void compareStartEndDate() {\n String[] startDateArray = startDate.split(dateOperator);\n String[] endDateArray = endDate.split(dateOperator);\n \n // Compares year first, then month, and then day.\n if (Integer.parseInt(startDateArray[2]) > Integer.parseInt(endDateArray[2])) {\n endDate = endDateArray[0] +\"/\"+ endDateArray[1] +\"/\"+ startDateArray[2];\n } else if (Integer.parseInt(startDateArray[2]) == Integer.parseInt(endDateArray[2])) {\n if (Integer.parseInt(startDateArray[1]) > Integer.parseInt(endDateArray[1])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n } else if (Integer.parseInt(startDateArray[1]) == Integer.parseInt(endDateArray[1]) && \n Integer.parseInt(startDateArray[0]) > Integer.parseInt(endDateArray[0])) {\n endDate = endDateArray[0] +\"/\"+endDateArray[1] +\"/\"+(Integer.parseInt(startDateArray[2])+1);\n }\n }\n }", "public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }", "protected ArrayList<Attraction> TryParseDate(String i, ArrayList<Attraction> toRunOn) throws Exception {\n String[] dates = i.split(\"-\");\n ArrayList<Attraction> toReturn = new ArrayList<>();\n SimpleDateFormat Simp = new SimpleDateFormat(\"dd/mm/yy\", Locale.US);\n SimpleDateFormat simpe2 = new SimpleDateFormat(\"dd/mm/yyyy\", Locale.US);\n\n try {\n if (dates.length == 2 && !dates[0].equals(\"\") && !dates[1].equals(\"\")) {\n java.util.Date first = Simp.parse(dates[0]);\n java.util.Date second = Simp.parse(dates[1]);\n for (Attraction item : toRunOn) {\n java.util.Date s = simpe2.parse(item.getStartDate());\n java.util.Date e = simpe2.parse(item.getEndDate());\n if ((first.before(s) || first.compareTo(s) == 0) && (e.before(second) || e.compareTo(second) == 0))\n toReturn.add(item);\n }\n } else {\n if (dates[0].equals(\"\")) {\n java.util.Date second = Simp.parse(dates[1]);\n for (Attraction item : toRunOn) {\n java.util.Date e = simpe2.parse(item.getEndDate());\n if ((e.before(second) || e.compareTo(second) == 0))\n toReturn.add(item);\n }\n } else {\n try {\n java.util.Date first = Simp.parse(dates[0]);\n for (Attraction item : toRunOn) {\n java.util.Date s = simpe2.parse(item.getStartDate());\n if ((first.before(s) || first.compareTo(s) == 0))\n toReturn.add(item);\n }\n } catch (Exception e) {\n return new ArrayList<>();\n }\n }\n }\n }catch (Exception e){\n\n }\n return toReturn;\n }", "@Test\n public void testGetOrdersByDate() {\n\n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderListByDate = service.getOrdersByDate(ld);\n List<Order> filteredList = new ArrayList<>();\n\n for (Order currentOrder : orderListByDate) {\n if (currentOrder.getOrderDate().contains(\"06232017\")) {\n filteredList.add(currentOrder);\n }\n }\n\n assertEquals(2, filteredList.size());\n }", "@Test\n public void testDateRangeNoDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertNull(\"should not contain a time \" + fields.get(\"generatedTimestamp\"), fields.get(\"generatedTimestamp\"));\n }", "boolean hasAcquireDate();", "public static boolean isValidOnDate(ICS ics, AssetId id, Date date) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Checking to see if asset \" + id + \" is valid on \" + (date == null ? \"the site preview date, (assuming site preview is enabled).\" : date));\n }\n ics.ClearErrno();\n \n final String inListName = \"FilterAssetByDateInputList-\" + ics.genID(false);\n IList inlist = new AssetIdIList(inListName, Collections.singletonList(id));\n ics.RegisterList(inListName, inlist);\n\n final String outListName = \"FilterAssetsByDateOutputList-\" + ics.genID(false);\n \n com.openmarket.xcelerate.jsp.asset.FilterAssetsByDate tag = new com.openmarket.xcelerate.jsp.asset.FilterAssetsByDate();\n tag.setInputList(inListName);\n tag.setOutputList(outListName);\n if (date != null) {\n tag.setDate(jdbcDateFormat.format(date));\n }\n tag.doEndTag(ics, true);\n if (ics.GetErrno() < 0) {\n LOG.warn(\"Errno set by <asset:filterassetsbydate> JSP tag while attempting to filter asset \"+id+\" by date: \"+date+ \"(null date is ok). Errno: \"+ics.GetErrno());\n // note the above tag behaves erratically and errno is unreliable\n// throw new CSRuntimeException(\"Unexpected exception filtering assets by date. Input Asset: \" + id + \", date: \" + null + \" (null is ok)\", errno);\n }\n \n IList out = ics.GetList(outListName);\n ics.RegisterList(outListName, null); // tidy up!\n \n if (out == null) throw new IllegalStateException(\"Tag executed successfully but no outlist was returned\");\n if (!out.hasData()) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Asset \" + id + \" is not valid on the effective date.\");\n }\n return false; // no matches\n }\n String c = IListUtils.getStringValue(out, \"assettype\");\n if (!id.getType().equals(c)) {\n throw new IllegalStateException(\"Output asset is not the right type: in:\" + id + \", out:\" + c);\n }\n String cid = IListUtils.getStringValue(out, \"assetid\");\n \n boolean result = Utilities.goodString(cid) && id.getId() == Long.parseLong(cid);\n \n if (LOG.isTraceEnabled()) {\n LOG.trace(\"Asset \" + id + \" is \" + (result ? \"\" : \"not \") + \"valid on the effective date.\");\n }\n return result;\n }", "public static void main(String[] args) {\n byte month=0;\n boolean days28 = month ==2;\n boolean days30 = month==4||month==6||month==9||month==11;\n boolean days31 = days28==false&&days30==false;\n if (days28){\n System.out.println(\"it has 28 days\");\n }\n if (days30){\n System.out.println(\"it has 30 days\");\n }\n if (days31){\n System.out.println(\"it has 31 days\");\n }\n\n }", "public static boolean isRevdate(java.sql.Date date1,int CUST_ID,int MOVIE_ID) {\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n java.util.Date date11 = null;\n try {\n date11 = formatter1.parse(\"1970-06-06\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long r_date = date1.getTime();\n irate_Connection om = new irate_Connection();\n om.startConnection(\"user1\", \"password\", dbName);\n conn = om.getConnection();\n s = om.getStatement();\n irate_DQL dql = new irate_DQL(conn, s);\n java.sql.Date date2 = dql.atten(CUST_ID, MOVIE_ID);\n if(date2 == date11)\n return false;\n long a_date = date2.getTime();\n long diffinmill = r_date - a_date;\n long diff = TimeUnit.DAYS.convert(diffinmill,TimeUnit.MILLISECONDS);\n if(diff > 7 || diff <= 0)\n return false;\n else\n return true;\n }", "public Boolean pre_Date (final Integer d, final Integer m, final Integer y) throws CGException {\n\n Boolean varRes_4 = null;\n Boolean var1_5 = null;\n {\n if ((var1_5 = new Boolean((d.intValue()) <= (new Integer(31).intValue()))).booleanValue()) \n var1_5 = new Boolean((m.intValue()) <= (new Integer(12).intValue()));\n }\n {\n if ((varRes_4 = var1_5).booleanValue()) {\n\n Boolean var2_12 = null;\n Boolean cond_14 = null;\n HashSet var2_16 = new HashSet();\n var2_16 = new HashSet();\n var2_16.add(new Integer(4));\n var2_16.add(new Integer(9));\n var2_16.add(new Integer(6));\n var2_16.add(new Integer(11));\n cond_14 = new Boolean(var2_16.contains(m));\n if (cond_14.booleanValue()) \n var2_12 = new Boolean((d.intValue()) <= (new Integer(30).intValue()));\n else \n if (new Boolean(m.intValue() == new Integer(2).intValue()).booleanValue()) \n var2_12 = new Boolean((d.intValue()) <= (new Integer(29).intValue()));\n else \n var2_12 = new Boolean(true);\n varRes_4 = var2_12;\n }\n }\n return varRes_4;\n }", "boolean hasBeginDate();", "public boolean isValidDate() {\n Calendar cal = Calendar.getInstance();\n cal.setTimeInMillis(mDate.getDate());\n int yearNow = cal.get(Calendar.YEAR);\n int monthNow = cal.get(Calendar.MONTH);\n int dayNow = cal.get(Calendar.DAY_OF_MONTH);\n cal.setTimeInMillis(selectedDate.getTimeInMillis());\n int yearSelected = cal.get(Calendar.YEAR);\n int monthSelected = cal.get(Calendar.MONTH);\n int daySelected = cal.get(Calendar.DAY_OF_MONTH);\n if (yearSelected <= yearNow) {\n if (monthSelected <= monthNow) {\n return daySelected >= dayNow;\n }\n }\n return true;\n }", "@Override\n public int compareTo(Date ARG) {\n if (year < ARG.year)\n {\n \treturn -1;\n }\n else if( year > ARG.year)\n {\n \treturn 1;\n }\n \n else{\n \tif (dayOfMonth < ARG.dayOfMonth)\n \t{\n \t\treturn -1; \n \t\t\n \t}\n \telse if (dayOfMonth > ARG.dayOfMonth)\n \t{\n \t\treturn 1; \n \t}\n \telse\n \t{\n \t\tif (dayOfMonth < ARG.dayOfMonth)\n \t\t{\n \t\t\treturn -1;\n \t\t}\n \t\telse if(dayOfMonth > ARG.dayOfMonth)\n \t\t{\n \t\t\treturn 1;\n \t\t}\n \t\telse\n \t\t{\n \t\t\treturn 0; \n \t\t}\n \t}\n \t\n } \t\n }", "public boolean checkReservationDateFromToday(String resMonth, String resDay, String resYear){\n int daysDiff,monthDiff,yearDiff; //date difference\n int monthToday,dayToday,yearToday; //date today\n int monthReserved,dayReserved,yearReserved; //date of reservation\n \n //date of reservation\n String sMonth,sDay,sYear;\n sMonth = resMonth;\n sDay = resDay;\n sYear = resYear;\n \n getCurrentDate(); //call to get current date\n \n boolean dateValid = false;\n sMonth = convertMonthToDigit(sMonth); //convert string month to string number\n \n monthToday = parseInt(month);\n dayToday = parseInt(day);\n yearToday = parseInt(year);\n \n //convert to integer\n monthReserved = parseInt(sMonth);\n dayReserved = parseInt(sDay);\n yearReserved = parseInt(sYear);\n \n //get the difference\n monthDiff = monthReserved - monthToday;\n daysDiff = dayReserved - dayToday;\n yearDiff = yearReserved - yearToday;\n \n System.out.println(\"startMonth: \"+ sMonth);\n System.out.println(\"yearDiff: \" + yearDiff);\n System.out.println(\"daysDiff: \" + daysDiff);\n System.out.println(\"monthDiff: \" + monthDiff);\n \n if(yearDiff > 0){ //next year\n return true;\n }\n \n if(yearDiff == 0){ //this year\n if(monthDiff >= 0){\n if(monthDiff == 0 && daysDiff == 0){ //cannot reserve room on the day\n //invalid day, the date is today\n dateValid = false;\n System.out.println(\"reservation day must not today.\");\n }else if(monthDiff==0 && daysDiff < 0){ // same month today, invalid day diff\n dateValid = false; \n System.out.println(\"reservation day must not in the past\");\n }else if(monthDiff>0 && daysDiff < 0){ //not the same month today, accept negative day diff\n dateValid = true;\n }else{ //the same month and valid future day\n dateValid = true;\n }\n }else{\n //invalid month\n System.out.println(\"reservation month must not in the past.\");\n }\n }else{\n //invalid year\n System.out.println(\"reservation year must not in the past.\");\n }\n \n return dateValid;\n }", "public Date checkDate() {\n // Create new sdf with format is dd/MM/yyyy\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\n sdf.setLenient(false); // Check special day\n Date date = null; // Create date\n boolean isOK = true; // Condition loop\n\n while (isOK) {\n try {\n String dateStr = checkEmpty(\"DOB\"); // Call method to check input of dob\n date = sdf.parse(dateStr); // Convert string to date\n return date;\n\n } catch (ParseException e) {\n // Print error if date is invalid\n System.out.println(\"Date is invalid !\");\n System.out.print(\"Enter again (dd/MM/yyyy): \");\n }\n }\n return date; // Return date\n }", "private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }", "public boolean dateCompareCurr(String[] inputdate){\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tDate comparedate = null; // 입력받은 날짜\r\n\t\t\r\n\t\ttry {\r\n\t\t\tDate curdate = dateFormat.parse(dateFormat.format(new Date())); // 현재날짜\r\n\t\t\t\r\n\t\t\tfor (int idx = 0; idx < inputdate.length; idx++) {\r\n\t\t\t\t\r\n\t\t\t\tcomparedate = dateFormat.parse(inputdate[idx]);\r\n\t\t\t\t\r\n\t\t\t\tif(comparedate.compareTo(curdate) >= 0){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean checkDate() {\n\t\tboolean cd = checkDate(this.year, this.month, this.day, this.hour);\n\t\treturn cd;\n\t}", "public boolean verifyInputCorrectFormatDate(String dateValue, boolean isNewToDoPage) {\n boolean result = true;\n try {\n // If isNewToDoPage = true :verify in add new to-do page | isNewToDoPage = false, verify in to-do list page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n clickElement(eleIdDueDate, \"Due date text box\");\n sendKeyTextBox(eleIdDueDate, dateValue, \"Due date text box\");\n result = validateAttributeElement(eleIdDueDate, \"value\", \"\");\n } else {\n waitForClickableOfElement(eleToDoNewRowDueDateText.get(0), \"Select due date text box\");\n clickElement(eleToDoNewRowDueDateText.get(0), \"Select due date text box\");\n sendKeyTextBox(eleToDoNewRowDueDateText.get(0), dateValue, \"Select due date text box\");\n result = validateAttributeElement(eleToDoNewRowDueDateText.get(0), \"value\", \"\");\n\n }\n //If result = false : before and after value as not same --> can not input correct data into due date control\n if (!result) {\n NXGReports.addStep(\"TestScript Failed: Input correct date format in due date text box \", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n NXGReports.addStep(\"Input correct date format in due date text box \", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Input correct date format in due date text box \", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n return result;\n }", "public static void main(String[] args) \r\n {\n\t Date date = new Date();\r\n\t System.out.println(date);\r\n\t \r\n\t //comparision of dates\r\n\t /*\r\n\t Return\r\n 1. It returns the value 0 if the argument Date is equal to this Date. \r\n 2. It returns a value less than 0 if this Date is before the Date argument.\r\n 3. It returns a value greater than 0 if this Date is after the Date argument.\r\n\t */\r\n\t Date d=new Date(2021,05,31);\r\n\t System.out.println(d.equals(date));\r\n Date d1=new Date(2021,5,26); \r\n int comparison=d.compareTo(d1); \r\n System.out.println();\r\n System.out.println(\"Your comparison value is : \"+comparison); \r\n }", "private boolean checkStartDateBeforeEndDate(String startDate, String endDate) {\n SimpleDateFormat date = new SimpleDateFormat(\"ddMMyy\");\n Date startingDate = null;\n try {\n startingDate = date.parse(startDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Date endingDate = null;\n try {\n endingDate = date.parse(endDate);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (startingDate.before(endingDate)) {\n return true;\n } else {\n return false;\n }\n }", "private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}", "public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}", "@Override\n public boolean isValid() {\n return dateFrom != null && dateTo != null;\n }", "public static boolean isEndordate(int cust_id,int movie_id,java.sql.Date date1) {\n SimpleDateFormat formatter1 = new SimpleDateFormat(\"yyyy-MM-dd\");\n java.util.Date date11 = null;\n try {\n date11 = formatter1.parse(\"1970-06-06\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n long r_date = date1.getTime();\n irate_Connection om = new irate_Connection();\n om.startConnection(\"user1\", \"password\", dbName);\n conn = om.getConnection();\n s = om.getStatement();\n irate_DQL dql = new irate_DQL(conn, s);\n java.sql.Date date2 = dql.atten(cust_id, movie_id);\n if(date2 == date11)\n return false;\n long a_date = date2.getTime();\n long diffinmill = r_date - a_date;\n long diff = TimeUnit.DAYS.convert(diffinmill,TimeUnit.MILLISECONDS);\n if(diff >= 1)\n return true;\n else\n return false;\n\n }", "public static boolean checkDateConstraints(Task task) {\n if (task.getBeginDate().before(new Date()) ||\n task.getBeginDate().after(task.getEndingDate()) ||\n task.getBeginDate().equals(task.getEndingDate())) {\n return false;\n }\n return true;\n }", "public static boolean validateFtzDate(LinkedHashMap<String, String> map,\n\t\t\t\t\t\t\t\t\t\t ArrayList<LinkedHashMap<String, String>> caseType) throws Exception\n\t{\n\t\t\n\t\tformat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tformat2 = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\ttodayDate = new Date();\n\t\tcalendar.setTime(todayDate);\n\t\ttodayDateStr = format2.format(todayDate);\n\t\tString htmlCalDate = \"dateInput\";\n\t\t\n\t\tArrayList<LinkedHashMap<String, String>> reqArrayList =\n\t\t\t\tnew ArrayList<LinkedHashMap<String, String>>();\n\t\tLinkedHashMap<String, String> req = new LinkedHashMap<String, String>();\n\t\tboolean status = true;\n\t\t\n\t\tString formula = map.get(\"Formula\");\n\t\tString requirements = map.get(\"Requirement\");\n\t\tString refDateLabel = map.get(\"Reference_Date_Label\").trim();\n\t\tString calcDateLabel = map.get(\"Calculated_Date_Label\").trim();\n\t\t\n\t\tString [] reqsList = formula.split(\"#\");\n\t\tfor(int i=0; i<reqsList.length;i++)\n\t\t{\n\t\t\treq.put(\"type\", reqsList[i].trim().substring(1, reqsList[i].trim().\n\t\t\t\t\tindexOf(\"]\")).trim().replace(\" \", \"\"));\n\t\t\treq.put(\"days\", reqsList[i].trim().substring(reqsList[i].trim().\n\t\t\t\t\tindexOf(\"+\")+1, reqsList[i].trim().length()).replace(\" \", \"\"));\n\t\t\treqArrayList.add(new LinkedHashMap<String, String>(req));\n\t\t\treq.clear();\n\t\t}\n\t\tif (calcDateLabel.equalsIgnoreCase(\"Preliminary Examiner's Report/Memo Response Due\"))\n\t\t{\n\t\t\thtmlCalDate = \"dateInputExaminer\";\n\t\t}\n\n\t\t////////////////////////////////////////\n\t\tboolean pass = true;\n\t\tString expectedDateValue = \"\", actualDateValue=\"\";\n\t\tString caseTypeGroup, typeOfCase, typeOfCaseNumber;\n\t\tfor (LinkedHashMap<String, String> oneType: caseType)\n\t\t{\n\t\t\tboolean found=false;\n\t\t\texpectedDateValue = \"\";\n\t\t\tactualDateValue = \"\";\n\t\t\tcaseTypeGroup = oneType.get(\"Case_Type_Group\");\n\t\t\ttypeOfCase = oneType.get(\"Type_Of_Case\");\n\t\t\ttypeOfCaseNumber = oneType.get(\"Number\");\n\t\t\tif (caseTypeGroup.equalsIgnoreCase(\"Staff Cases\"))\n\t\t\tclickElementJs(replaceGui(guiMap.get(\"caseTypeGroup\"), \"S\"));\t\n\t\t\telse \n\t\t\tclickElementJs(replaceGui(guiMap.get(\"caseTypeGroup\"), \"B\"));\t\t\t\n\t\t\tselectElementByText(guiMap.get(\"selectCaseType\"), typeOfCase);\n\t\t\t\n\t\t\tfor(LinkedHashMap <String, String> row:reqArrayList)\n\t\t\t{\n\t\t\t\tList<String> list = Arrays.asList(row.get(\"type\").trim().split(\",\"));\n\t\t\t\tif (list.contains(typeOfCaseNumber) || list.contains(\" \"+typeOfCaseNumber))\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, Integer.parseInt(row.get(\"days\").trim()));\n\t\t\t\t\texpectedDateValue = format.format(calendar.getTime());\n\t\t\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1*Integer.parseInt(row.get(\"days\").trim()));\n\t\t\t\t\tbreak;\n\t\t\t\t} \n\t\t\t}\n\t\t\tint currentWait = setBrowserTimeOut(3);\n\t\t\tif(!checkElementExists(replaceGui(guiMap.get(htmlCalDate),calcDateLabel))\n\t\t\t\t\t|| !checkElementExists(replaceGui(guiMap.get(\"dateInput\"),refDateLabel))) \n\t\t\t{\n\t\t\t\tif (found)\n\t\t\t\t{\n\t\t\t\t\tpass = false;\n\t\t\t\t\tupdateHtmlReportOverall(\"Case Type = (\"+ typeOfCaseNumber +\") \"+typeOfCase, \"For this case type, both\"\n\t\t\t\t\t\t\t+ \" dates \" +refDateLabel+ \" AND \"+calcDateLabel+\" should be visible on GUI\", \"not as expected\",\n\t\t\t\t\t\t\t\"VP\", \"fail\", calcDateLabel + \"_\" + typeOfCaseNumber);\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tpass = pass & compareAndReport(calcDateLabel, actualDateValue, expectedDateValue, typeOfCase, \n\t\t\t\t\t\t\trefDateLabel, todayDateStr,typeOfCaseNumber, requirements);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//f e, nf e\n\t\t\telse if(checkElementExists(replaceGui(guiMap.get(htmlCalDate),calcDateLabel))\n\t\t\t\t\t\t\t&& checkElementExists(replaceGui(guiMap.get(\"dateInput\"),refDateLabel)))\n\t\t\t{ \n\t\t\t\tenterText(replaceGui(guiMap.get(\"dateInput\"), refDateLabel),todayDateStr);\n\t\t\t\thighlightElement(replaceGui(guiMap.get(\"dateInput\"), refDateLabel), \"blue\");\n\t\t\t\tscrollToElement(replaceGui(guiMap.get(htmlCalDate), calcDateLabel));\n\t\t\t\thighlightElement(replaceGui(guiMap.get(htmlCalDate), calcDateLabel), \"blue\");\n\t\t\t\tactualDateValue = getElementAttribute(replaceGui(guiMap.get(htmlCalDate),\n\t\t\t\t\t\tcalcDateLabel), \"value\");\n\t\t\t\tpass = pass & compareAndReport(calcDateLabel, actualDateValue, expectedDateValue, typeOfCase, \n\t\t\t\t\t\trefDateLabel, todayDateStr,typeOfCaseNumber, requirements);\n\t\t\t}\t\t\t\n\t\t\tsetBrowserTimeOut(currentWait);\n\t\t}//for\n\t\treturn pass;\n\t}", "public void test_no_adjustment_basic() {\n // ## Arrange ##\n String expected = \"2008-12-14 12:34:56\";\n FromToOption option = createOption();\n\n // ## Act ##\n Date fromDate = option.filterFromDate(DfTypeUtil.toDate(expected));\n Date toDate = option.filterToDate(DfTypeUtil.toDate(expected));\n\n // ## Assert ##\n assertEquals(ConditionKey.CK_GREATER_EQUAL, option.getFromDateConditionKey());\n assertEquals(ConditionKey.CK_LESS_EQUAL, option.getToDateConditionKey());\n assertEquals(expected, DfTypeUtil.toString(fromDate, \"yyyy-MM-dd HH:mm:ss\"));\n assertEquals(expected, DfTypeUtil.toString(toDate, \"yyyy-MM-dd HH:mm:ss\"));\n }", "public void processDate(boolean periodStart) {\n Calendar cal = Calendar.getInstance();\n if (year == null) {\n year = cal.get(Calendar.YEAR);\n }\n if (week != null) {\n cal.set(Calendar.WEEK_OF_YEAR, week);\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, (periodStart) ? Calendar.MONDAY : Calendar.SUNDAY);\n week = null;\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (season != null) {\n if (\"Spring\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 2 : 4);\n } else if (\"Summer\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 5 : 7);\n } else if (\"Autumn\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 8 : 10);\n } else if (\"Winter\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 11 : 1);\n }\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n season = null;\n }\n if (month != null) {\n cal.set(Calendar.MONTH, TimeConstants.getMonthIndex(month));\n }\n if (day != null && day == 99) {\n cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (day == null) {\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n }", "public boolean checkSearchForServiceRequestsForContractsTable(String sMethod) throws ParseException\n\t{\n\t\t// Checking if the table is present or not and validating if it is already openened \n\t\tif(utils.isProxyWebelement(this.tableMbrCompositesearchforServiceRequestContracts))\n\t\t{\n\t\t\tutils.clickAnelemnt(this.lnkMbrCompositeIntSearchForServiceRequest,\"Member Composite \",\" Search for Service Request for Contract\");\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Open Service Request link is already clicked\\n\\n\");\n\t\t}\n\t\t//Checking if dates are equal \n\n\t\t// array list top storwe all the values and the dates in the Table \n\t\tArrayList<String> Dates = new ArrayList<String>();\n\t\t// wil save the values in an array list \n\t\tDates=utils.getcolumnStringFromTableByName(this.tableMbrCompositesearchforServiceRequestContracts, \"Open Date\");\n\t\tint i=2;\n\t\tSystem.out.println(Dates.size());\n\t\tif(Dates.size()>7)\n\t\t{\n\t\t\tSystem.out.println(\"There are more than 5 rows in Open Service request Table.\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// Iterating the dates from the stored values \n\t\tfor(String iterator:Dates)\t\n\t\t{\n\n\t\t\tDateFormat formatter ; \n\t\t\tDate date1,date2;\n\t\t\tDate date3 = null;\n\t\t\tString date_1=Dates.get(i);\n\t\t\tif(i+1==Dates.size())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tString date_2=Dates.get(i+1);\n\t\t\tformatter = new SimpleDateFormat(\"MMMM dd,yyyy\");\n\n\t\t\tdate1=formatter.parse(date_1);\n\t\t\tdate2=formatter.parse(date_2);\n\t\t\tif(date1.equals(date2))\n\t\t\t{\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(sMethod==\"Last 7 Days\"||sMethod==\"Last 30 Days\"||sMethod==\"Last 90 Days\")\n\t\t\t\tif(date1.after(date2))\n\t\t\t\t{\n\t\t\t\t\ti++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"THE DATES ARE NOT IN DESCENDING ORDER\");\n\t\t\treturn false;\n\t\t}\n\n\t\tblogger.logMessage(\"Member Composite \", \" Open service request validation \");\n\t\treturn true;\n\t}", "public boolean runsOn( GTFSDate date ) {\n\t\tif( date.before( this.start_date) ) {\n\t\t\tthrow new DateOutOfBoundsException( date+\" is before period start \"+this.start_date );\n\t\t}\n\t\tif( date.after( this.end_date) ) {\n\t\t\tthrow new DateOutOfBoundsException( date+\" is after period end \"+this.end_date );\n\t\t}\n\t\t\n\t\t//Return false if service is canceled on this day; true of it specifically runs\n\t\tServiceCalendarDate exception = this.getServiceCalendarDate(date);\n\t\tif(exception != null) {\n\t\t\tif( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.ADDED ) {\n\t\t\t\treturn true;\n\t\t\t} else if( exception.exception_type.intValue() == ServiceCalendarDateExceptionType.REMOVED ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Return true if it runs on today's DOW\n\t\tGregorianCalendar cal = new GregorianCalendar(date.year,date.month-1,date.day);\n\t\tint dow = cal.get(GregorianCalendar.DAY_OF_WEEK);\n\t\tif((dow==GregorianCalendar.MONDAY && this.monday.val ) ||\n\t\t (dow==GregorianCalendar.TUESDAY && this.tuesday.val ) ||\n\t\t (dow==GregorianCalendar.WEDNESDAY && this.wednesday.val) ||\n\t\t (dow==GregorianCalendar.THURSDAY && this.thursday.val ) ||\n\t\t (dow==GregorianCalendar.FRIDAY && this.friday.val ) ||\n\t\t (dow==GregorianCalendar.SATURDAY && this.saturday.val ) ||\n\t\t (dow==GregorianCalendar.SUNDAY && this.sunday.val )) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean hasSetToAndFromDates() {\r\n return (this.fromDateString != null) && (this.toDateString != null);\r\n }", "boolean hasDateTime();", "public void testCreateCreationDateFilter2() {\r\n try {\r\n instance.createCreationDateFilter(new Date(20000), new Date(10000));\r\n fail(\"IllegalArgumentException expected.\");\r\n } catch (IllegalArgumentException iae) {\r\n //good\r\n }\r\n }", "private void checkDate(String strDate, LocalDate localDate) {\n if (Integer.parseInt(strDate.substring(0, 4)) != localDate.getYear()\n || Integer.parseInt(strDate.substring(5, 7)) != localDate.getMonthValue()\n || Integer.parseInt(strDate.substring(8,10)) != localDate.getDayOfMonth()) {\n throw new IllegalArgumentException(\"Illegal date: date dose not exist.\");\n }\n }", "private static boolean isDeliveryDate(String string) {\n\t\tString[] tmp = string.split(\"/\");\n\t\tint[] date = new int[tmp.length];\n\t\t\n\t\tif(date.length != 3) {\n\t\t\treturn false;\n\t\t}\n\t\tfor(int i = 0; i < date.length; i++) {\n\t\t\tdate[i] = Integer.parseInt(tmp[i]);\n\t\t}\n\t\t\n\t\tCalendar cal = new GregorianCalendar(date[2], date[0]-1, date[1]);\n\t\t\n\t\t//check valid date\n\t\tboolean is_valid_date = true;\n\t\tif(cal.get(Calendar.YEAR) != date[2]) is_valid_date = false;\n\t\tif(cal.get(Calendar.MONTH)+1 != date[0]) is_valid_date = false;\n\t\tif(cal.get(Calendar.DAY_OF_MONTH) != date[1]) is_valid_date = false;\n\t\treturn is_valid_date;\n\t\t\n\t\t/****** THIS IS USED FOR SETTING A LIMIT ON HOW EARLY OR LATE A INVOICE CAN BE ENTERED\n\t\t\n\t\tCalendar today = new GregorianCalendar();\n\t\tCalendar limit_date;\n\t\tif(today.MONTH < 8) \n\t\tlimit_date = new GregorianCalendar( today.get(Calendar.YEAR), \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.MONTH)+4, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.DAY_OF_MONTH) ); // limit date is 4 months ahead of current time. \n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tlimit_date = new GregorianCalendar(\ttoday.get(Calendar.YEAR)+1, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.MONTH)+4%11, \n\t\t\t\t\t\t\t\t\t\t\ttoday.get(Calendar.DAY_OF_MONTH) );\n\t\t\t\n\n\t\tif(delivery_date.compareTo(today) <= 0) \n\t\treturn false;\n\t\telse if(delivery_date.compareTo(limit_date) >= 0)\n\t\treturn false;\n\t\telse*/\n\t\t\n\t}", "boolean IFbefore(Date day1, int ID1, Date day2, int ID2){\n if (day1.compareTo(day2) < 0) return true;\n if (day1.compareTo(day2) > 0) return false;\n if (ID1 < ID2) return true;\n return false;\n }", "private boolean isEqualDate(DateStruct d1, DateStruct d2)\n {\n boolean isEqual = false;\n if ( d1.year == d2.year && d1.month == d2.month && d1.day == d2.day )\n {\n isEqual = true;\n }\n return isEqual;\n }", "public void validateStartDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long startDate = value.dateValue().getTime();\n\n if (startDate < sysdate)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"StartDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_DATE_PAST\"); // Message name\n } \n }\n \n }", "@Override\n\tpublic RptParams getCustomCondition() {\n\t\tRptParams params = new RptParams();\n\n\t\tDate sd = (Date) this.pkStartDate.getValue();\n\t\tDate ed = (Date) this.pkEndDate.getValue();\n\n\t\tparams.setObject(\"startDate\", sd);\n\t\tparams.setObject(\"endDate\", ed);\n\n\t\treturn params;\n\t}", "private boolean acceptDayG(DayG day) {\r\n if(day.getYear() != endDate.get(Calendar.YEAR))\r\n return false;\r\n \r\n int dayOfYear = day.getCalendar().get(Calendar.DAY_OF_YEAR);\r\n if(dayOfYear == acceptedDatesRange[0] || dayOfYear == \r\n acceptedDatesRange[1] || (dayOfYear < acceptedDatesRange[1] &&\r\n dayOfYear > acceptedDatesRange[0])) {\r\n \r\n //MiscStuff.writeToLog(\"\" + dayOfYear + \" \" + acceptedDatesRange[0] +\r\n // \" \" + acceptedDatesRange[1]); //print year.....................................................................................\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean validateDate(Date Date) {\n if (Date.after(startSemester) && Date.before(endSemester))\n if (Date.after(endHoliday) || Date.before(beginHoliday))\n return true;\n return false;\n\n }", "private void givenExchangeRatesExistsForEightMonths() {\n }", "@Override\n\tpublic boolean create(Dates obj) {\n\t\treturn false;\n\t}", "@Override\n public boolean isValidExpression(String expr) {\n final Pattern pattern1 = Pattern.compile(DATE_REGEX_FULL);\n final Pattern pattern2 = Pattern.compile(DATE_REGEX_FULL_2);\n final Matcher matcher1 = pattern1.matcher(expr);\n final Matcher matcher2 = pattern2.matcher(expr);\n return matcher1.matches() ^ matcher2.matches();\n }", "@Test\n public void testDateRangeInvalidDate() throws Exception {\n Map<String, String> fields = new HashMap<String, String>();\n fields.put(\"generatedTimestamp\", \"foo\");\n \n this.addSingleDayDateRange.invoke(this.lockService, fields);\n \n Assert.assertEquals(\"should not have changed time field \" + fields.get(\"generatedTimestamp\"),\n \"foo\", fields.get(\"generatedTimestamp\"));\n }", "@Override\n public void prepareTransient() {\n fixDates();\n untilWhenDate = assignDateField(untilWhen);\n }", "public boolean verifyDataOfDatePicker(boolean isNewToDoPage) {\n try {\n Calendar cal = Calendar.getInstance();\n int currentDay = cal.get(Calendar.DAY_OF_MONTH);\n int currentMonth = cal.get(Calendar.MONTH);\n int currentYear = cal.get(Calendar.YEAR);\n int focusDay = 0;\n int focusMonth = 0;\n int focusYear = 0;\n // If isNewToDoPage = true, verify in add new to-do page\n if (isNewToDoPage) {\n waitForClickableOfElement(eleIdDueDate, \"Due date text box\");\n clickElement(eleIdDueDate, \"click to eleIdDueDate\");\n waitForClickableOfElement(eleXpathChooseDate, \"Date picker\");\n waitForVisibleElement(eleDataPickerToDate, \"Date picker to date\");\n waitForVisibleElement(eleDataPickerToDay, \"Date picker to day\");\n\n focusDay = Integer.parseInt(eleDataPickerToDay.getAttribute(\"text\").trim());\n focusMonth = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-month\").trim());\n focusYear = Integer.parseInt(eleDataPickerToDate.getAttribute(\"data-year\").trim());\n getLogger().info(\"Day : \" + eleDataPickerToDay.getAttribute(\"text\") + \"Month :\" + eleDataPickerToDate\n .getAttribute(\"data-month\") + \" Year :\" + eleDataPickerToDate.getAttribute(\"data-year\"));\n\n }\n // Compare focus day, month, year with current day, month, year\n if (focusDay != currentDay || focusMonth != currentMonth || focusYear != currentYear) {\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n return false;\n }\n NXGReports.addStep(\"Verify data in date picker\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify data in date pickerd\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n return true;\n }", "private boolean exceededDateListLimit() {\n final int MAX_DATE_PARSE = 2;\n return dateList.size() > MAX_DATE_PARSE;\n }", "private boolean CheckDateSelection() {\n\t\tif (Date_DatePicker.getValue() == null) {\n\t\t\tif (!Date_DatePicker.getStyleClass().contains(\"error\"))\n\t\t\t\tDate_DatePicker.getStyleClass().add(\"error\");\n\t\t\tDateNote.setText(\"* Select date\");\n\t\t\treturn false;\n\t\t}\n\t\tDate_DatePicker.getStyleClass().remove(\"error\");\n\t\tDateNote.setText(\"*\");\n\t\treturn true;\n\t}", "private static boolean isDate(final Object obj) {\n return dateClass != null && dateClass.isAssignableFrom(obj.getClass());\n }", "boolean hasSettlementDate();" ]
[ "0.6649518", "0.6519971", "0.6331176", "0.62747604", "0.6203099", "0.6196772", "0.6172704", "0.61385167", "0.611988", "0.61196566", "0.6096047", "0.6082339", "0.60802305", "0.60414314", "0.6038433", "0.6036333", "0.6021552", "0.6020461", "0.60038483", "0.59946954", "0.5981261", "0.59608364", "0.5952818", "0.5936747", "0.5897475", "0.5881258", "0.5851513", "0.5849332", "0.5848927", "0.5844625", "0.58401394", "0.5836059", "0.5824715", "0.58100724", "0.58058333", "0.5778724", "0.57768726", "0.57457316", "0.57435656", "0.5743248", "0.5725091", "0.5720902", "0.5719985", "0.5708525", "0.5704522", "0.5696678", "0.5682596", "0.567631", "0.5673188", "0.56631696", "0.5646983", "0.5644606", "0.56330407", "0.5631207", "0.5628434", "0.56175387", "0.56153065", "0.56071895", "0.55962175", "0.5582958", "0.55820215", "0.5581244", "0.5578624", "0.55781263", "0.556211", "0.5561144", "0.55472", "0.55444527", "0.5540265", "0.5536083", "0.5532097", "0.5523477", "0.5515715", "0.55091923", "0.5505826", "0.5504532", "0.54982644", "0.5497863", "0.54776096", "0.5471558", "0.54579246", "0.5451115", "0.5449991", "0.5446798", "0.5430733", "0.5430363", "0.5430184", "0.54293257", "0.5421053", "0.5417485", "0.5406943", "0.5402841", "0.54012793", "0.53992724", "0.5399128", "0.5391788", "0.538957", "0.538788", "0.5387429", "0.538276", "0.53792125" ]
0.0
-1
Saves an employee into the database
public void save(Session session, Employee emp) { Transaction t = session.beginTransaction(); session.saveOrUpdate(emp); t.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "void save(Employee employee);", "@Override\r\n\tpublic void post(Employee employee) {\n\t\t empdao.save(employee);\r\n\t}", "@Override\n\tpublic void save(Employee employee) {\n\t\temployeeDao.save(employee);\n\t\t\n\t}", "EmployeeDetail save(EmployeeDetail detail) throws DBException;", "public void save(Employee employee) {\n String objectStr = MyUtils.serializeIntoAString(employee);\n Connection connection = null;\n Statement stmt = null;\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MyDB\", \"root\", \"password\");\n stmt = connection.createStatement();\n stmt.execute(\"INSERT INTO EMPLOYEE VALUES(\" + objectStr + \")\");\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n }", "@Override\n\tpublic void save(Employee theEmployee) {\n\t\t\n\t}", "@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}", "private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }", "@Transactional\n\t\tpublic void saveEmployee(EmployeeEntity employeeEntity) {\n\t\t\temployeedao.saveEmployee(employeeEntity);\n\t\t}", "@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}", "public void saveEmployee(Employee emp){\n System.out.println(\"saved\" + emp);\n\n }", "@Override\r\n\tpublic Employee save(Employee emp) {\n\t\t return empdao.save(emp);\r\n\t}", "@Override\n\tpublic Employee saveEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.saveEmployee(Employee emp) save Employee object\");\n\t\treturn repositary.save(emp);\n\t}", "public void addEmployee(Employee employee) {\n employeeRepository.save(employee);\n }", "public Employee save(Employee employee){\n return employeeRepository.save(employee);\n }", "@Override\n\t@Transactional\n\tpublic Employee save(Employee employee) {\n\t\treturn employeeDao.save(employee);\n\t}", "@Override\n\tpublic void save(Employee employee) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t// Save an Employee\n\t\tcurrentSession.saveOrUpdate(employee);\n\t\t\n\t}", "@PostMapping(\"/saveEmployee\")\n\tpublic String saveEmployee(@ModelAttribute(\"employee\") Employees employee) {\n\t\tservice.saveEmployee(employee);\n\t\treturn \"redirect:/employees\";\n\t}", "@Override\n\tpublic Employee save(Employee employee) {\n\t\treturn employeeRepository.save(employee);\n\t}", "void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}", "@PostMapping(\"/saveEmployee\")\r\n\tpublic String saveEmployee(@ModelAttribute(\"employee\") Employee employee) {\n\t\tempServ.saveEmployee(employee);\r\n\t\treturn \"redirect:/\";\r\n\t}", "@Override\r\n\tpublic int insertEmployee(Employee employee) {\n\t\treturn employeedao.insertEmployee(employee);\r\n\t}", "@Override\n public void save(Employee employee) {\n Employee dbEmployee = entityManager.merge(employee);\n \n //update with id from database so we can generate id for save/insert\n employee.setId(dbEmployee.getId());\n \n }", "public void addEmployee(final Employee employee) {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\r\n\t\tsession.save(employee);\r\n\t}", "@Override\n\t@Transactional\n\tpublic boolean saveEmployee(Employee employee) {\n\t\t\n\t\tentityManager.persist(employee);\n\t\tentityManager.flush();\n\t\treturn false;\n\t}", "public void saveEmployee(CreateOrEditEmployeeRequestDto employee);", "@Override\n\tpublic void add(Employee employee) {\n\t\temployeeDao.save(employee);\t\t\n\t}", "public void addEmployee(Employee employee) throws SQLException {\n\t\tConnection connection = DatabaseConnection.getConnection();\n\t\tString query = \"INSERT INTO EMPLOYEE VALUES(?,?)\";\n\t\tPreparedStatement pStatement = connection.prepareStatement(query);\n\t\tpStatement.setString(1, employee.getEmpId());\n\t\tpStatement.setString(2, employee.getEname());\n\t\tpStatement.executeUpdate();\n\n\t}", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@PostMapping(\"/addNewEmployee/save\")\n public String saveEmployee(@ModelAttribute(\"employee\") Employee employee){\n employeeService.saveEmployee(employee);\n return \"redirect:/\";\n }", "@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String save(Emp e) {\n\t\treturn \"JPA :Emp saved with ID \" + e.getEmpId(); \r\n\t}", "@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "public void update(Employee employee){\n employeeRepository.save(employee);\n }", "public long saveEmployee(Employee employee) {\n return employeeRepository.save(employee).getId();\n }", "@PostMapping(\"/save\")\n\tpublic ResponseEntity<String> createEmployee(@RequestBody Employee employee) {\n\t\tInteger id = service.saveEmployee(employee);\n\t\tString message = \"Employee '\" + id + \"' Created!\";\n\t\treturn new ResponseEntity<String>(message, HttpStatus.CREATED); // 201\n\t}", "@PostMapping(\"/employee\")\r\n\tpublic Employee createEmployee(@RequestBody Employee emp)\r\n\t{\r\n\t\treturn empdao.save(emp);\t\r\n\t}", "public void insert(Employee e) throws ClassNotFoundException, SQLException;", "@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}", "@Override\r\n\tpublic int insertEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "private void saveEmployee() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String nameString = mNameEditText.getText().toString().trim();\n String addressString = mAddressEditText.getText().toString().trim();\n String numberString = mNumberEditText.getText().toString().trim();\n String birthDateString = mBirthTextView.getText().toString().trim();\n\n // Check if this is supposed to be a new pet\n // and check if all the fields in the editor are blank\n if (mCurrentPetUri == null &&\n TextUtils.isEmpty(nameString) &&\n mImagePath.isEmpty()) {\n // Since no fields were modified, we can return early without creating a new pet.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and employee attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NAME, nameString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_ADDRESS, addressString);\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_BIRTH_DAY, birthDateString);\n\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_PHOTOS, mImagePath);\n\n // If the number is not provided by the user, don't try to parse the string into an\n // integer value. Use 0 by default.\n int number = 0;\n if (!TextUtils.isEmpty(numberString)) {\n number = Integer.parseInt(numberString);\n }\n values.put(EmployeeEntry.COLUMN_EMPLOYEE_NUMBER, number);\n\n // Determine if this is a new or existing pet by checking if mCurrentPetUri is null or not\n if (mCurrentPetUri == null) {\n // This is a NEW employee, so insert a new employee into the provider,\n // returning the content URI for the new pet.\n Uri newUri = getContentResolver().insert(EmployeeEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING pet, so update the pet with content URI: mCurrentPetUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentPetUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentPetUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_employee_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_employee_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "int insert(Employee record);", "@PostMapping(\"/employee\")\n\tpublic Employee createEmployee(@RequestBody Employee employee) {\n\t\treturn emprepo.save(employee);\n\t}", "@PostMapping(\"/employee\")\r\n\tpublic void add(@RequestBody Employee employee) {\r\n\t\tempService.save(employee);\r\n\t}", "@Transactional(readOnly = false)\r\n\tpublic void saveEmployee(Employee employee) {\r\n\t\tem.merge(employee);\r\n\t}", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "@PostMapping(\"/register\")\n\tpublic ResponseEntity<Employee> saveEmployee(@RequestBody Employee emp){\n\t\tEmployee addedEmployee = employeeService.saveEmployee(emp);\n\t\treturn new ResponseEntity<Employee>(addedEmployee, HttpStatus.OK);\n\t}", "@PostMapping(value = \"/addEmployee\")\n\tpublic void addEmployee() {\n\t\tEmployee e = new Employee(\"Iftekhar Khan\");\n\t\tdataServiceImpl.add(e);\n\t}", "@PostMapping(value=\"/employes\")\n\tpublic void createEmployeeDeatils(@RequestBody Employee employee){\n\t\t\t\n\t\temployeeService.saveEmployeeDetails(employee);\n\t\t\n\t}", "@Override\n public void save(Employee theEmployee) {\n Employee dbEmployee = entityManager.merge(theEmployee);\n theEmployee.setId(dbEmployee.getId());\n }", "@RequestMapping(value=\"/addEmployeeSubmit\", method=RequestMethod.POST)\n /* Add submitted new employee details to database, and then redirect to listEmployees */\n public String addEmployeeSubmit(Employee employee) {\n employeeservice.saveEmployee(employee);\n\n return \"redirect:/employee/listEmployees\";\n }", "@Override\n\tpublic Employee createEmployee(Employee employee) {\n\t\tSession sess = sessionFactory.openSession();\n\t\tTransaction tx = sess.beginTransaction();\n\t\tsess.save(employee);\n\t\ttx.commit();\n\t\tsess.close();\n\n\t\treturn employee;\n\t}", "@PostMapping(\"/employees\")\n\tpublic Employee addEmployee(@RequestBody Employee theEmployee) {\n\t\t theEmployee.setId(0);\n\t\t employeeService.save(theEmployee);\n\t\t \n\t return theEmployee;\n\t}", "@Override\n\tpublic void store() {\n\n\t\tSystem.out.println(\"store() in Employee Dao\");\n\t}", "public void guardar(Empleado empleado) {\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\tJPAUtil.shutdown();\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@PostMapping(\"/createEmployee\")\n\tpublic Employee createEmployee(@RequestBody Employee employee) {\n\t\treturn repo.save(employee);\n\t}", "@PostMapping(\"/addEmployee\")\n\tpublic ResponseEntity<EmployeeMon> createEmployee(@RequestBody EmployeeMon employee)\n\t{\n\t\ttry {\n\t\t\tEmployeeMon stud = repository.save(\n\t\t\t\t\tnew EmployeeMon(employee.getId(),employee.getName(),employee.getAddress(), employee.getEmail(),\n\t\t\t\t\t\t\temployee.getSalary()));\n\t\t\tLOGGER.info(\"Inserted data into Table\");\n\t\t\treturn new ResponseEntity<>(stud, HttpStatus.CREATED);\n\t\t} catch(Exception e) {\n\t\t\treturn new ResponseEntity<>(null, HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@Override\r\n\tpublic boolean registerEmployee(EmployeeEO employeeEORef) {\n\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic int addEmployee1(Employee employee) throws SQLException {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\t\treturn added;\r\n\t}", "@Override\n\tpublic ResponseEntity<Employee> save(Employee t) {\n\t\treturn null;\n\t}", "public void addEmployee(employee emp){\n try {\n \n \n String insert =\"INSERT INTO JEREMY.EMPLOYEE (NAME, USERNAME, PASSWORD) VALUES \"\n + \"('\"+emp.name+\"','\"\n +emp.username+\"','\"\n +emp.password+\"')\";\n \n System.out.println(insert);\n \n empstmt.executeUpdate(insert);\n\n emprs = stmt.executeQuery(\"SELECT * FROM JEREMY.EMPLOYEE\");\n total();\n } catch (Exception e) {\n System.out.println(\"SQL problem dbEmployee Addmployee()\" + e);\n }\n \n }", "public int insertData(Employee employee) {\n\t\ttry {\n\t\t\tString query = \"insert into employeedbaddress values(?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setInt(1, employee.getEno());\n\t\t\tps.setString(2, employee.getEname());\n\t\t\tps.setString(3, employee.getEdesignation());\n\t\t\tps.setString(4, employee.getEgender());\n\t\t\tps.setDouble(5, employee.getEsalary());\n\t\t\tps.setString(6, employee.getEusername());\n\t\t\tps.setString(7, employee.getEpassword());\n\t\t\tps.setString(8, employee.getStreet());\n\t\t\tps.setString(9, employee.getCity());\n\t\t\tps.setString(10, employee.getState());\n\t\t\tps.setInt(11, employee.getPincode());\n\t\t\tps.setString(12, employee.getContact());\n\t\t\tps.setString(13, employee.getEmail());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public int saveEmp(Emp emp) throws Exception {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tsession.save(emp);\n\t\t\tsession.flush();\n\t\t\treturn 1;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n String firstName = request.getParameter(\"firstname\");\n String lastName = request.getParameter(\"lastname\");\n Date birthDate = null;\n float salary = 0.0f;\n Employee emp = null;\n\n // Try the conversion of the birth and salary strings\n try {\n SimpleDateFormat df = new SimpleDateFormat(\"MMM d, yyyy\");\n String birthDateStr = request.getParameter(\"birthdate\").trim();\n birthDate = new Date(df.parse(birthDateStr).getTime());\n String salaryStr = request.getParameter(\"salary\").trim();\n salary = Float.parseFloat(salaryStr);\n emp = new Employee(firstName, lastName, birthDate, salary);\n } catch (NumberFormatException | ParseException pe) {\n request.setAttribute(\"errorMessage\", \"Exception parsing: \" + pe);\n RequestDispatcher rd = request.getRequestDispatcher(\"failure.jsp\");\n rd.forward(request, response);\n }\n\n // Solution code\n EntityManager em = null;\n try {\n em = emf.createEntityManager();\n utx.begin();\n em.persist(emp);\n utx.commit();\n } catch (NotSupportedException | SystemException | RollbackException | HeuristicMixedException | HeuristicRollbackException | SecurityException | IllegalStateException e) {\n request.setAttribute(\"errorMessage\", \"Exception: \" + e);\n RequestDispatcher rd = request.getRequestDispatcher(\"failure.jsp\");\n rd.forward(request, response);\n }\n\n try {\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Success</title>\");\n out.println(\"</head>\");\n out.println(\"<body>\");\n out.println(\"<h1>Created New Employee</h1><br/>\");\n out.println(\"ID: \" + emp.getId() + \"<br/>\");\n out.println(\"First Name: \" + emp.getFirstName() + \"<br/>\");\n out.println(\"Last Name: \" + emp.getLastName() + \"<br/>\");\n out.println(\"Birth Date: \" + emp.getBirthDate() + \"<br/>\");\n out.println(\"Salary: \" + emp.getSalary() + \"<br/>\");\n out.println(\"<p><a href=\" + request.getContextPath() + \">Back</a>\");\n out.println(\"</body>\");\n out.println(\"</html>\");\n } finally {\n out.close();\n em.close();\n }\n }", "@RequestMapping(value = \"/employee\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)\n\t@Timed\n\tpublic ResponseEntity<?> saveEmployee(@Valid @RequestBody EmployeeDTO employeeDTO, HttpServletRequest request) {\n\t\tlog.info(\"Inside the saveEmployee -\" + employeeDTO);\n\t\tlog.info(\"Inside Save employee\"+employeeDTO.getManagerId());\n\t\tlong userId = SecurityUtils.getCurrentUserId();\n\t\tlog.info(\"save Employee call - userId \"+userId);\n\t\temployeeDTO.setUserId(userId);\n\n\t\ttry {\n\t\t\tEmployeeDTO employeeDto = employeeService.createEmployeeInformation(employeeDTO);\n\n\t\t\t/*\n\t\t\tif(employeeDto.isCreateUser()) {\n\t\t\t\tUserDTO userDto = new UserDTO();\n\t\t\t\tuserDto.setLogin(employeeDto.getEmpId());\n\t\t\t\tuserDto.setFirstName(employeeDto.getName());\n\t\t\t\tuserDto.setLastName(employeeDto.getLastName());\n\t\t\t\tuserDto.setEmployeeId(employeeDto.getId());\n\t\t\t\tuserDto.setEmployeeName(employeeDto.getName());\n\t\t\t\tuserService.createUserInformation(userDto);\n\t\t\t}\n\t\t\t*/\n\n\t\t}catch(Exception e) {\n\t\t\tthrow new TimesheetException(e, employeeDTO);\n\t\t}\n\t\treturn new ResponseEntity<>(HttpStatus.CREATED);\n\t}", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "@Transactional\n public Employee insert(Employee employee) {\n logger.debug(\"Testing create employee :\");\n return employeeDao.insert(employee);\n }", "public Employee createOne(Employee employee) {\n return employeeRepository.save(employee);\n }", "@PostMapping(\"/employees\")\r\n\tpublic Employee addEmployee(@RequestBody Employee theEmployee) {\r\n\t\t\r\n\t\t// also just in case the pass an id in JSON... set id to 0\r\n\t\t// this force a save of new item...instead of update\r\n\t\ttheEmployee.setId(0);\r\n\t\t\r\n\t\temployeeService.saveEmployee(theEmployee);\r\n\t\t\r\n\t\treturn theEmployee;\r\n\t\t\r\n\t}", "int insert(ProEmployee record);", "@Override\r\n\tpublic Employee change(Employee employee) {\n\t\treturn empdao.save(employee);\r\n\t}", "public String addEmployee(Employee employee) {\n\n\t\t/*\n\t\t * All the values of the add employee form are encapsulated in the employee object.\n\t\t * These can be accessed by getter methods (see Employee class in model package).\n\t\t * e.g. firstName can be accessed by employee.getFirstName() method.\n\t\t * The sample code returns \"success\" by default.\n\t\t * You need to handle the database insertion of the employee details and return \"success\" or \"failure\" based on result of the database insertion.\n\t\t */\n\t\ttry {\n\t\t\tString SSN = employee.getEmployeeID();\n\t\t\tSSN = SSN.replace(\"-\",\"\");\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"INSERT IGNORE INTO mwcoulter.Location (ZipCode, City, State) VALUES (?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(employee.getZipCode()));\n\t\t\tst.setString(2, employee.getCity());\n\t\t\tst.setString(3, employee.getState());\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"INSERT INTO mwcoulter.Person (SSN, LastName, FirstName, Address, ZipCode, Telephone) \" +\n\t\t\t\t\t\"VALUES (?,?,?,?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(SSN));\n\t\t\tst.setString(2, employee.getLastName());\n\t\t\tst.setString(3, employee.getFirstName());\n\t\t\tst.setString(4, employee.getAddress());\n\t\t\tst.setInt(5, employee.getZipCode());\n\t\t\tst.setLong(6, Long.valueOf(employee.getTelephone()));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"INSERT INTO mwcoulter.LivesAt (ZipCode, SSN) \" +\n\t\t\t\t\t\"VALUES (?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(employee.getZipCode()));\n\t\t\tst.setInt(2, Integer.valueOf(SSN));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\"INSERT INTO mwcoulter.Employee (ID, SSN, StartDate, HourlyRate, Email) \" +\n\t\t\t\"VALUES (?,?,?,?,?);\");\n\t\t\tst.setInt(1,Integer.valueOf(SSN));\n\t\t\tst.setInt(2,Integer.valueOf(SSN));\n\t\t\tst.setDate(3,Date.valueOf(employee.getStartDate()));\n\t\t\tst.setInt(4, (int)employee.getHourlyRate());\n\t\t\tst.setString(5, employee.getEmail());\n\t\t\tst.executeUpdate();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn \"failure\";\n\t\t}\n\t\treturn \"success\";\n\t\t}", "@RequestMapping(value = \"/employee\", method = RequestMethod.POST)\r\n\tpublic Employee addEmployee(@RequestBody Employee employee) throws EmployeeMaintainceException {\r\n\r\n\t\ttry {\r\n\t\t\treturn eService.addEmp(employee);\r\n\t\t}\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(400, e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public Boolean save(Emp p){\n\t\t\n\t\tString sql=\"insert into emp99(Name,Salary,Designation) values(?,?,?)\";\n\t\t\n\t\treturn (Boolean) template.execute(sql, new PreparedStatementCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\n\t\t\t\t\n\t\t\t\tps.setString(1, p.getName());\n\t\t\t\tps.setFloat(2, p.getSalary());\n\t\t\t\tps.setString(3, p.getDesignation());\n\t\t\t\treturn ps.execute();\n\t\t\t}\n\t\t\t\n\t\t});\n\t}", "public void saveEmpleado(){\n \n //validor los campos antes de generar algún cambio\n if(!camposValidos()) {\n mFrmMantenerEmpleado.messageBoxAlert(Constant.APP_NAME, \"los campos no deben estar vacíos\");\n return;\n }\n \n //empleado nuevo\n boolean isUpdate=true;\n if(mEmpleado==null){ \n isUpdate=false; \n mEmpleado= new Empleado(); \n }\n \n \n mEmpleado.setFullNamePer(mFrmMantenerEmpleado.txtName.getText());//persona\n mEmpleado.setRucDNI(mFrmMantenerEmpleado.txtDniRuc.getText());//persona \n mEmpleado.setEdad((int)mFrmMantenerEmpleado.spnEdad.getValue());//persona\n mEmpleado.setTelefono(mFrmMantenerEmpleado.txtPhone.getText());//persona\n mEmpleado.setCorreo(mFrmMantenerEmpleado.txtEmail.getText());//persona\n mEmpleado.setDireccion(mFrmMantenerEmpleado.txtAddress.getText());//persona\n mEmpleado.setTipoEmpleado(mTipoEmpleadoList.get(mFrmMantenerEmpleado.cmbEmployeeType.getSelectedIndex()));//empleado\n mEmpleado.setSueldo((float)mFrmMantenerEmpleado.spnPayment.getValue());//empleado\n mEmpleado.setHorarioLaboralEmp(mFrmMantenerEmpleado.txtHorarioLaboral.getText());//empleado\n mEmpleado.setEstadoEmp(mFrmMantenerEmpleado.txtEstate.getText());//empleado\n \n \n \n //guardar o actualizar\n mEmpleado.save();\n \n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, (isUpdate?\"Se ha actualizado el empleado\":\"Se ha agregado un nuevo empleado al sistema\") );\n clear();\n }", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "@Override\n\tpublic Employee registerEmployee(Employee employee) {\n\t\tEmployee updatedEmployee = null;\n\t\ttry {\n\t\t\tlogger.info(\"saving employee = {}\", employee);\n\t\t\tupdatedEmployee = employeeDao.registerEmployee(employee);\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn updatedEmployee;\n\t}", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "@Test\n\tpublic void testingAddNewEmployee() {\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"emailAddress\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tWebElement newEmployee = driver.findElement(By.linkText(\"FirstName LastName\"));\n\t\tassertNotNull(newEmployee);\n\t\t\n\t}", "@PostMapping(\"addEmployee\")\r\n\tpublic String addEmployee(@ModelAttribute(\"employee\") Employee employee) {\r\n\r\n\t\temployeeDao.addEmployee(employee);\r\n\t\t\r\n\t\treturn \"EmployeeDetails\";\r\n\t}", "public String addEmployeeRecord(String firstName, String lastName,\n String socialSecurityNumber, String department,\n String roomNumber, String phoneNumber) {\n\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n int result = 0;\n\n try {\n\n connection = getConnection(connection);\n\n String queryString = \"INSERT INTO employees \"\n + \"(first_name, last_name, ssn, dept, room, phone)\"\n + \"values ( ?, ?, ?, ?, ?, ? )\";\n\n statement = connection.prepareStatement(queryString);\n statement.setString(1, firstName);\n statement.setString(2, lastName);\n statement.setString(3, socialSecurityNumber);\n statement.setString(4, department);\n statement.setString(5, roomNumber);\n statement.setString(6, phoneNumber);\n\n result = statement.executeUpdate();\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n System.err.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n\n\n if (statement != null) {\n statement.close();\n }\n\n\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException sqlException) {\n sqlException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n if (result > 0) {\n return \"New employee added successfully.\";\n } else {\n return \"Error adding new employee.\";\n }\n }", "public String addEmployee(EmployeeDetails employeeDetails) throws NullPointerException;", "@RequestMapping(value = \"/save\", method = RequestMethod.POST)\r\n\tpublic String saveEmployee(HttpServletRequest request,\r\n\t\t\t@ModelAttribute(\"command\") Employee employee, BindingResult result,\r\n\t\t\t@RequestParam String action) {\r\n\t\tSystem.out.println(\"------------- saving or updating emp --------------\");\r\n\t\tSystem.out.println(employee);\r\n\t\tif(action.equalsIgnoreCase(\"Submit\")){\r\n\t\t\tdao.addOrUpdateEmployee(employee);\r\n\t\t}\r\n\t\treturn \"redirect:/\";\r\n\t}", "void save(E entity);", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "@POST\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response addEmployee(EmployeeVO emVo) throws SQLException {\n\t\tEmployeeFacade employeeFacade = new EmployeeFacade();\n\t\tboolean result = employeeFacade.save(emVo);\n\t\tif (result)\n\t\t\treturn Response.status(200).build();\n\t\telse\n\t\t\treturn Response.status(409).build();\n\t}", "@Override\r\n\tpublic <S extends Employee> S save(S arg0) {\n\t\treturn null;\r\n\t}", "public WeekAssignmentPerEmployee saveOne(WeekAssignmentPerEmployee weekAssignmentPerEmployee) {\n\t\ttry{\n\t\t\t//tx.begin();\n\t\t\tem.persist(weekAssignmentPerEmployee);\n\t\t\t\n\t // tx.commit();\n\t return weekAssignmentPerEmployee;\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tthrow new BusinessException(new ExceptionMessage(\"Failed in WeekAssignmentPerEmployeDao : saveOne ...\"));\n\t \n\t\t}finally{\n\t\t\tem.close();\n\t\t}\n\n\t\t\n\t}", "@Override\r\n\tpublic String AddEmployeeDetails(EmployeeEntity employee) throws CustomException {\n\t\tString strMessage=\"\";\r\n\t\trepository.save(employee);\r\n\t\tstrMessage=\"Employee data has been saved\";\r\n\t\treturn strMessage;\r\n\t}", "int insert(Emp record);", "@Transactional\n\t@CacheEvict(cacheNames = {\"allEmployeesCache\"}, allEntries = true)\n\tpublic void addEmployee(Employee employee) throws Exception {\n\t\tString password = passwordService.createPassword();\n\t\tString passwordEncode = passwordEncoder.encode(password);\n\t\tUser user = employee.getUser();\n\t\tuser.setEnabled(true);\n\t\tuser.setPassword(passwordEncode);\n\t\tOptional<Role> role1 = roleRepository.findById(1L);\n\t\tOptional<Role> role4 = roleRepository.findById(4L);\n List<Role> roles = new ArrayList<>();\n roles.add(role1.get());\n roles.add(role4.get());\n user.setRoles(roles);\n employee.setRegisterDateTime(LocalDateTime.now());\n final User userFromRequest = getUserFromRequest();\n employee.setUserRegister(userFromRequest);\n\t\temployeeRepository.save(employee);\n\t\tsendEmailForAddAdminEmployee(employee, password);\n\t}", "void save(Teacher teacher);", "public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "public boolean guardar(Empleado empleado) {\n\n try {\n\n empDAO.create(empleado);\n System.out.println(\"Guardando Empleado:\" + empleado.toString());\n return true;\n\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n\n return false;\n\n }", "@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}", "@Override\n\tpublic Employee saveEmployee(EmployeeDto registerDTO) {\n\n\t\tModelMapper modelMapper = new ModelMapper();\n\n\t\tEmployee employee = modelMapper.map(registerDTO, Employee.class);\n\n\t\treturn employeeDao.saveEmployee(employee);\n\t}", "@Test\r\n\tpublic void addEmployeeTestCase3() {\n\t\tEmployee employee3 = new Employee();\r\n\t\temployee3.name = \"Lingtan\";\r\n\t\temployee3.role = \"Ui designer\";\r\n\t\temployee3.email = \"[email protected]\";\r\n\t\temployee3.employeeID = \"Ling2655\";\r\n\t\temployee3.dob = LocalDate.of(2000, 12, 12);\r\n\t\temployee3.gender = \"Male\";\r\n\t\temployee3.mobileNumber =Long.parseLong(\"9249324982\");\r\n\t\temployee3.joiningData = LocalDate.of(2000, 12, 12);\r\n\t\t\r\n\t\tEmployeeOperations.addEmployee(employee3);\t\r\n\t}" ]
[ "0.83124775", "0.8043714", "0.80424213", "0.80404353", "0.7989981", "0.7964904", "0.7884041", "0.781862", "0.7751335", "0.7683169", "0.7589738", "0.74561846", "0.74288136", "0.7398181", "0.7337196", "0.73068655", "0.7269084", "0.7265552", "0.7238759", "0.72239184", "0.7192147", "0.7144228", "0.7109612", "0.7092064", "0.70477825", "0.7040939", "0.7032931", "0.70047075", "0.69350207", "0.6922048", "0.6919145", "0.6891362", "0.68771845", "0.68440145", "0.68234396", "0.68200797", "0.68104255", "0.68081427", "0.67696327", "0.6764536", "0.6763495", "0.6761601", "0.6748722", "0.6742447", "0.6740466", "0.66983795", "0.66965544", "0.668449", "0.667565", "0.66722095", "0.6652966", "0.66450864", "0.6622798", "0.6622729", "0.66188484", "0.65746933", "0.65676886", "0.6526249", "0.6523326", "0.65145904", "0.65048087", "0.650281", "0.64987534", "0.64879686", "0.6471283", "0.6465895", "0.6465021", "0.6442302", "0.6440615", "0.6436521", "0.6418725", "0.64183277", "0.64124596", "0.6412311", "0.6408929", "0.63912547", "0.6383303", "0.6376835", "0.6357374", "0.63403976", "0.63355017", "0.63342744", "0.6333689", "0.63215816", "0.63202626", "0.6315454", "0.63075376", "0.63068855", "0.6304786", "0.6299778", "0.62978095", "0.629155", "0.6286701", "0.6286325", "0.62713766", "0.6264805", "0.62644523", "0.6255257", "0.6238073", "0.62350804" ]
0.6352838
79
Updates an employee of the database
public Employee update(Session session, Employee emp) { Employee bbddEmp; Transaction t = session.beginTransaction(); Query query = session.createQuery("from Employee where" + " name = :name and nifnie = :nifnie and companyEntryDate=:" + "companyEntryDate "); query.setParameter("name", emp.getName()); query.setParameter("nifnie", emp.getNifnie()); query.setDate("companyEntryDate", emp.getCompanyEntryDate()); bbddEmp = (Employee) query.list().get(0); updateColumns(emp, bbddEmp); session.update(bbddEmp); t.commit(); return bbddEmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public void update(Employee e) {\n\t\t\r\n\t}", "void update(EmployeeDetail detail) throws DBException;", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "public void update(Employee employee){\n employeeRepository.save(employee);\n }", "@Override\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "public void updateEmployeeDetails(EmployeeDetails employeeDetails);", "@Override\n\t//业务层修改员工方法\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "@Override\n\tpublic void updateEmployee(Employee employee) {\n\t\tEmployee updateEmployee = em.find(Employee.class, employee.getId());\n\t\t\n\t\tem.getTransaction().begin();\n\t\tem.merge(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Updated successfully\");\n\t\tlogger.log(Level.INFO, \"Data Updated successfully\");\n\n\t}", "private void updateEmployee(HttpServletRequest request, HttpServletResponse response)\r\n\t\tthrows Exception {\n\t\tint id = Integer.parseInt(request.getParameter(\"employeeId\"));\r\n\t\tString firstName = request.getParameter(\"firstName\");\r\n\t\tString lastName = request.getParameter(\"lastName\");\r\n\t\tint age = Integer.parseInt(request.getParameter(\"age\"));\r\n\t\tString gender = request.getParameter(\"gender\");\r\n\t\tString email = request.getParameter(\"email\");\r\n\t\t\r\n\t\t// create a new student object\r\n\t\tEmployee theEmployee = new Employee (id, firstName, lastName,gender,age, email);\r\n\t\t\r\n\t\t// perform update on database\r\n\t\temployeeDAO.updateEmployee(theEmployee);\r\n\t\t\r\n\t\t// send them back to the \"list students\" page\r\n\t\tlistEmployees(request, response);\r\n\t\t\r\n\t}", "@Override\n\tpublic void update(Employee employee) {\n\t}", "@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}", "public void updateEmployee(Employee employee) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n String SQL = \"UPDATE employees SET surname=?, name=?, gender=?, marital_status=?, salary=?, dob=? WHERE idEmployee=?\";\n try {\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n preparedStatement.setInt(7, employee.getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "@Transactional\n public Employee update(Employee employee) {\n logger.debug(\"update employee by id :\");\n return employeeDao.update(employee);\n }", "public int updateEmployee(Employee emp) throws SQLException {\n\t\t\treturn employeeDAO.updateEmployee(emp);\n\t\t}", "public void updateEmp(Emp emp) {\n\t\t\n\t}", "@Override\n\tpublic int updateEmployee(Employee emp) throws RemoteException {\n\t\treturn DAManager.updateEmployee(emp);\n\t}", "public int updateEmployeeRecord(Employee employee) {\n\t\ttry {\n\t\t\t\n\t\t\tString query = \"update employeedbaddress set eName=?, eDesignation=?, eGender=?, eSalary=?, eUsername=?, ePassword=?, street=?, city=?, state=?, pincode=?, contact=?, email=? where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setString(1, employee.getEname());\n\t\t\tps.setString(2, employee.getEdesignation());\n\t\t\tps.setString(3, employee.getEgender());\n\t\t\tps.setDouble(4, employee.getEsalary());\n\t\t\tps.setString(5, employee.getEusername());\n\t\t\tps.setString(6, employee.getEpassword());\n\t\t\tps.setString(7, employee.getStreet());\n\t\t\tps.setString(8, employee.getCity());\n\t\t\tps.setString(9, employee.getState());\n\t\t\tps.setInt(10, employee.getPincode());\n\t\t\tps.setString(11, employee.getContact());\n\t\t\tps.setString(12, employee.getEmail());\n\t\t\tps.setInt(13, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "@PutMapping(\"/update\")\n\t public Employee updateEmployee(@RequestBody Employee emp)\n\t {\n\t\treturn employeeService.editEmployee(emp);\n\t }", "int updateByPrimaryKey(Employee record);", "@Override\r\n\tpublic boolean updateEmployee(Employee employee) {\n\t\tboolean added = false;\r\n\t\tString updateData = \"update employee set empName=?, salary=? ,technology=? where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(updateData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getSalary());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getEmpId());\r\n\r\n\t\t\tint updated = ps.executeUpdate();\r\n\t\t\tif (updated > 0) {\r\n\t\t\t\tadded = true;\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "public void updateEmployee(Long employeeId, CreateOrEditEmployeeRequestDto employee) throws ApiDemoBusinessException;", "@PutMapping(\"/employees/{employeeId}\")\r\n\tpublic Employee updateEmployee(@RequestBody Employee theEmployee) {\r\n\t\t\r\n\t\t\temployeeService.saveEmployee(theEmployee);\r\n\t\t\r\n\t\treturn theEmployee;\r\n\t}", "protected void updateEmployee(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException {\n\t\tString name,email,password,country;\n\t\tint eId;\n\t\tname = request.getParameter(\"name\");\n\t\temail = request.getParameter(\"email\");\n\t\tpassword = request.getParameter(\"password\");\n\t\tcountry = request.getParameter(\"country\");\n\t\teId = Integer.parseInt(request.getParameter(\"eId\"));\n\t\tEmployeeModel emp = new EmployeeModel(name,password,email,country,eId);\n\t\temployeeServiceObj.updateEmployee(emp);\n\t\t\n\t\t\n\t\tRequestDispatcher view=request.getRequestDispatcher(\"viewEmployees.do\");\n\t\tview.forward(request, response);\n\t\t\t\n\t}", "public Employee updateEmployeeDetails(Employee employee) {\n\t\t long requestObjectEmployeeId = employee.getEmployeeId();\n\t\t Employee existedEmployee = employeeDao.findEmployeeByEmployeeId(requestObjectEmployeeId);\n\t\t if(employee != null) {\n\t\t\t return employeeDao.save(employee);\n\t\t }\n\t\t\treturn null;\t\n\t}", "@Override\n\tpublic Integer update(Employee e) {\n\t\tString sql = \"update Staff set Emp_name = ?, Emp_psword = ?, Emp_rank = ? where Emp_usrnme = ?\";\n\t\tint a = -1;\n\t\t//if errors occur revert to three column method as illustrated in project notes.\n\t\ttry(Connection con = ConnectDB.getHardCodedConnection()){\n\t\t\tPreparedStatement ps = con.prepareStatement(sql);\n\t\t\tps.setString(1, e.getEmployeeName());\n\t\t\tps.setString(2, e.getEPassword());\n\t\t\tps.setInt(3, e.getRank());\n\t\t\tps.setString(4,e.getEUserName());\n\t\t\t\n\t\t\ta = ps.executeUpdate();\n\t\t} catch (SQLException E) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "public void updateEmployee(final Employee update) {\r\n\t\t sessionFactory.getCurrentSession().saveOrUpdate(update);\r\n\t }", "public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "@Override\n\t@Transactional\n\tpublic boolean updateEmployee(Employee employee) {\n\t\treturn employeeDao.updateEmployee(employee);\n\t}", "public String editEmployee(Employee employee) {\n\t\t\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tPreparedStatement st = con.prepareStatement(\n\t\t\t\t\t\"UPDATE mwcoulter.Employee SET StartDate = ?, HourlyRate = ?, Email = ? WHERE SSN = ?\");\n\t\t\tst.setDate(1, Date.valueOf(employee.getStartDate()));\n\t\t\tst.setInt(2, (int)employee.getHourlyRate());\n\t\t\tst.setString(3, employee.getEmail());\n\t\t\tst.setInt(4, Integer.valueOf(employee.getEmployeeID()));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"UPDATE mwcoulter.Person SET LastName = ?, FirstName = ?, Address = ?, ZipCode = ? WHERE SSN = ?\");\n\t\t\tst.setString(1, employee.getLastName());\n\t\t\tst.setString(2, employee.getFirstName());\n\t\t\tst.setString(3, employee.getAddress());\n\t\t\tst.setInt(4, employee.getZipCode());\n\t\t\tst.setInt(5, Integer.valueOf(employee.getEmployeeID()));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"UPDATE mwcoulter.LivesAt SET ZipCode = ? WHERE SSN = ?\");\n\t\t\tst.setInt(1, employee.getZipCode());\n\t\t\tst.setInt(2, Integer.valueOf(employee.getEmployeeID()));\n\t\t\tst.executeUpdate();\n\t\t\t\n\t\t\tst = con.prepareStatement(\n\t\t\t\t\t\"UPDATE mwcoulter.Location SET City = ?, State = ? WHERE ZipCode = ?\");\n\t\t\tst.setString(1, employee.getCity());\n\t\t\tst.setString(2, employee.getState());\n\t\t\tst.setInt(3, employee.getZipCode());\n\t\t\tst.executeUpdate();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t\treturn \"failure\";\n\t\t}\n\t\treturn \"success\";\n\n\t}", "@PutMapping(\"/UpdateEmployee/{empId}\")\r\n public String updateEmployee(@RequestBody Employee employee, @PathVariable String empId) {\r\n return admin.updateEmployeeService(employee, empId);\r\n }", "@Override\r\n\tpublic boolean updateEmployee(EmployeeEO employeeEORef) {\n\t\tif(employeeDAORepoRef.findById(employeeEORef.getEmployeeId()).equals(null))\r\n\t\treturn false;\r\n\t\telse {\r\n\t\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.PUT)\r\n\tpublic Employee updateEmployee(@RequestBody Employee employee, @PathVariable int empId)\r\n\t\t\tthrows EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.updateEmployee(employee, empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(400, e.getMessage());\r\n\t\t}\r\n\r\n\t}", "void update(Employee nurse);", "int updateByPrimaryKey(ProEmployee record);", "@PutMapping(\"/employee/{id}\")\n\tpublic ResponseEntity<Employee> updateEmployee(@PathVariable Long id, @RequestBody Employee employeeDetail){\n\t\t\n\t\tEmployee employee = emprepo.findById(id).orElseThrow(()-> new ResourceNotFoundException(\"Employee not exist with id: \"+id )); \n\t\t\n\t\temployee.setFirstname(employeeDetail.getFirstname());\n\t\temployee.setLastname(employeeDetail.getLastname());\n\t\temployee.setEmail(employeeDetail.getEmail());\n\t\t\n\t\tEmployee updateEmployee= emprepo.save(employee);\n\t\t\n\t\treturn ResponseEntity.ok(updateEmployee);\n\t}", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "@Test\r\n public void testUpdateEmployee1() throws Exception {\r\n try {\r\n\r\n int employee_id = 0;\r\n int department_id = 1;\r\n int position_id = 1;\r\n int status = 1;\r\n String date = \"\";\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n boolean expResult = false;\r\n boolean result = instance.updateEmployee(employee_id, department_id, position_id, status, date);\r\n assertEquals(expResult, result);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"Wrong Required Parameters\"));\r\n }\r\n }", "@Override\n\t@Transactional\n\tpublic void updateEmp(int employeeID, Employee employee) {\n\t\tOptional<Employee> empData = employeeRepository.findById(employeeID);\n\t\tif(empData.isPresent()) {\n\t\t\tEmployee emp = empData.get();\n\t\t\temp.setFirstName(employee.getFirstName());\n\t\t\temp.setLastName(employee.getLastName());\n\t\t\temp.setEmail(employee.getEmail());\n\t\t\temp.setPhone(employee.getPhone());\n\t\t\temployeeRepository.save(emp);\n\t\t}\n\t\t\n\t}", "public Employeedetails updateEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tString employeeName = employeeDetail.getEmployeeName();\n\t\t\t;\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"update employeeregister set employeename = '\"\n\t\t\t\t\t+ employeeName + \"' where employeeid ='\" + employeeId\n\t\t\t\t\t+ \"';\";\n\t\t\tint a = statement.executeUpdate(squery);\n\n\t\t\tif (a == 0) {\n\n\t\t\t\treturn employeeDetail;\n\t\t\t} else {\n\t\t\t\treturn employeeDetail;\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "@Override\n\tpublic ResponseEntity<Employee> update(Employee t) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employees update(Employees entity)\n\tthrows OperationNotSupportedException {\n\t\treturn null;\n\t}", "@PutMapping(\"/updateEmployee/{id}\")\n\tpublic ResponseEntity<Employee> updateEmployee(@PathVariable Long id, @RequestBody Employee employee){\n\t\tEmployee save = repo.save(employee);\n\t\treturn ResponseEntity.ok(save);\n\t}", "@Override\n\tpublic Integer updateEmp(Integer id, String name) {\n\t\treturn null;\n\t}", "@Override\n\tpublic Employee update(Employee emp) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void preparedUpdateEmployee(Employee e) {\n\t\t\n\t}", "public boolean updateEmployeeDetail(Employee employee) {\n\t\treturn dao.updateEmployeeDetail(employee);\n\t}", "private static void updateEmployeeHelper() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Insert Employee's ID\");\n\t\tString newID = input.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insert Current name\");\n\t\tString newName = input.nextLine();\n\n\t\tSystem.out.println(\"Insert Old Department\");\n\t\tString oldDepartment = input.nextLine();\n\n\t\tSystem.out.println(\"Insert New Department\");\n\t\tString newDepartment = input.nextLine();\n\n\t\tems2.updateEmployee(newID, newName, oldDepartment, newDepartment);\n\t}", "public int updateEmp(Emp emp) throws Exception {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tsession.update(emp);\n\t\t\tsession.flush();\n\t\t\treturn 1;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\treturn -1;\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t}", "@Override\n\tpublic void updateEmployeEmailById(int empid, String email) {\n\t\t\n\t}", "@PutMapping(\"/products/{id}\")\r\n\tpublic Employee update(@RequestBody Employee employee, @PathVariable Integer id) {\r\n\t \r\n\t Employee exitEmployee= empService.get(id);\r\n\t empService.save(employee); \r\n\t return exitEmployee;\r\n\t}", "@Override\n\tpublic Integer updateEmployee(EmployeeBean employeeBean, DepartmentBean departmentBean) {\n\t\t\n\t\tLOGGER.info(\"starts updateEmployee method\");\n\t\tLOGGER.info(\"Ends updateEmployee method\");\n\t\treturn adminEmployeeDao.updateEmployee(employeeBean);\n\t}", "public void updateEmployee(ActionRequest request, ActionResponse response) throws SystemException, IOException {\n\t\tEmployee employee = EmployeeLocalServiceUtil.fetchEmployee(ParamUtil.getInteger(request, \"employeeId\"));\n\t\tThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);\n\t\temployee.setEmployeeDesignation(ParamUtil.getString(request, \"employeeName\"));\n\t\temployee.setEmployeeDesignation(ParamUtil.getString(request, \"employeeDesignation\"));\n\t\temployee.setAddress(ParamUtil.getString(request, \"address\"));\n\t\temployee.setEmail(ParamUtil.getString(request, \"email\"));\n\t\temployee.setPhoneNumber(ParamUtil.getString(request, \"phoneNumber\"));\n\t\t// setting groupId\n\t\temployee.setGroupId(themeDisplay.getScopeGroupId());\n\t\tlong fileEntryId = employee.getFileEntryId();\n\t\tif (fileEntryId > 0) {\n\t\t\t// updating files entered\n\t\t\tupdateFileUpload(employee, fileEntryId, themeDisplay, request);\n\n\t\t} else {\n\t\t\t// Adding files if there's no files in DB\n\t\t\tcreateFolder(request, themeDisplay);\n\t\t\tfileEntryId = fileUpload(employee, themeDisplay, request);\n\t\t\temployee.setFileEntryId(fileEntryId);\n\t\t}\n\t\tEmployeeLocalServiceUtil.updateEmployee(employee);\n\t}", "@Override\n\tpublic EmployeeBean updateEmployeeDetails(EmployeeBean employeeBean) throws Exception {\n\t\treturn employeeDao.updateEmployeeDetails(employeeBean);\n\t}", "@Override\n\tpublic void update(Empleado e) {\n\t\tSystem.out.println(\"Actualiza el empleado \" + e + \" en la BBDD.\");\n\t}", "@Override\r\n\tpublic Employee change(Employee employee) {\n\t\treturn empdao.save(employee);\r\n\t}", "@Override\n\tpublic void updateInformation(String firstname, String lastname, String email, int id) {\t\t\n\t\ttry {\n\t\t\tString sql = \"update employees set first_name = '\"+firstname+\"', last_name='\"+lastname+\"',email = '\"+email+\"' where employee_id=\"+id; \n\t\t\tConnection connection = DBConnectionUtil.getConnection();\n\t\t\tStatement statement = connection.createStatement();\t\t\n\t\t\tstatement.executeUpdate(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void updateEmployee(Employee emp, int id) {\n\t\tif (id == emp.getEmployeeID()) {\n\t\t\temployeeRepository.save(emp);\n\t\t}\n\t}", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "@RequestMapping(path = \"/employee/{id}/{name}\", method = RequestMethod.PUT)\r\n\t@ResponseBody\r\n\tpublic String updateEmployeeById(@PathVariable int id, @PathVariable String name) {\r\n\t\ter.save(new Employee(id, name));\r\n\t\treturn \"Employee updated with id: \" + id;\r\n\t}", "@Override\n public Employee updateEmployeeName(int employeeId, String name) {\n return null;\n }", "public void update(Emp p){\n\t\n\t\tString sql=\"UPDATE emp99 set name=?, salary=?, designation=? WHERE id=\"+p.getId();\n\t\t\n\t\ttemplate.update(sql, p.getName(),p.getSalary(),p.getDesignation());\n\t\t\n\t\t/*return template.execute(sql, new PreparedStatementCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\n\t\t\t\t\n\t\t\t\tps.setString(1, p.getName());\n\t\t\t\tps.setFloat(2, p.getSalary());\n\t\t\t\tps.setString(3, p.getDesignation());\n\t\t\t\tps.setInt(4, p.getId());\n\t\t\t\t\n\t\t\t\treturn ps.execute();\n\t\t\t}\n\t\t});*/\n\t\t\n\t}", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "public void updateData() throws SQLException {\n pst=con.prepareStatement(\"update employee set name=?,city=? where id=?\");\n System.out.println(\"Enter name: \");\n String name=sc.next();\n pst.setString(1,name);\n\n System.out.println(\"Enter city: \");\n String city=sc.next();\n pst.setString(2,city);\n\n System.out.println(\"Enter id: \");\n int id=sc.nextInt();\n pst.setInt(3,id);\n pst.execute();\n\n System.out.println(\"Data updated successfully\");\n }", "public EmployeeEntity updateEmployeeData(EmployeeEntity employee, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\ttry {\n\t\t\thibernateSession.update(employee);\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\n\t\thibernateSession.evict(employee);\n\t\thibernateSession.flush();\n\n\t\treturn employee;\n\t}", "E update(E entiry);", "public void update(Employee emp)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_UPDATE_EMPLOYEE_REQUEST, emp, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_UPDATE_EMPLOYEE_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}", "int updateByPrimaryKeySelective(ProEmployee record);", "@Override\r\n\tpublic void updateEmployee(int id, Employee employee) {\n\t\tfor(int i=0;i<employees.size();i++)\r\n\t\t{\r\n\t\t\tEmployee emp= employees.get(i);\r\n\t\t\tif(emp.getEmpId()==(id));\r\n\t\t\temployees.set(i, employee);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "@PutMapping(\"/my-employee\")\n\t@Secured(Roles.BOSS)\n\tpublic ResponseEntity<?> updateEmployee(@Valid @RequestBody ModifyEmployeeDto modifyEmployeeDto) {\n\t\tLogStepIn();\n\n\t\tEmployee employee = employeeRepository.findById(modifyEmployeeDto.id.longValue());\n\t\tif(employee == null)\n\t\t\treturn LogStepOut(ResponseEntity.notFound().build());\n\n\t\tString bossUsername = SecurityContextHolder.getContext().getAuthentication().getName();\n\t\tEmployee employeeBoss = userRepository.findByName(bossUsername).getEmployee();\n\t\tif (employee.getBossId().equals(employeeBoss.getId())) {\n\t\t\tif(modifyEmployeeDto.grossPayment != null)\n\t\t\t\temployee.setGrossPayment(modifyEmployeeDto.grossPayment);\n\n\t\t\tif(modifyEmployeeDto.workHours != null)\n\t\t\t\temployee.setWorkHours(modifyEmployeeDto.workHours);\n\n\t\t\tif(modifyEmployeeDto.workStatus != null)\n\t\t\t\temployee.setWorkStatus(WorkStatus.get(modifyEmployeeDto.workStatus));\n\n\t\t\tif(modifyEmployeeDto.isEntrant != null)\n\t\t\t\temployee.setEntrant(modifyEmployeeDto.isEntrant);\n\n\t\t\tEmployee modifiedEmployee = employeeRepository.save(employee);\n\n\t\t\treturn LogStepOut(ResponseEntity.ok(toDto(modifiedEmployee)));\n\t\t}\n\n\t\treturn LogStepOut(ResponseEntity.badRequest().body(\"The requested id does not match the authenticated user's id.\"));\n\t}", "@Override\n public ResponseEntity<Void> updateEmployee(int id, @Valid EmployeeDTO employeeDTO) throws RestException {\n Employee employeeUpdate = EmployeeToEmployeeDTOMapper.INSTANCE.employeeDTOToEmployee(employeeDTO);\n employeesService.updateEmployee(id, employeeUpdate);\n return new ResponseEntity<>(HttpStatus.OK);\n }", "public managerUpadateEmployee(final String managerName, final String givenEmailAddress) {\r\n\t\ttry{\r\n\t\t //STEP 2: Register JDBC driver\r\n\t\t Class.forName(mainMethodClass.JDBC_DRIVER);\r\n\r\n\t\t //STEP 3: Open a connection\r\n\t\t conn = DriverManager.getConnection(mainMethodClass.DB_URL, \"root\", \"\");\r\n\t\t \r\n\t\t //STEP 4: Execute a query\r\n\t\t pstmt = conn.prepareStatement(\"SELECT first_name, last_name, email_address, password FROM manager_add_employee WHERE email_address = ?\");\r\n\t\t pstmt.setString(1, givenEmailAddress);\r\n\t\t ResultSet rs = pstmt.executeQuery();\r\n\r\n\t\t //STEP 5: Extract data from result set\r\n\t\t while(rs.next()){\r\n\t\t //Retrieve by column name\r\n\t\t firstName = rs.getString(\"first_name\");\r\n\t\t LastName = rs.getString(\"last_name\");\r\n\t\t emailAddress = rs.getString(\"email_address\");\r\n\t\t password = rs.getString(\"password\");\t\t \r\n\t\t }\r\n\t\t rs.close();\r\n\t\t }catch(SQLException se){\r\n\t\t JOptionPane.showMessageDialog(null, se);\r\n\t\t se.printStackTrace();\r\n\t\t }catch(Exception e){\r\n\t\t\t JOptionPane.showMessageDialog(null, e);\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\tsetTitle(\"Update Employee\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 450);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.GRAY);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(null);\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tpanel.setBounds(0, 0, 434, 70);\r\n\t\tcontentPane.add(panel);\r\n\t\t\r\n\t\tJLabel lblUpdateEmployee = new JLabel(\"UPDATE EMPLOYEE\");\r\n\t\tlblUpdateEmployee.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblUpdateEmployee.setForeground(Color.WHITE);\r\n\t\tlblUpdateEmployee.setFont(new Font(\"Tahoma\", Font.BOLD, 24));\r\n\t\tlblUpdateEmployee.setBounds(0, 0, 434, 70);\r\n\t\tpanel.add(lblUpdateEmployee);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBackground(Color.GRAY);\r\n\t\tpanel_1.setBounds(52, 110, 330, 260);\r\n\t\tcontentPane.add(panel_1);\r\n\t\t\r\n\t\tfirstname = new JTextField();\r\n\t\tfirstname.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tfirstname.setColumns(10);\r\n\t\tfirstname.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tfirstname.setBounds(10, 25, 150, 35);\r\n\t\tpanel_1.add(firstname);\r\n\t\tfirstname.setText(firstName);\r\n\t\t\r\n\t\tlastname = new JTextField();\r\n\t\tlastname.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlastname.setColumns(10);\r\n\t\tlastname.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tlastname.setBounds(170, 25, 150, 35);\r\n\t\tpanel_1.add(lastname);\r\n\t\tlastname.setText(LastName);\r\n\t\t\r\n\t\temailaddress = new JTextField();\r\n\t\temailaddress.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\temailaddress.setColumns(10);\r\n\t\temailaddress.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\temailaddress.setBounds(10, 90, 310, 35);\r\n\t\tpanel_1.add(emailaddress);\r\n\t\temailaddress.setText(emailAddress);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"First Name\");\r\n\t\tlabel_1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_1.setBounds(10, 3, 100, 22);\r\n\t\tpanel_1.add(label_1);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"Last Name\");\r\n\t\tlabel_2.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_2.setBounds(170, 3, 100, 22);\r\n\t\tpanel_1.add(label_2);\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"Email Address\");\r\n\t\tlabel_3.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_3.setBounds(10, 68, 100, 22);\r\n\t\tpanel_1.add(label_3);\r\n\t\t\r\n\t\tpasswordField = new JPasswordField();\r\n\t\tpasswordField.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tpasswordField.setBounds(10, 155, 310, 35);\r\n\t\tpanel_1.add(passwordField);\r\n\t\tpasswordField.setText(password);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"Password\");\r\n\t\tlabel_4.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_4.setBounds(10, 132, 100, 22);\r\n\t\tpanel_1.add(label_4);\r\n\t\t\r\n\t\tJButton btnUpdateAccount = new JButton(\"Update Account\");\r\n\t\tbtnUpdateAccount.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfinal String updateFirstName = firstname.getText().trim();\r\n\t\t\t\tfinal String updateLastName = lastname.getText().trim();\r\n\t\t\t\tfinal String updateEmailAddress = emailaddress.getText().trim();\r\n\t\t\t\tfinal String updatePassword = passwordField.getText().trim();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tClass.forName(mainMethodClass.JDBC_DRIVER);\r\n\t\t\t\t\tconn = DriverManager.getConnection(mainMethodClass.DB_URL,\"root\",\"\");\r\n\t\t\t\t\tpstmt = conn.prepareStatement(\"UPDATE manager_add_employee SET first_name = ? ,last_name = ?,email_address = ? ,password = ? WHERE email_address = ?\");\r\n\t\t\t\t\tpstmt.setString(1, updateFirstName);\r\n\t\t\t\t\tpstmt.setString(2, updateLastName);\r\n\t\t\t\t\tpstmt.setString(3, updateEmailAddress);\r\n\t\t\t\t\tpstmt.setString(4, updatePassword);\r\n\t\t\t\t\tpstmt.setString(5, givenEmailAddress);\r\n\t\t\t\t\tint i = pstmt.executeUpdate();\r\n\t\t\t\t\tif(i > 0){\r\n\t\t\t\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tsuccesfullUpdateEmployee frame = new succesfullUpdateEmployee(managerName, updateFirstName, updateLastName, updateEmailAddress, updatePassword);\r\n\t\t\t\t\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data Not Save\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdateAccount.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tbtnUpdateAccount.setFocusable(false);\r\n\t\tbtnUpdateAccount.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tbtnUpdateAccount.setBackground(Color.LIGHT_GRAY);\r\n\t\tbtnUpdateAccount.setBounds(10, 211, 150, 35);\r\n\t\tpanel_1.add(btnUpdateAccount);\r\n\t\t\r\n\t\tfinal JButton button_1 = new JButton(\"Back\");\r\n\t\tbutton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e1) {\r\n\t\t\t\tif(e1.getSource() == button_1){\r\n\t\t\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tmanagerSearchEmployeeUpdate mff = new managerSearchEmployeeUpdate(managerName);\r\n\t\t\t\t\t\t\t\tmff.setLocationRelativeTo(null);\r\n\t\t\t\t\t\t\t\tmff.setVisible(true);\r\n\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tbutton_1.setFocusable(false);\r\n\t\tbutton_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tbutton_1.setBackground(Color.LIGHT_GRAY);\r\n\t\tbutton_1.setBounds(170, 211, 150, 35);\r\n\t\tpanel_1.add(button_1);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setLayout(null);\r\n\t\tpanel_2.setBackground(Color.GRAY);\r\n\t\tpanel_2.setBounds(0, 70, 434, 25);\r\n\t\tcontentPane.add(panel_2);\r\n\t\t\r\n\t\tJLabel label_5 = new JLabel(managerName);\r\n\t\tlabel_5.setHorizontalTextPosition(SwingConstants.RIGHT);\r\n\t\tlabel_5.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlabel_5.setForeground(Color.WHITE);\r\n\t\tlabel_5.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_5.setBounds(0, 0, 425, 25);\r\n\t\tpanel_2.add(label_5);\r\n\t}", "int updateByPrimaryKeySelective(Employee record);", "public void modificarempleado(Empleado empleado)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n empleadodatos.update(empleado);\n conexion.commit();\n System.out.println(\"Empleado modificado con exito\");\n }catch(SQLException e){\n System.out.println(\"Error en modificacion de empleado\");\n e.printStackTrace();\n try{\n conexion.rollback();\n }catch(SQLException ex){\n ex.printStackTrace();\n System.out.println(\"Error en rollback, vamos a morir todos\");\n ex.printStackTrace();\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }", "public void updateEmployeeDetails(int employeeId, String firstName, String lastName, int salary, long mobileNumber,\n\t Date dateOfBirth ) {\n\temployeeService.updateEmployeeDetails(employeeId, firstName, lastName, salary, mobileNumber, dateOfBirth);\n }", "public void editEmployee(ActionRequest request, ActionResponse response) throws PortalException, SystemException {\n\t\tString strKey = request.getParameter(\"editKey\");\n\t\tlong empId = Long.valueOf(strKey);\n\t\tEmployee emp = EmployeeLocalServiceUtil.getEmployee(empId);\n\t\trequest.setAttribute(\"editKey\", emp);\n\t\tresponse.setRenderParameter(\"mvcPath\", \"/html/employee/edit.jsp\");\n\t}", "public void setEmployeeId(long employeeId);", "@Override\n\tpublic boolean updateInfo(int employee_id, String firstName, String lastName) {\n\t\ttry (Connection con = ConnectionService.getConnection()) {\n\t\t\tString sql = \"UPDATE EMPLOYEE_TABLE\\r\\n\" + \n\t\t\t\t\t\"SET FIRSTNAME = ? , LASTNAME = ?\\r\\n\" + \n\t\t\t\t\t\"WHERE EMPLOYEE_ID = ?\";\n\t\t\tPreparedStatement pstmt = con.prepareStatement(sql);\n\t\t\tpstmt.setString(1, firstName);\n\t\t\tpstmt.setString(2, lastName);\n\t\t\tpstmt.setInt(3,employee_id);\n\t\t\tif(pstmt.executeUpdate() == 1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "@PutMapping(path = \"/{employeeNumber}\")\n private ResponseEntity<EmployeeDto> update(@PathVariable(name = \"employeeNumber\") Long employeeNumber,\n @RequestBody EmployeeDto employeeDto){\n Employee employeeRequest = modelMapper.map(employeeDto, Employee.class);\n\n // Save data to DB using create method()\n // passing converted Dto -> entity as parameter\n Employee employee = employeeService.update(employeeNumber, employeeRequest);\n\n // Convert back from Entity -> Dto\n // for returning values to the front end\n EmployeeDto employeeResponse = modelMapper.map(employee, EmployeeDto.class);\n\n return ResponseEntity.ok().body(employeeResponse);\n }", "@PutMapping(\"/emp\")\n\tpublic ResponseEntity<EmployeeResource> updateEmp(@RequestBody EmployeeResource employeeResource)\n\t{\n\t\temployeeResource = employeeService.saveEmp(employeeResource);\n\t\t\n\t\treturn new ResponseEntity<>(employeeResource, HttpStatus.OK);\n\t}", "@Override\n\tpublic int saveEmployee() {\n\t\tEmployeeDao dao= new EmployeeDao();\n\t\tint result=dao.saveEmployee(new Employee(101349, \"Deevanshu\", 50000));\n\t\treturn result;\n\t}", "@Override\r\n\tpublic int updateByExample(Emp record, EmpExample example) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public void update(Expence expence)\r\n/* 169: */ {\r\n/* 170:174 */ this.expenceDao.update(expence);\r\n/* 171: */ }", "@Override\n\tpublic void save(Employee employee) {\n\t\temployeeDao.save(employee);\n\t\t\n\t}", "public boolean updateEmployee(int id, String[] fields, String[] data) throws SQLException {\n if (fields.length != data.length)\n throw new IllegalArgumentException(\"Each field/data input must have a corresponding data/field input!\");\n\n String update = String.format(\"UPDATE %s SET %s = '%s'\", table_employees.name, fields[0], data[0]);\n StringBuilder sql = new StringBuilder(update);\n\n for (int i = 1; i < fields.length; i++) {\n String set = String.format(\", %s = '%s'\", fields[i], data[i]);\n sql.append(set);\n }\n\n String where = String.format(\" WHERE %s = %s\", table_employees.cols.id, id);\n sql.append(where);\n\n return con.createStatement().executeUpdate(sql.toString()) != 0;\n }", "@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}", "private void updateEmplUsingJDBC(\n final String firstName, final String lastName, final Date newStartDate) {\n \n LOG.info(\"updateEmployeeUsingJDBC: updating \" + firstName + \" \" + lastName);\n\n try {\n _updateEmployeeStatement.setDate(1, newStartDate);\n _updateEmployeeStatement.setString(2, firstName);\n _updateEmployeeStatement.setString(3, lastName);\n int rc = _updateEmployeeStatement.executeUpdate();\n if (rc <= 0) {\n LOG.error(\"updateEmplUsingJDBC: error updating employee, return = \" + rc);\n return;\n }\n } catch (Exception e) {\n LOG.error(\"updateEmplUsingJDBC: exception updating employee\", e);\n }\n }", "EmployeeDetail save(EmployeeDetail detail) throws DBException;", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }" ]
[ "0.84486455", "0.8208561", "0.8186445", "0.81023794", "0.80797845", "0.8011271", "0.7939111", "0.7909142", "0.79037815", "0.78889173", "0.7818739", "0.7810154", "0.777519", "0.77683026", "0.7752693", "0.7733819", "0.7731944", "0.77310914", "0.7695744", "0.7693276", "0.7676042", "0.7643236", "0.76234555", "0.7621929", "0.7620055", "0.75827676", "0.7550315", "0.75395244", "0.74955887", "0.7463965", "0.7460783", "0.7458938", "0.7417459", "0.7405787", "0.7400367", "0.7371286", "0.7362826", "0.7346502", "0.7327008", "0.731996", "0.73085856", "0.73048747", "0.7301934", "0.72635", "0.7211407", "0.72003984", "0.7153484", "0.7096582", "0.7087027", "0.7067681", "0.7030557", "0.6996298", "0.6992437", "0.6991904", "0.69795513", "0.69645375", "0.6951424", "0.69487077", "0.69312274", "0.6926205", "0.6884495", "0.68812746", "0.68280804", "0.68060905", "0.6798076", "0.679761", "0.67918426", "0.6787819", "0.6784905", "0.6772404", "0.67699635", "0.675111", "0.67334175", "0.67141974", "0.6713005", "0.66942126", "0.66876835", "0.6677384", "0.6658644", "0.66539645", "0.66479176", "0.66343653", "0.6626439", "0.66221607", "0.6591496", "0.6558189", "0.65527713", "0.6515621", "0.65141034", "0.65009606", "0.64778274", "0.64728934", "0.6472184", "0.646944", "0.6453355", "0.6452379", "0.6451755", "0.6448643", "0.643933", "0.64328045" ]
0.67576486
71
Checks if an employee exists in the database
public boolean exists(Session session, Employee emp) { List<Category> list; Transaction t = session.beginTransaction(); Query query = session.createQuery("from Employee where" + " name = :name and nifnie = :nifnie and companyEntryDate=:" + "companyEntryDate "); query.setParameter("name", emp.getName()); query.setParameter("nifnie", emp.getNifnie()); query.setDate("companyEntryDate", emp.getCompanyEntryDate()); list = query.list(); t.commit(); return !list.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean employeeExists() {\n\t\tResultSet r = super.query(\"SELECT \" + C.COLUMN_ID + \" FROM \" + C.TABLE_EMPLOYEE\n\t\t\t\t+ \" WHERE \" + C.COLUMN_ID + \"=\" + this.getID() + \" LIMIT 1\");\n\t\tif (r == null)\n\t\t\treturn false;\n\t\ttry {\n\t\t\tsuper.setRecentError(null);\n\t\t\treturn r.first();\n\t\t} catch (SQLException e) {\n\t\t\tsuper.setRecentError(e);\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isAlreadyExists(Employee employee) throws ClassNotFoundException{\n\t\tboolean result = false;\n\n\t\tClass.forName(\"com.mysql.cj.jdbc.Driver\");\n\n\t\ttry (Connection connection = DriverManager\n\n\t\t\t\t.getConnection(\"jdbc:mysql://localhost:3306/employees?useSSL=false\", \"root\", \"Chithra1!\");\n\n\n\t\t\t\tCallableStatement cs=(CallableStatement) connection.prepareCall(\"select username from employee where username = ? \")){\n\n\t\t\tcs.setString(1,employee.getUsername());\n\n\t\t\tResultSet rs =cs.executeQuery();\n\t\t\tresult = rs.next();\n\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif(result==true) {\n\t\t\treturn true;\n\t\t}else {\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "boolean hasEmployee();", "boolean hasEmployee();", "@Override\r\n\tpublic <S extends Employee> boolean exists(Example<S> arg0) {\n\t\treturn false;\r\n\t}", "boolean hasEmployeelist();", "protected boolean checkExistence(E entity) throws DAOException {\n\t\tString existanceSQL = getEntityExistanceSQL(entity);\n\n\t\ttry (Connection connection = source.getConnection();\n\t\t\t\tStatement st = connection.createStatement();\n\t\t\t\tResultSet rs = st.executeQuery(existanceSQL)) {\n\n\t\t\treturn rs.next();\n\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t}", "public Employeedetails checkEmployee(String uid);", "public boolean isIdExist(int projectId) throws EmployeeManagementException;", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "@java.lang.Override\n public boolean hasEmployee() {\n return employee_ != null;\n }", "public boolean hasEmployee(Employee i){\r\n boolean exists = false;\r\n\r\n for(Employee e: listOfEmployees){\r\n if(e.name.toLowerCase().equals(i.name.toLowerCase())&& e.departmentName.toLowerCase().equals(i.departmentName.toLowerCase()) && e.contactNumber.equals(i.contactNumber)){\r\n i.name = e.name;\r\n i.departmentName = e.departmentName;\r\n exists = true;\r\n }\r\n }\r\n return exists;\r\n\r\n }", "public boolean userExists(String user){\n boolean answer = false;\n //look into the database\n try{\n statement = connection.createStatement();\n //execute SQL query and get the data from the database\n ResultSet myResult = statement.executeQuery(\"SELECT name FROM members WHERE name = '\" + user +\"'\");\n while (myResult.next()) {\n if (myResult.getString(\"name\")!= null)\n //name exists so answer = true\n answer = true;\n }\n\n }catch (SQLException ex){ex.printStackTrace();}\n return answer;\n }", "public void isEmployee(String username) throws ValidationException {\n\t\ttry {\n\t\t\temployeeService.getEmployeeId(username);\n\t\t} catch (ServiceException e) {\n\t\t\tthrow new ValidationException(INVALIDEMPLOYEE);\n\t\t}\n\t}", "@Override\n\tpublic boolean existEnterprise(Enterprise enterprise) {\n\t\treturn enterpriseDAO.existEnterprise(enterprise.getId(),enterprise.getLicense());\n\t}", "private boolean personAlreadyExists(AddPeopleRequest addPeopleRequest) {\n // query db for this user\n AddPeopleRequest matchingEntry =\n this.addPersonRequestMongoRepository\n .findPersonByFirstAndLastName(\n addPeopleRequest.getFirstName(),\n addPeopleRequest.getLastName());\n // if the value returned is null.. the value did not exist..\n if (matchingEntry == null) {\n return false;\n } else {\n return true;\n }\n }", "int addEmployee() {\n \n if(isEmptyData()){\n return 0;\n }\n\n String Username = txtUsername.getText().trim();\n PreparedStatement ps = null;\n ResultSet rs = null;\n boolean exist = false;\n try {\n String sql = \"select * from employeedetails where username=?\";\n ps = conn.prepareStatement(sql);\n ps.setString(1, Username);\n rs = ps.executeQuery();\n if(rs.next()){\n exist = true;\n }\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(this, ex);\n } finally {\n Postgre p = new Postgre();\n p.closeConn(null, ps, rs);\n }\n System.out.println(exist);\n\n if(exist){\n JOptionPane.showMessageDialog(this, \"User with Username : \"+Username + \" exists. Try another Username.\"); \n return 0;\n }\n \n Date DOB = txtdob.getDate();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n String strDate = dateFormat.format(DOB);\n Timestamp dobt = changeDateFormat(strDate);\n Date date = txthiredate.getDate();\n dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n strDate = dateFormat.format(date);\n Timestamp hireDate = changeDateFormat(strDate);\n\n String gender = null;\n if (rbmale.isSelected()) {\n gender = \"Male\";\n } else if (rbfemale.isSelected()) {\n gender = \"Female\";\n }\n\n boolean valid = cbvalid.isSelected();\n String fname = txtfname.getText().trim();\n String lname = txtlname.getText().trim();\n String contact = txtcontact.getText().trim();\n String email = txtemail.getText().trim();\n String address = txtaddress.getText().trim();\n String city = txtcity.getText().trim();\n String state = txtstate.getText().trim();\n String country = txtcountry.getText().trim();\n String pincode = txtpincode.getText().trim();\n\n String sql = \"insert into employeedetails(username, fname, lname, gender, email, contactno, address, city, state_name, country, pincode, birth_date, validity, hire_date) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\n try {\n ps = conn.prepareStatement(sql);\n ps.setString(1, Username);\n ps.setString(2, fname);\n ps.setString(3, lname);\n ps.setString(4, gender);\n ps.setString(5, email);\n ps.setString(6, contact);\n ps.setString(7, address);\n ps.setString(8, city);\n ps.setString(9, state);\n ps.setString(10, country);\n ps.setString(11, pincode);\n ps.setTimestamp(12, dobt);\n ps.setBoolean(13, valid);\n ps.setTimestamp(14, hireDate);\n\n int i = ps.executeUpdate();\n if (i > 0) {\n JOptionPane.showMessageDialog(this, i + \" Employee data inserted !!!\");\n } else {\n JOptionPane.showMessageDialog(this, \"Some error occured. Try again!\");\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, e);\n e.printStackTrace();\n } finally {\n Postgre p = new Postgre();\n p.closeConn(null, ps, null);\n }\n\n return 1;\n }", "private static boolean doesUserExist () {\n String sqlRetrieveAisId = \"SELECT ais_id FROM users WHERE user_id=?\";\n \n boolean valid = false;\n try (Connection conn = Database.getConnection();\n PreparedStatement pstmt = conn.prepareStatement(sqlRetrieveAisId)) {\n \n pstmt.setInt(1, userId);\n \n ResultSet rs = pstmt.executeQuery();\n \n valid = rs.next() != false;\n } catch (SQLException se) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(1), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (IOException ioe) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n JOptionPane.showMessageDialog(MainLayout.getJPanel(), Messages.getError(0), Messages.getHeaders(0), JOptionPane.ERROR_MESSAGE);\n }\n \n return valid;\n }", "public boolean checkUserExists(String username) {\n boolean exists = false;\n try {\n conn = dao.getConnection();\n ps = conn.prepareStatement(\"SELECT * FROM USERS WHERE USERNAME=?\");\n ps.setString(1, username);\n\n ResultSet rs = ps.executeQuery();\n\n // rs.next() is false if the set is empty\n exists = rs.next();\n\n // close stuff\n ps.close();\n conn.close();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return exists;\n }", "public boolean addEmp(Employee e) {\n\t\treturn edao.create(e);\n\t\t\n\t}", "public boolean employeeIdPresent(int employeeId) {\n\n \tif (employeeService.employeeIdPresent(employeeId)) {\n return true;\n } else {\n \t return false;\n \t}\n }", "@Override\r\n\tpublic boolean existe(String nomeEmpresa) {\n\t\treturn false;\r\n\t}", "private boolean isExist(String name, Date date) {\n\t\t\n\t\tString sql = \"SELECT * from `expenses` WHERE Name='\"+name+\"' AND Date='\"+date+\"';\";\n\t\tResultSet rs = this.queryHandler.executeQuery(sql);\n\t\ttry {\n\t\t\tboolean exist = false;\n\t\t\twhile(rs.next()) {\n\t\t\t\texist = true;\n\t\t\t}\n\t\t\treturn exist;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.queryHandler.close();\n\t\treturn false;\n\t}", "@Override\n public boolean userExists(String name){\n\n String sql = \"SELECT count(*) FROM users WHERE name=?\";\n int count = jdbcTemplate.queryForObject(sql, Integer.class, name);\n if(count == 0) {\n return false;\n } else {\n return true;\n }\n\n }", "boolean exists(User user);", "public boolean createEmployeeInfo(Employee employee) {\n\t\treturn dao.createEmployeeInfo(employee);\n\t}", "public static boolean getEmployees(String username) {\n\t\tif(username != null) {\n\t\t\t//JDBCquery for employee with username\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public static boolean userExists(String username) throws IOException, SQLException {\n ArrayList<String> user = retrieveUser(username);\n if (!user.isEmpty()) {\n if (user.get(0).equals(username)) {\n System.out.println(\"Username exists in database.\");\n return true;\n }\n }\n System.out.println(\"The user: \" + username + \" does not exist\");\n return false;\n }", "public boolean contains (Employee a)\n\t{\n\t\tboolean employeeFound = false;\n\t\tif(a == null)\n\t\t\t{\n\t\t\tSystem.out.println(\"ERROR: Object parameter must not be null!\");\n\t\t\treturn false;\n\t\t\t}\n\t\t\t//throw new IllegalArgumentException(\"ERROR: Object parameter must not be null!\");\n\t\telse\n\t\t{\n\t\t\tfor(int i= 0; i < employeeData.length; i++)\n\t\t\t{\n\t\t\t\tif(employeeData[i] == a)\n\t\t\t\t{\n\t\t\t\t\temployeeFound = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn employeeFound;\n\t}", "@Test\n public void userNameExists ()throws SQLException {\n Connection conn = DriverManager.getConnection(\"jdbc:mysql://localhost/users\", \"root\", \"tech\");\n Statement stmt= (Statement) conn.createStatement();\n sql = \"SELECT * FROM user WHERE userName='\"+uName+\"'\";\n rs = stmt.executeQuery(sql);\n \n while(rs.next()){\n uName=rs.getString(\"username\");\n }\n \n boolean exists=false;\n if(uName==null){\n System.out.println(\"Username does not exist!\");\n exists=false;\n assertTrue(exists=false);\n //return exists;\n }\n System.out.println(\"Username already exists!\");\n exists=true;\n assertTrue(exists=true);\n //return exists;\n }", "public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }", "public boolean hasEmployee() {\n return employeeBuilder_ != null || employee_ != null;\n }", "private boolean createEmployeeAvailability(String name) {\n int empID;\n empID = findEmployee(name);\n\n String employeeAvailablitySQL = \"INSERT INTO empAvailability(empID, availability) values(\" +\n \"'\" + empID + \"'\" + \",\" +\n \"'000,000,000,000,000,000,000')\";\n return (database.updateDatabase(employeeAvailablitySQL));\n }", "public static String employeeExists(String eid, String pass){\n return \"select e_fname from employee where e_id = '\"+eid+\"' and e_pass = '\"+pass+\"'\";\n }", "public static void addEmployee(Employee employee) {\n try {\n if (employeeRepository.insert(dataSource, employee) == 1) {\n LOGGER.warn(\"The employee \" + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" is already in the list\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + employee.getFirstName() + \" \" + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"in-list\") + \"\\n\");\n } else {\n LOGGER.info(\"The employee \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" was successfully added to the list of employees\");\n System.out.println(\"\\n\" + resourceBundle.getString(\"emp\") + \" \" + employee.getFirstName() + \" \"\n + employee.getLastName() + \" \" + employee.getBirthday() + \" \" + resourceBundle.getString(\"success.add\") + \"\\n\");\n }\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n }", "@Test\n @Ignore\n public void testExists() throws Exception {\n System.out.println(\"exists\");\n Identifier identifier = null;\n IndexDaoImpl instance = null;\n boolean expResult = false;\n boolean result = instance.exists(identifier);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public boolean isEventExist(String eid) throws SQLException {\n\t\tboolean exist = false;\n\t\tSQLiteDatabase db = tableHelper.getReadableDatabase();\n\t\ttry {\n\t\t\tCursor cursor = db.query(SQLTablesHelper.MY_EVENT_TABLE_NAME, columns,\n\t\t\t\t\tSQLTablesHelper.MY_EVENT_EID + \" =?\",\n\t\t\t\t\tnew String[] {eid}, \n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\tif (!cursor.isAfterLast()) exist = true;\n\t\t\tcursor.close();\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t\treturn exist;\n\t}", "boolean validateEmployeeId(String employeeId);", "private Entity exists(String usrIn){\n\t\t\n\t\tFilter filter1 = new FilterPredicate(\"username\", FilterOperator.EQUAL, usrIn);\n\t\t\n\t\tQuery q = new Query(EMPLOYEE).setFilter(filter1);\t\n\t\tList<Entity> list = datastore.prepare(q).asList(FetchOptions.Builder.withDefaults());\n\t\t\n\t\treturn list.size() == 0 ? null : list.get(0);\n\t}", "public boolean IsExistById(Department d) {\n\t\treturn false;\n\t}", "public boolean exists() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry { return myData.record.exists(background.getClient()); }\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn false;\n\t}", "private boolean existsUser(Connection con) throws SQLException {\n\t\tlog.entry();\n\t\tboolean userExists = false;\n\t\tPreparedStatement ps = con.prepareStatement(\"SELECT COUNT(*) FROM Users \"\n\t\t + \"WHERE `id`=?;\");\n\t\ttry {\n\t\t\tps.setInt(1, id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.first() && rs.getInt(1) > 0) {\n\t\t\t\tuserExists = true;\n\t\t\t}\n\t\t} finally {\n\t\t\tcloseStatement(ps);\n\t\t}\n\t\tthrowSqlException();\n\t\tlog.exit();\n\t\treturn userExists;\n\t}", "@Override\n @SuppressWarnings(\"unchecked\")\n public boolean checkExists(String username) throws DAOException{\n \n try{\n Session session = HibernateConnectionUtil.getSession();\n \n Criteria crit = session.createCriteria(UserProfile.class);\n crit.add(Restrictions.eq(\"username\", username));\n List<UserProfile> userList = crit.list();\n session.close();\n return !userList.isEmpty();\n }\n catch(HibernateException e){\n throw new DAOException(\"HibernateException: \" + e.getMessage());\n }\n\n }", "public void isValidEmployee(Employee employee) throws ValidationException, ServiceException {\n\t\tNumberValidator.isValidEmployeeId(employee.getEmployeeId());\n\t\tNumberValidator.isValidMobileNumber(employee.getMobileNumber());\n\t\tStringValidator.isValidName(employee.getName());\n\t\tStringValidator.isValidEmail(employee.getEmail());\n\t\tStringValidator.isValidPassword(employee.getPassword());\n\t\tStringValidator.isValidUsername(employee.getUsername());\n\t\tInteger id = employeeService.exists(employee.getEmployeeId());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Employee Id already exists\");\n\t\t}\n\t\tid = employeeService.exists(employee.getMobileNumber());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Mobile Number already exists\");\n\t\t}\n\t\tid = employeeService.exists(employee.getEmail());\n\t\tif (id != null) {\n\t\t\tthrow new ValidationException(\"Email Id already exists\");\n\t\t}\n\t\tDateValidator.isValidJoinedDate(employee.getJoinedDate());\n\t}", "boolean isUserExists(RegisterData data) throws DuplicateUserException;", "boolean existsByNameAndId(String name, int id);", "@Test\r\n public void testGetAllEMployees() throws Exception {\r\n try {\r\n EmployeeDAOImpl instance = new EmployeeDAOImpl();\r\n List<Employee> result = instance.getAllEMployees();\r\n assertTrue(result != null);\r\n assertTrue(result.size() > 0);\r\n } catch (Exception ex) {\r\n assertTrue(ex.getMessage().contains(\"NoDataFromDatabase\"));\r\n }\r\n }", "boolean checkEmailExist(String email){\n boolean isEmailExists = false;\n dbConnection();\n try{\n stmt = con.prepareStatement(\"SELECT * FROM users ORDER BY email\");\n rs = stmt.executeQuery();\n while(rs.next()){\n String checkEmail = rs.getString(\"email\");\n if(checkEmail.equals(email)){\n isEmailExists = true;\n }\n }\n }\n catch(Exception e){\n e.printStackTrace();\n }\n return isEmailExists;\n }", "@Override\r\n\tpublic boolean registerEmployee(EmployeeEO employeeEORef) {\n\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\treturn true;\r\n\t}", "public boolean checkDb() {\n\t\t\n\t\tint userId = Auth.getCurrentUser().getId();\n\t\tString sql = \"select id from PersonalDetails where id='\"+userId+\"'\";\n\t\tint gotId;\n\t\t//connectToDb();\n\t\t\n\t\ttry(Connection conn = myDb;\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql)){\n\t\t\tgotId = rs.getInt(\"id\");\n\t\t}catch(SQLException e){\n\t\t\t\n\t\t\tmyDb = null;\n\t\t\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(gotId == userId) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\t//return false;\n\t\t\treturn false;\n\t\t}\n\n\t}", "boolean exists(PK id);", "public boolean isExistingUser(String email){\n Long count = userRepository.countByEmail(email);\n\n return count > 0;\n }", "public boolean userNameExists(){\r\n boolean userNameExists = false;\r\n //reads username and password\r\n String user = signup.getUsername();\r\n String pass = signup.getFirstPassword();\r\n try{\r\n //creates statement\r\n //connects to database\r\n \r\n Connection myConn = DriverManager.getConnection(Main.URL); \r\n \r\n //creates statement\r\n Statement myStmt = myConn.createStatement();\r\n System.out.println(\"statement initiated\");\r\n //SQL query\r\n ResultSet myRs = myStmt.executeQuery(\"select * from LISTOFUSERS \");\r\n System.out.println(\"query initiated\");\r\n //process result set\r\n //checks to see if the username already exists in the database\r\n while (myRs.next()){\r\n System.out.println(\"check\");\r\n if(user.equals(myRs.getString(\"USERNAME\"))){\r\n \r\n userNameExists = true;\r\n break;\r\n }\r\n }\r\n myConn.close();\r\n \r\n \r\n \r\n } catch (Exception e) \r\n {\r\n System.err.println(e.getMessage());\r\n } \r\n return userNameExists; \r\n }", "public boolean isElectiveExist(Elective elective) {\n\t\tString userid=elective.getId().getUserId().toString();\n\t\tString courseid=elective.getId().getCourseId().toString();\n\t\tString sql=\"select * from elective where user_id=\"+\"'\"+userid+\"'\"+\" and \"+\"course_id=\"+\"'\"+courseid+\"'\";\n\t\tList<Map<String, Object>> electives = electiveDao.query(sql);\n\t\tif(electives.size()>0){\n\t\t\t//System.out.println(\"service\"+teamings.get(0).get(teaming));\n\t\t\treturn true;\t\n\t\t}\n\t\t\t\n\t\treturn false;\n\t\t\n\t}", "public boolean existUser(String id);", "public boolean isExist(String id) {\n return mysqlDao.isExist(id);\n }", "Boolean checkUserExists(Integer userId) throws AppException;", "public boolean isEmployeeActive(Number employeeId) {\n boolean isActive = false;\n EmployeeVVOImpl empVO =\n (EmployeeVVOImpl)findValidationViewObject(\"EmployeeVVO1\");\n empVO.initQuery(employeeId);\n\n // Just doing a simple existence check. If you don't find a\n // match, return false.\n if (empVO.hasNext()) {\n isActive = true;\n }\n return isActive;\n }", "public boolean isExist(Date date) {\n return mysqlDao.isExist(date);\n }", "public boolean hasEmployeelist() {\n return employeelist_ != null;\n }", "boolean existsById(String accountNumber) throws AccountException;", "@Override\r\n\tpublic int addEmployee(Employee employee) {\n\t\tint added = 0;\r\n\t\tString insertData = \"insert into employee values(?,?,?,?)\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(insertData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getEmpId());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getSalary());\r\n\r\n\t\t\tadded = ps.executeUpdate();\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "private boolean findExist(UsersRobots usersRobots){\n List<UsersRobots> result = (List<UsersRobots>) entityManager.createQuery(\"SELECT ur FROM UsersRobots ur where ur.idUser = :idUser and ur.idRobot = :idRobot\")\n .setParameter(\"idUser\",usersRobots.getIdUser())\n .setParameter(\"idRobot\",usersRobots.getIdRobot())\n .getResultList();\n if(result.size() > 0){\n return true;\n }\n return false;\n }", "public boolean checkIfEmailExist(String email){\n // create query to get user with asked email\n TypedQuery<UsersEntity> findUser = entityManager.createQuery(\n \"SELECT user FROM UsersEntity user WHERE user.email=:email\",\n UsersEntity.class);\n\n // set query email parameter\n findUser.setParameter(\"email\", email);\n\n try {\n findUser.getSingleResult();\n FacesMessage msg = new FacesMessage(\"User: \" + email + \" - already exist\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n return true;\n } catch (NoResultException e) {\n return false;\n }\n }", "public boolean alreadyExist(String nameRoom) throws SQLException{\n return roomDao.alreadyExist(nameRoom);\n }", "public User userExist(User user);", "@Override\r\n\tpublic int insertEmployee(Employee employee) {\n\t\treturn employeedao.insertEmployee(employee);\r\n\t}", "public boolean existe(Atendente atendente) throws Execption {\r\n\r\n String sql = \"SELECT * FROM tb_atendente WHERE nome = ? \"\r\n + \"AND senha = ?\";\r\n\r\n try {\r\n // conexao = new ConexaoDB ();\r\n Connection conn = ConexaoDB.obtemConexao();\r\n\r\n PreparedStatement pst = conn.prepareStatement(sql);\r\n\r\n pst.setString(1, atendente.getNome());\r\n pst.setString(2, atendente.getSenha());\r\n\r\n // executando o comando 'select'\r\n // e recebendo o retorno\r\n ResultSet resultado = pst.executeQuery();\r\n\r\n if (resultado.next()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return false;\r\n }\r\n\r\n }", "public static boolean tableIsExist(String name) throws Exception {\n init();\n TableName tableName = TableName.valueOf(name);\n boolean flag = admin.tableExists(tableName);\n close();\n return flag;\n }", "public boolean checkEmail(TextField email) {\n String emailSQL = \"SELECT * FROM user WHERE email = ?\";\n ResultSet rsEmail;\n boolean email_exists = false;\n\n\n try {\n\n PreparedStatement emailPST = connection.prepareStatement(emailSQL);\n emailPST.setString(1, email.getText());\n rsEmail = emailPST.executeQuery();\n\n if (rsEmail.next()) {\n email_exists = true;\n outputText.setStyle(\"-fx-text-fill: #d33232\");\n outputText.setText(\"Email Already Used\");\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n return email_exists;\n\n }", "public boolean findUserIsExist(String name) {\n\t\treturn false;\r\n\t}", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public boolean isSetEmployeeId() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMPLOYEEID_ISSET_ID);\n }", "public void checkUsernameExist() {\n\n try {\n BLUser bluser = new BLUser();\n User user = new User();\n\n ResultSet rs = bluser.selectUserIdFromUsername(txt_username.getText());\n\n user.setUsername(txt_username.getText());\n bluser.setUser(user);\n\n if (bluser.checkUsernameExist()) {\n \n populateDataOnTable();\n }// end if\n else {\n JOptionPane.showMessageDialog(rootPane, \"Invalid username!\");\n }// end else \n\n }// end try\n catch (Exception ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage(), \"Exception\", JOptionPane.INFORMATION_MESSAGE);\n }//end catch\n }", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean existe(Long id) {\n\t\treturn false;\n\t}", "public boolean checkUser(String username){\n String hql = \"SELECT c.id from Customer c where c.username = :username\";\n Query query = entityManager.createQuery(hql);\n query.setParameter(\"username\", username);\n try {\n query.getSingleResult();\n }catch(NoResultException e){\n return true;\n }\n return false;\n }", "public boolean checkThisEmailAlreadyExist(String email) {\n\t\tquery = \"select id from guru where email=?\";\n\t\tList<GuruModel> list = this.jdbcTemplate.query(query,new Object[]{email},BeanPropertyRowMapper.newInstance(GuruModel.class));\n\t\t\n\t\tif(list.size() == 0)\n\t\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean updateEmployee(Employee employee) {\n\t\tboolean added = false;\r\n\t\tString updateData = \"update employee set empName=?, salary=? ,technology=? where empId=?\";\r\n\r\n\t\ttry {\r\n\t\t\tPreparedStatement ps = dataSource.getConnection().prepareStatement(updateData);\r\n\t\t\tps.setString(1, employee.getName());\r\n\t\t\tps.setInt(2, employee.getSalary());\r\n\t\t\tps.setString(3, employee.getTechnoogy());\r\n\t\t\tps.setInt(4, employee.getEmpId());\r\n\r\n\t\t\tint updated = ps.executeUpdate();\r\n\t\t\tif (updated > 0) {\r\n\t\t\t\tadded = true;\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn added;\r\n\t}", "@Override\n\tpublic boolean checkUser(String username) {\n\t\tboolean result = false;\n\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query = (Query) session.createQuery(\"from Member where username=?\");\n\n\t\tMember member = (Member) query.setString(0, username).uniqueResult();\n\t\tif (member != null) {\n\t\t\tresult = true;\n\t\t\tlogger.info(\"Member Exists\");\n\t\t} \n\n\t\treturn result;\n\n\t}", "@Override\n\tpublic boolean userExists(String email) {\n\t\treturn (searchIndex(email) >= 0);\n\t}", "public boolean checkIfExist(Coupon coupon) throws DbException;", "boolean exists(Integer id);", "@Override\r\n\tpublic boolean addemp(EmployeeBean employeeBean) {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\t\tEntityTransaction entityTransaction = manager.getTransaction();\r\n\t\tboolean isAdd = false;\r\n\t\ttry {\r\n\t\t\tentityTransaction.begin();\r\n\t\t\tmanager.persist(employeeBean);\r\n\t\t\tif(employeeBean != null) {\r\n\t\t\t\tentityTransaction.commit();\r\n\t\t\t\tisAdd=true;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tisAdd = false;\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn isAdd;\r\n\t}", "public Boolean existCheckingAccountId(long accountId) throws Exception {\r\n try {\r\n CheckingAccountDAO checkingAccountDAO = new CheckingAccountDAO();\r\n checkingAccountDAO.selectById(accountId);\r\n checkingAccountDAO.close();\r\n return true;\r\n } catch (Exception e) {\r\n return false;\r\n }\r\n }", "public static boolean deleteStuff(Employee employee){\n\t\t// Get the Datastore Service\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tQuery q = buildAQuery(employee.getFirstName());\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tEntity entity = null;\n\t\ttry {\n\t\t\tfor (Entity result : pq.asIterable()) {\n\t\t\t\t//This is inefficient, but we are just writing simple code at this point\n\t\t\t\tentity = result; \n\t\t\t}\n\t\t} catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(entity != null){\n\t\t\t//First get their key\n\t\t\tKey key = entity.getKey();\n\t\t\tdatastore.delete(key);\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false; \n\t\t}\n\n\t}", "public static boolean findAndDisplayEmployee(Statement stmt, String empID) throws SQLException {\r\n boolean employeeFound; //flag\r\n\r\n //create a SELECT statement to get the specified\r\n //row from the employee table\r\n String sqlStatement = \"SELECT * FROM Employee WHERE empID = '\" +\r\n empID + \"'\";\r\n\r\n //send the SELECT statement to the DBMS\r\n ResultSet result = stmt.executeQuery(sqlStatement);\r\n\r\n //display the contents of the result set\r\n if (result.next()){\r\n //display the employee\r\n System.out.println(\"EmpID: \" +\r\n result.getString(\"EmpID\"));\r\n System.out.println(\"Name: \" +\r\n result.getString(\"Name\"));\r\n System.out.println(\"Position: \" +\r\n result.getString(\"Position\"));\r\n System.out.println(\"HourlyPayRate: \" +\r\n result.getDouble(\"HourlyPayRate\"));\r\n\r\n //set the flag to indicate the employee was found\r\n employeeFound = true;\r\n }\r\n else {\r\n //Indicate the employee was not found\r\n employeeFound = false;\r\n }\r\n return employeeFound;\r\n\r\n }", "@Override\n @Transactional(readOnly = true)\n public Boolean existsByUsername(String username) {\n return this.pacienteRepository.existsByUsername(username);\n }", "public boolean isUsersExist(Pet pet);", "boolean existeId(Long id);", "public void testExisteProjeto() {\n String nome = \"projetoNaoExistente\";\n assertFalse(ProjetoDAO.existeProjeto(nome));\n }" ]
[ "0.8014229", "0.73062676", "0.7248659", "0.7248659", "0.68654305", "0.6838001", "0.68220377", "0.6706755", "0.668229", "0.66005003", "0.66005003", "0.6587141", "0.64801115", "0.6468892", "0.64128923", "0.63886976", "0.6369855", "0.63690907", "0.6344128", "0.6342424", "0.6340439", "0.6286884", "0.62795645", "0.6273091", "0.62564427", "0.62547624", "0.6248362", "0.62166625", "0.6206849", "0.6205966", "0.6205027", "0.6205027", "0.61909544", "0.614999", "0.61232823", "0.6097143", "0.60919684", "0.6082806", "0.60721946", "0.6071573", "0.605858", "0.6048376", "0.6045991", "0.60097164", "0.60032773", "0.59856445", "0.5979987", "0.5978381", "0.59748", "0.59664613", "0.59662056", "0.5964992", "0.5944915", "0.59346193", "0.59303916", "0.59124386", "0.5910256", "0.5908552", "0.59085053", "0.59025383", "0.5900246", "0.5882643", "0.5880369", "0.58791614", "0.587383", "0.585812", "0.5857758", "0.5855458", "0.5840127", "0.5839853", "0.58342236", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.583141", "0.5808292", "0.58022934", "0.58022934", "0.5800102", "0.57999945", "0.57926875", "0.57882756", "0.57837003", "0.57786703", "0.5775145", "0.57729", "0.5765502", "0.5757242", "0.57533425", "0.57515866", "0.57495433", "0.5745445", "0.5742421" ]
0.67455256
7
Updates the employee bbddEmp by setting in it the values of the employee memoryEmp
public void updateColumns(Employee memoryEmp, Employee bbddEmp) { bbddEmp.setBankAccount(memoryEmp.getbAC()); bbddEmp.setCategory(memoryEmp.getCategory()); bbddEmp.setCodigoCuenta(memoryEmp.getCodigoCuenta()); bbddEmp.setCompany(memoryEmp.getCompany()); bbddEmp.setCompanyEntryDate(memoryEmp.getCompanyEntryDate()); bbddEmp.setCompanyEntryLocalDate(memoryEmp.getCompanyEntryLocalDate()); bbddEmp.setCompanyName(memoryEmp.getCompanyName()); bbddEmp.setEmail(memoryEmp.getEmail()); bbddEmp.setExtraPayroll(memoryEmp.getExtraPayroll()); bbddEmp.setExtraProRate(memoryEmp.getExtraProRate()); bbddEmp.setID(memoryEmp.getID()); bbddEmp.setIban(memoryEmp.getIban()); bbddEmp.setNominas(memoryEmp.getNominas()); bbddEmp.setPayroll(memoryEmp.getPayroll()); bbddEmp.setSurname1(memoryEmp.getSurname1()); bbddEmp.setSurname2(memoryEmp.getSurname2()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateEmp(Emp emp) {\n\t\t\n\t}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public void updateemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "public void update(Employee e) {\n\t\t\r\n\t}", "@Override\n\tpublic Employee update(Employee emp) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "public void updateEmployeeDetails(EmployeeDetails employeeDetails);", "@Override\n\tpublic void updateEmployee(Employee employee) {\n\t\tEmployee updateEmployee = em.find(Employee.class, employee.getId());\n\t\t\n\t\tem.getTransaction().begin();\n\t\tem.merge(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Updated successfully\");\n\t\tlogger.log(Level.INFO, \"Data Updated successfully\");\n\n\t}", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "void update(EmployeeDetail detail) throws DBException;", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void update(Employee employee) {\n\t}", "public Employee updateEmployeeDetails(Employee employee) {\n\t\t long requestObjectEmployeeId = employee.getEmployeeId();\n\t\t Employee existedEmployee = employeeDao.findEmployeeByEmployeeId(requestObjectEmployeeId);\n\t\t if(employee != null) {\n\t\t\t return employeeDao.save(employee);\n\t\t }\n\t\t\treturn null;\t\n\t}", "@Override\n\tpublic EmployeeBean updateEmployeeDetails(EmployeeBean employeeBean) throws Exception {\n\t\treturn employeeDao.updateEmployeeDetails(employeeBean);\n\t}", "@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int updateEmployee(Employee emp) throws RemoteException {\n\t\treturn DAManager.updateEmployee(emp);\n\t}", "@Override\n\tpublic Employee updateEmployee(Employee emp) {\n\t\tlog.debug(\"EmplyeeService.updateEmployee(Employee emp) update Employee object whos id is\" + emp.getId());\n\t\treturn repositary.save(emp);\n\t}", "@Override\n\tpublic Integer updateEmp(Integer id, String name) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void updateEmployee(long employeeId, Employee updateEmployee) {\n\t\t\r\n\t}", "@Override\n\tpublic void update(Empleado e) {\n\t\tSystem.out.println(\"Actualiza el empleado \" + e + \" en la BBDD.\");\n\t}", "@Override\n\tpublic void updateEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\ttemplate.update(empContactDetail);\n\n\t}", "@Override\n\tpublic void setEmpId(long empId) {\n\t\t_employee.setEmpId(empId);\n\t}", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public Employee update(Session session, Employee emp) {\n Employee bbddEmp;\n Transaction t = session.beginTransaction();\n Query query = session.createQuery(\"from Employee where\"\n + \" name = :name and nifnie = :nifnie and companyEntryDate=:\"\n + \"companyEntryDate \");\n query.setParameter(\"name\", emp.getName());\n query.setParameter(\"nifnie\", emp.getNifnie());\n query.setDate(\"companyEntryDate\", emp.getCompanyEntryDate());\n bbddEmp = (Employee) query.list().get(0);\n\n updateColumns(emp, bbddEmp);\n session.update(bbddEmp);\n t.commit();\n return bbddEmp;\n }", "public abstract void updateEmployee(int id, Employee emp) throws DatabaseExeption;", "public int updateEmployeeRecord(Employee employee) {\n\t\ttry {\n\t\t\t\n\t\t\tString query = \"update employeedbaddress set eName=?, eDesignation=?, eGender=?, eSalary=?, eUsername=?, ePassword=?, street=?, city=?, state=?, pincode=?, contact=?, email=? where eNo=?\";\n\t\t\tPreparedStatement ps = connection.prepareStatement(query);\n\t\t\tps.setString(1, employee.getEname());\n\t\t\tps.setString(2, employee.getEdesignation());\n\t\t\tps.setString(3, employee.getEgender());\n\t\t\tps.setDouble(4, employee.getEsalary());\n\t\t\tps.setString(5, employee.getEusername());\n\t\t\tps.setString(6, employee.getEpassword());\n\t\t\tps.setString(7, employee.getStreet());\n\t\t\tps.setString(8, employee.getCity());\n\t\t\tps.setString(9, employee.getState());\n\t\t\tps.setInt(10, employee.getPincode());\n\t\t\tps.setString(11, employee.getContact());\n\t\t\tps.setString(12, employee.getEmail());\n\t\t\tps.setInt(13, employee.getEno());\n\t\t\tresult = ps.executeUpdate();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn result;\n\t}", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "public EmployeeDTO updateEmployee(final EmployeeDTO createEmployeeDTO) throws ApplicationCustomException;", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "@Override\n\t//业务层修改员工方法\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "@Override\n\tpublic void updateEmployeEmailById(int empid, String email) {\n\t\t\n\t}", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "public void setEmpID(String _empID) {\r\n this.empID = _empID;\r\n }", "public void update(Employee emp)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_UPDATE_EMPLOYEE_REQUEST, emp, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_UPDATE_EMPLOYEE_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}", "public Employeedetails updateEmployee(Employeedetails employeeDetail,\n\t\t\tConnection connection) {\n\n\t\ttry {\n\t\t\tString employeeId = employeeDetail.getEmployeeId();\n\t\t\tString employeeName = employeeDetail.getEmployeeName();\n\t\t\t;\n\t\t\tStatement statement = connection.createStatement();\n\t\t\tString squery = \"update employeeregister set employeename = '\"\n\t\t\t\t\t+ employeeName + \"' where employeeid ='\" + employeeId\n\t\t\t\t\t+ \"';\";\n\t\t\tint a = statement.executeUpdate(squery);\n\n\t\t\tif (a == 0) {\n\n\t\t\t\treturn employeeDetail;\n\t\t\t} else {\n\t\t\t\treturn employeeDetail;\n\t\t\t}\n\n\t\t} catch (SQLException sqle) {\n\n\t\t} catch (Exception e) {\n\n\t\t}\n\t\treturn employeeDetail;\n\n\t}", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "public void ModifyEmployee(int idEmployee , String firstName , String lastName, String name_department)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\temp.setName(firstName);\n\t\t\t\t\temp.setSurname(lastName);\n\t\t\t\t\temp.setDepartment(SearchDepartment(name_department));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setEmpName(String empName)\r\n\t{\r\n\t\tthis.empName = empName;\r\n\t}", "public void editar(Empleado empleado) {\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.merge(empleado);\n\t\tentityManager.getTransaction().commit();\n\t\t//JPAUtil.shutdown();\n\t}", "@SuppressWarnings(\"unchecked\")\n\t@RequestMapping(\"/updateemployee/{empId}\")\n\t\n\tpublic ModelAndView updateEmployee(@ModelAttribute(\"emppage\") Employee empk,@PathVariable (\"empId\") int empId,HttpServletRequest request, HttpServletResponse response) \n{\n\t\t\t\n\t\t\tHttpSession mlk = request.getSession();\n\t\t\t\n\t\t\t//String idv = request.getParameter(\"empId\");\n\t\t\t//int empId = (int)mlk.getAttribute(\"empp\");\n\t\t\tSystem.out.println(\"id val\"+empId);\n\t\t\tString empName=empk.getEmpName();\n\t\t\tSystem.out.println(\"employee Name\"+empName);\n\t\t\tString dob=empk.getDateOfBirth();\n\t\t\tSystem.out.println(\"dob \"+dob);\n\t\t\tString mailId=empk.getMailId();\n\t\t\tSystem.out.println(\"mail Id\"+mailId);\n\t\t\tString depsample = request.getParameter(\"deptEmpName\");\n\t\t\tList<Department> lsv = (List<Department>) mlk.getAttribute(\"lisdept\");\n\t\t\t\n\t\t\tint studeptid = 0;\n\t\t\tfor (Department department : lsv) {\n\t\t\t\tif(department.getDeptName().equals(depsample))\n\t\t\t\t{\n\t\t\t\t\tstudeptid= department.getDeptId();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"values update employee \"+ studeptid);\n\t\t\tlong mob = empk.getMobileNo();\n\t\t\tfloat sal = empk.getSalary();\n\t\t\tString comName = empk.getCompanyName();\n\t\t\tDepartment dv = new Department();\n\t\t\tdv.setDeptId(studeptid);\n\t\t\tEmployee emp = new Employee();\n\t\t\temp.setEmpId(empId);\n\t\t\temp.setEmpName(empName);\n\t\t\temp.setMailId(mailId);\n\t\t\temp.setDateOfBirth(dob);\n\t\t\temp.setDepartment(dv);;\n\t\t\temp.setMobileNo(mob);\n\t\t\temp.setSalary(sal);\n\t\t\temp.setCompanyName(comName);\n\t\t\t\n\t\t\tSystem.out.println(\"Values from update employee\"+empId + \" \"+empName+\" \"+mailId+ \" \"+dob + \" \"+studeptid+\" \"+mob+ \" \"+sal + \" \"+ comName);\n\t\t\t\n\t\t\tSystem.out.println(\"values for updating\");\n\t\t\t//System.out.println(empId+\" \"+empName + \" \"+ mailId+\" \"+dob+\" \"+studeptid);\n\t\t\t\n\t\t\tdeptEmpService.updateEmpServ(emp);\n\t\t\tHttpSession sea = request.getSession();\n\t\t\tsea.setAttribute(\"submitDone\",\"done\");\n\t\t\t//response.sendRedirect(\"listEmp?deptId=\"+studeptid);\n\t\t\treturn new ModelAndView(\"redirect:/listEmp?deptId=\"+studeptid);\n\t\t}", "public managerUpadateEmployee(final String managerName, final String givenEmailAddress) {\r\n\t\ttry{\r\n\t\t //STEP 2: Register JDBC driver\r\n\t\t Class.forName(mainMethodClass.JDBC_DRIVER);\r\n\r\n\t\t //STEP 3: Open a connection\r\n\t\t conn = DriverManager.getConnection(mainMethodClass.DB_URL, \"root\", \"\");\r\n\t\t \r\n\t\t //STEP 4: Execute a query\r\n\t\t pstmt = conn.prepareStatement(\"SELECT first_name, last_name, email_address, password FROM manager_add_employee WHERE email_address = ?\");\r\n\t\t pstmt.setString(1, givenEmailAddress);\r\n\t\t ResultSet rs = pstmt.executeQuery();\r\n\r\n\t\t //STEP 5: Extract data from result set\r\n\t\t while(rs.next()){\r\n\t\t //Retrieve by column name\r\n\t\t firstName = rs.getString(\"first_name\");\r\n\t\t LastName = rs.getString(\"last_name\");\r\n\t\t emailAddress = rs.getString(\"email_address\");\r\n\t\t password = rs.getString(\"password\");\t\t \r\n\t\t }\r\n\t\t rs.close();\r\n\t\t }catch(SQLException se){\r\n\t\t JOptionPane.showMessageDialog(null, se);\r\n\t\t se.printStackTrace();\r\n\t\t }catch(Exception e){\r\n\t\t\t JOptionPane.showMessageDialog(null, e);\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\tsetTitle(\"Update Employee\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 450, 450);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.GRAY);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout(null);\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tpanel.setBounds(0, 0, 434, 70);\r\n\t\tcontentPane.add(panel);\r\n\t\t\r\n\t\tJLabel lblUpdateEmployee = new JLabel(\"UPDATE EMPLOYEE\");\r\n\t\tlblUpdateEmployee.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblUpdateEmployee.setForeground(Color.WHITE);\r\n\t\tlblUpdateEmployee.setFont(new Font(\"Tahoma\", Font.BOLD, 24));\r\n\t\tlblUpdateEmployee.setBounds(0, 0, 434, 70);\r\n\t\tpanel.add(lblUpdateEmployee);\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.setBackground(Color.GRAY);\r\n\t\tpanel_1.setBounds(52, 110, 330, 260);\r\n\t\tcontentPane.add(panel_1);\r\n\t\t\r\n\t\tfirstname = new JTextField();\r\n\t\tfirstname.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tfirstname.setColumns(10);\r\n\t\tfirstname.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tfirstname.setBounds(10, 25, 150, 35);\r\n\t\tpanel_1.add(firstname);\r\n\t\tfirstname.setText(firstName);\r\n\t\t\r\n\t\tlastname = new JTextField();\r\n\t\tlastname.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlastname.setColumns(10);\r\n\t\tlastname.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tlastname.setBounds(170, 25, 150, 35);\r\n\t\tpanel_1.add(lastname);\r\n\t\tlastname.setText(LastName);\r\n\t\t\r\n\t\temailaddress = new JTextField();\r\n\t\temailaddress.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\temailaddress.setColumns(10);\r\n\t\temailaddress.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\temailaddress.setBounds(10, 90, 310, 35);\r\n\t\tpanel_1.add(emailaddress);\r\n\t\temailaddress.setText(emailAddress);\r\n\t\t\r\n\t\tJLabel label_1 = new JLabel(\"First Name\");\r\n\t\tlabel_1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_1.setBounds(10, 3, 100, 22);\r\n\t\tpanel_1.add(label_1);\r\n\t\t\r\n\t\tJLabel label_2 = new JLabel(\"Last Name\");\r\n\t\tlabel_2.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_2.setBounds(170, 3, 100, 22);\r\n\t\tpanel_1.add(label_2);\r\n\t\t\r\n\t\tJLabel label_3 = new JLabel(\"Email Address\");\r\n\t\tlabel_3.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_3.setBounds(10, 68, 100, 22);\r\n\t\tpanel_1.add(label_3);\r\n\t\t\r\n\t\tpasswordField = new JPasswordField();\r\n\t\tpasswordField.setBorder(new LineBorder(Color.BLACK, 2));\r\n\t\tpasswordField.setBounds(10, 155, 310, 35);\r\n\t\tpanel_1.add(passwordField);\r\n\t\tpasswordField.setText(password);\r\n\t\t\r\n\t\tJLabel label_4 = new JLabel(\"Password\");\r\n\t\tlabel_4.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_4.setBounds(10, 132, 100, 22);\r\n\t\tpanel_1.add(label_4);\r\n\t\t\r\n\t\tJButton btnUpdateAccount = new JButton(\"Update Account\");\r\n\t\tbtnUpdateAccount.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfinal String updateFirstName = firstname.getText().trim();\r\n\t\t\t\tfinal String updateLastName = lastname.getText().trim();\r\n\t\t\t\tfinal String updateEmailAddress = emailaddress.getText().trim();\r\n\t\t\t\tfinal String updatePassword = passwordField.getText().trim();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tClass.forName(mainMethodClass.JDBC_DRIVER);\r\n\t\t\t\t\tconn = DriverManager.getConnection(mainMethodClass.DB_URL,\"root\",\"\");\r\n\t\t\t\t\tpstmt = conn.prepareStatement(\"UPDATE manager_add_employee SET first_name = ? ,last_name = ?,email_address = ? ,password = ? WHERE email_address = ?\");\r\n\t\t\t\t\tpstmt.setString(1, updateFirstName);\r\n\t\t\t\t\tpstmt.setString(2, updateLastName);\r\n\t\t\t\t\tpstmt.setString(3, updateEmailAddress);\r\n\t\t\t\t\tpstmt.setString(4, updatePassword);\r\n\t\t\t\t\tpstmt.setString(5, givenEmailAddress);\r\n\t\t\t\t\tint i = pstmt.executeUpdate();\r\n\t\t\t\t\tif(i > 0){\r\n\t\t\t\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tsuccesfullUpdateEmployee frame = new succesfullUpdateEmployee(managerName, updateFirstName, updateLastName, updateEmailAddress, updatePassword);\r\n\t\t\t\t\t\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data Not Save\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdateAccount.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tbtnUpdateAccount.setFocusable(false);\r\n\t\tbtnUpdateAccount.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tbtnUpdateAccount.setBackground(Color.LIGHT_GRAY);\r\n\t\tbtnUpdateAccount.setBounds(10, 211, 150, 35);\r\n\t\tpanel_1.add(btnUpdateAccount);\r\n\t\t\r\n\t\tfinal JButton button_1 = new JButton(\"Back\");\r\n\t\tbutton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e1) {\r\n\t\t\t\tif(e1.getSource() == button_1){\r\n\t\t\t\t\tEventQueue.invokeLater(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tmanagerSearchEmployeeUpdate mff = new managerSearchEmployeeUpdate(managerName);\r\n\t\t\t\t\t\t\t\tmff.setLocationRelativeTo(null);\r\n\t\t\t\t\t\t\t\tmff.setVisible(true);\r\n\t\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tbutton_1.setFocusable(false);\r\n\t\tbutton_1.setBorder(new LineBorder(new Color(0, 0, 0), 2));\r\n\t\tbutton_1.setBackground(Color.LIGHT_GRAY);\r\n\t\tbutton_1.setBounds(170, 211, 150, 35);\r\n\t\tpanel_1.add(button_1);\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setLayout(null);\r\n\t\tpanel_2.setBackground(Color.GRAY);\r\n\t\tpanel_2.setBounds(0, 70, 434, 25);\r\n\t\tcontentPane.add(panel_2);\r\n\t\t\r\n\t\tJLabel label_5 = new JLabel(managerName);\r\n\t\tlabel_5.setHorizontalTextPosition(SwingConstants.RIGHT);\r\n\t\tlabel_5.setHorizontalAlignment(SwingConstants.RIGHT);\r\n\t\tlabel_5.setForeground(Color.WHITE);\r\n\t\tlabel_5.setFont(new Font(\"Tahoma\", Font.BOLD, 14));\r\n\t\tlabel_5.setBounds(0, 0, 425, 25);\r\n\t\tpanel_2.add(label_5);\r\n\t}", "@Override\n\tpublic void updateEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\tthis.empContactDetailDAO.updateEmpContactDetail(empContactDetail);\n\t}", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "@Override\n\t@Transactional\n\tpublic void updateEmp(int employeeID, Employee employee) {\n\t\tOptional<Employee> empData = employeeRepository.findById(employeeID);\n\t\tif(empData.isPresent()) {\n\t\t\tEmployee emp = empData.get();\n\t\t\temp.setFirstName(employee.getFirstName());\n\t\t\temp.setLastName(employee.getLastName());\n\t\t\temp.setEmail(employee.getEmail());\n\t\t\temp.setPhone(employee.getPhone());\n\t\t\temployeeRepository.save(emp);\n\t\t}\n\t\t\n\t}", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "public EmployeeEntity updateEmployeeData(EmployeeEntity employee, StorageContext context)\n\t\t\tthrows PragmaticBookSelfException {\n\n\t\tSession hibernateSession = context.getHibernateSession();\n\n\t\ttry {\n\t\t\thibernateSession.update(employee);\n\t\t} catch (HibernateException he) {\n\t\t\tthrow new PragmaticBookSelfException(he);\n\t\t}\n\n\t\thibernateSession.evict(employee);\n\t\thibernateSession.flush();\n\n\t\treturn employee;\n\t}", "public void updateEmployee(Long employeeId, CreateOrEditEmployeeRequestDto employee) throws ApiDemoBusinessException;", "private static void updateEmployeeHelper() {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Insert Employee's ID\");\n\t\tString newID = input.nextLine();\n\t\t\n\t\tSystem.out.println(\"Insert Current name\");\n\t\tString newName = input.nextLine();\n\n\t\tSystem.out.println(\"Insert Old Department\");\n\t\tString oldDepartment = input.nextLine();\n\n\t\tSystem.out.println(\"Insert New Department\");\n\t\tString newDepartment = input.nextLine();\n\n\t\tems2.updateEmployee(newID, newName, oldDepartment, newDepartment);\n\t}", "public void setempID(String empID) {\n\t\t_empID = empID;\n\t}", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "@Override\n\tpublic Studentbean2 updateAddress(AddressBean upd) {\n\t\tStudentbean2 s=null;\n\t\tfor(Studentbean2 e:stu2)\n\t\t{ \n\t\t\tif(e.getId()==upd.getId())\n\t\t\t{ \n\t\t\t\te.setA(upd);\n\t\t\t\ts=e;\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t}", "@Override\n\tpublic void update(Employee employee) {\n\t\temployeeDao.update(employee);\n\t}", "@Override\r\n\tpublic boolean updateEmployee(EmployeeEO employeeEORef) {\n\t\tif(employeeDAORepoRef.findById(employeeEORef.getEmployeeId()).equals(null))\r\n\t\treturn false;\r\n\t\telse {\r\n\t\t\temployeeDAORepoRef.save(employeeEORef);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public getEmployeeInfo_result(getEmployeeInfo_result other) {\n if (other.isSetSuccess()) {\n this.success = new com.moseeker.thrift.gen.employee.struct.EmployeeInfo(other.success);\n }\n if (other.isSetE()) {\n this.e = new com.moseeker.thrift.gen.common.struct.BIZException(other.e);\n }\n }", "@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }", "@Override\n\tpublic Integer updateEmployee(EmployeeBean employeeBean, DepartmentBean departmentBean) {\n\t\t\n\t\tLOGGER.info(\"starts updateEmployee method\");\n\t\tLOGGER.info(\"Ends updateEmployee method\");\n\t\treturn adminEmployeeDao.updateEmployee(employeeBean);\n\t}", "public void setEmployeeId(long employeeId);", "public int updatePostingDetailsInfo(PpPostingdetail ppPostingdetail, PpEmployeemaster ppEmployeemaster){\r\n\tint a=\temployeeAppointmentDao.updatePostingDetailsInfo(ppPostingdetail, ppEmployeemaster);\r\n\r\n\t\treturn a;\r\n\t}", "void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}", "public void update(Employee employee){\n employeeRepository.save(employee);\n }", "protected void beforeUpdateEmployee(\n RetailscmUserContext userContext,\n Employee existed,\n String retailStoreCountryCenterId,\n String employeeId,\n int employeeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "public void setUpdateEmp(String updateEmp) {\n this.updateEmp = updateEmp == null ? null : updateEmp.trim();\n }", "void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }", "protected void beforeUpdateEmployee(\n RetailscmUserContext userContext,\n Employee existed,\n String occupationTypeId,\n String employeeId,\n int employeeVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "public void setEmpNumber(String empNumber)\r\n\t{\r\n\t\tthis.empNumber = empNumber;\r\n\t}", "public void setEmpname(String empname) {\n\t\tthis.empname = empname;\r\n\t}", "@Override\n\tpublic void preparedUpdateEmployee(Employee e) {\n\t\t\n\t}", "private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }", "public void setEmpId(int empId) {\n\t\tthis.empId = empId;\n\t}", "@Override\r\n\tpublic void updateEmployee(int id, Employee employee) {\n\t\tfor(int i=0;i<employees.size();i++)\r\n\t\t{\r\n\t\t\tEmployee emp= employees.get(i);\r\n\t\t\tif(emp.getEmpId()==(id));\r\n\t\t\temployees.set(i, employee);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "private void updateRecord() {\r\n int empId = -1;\r\n boolean hasError = false;\r\n try {\r\n empId = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Employee id must be integer\");\r\n }\r\n String telephone = employeeNumberJTextField.getText();\r\n String name = employeeNameJTextField.getText();\r\n int years = -1;\r\n try {\r\n years = Integer.parseInt(employeeYearsOfWorkJTextField.getText());\r\n } catch (NumberFormatException e) {\r\n hasError = true;\r\n JOptionPane.showMessageDialog(this, \"Years of works must be an integer\");\r\n }\r\n if (!hasError) {\r\n records.add(new Record(empId, telephone, name, years));\r\n }\r\n }", "public void updateEmployee(Employee employee) throws SQLException {\n PreparedStatement preparedStatement = null;\n MysqlDbManager mysqlDb = MysqlDbManager.getInstance();\n String SQL = \"UPDATE employees SET surname=?, name=?, gender=?, marital_status=?, salary=?, dob=? WHERE idEmployee=?\";\n try {\n mysqlDb.getNewConnection();\n preparedStatement = mysqlDb.getConnection().prepareStatement(SQL);\n preparedStatement.setString(1, employee.getSurname());\n preparedStatement.setString(2, employee.getName());\n preparedStatement.setString(3, employee.getGender());\n preparedStatement.setString(4, employee.getMaritalStatus());\n preparedStatement.setInt(5, employee.getSalary());\n preparedStatement.setDate(6, new Date(employee.getDob().getTime()));\n preparedStatement.setInt(7, employee.getId());\n mysqlDb.executePreparedUpdate(preparedStatement);\n } catch (NullPointerException e) {\n LOGGER.log(Level.SEVERE, \"There is no access to the mysql database: \" + e.toString());\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n } finally {\n try {\n if (preparedStatement != null) {\n preparedStatement.close();\n }\n if (!mysqlDb.getConnection().isClosed()) {\n mysqlDb.getConnection().close();\n }\n } catch (SQLException e) {\n LOGGER.log(Level.SEVERE, \"SQLException\" + e.toString());\n }\n }\n }", "public boolean updateEmployeeDetail(Employee employee) {\n\t\treturn dao.updateEmployeeDetail(employee);\n\t}", "public void setModifyEmp(String modifyEmp) {\n this.modifyEmp = modifyEmp;\n }", "public void insertEmp(Emp emp) {\n\t\t\n\t}", "public void setModifyEmp(Integer modifyEmp) {\n\t\tthis.modifyEmp = modifyEmp;\n\t}", "public ManageBranchEmployee(Data data,PrintData printData){\n this.data = data;\n this.printData = printData;\n trackingNumbers = new ArrayList<>();\n }", "private void updateEmployeeSeating() {\n BookingModel bookingModel1 = new BookingModel();\n UserModel userModel1 = new UserModel();\n try {\n bookingModel1.updateBookingSeat(employeeID, seatNum);\n userModel1.setPreviousSeat(seatNum);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic Employee addEmployeeData(Employee emp) {\n\t\treturn employeeDAO.addEmployee(emp);\r\n\t}", "public void testUpdateAddress7() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n this.dao.updateAddress(address, false);\r\n fail(\"IPE expected\");\r\n } catch (InvalidPropertyException e) {\r\n //good\r\n }\r\n }", "public void add(Employee emp) throws InvalidOperationException {\n if (employeeArray[emp.getId()] != null) {\n throw new InvalidOperationException(\"Error adding employee , employee id already exists \" + emp.getId());\n }\n try {\n employeeArray[emp.getId()] = emp;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new InvalidOperationException(\"Error adding employee , id must be less than \" + employeeArray.length);\n }\n }", "public void modificarempleado(Empleado empleado)throws SQLException{\n Connection conexion = null;\n \n try{\n conexion = GestionSQL.openConnection();\n if(conexion.getAutoCommit()){\n conexion.setAutoCommit(false);\n }\n \n EmpleadosDatos empleadodatos = new EmpleadosDatos();\n empleadodatos.update(empleado);\n conexion.commit();\n System.out.println(\"Empleado modificado con exito\");\n }catch(SQLException e){\n System.out.println(\"Error en modificacion de empleado\");\n e.printStackTrace();\n try{\n conexion.rollback();\n }catch(SQLException ex){\n ex.printStackTrace();\n System.out.println(\"Error en rollback, vamos a morir todos\");\n ex.printStackTrace();\n }\n }finally{\n if(conexion != null){\n conexion.close();\n }\n }\n }", "@Override\n\tpublic void addEmpContactDetail(EmpContactDetail empContactDetail) {\n\t\ttemplate.save(empContactDetail);\n\n\t}", "@PutMapping(\"/update\")\n\t public Employee updateEmployee(@RequestBody Employee emp)\n\t {\n\t\treturn employeeService.editEmployee(emp);\n\t }", "private void setValueForEditAddrss() {\n ServiceCaller serviceCaller = new ServiceCaller(context);\n serviceCaller.callGetAllAddressByIdService(addressid, new IAsyncWorkCompletedCallback() {\n @Override\n public void onDone(String workName, boolean isComplete) {\n if (isComplete) {\n if (!workName.trim().equalsIgnoreCase(\"no\") && !workName.equalsIgnoreCase(\"\")) {\n ContentDataAsArray contentDataAsArray = new Gson().fromJson(workName, ContentDataAsArray.class);\n for (Data data : contentDataAsArray.getData()) {\n if (data != null) {\n edt_name.setText(data.getName());\n edt_phone.setText(data.getPhone());\n edt_landmark.setText(data.getLandmark());\n edt_address.setText(data.getAddress());\n edt_city.setText(data.getCity());\n edt_state.setText(data.getState());\n }\n }\n }\n }\n }\n });\n\n }", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "public int updateEmployee(Employee emp) throws SQLException {\n\t\t\treturn employeeDAO.updateEmployee(emp);\n\t\t}", "public void update(Emp p){\n\t\n\t\tString sql=\"UPDATE emp99 set name=?, salary=?, designation=? WHERE id=\"+p.getId();\n\t\t\n\t\ttemplate.update(sql, p.getName(),p.getSalary(),p.getDesignation());\n\t\t\n\t\t/*return template.execute(sql, new PreparedStatementCallback<Boolean>() {\n\n\t\t\t@Override\n\t\t\tpublic Boolean doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\n\t\t\t\t\n\t\t\t\tps.setString(1, p.getName());\n\t\t\t\tps.setFloat(2, p.getSalary());\n\t\t\t\tps.setString(3, p.getDesignation());\n\t\t\t\tps.setInt(4, p.getId());\n\t\t\t\t\n\t\t\t\treturn ps.execute();\n\t\t\t}\n\t\t});*/\n\t\t\n\t}", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void empDetails() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "@RequestMapping(value = \"/employee/{empId}\", method = RequestMethod.PUT)\r\n\tpublic Employee updateEmployee(@RequestBody Employee employee, @PathVariable int empId)\r\n\t\t\tthrows EmployeeMaintainceException {\r\n\t\ttry {\r\n\t\t\treturn eService.updateEmployee(employee, empId);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new EmployeeMaintainceException(400, e.getMessage());\r\n\t\t}\r\n\r\n\t}", "@Override\n public void save(Employee theEmployee) {\n Employee dbEmployee = entityManager.merge(theEmployee);\n theEmployee.setId(dbEmployee.getId());\n }", "void assign (int departmentId, AssignEmployeeRequest empList);" ]
[ "0.7214944", "0.6658637", "0.64828134", "0.63875806", "0.6366684", "0.6276053", "0.62002176", "0.6186173", "0.61748135", "0.6167372", "0.6141892", "0.6127679", "0.6110889", "0.6104005", "0.60957205", "0.6077869", "0.6062936", "0.6059084", "0.6031682", "0.60042894", "0.60038495", "0.59829015", "0.59762096", "0.592981", "0.58820117", "0.582316", "0.58216614", "0.5815191", "0.580199", "0.5790298", "0.57763", "0.5761711", "0.5751869", "0.57245815", "0.5688783", "0.5680014", "0.5679414", "0.5661658", "0.5659608", "0.5639112", "0.5620134", "0.5607234", "0.5602907", "0.56022125", "0.5599984", "0.55807406", "0.5579354", "0.5573536", "0.5568841", "0.55582166", "0.5552828", "0.5549692", "0.5543019", "0.5537118", "0.5534639", "0.55335057", "0.55224144", "0.5522237", "0.5521062", "0.5518125", "0.5509549", "0.550332", "0.5496208", "0.5488301", "0.54872113", "0.54840446", "0.5483843", "0.5474725", "0.5473967", "0.54668075", "0.5466387", "0.5464139", "0.5460232", "0.545699", "0.5447831", "0.54424", "0.5424153", "0.54205126", "0.5419031", "0.5416502", "0.54139715", "0.53968817", "0.538633", "0.53753144", "0.5371525", "0.53635895", "0.53541636", "0.5348743", "0.53457516", "0.5339333", "0.53370154", "0.5335833", "0.532672", "0.53157586", "0.5314246", "0.5306224", "0.52985436", "0.5290791", "0.52899426", "0.52876097" ]
0.778142
0
Created by Jan Shair on 31/01/2017.
@Singleton @Component(modules={AppModule.class, NetModule.class}) public interface NetComponent { void inject(App application); void inject(MainActivity activity); SharedPreferenceUtil provideSharedPreferences(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void poetries() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void init() {}", "public final void mo91715d() {\n }", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public Pitonyak_09_02() {\r\n }", "@Override\n protected void initialize() \n {\n \n }", "public void mo12930a() {\n }", "@Override\n protected void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void mo1531a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void init() {\n\n\t}", "public void mo6081a() {\n }", "Consumable() {\n\t}", "private TMCourse() {\n\t}", "public void mo21877s() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void init() {\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void m23075a() {\n }" ]
[ "0.58478326", "0.5797519", "0.5680036", "0.566044", "0.54909265", "0.54683006", "0.5467793", "0.5467793", "0.546279", "0.54534084", "0.5445787", "0.5442567", "0.5406574", "0.5387817", "0.5384442", "0.5381082", "0.53529936", "0.5348938", "0.53425455", "0.5338641", "0.5338145", "0.5335194", "0.532913", "0.53240913", "0.5321506", "0.5307194", "0.5307194", "0.5307194", "0.5307194", "0.5307194", "0.5307194", "0.5291863", "0.52879804", "0.52842855", "0.5265447", "0.5254701", "0.52520806", "0.52520806", "0.52520806", "0.52520806", "0.52520806", "0.5250034", "0.52455807", "0.5244942", "0.52396", "0.5229324", "0.5229324", "0.5229324", "0.5229324", "0.5229324", "0.5229324", "0.5229324", "0.52245647", "0.52199507", "0.5216936", "0.5216936", "0.52130646", "0.52112395", "0.5211172", "0.520795", "0.52041405", "0.5203119", "0.51985466", "0.51947576", "0.51936966", "0.51880777", "0.5172123", "0.516241", "0.5160986", "0.5160986", "0.5160986", "0.51584643", "0.5157592", "0.51539105", "0.51539105", "0.51539105", "0.5148266", "0.5140599", "0.5138649", "0.5134422", "0.5128128", "0.51255226", "0.5125044", "0.51194197", "0.51165754", "0.5114825", "0.5114825", "0.51031405", "0.51031405", "0.5097983", "0.5097983", "0.5097983", "0.50968313", "0.5096099", "0.5084255", "0.5081022", "0.5080644", "0.5080644", "0.5080644", "0.5078257", "0.50764424" ]
0.0
-1
display/center the jdialog when the button is pressed
@Override public void actionPerformed(ActionEvent e) { frame.setVisible(false); new Register(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tJDialog jDialog = getPomocDialog();\n\t\t\t\t\tjDialog.setTitle(\"Pomoc\");\n\t\t\t\t\tjDialog.pack();\n\t\t\t\t\tPoint loc = getHlavneOkno().getLocation();\n\t\t\t\t\tloc.translate(20, 20);\n\t\t\t\t\tjDialog.setLocation(loc);\n\t\t\t\t\tjDialog.setVisible(true);\n\t\t\t\t\n\t\t\t\t}", "public void display() {\n dialog.setVisible(true);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcd.show(jp, \"3\");\n\t\t\t}", "public void display(){\r\n dlgValidationChks =new CoeusDlgWindow(mdiForm,\"Validation Rules\",true);\r\n dlgValidationChks.addWindowListener(new WindowAdapter(){\r\n public void windowOpened(WindowEvent we){\r\n btnOk.requestFocusInWindow();\r\n btnOk.setFocusable(true);\r\n btnOk.requestFocus();\r\n }\r\n });\r\n dlgValidationChks.addEscapeKeyListener( new AbstractAction(\"escPressed\") {\r\n public void actionPerformed(ActionEvent ar) {\r\n try{\r\n dlgValidationChks.dispose();\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }\r\n });\r\n try{\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n dlgValidationChks.setSize(WIDTH, HEIGHT);\r\n Dimension dlgSize = dlgValidationChks.getSize();\r\n dlgValidationChks.setLocation(screenSize.width/2 - (dlgSize.width/2),\r\n screenSize.height/2 - (dlgSize.height/2));\r\n dlgValidationChks.getContentPane().add( this );\r\n dlgValidationChks.setResizable(false);\r\n dlgValidationChks.setVisible(true);\r\n }catch(Exception exc){\r\n exc.printStackTrace();\r\n }\r\n }", "public static void showDialog() {\n\t\tdialog.setLocationRelativeTo(Cytoscape.getDesktop());\n\t\tdialog.setVisible(true);\n\t}", "public void center(){\n\t\t\n\t\t//If there is any progress dialog box, close it.\n\t\tFormUtil.dlg.hide();\n\t\t\n\t\t//Let the base GWT implementation of centering take control.\n\t\tsuper.center();\n\t\t\n\t}", "public void centerDialog() {\n final Toolkit toolkit = Toolkit.getDefaultToolkit();\n final Dimension screenSize = toolkit.getScreenSize();\n final int x = (screenSize.width - getWidth()) / 2;\n final int y = (screenSize.height - getHeight()) / 2;\n setLocation(x, y);\n }", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}", "public void actionPerformed(ActionEvent evt) {\r\n super.actionPerformed(evt);\r\n createDialog().show();\r\n }", "private void setDialog()\n {\n //this.setSize(350,500);\n this.setTitle(Constant.getTextBundle(\"ปฏิกิริยาต่อกัน\"));\n Toolkit thekit = this.getToolkit(); \n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation((screenSize.width-this.getSize().width)/2, (screenSize.height-this.getSize().height)/2);\n }", "public void showDialog(Dialog dialog) {\n activeDialog = dialog;\n activeDialog.center();\n }", "private void btnThemChongChiDinhActionPerformed(java.awt.event.ActionEvent evt) {\n ThemChongChiDinh.setVisible(true);\n ThemChongChiDinh.setLocationRelativeTo(null);\n\n hienThiToanBenh();\n hienThiToanBoThuoc();\n }", "private void createResultPopup() {\r\n resultDialog = new JDialog(parentFrame);\r\n resultDialog.setLayout(new BoxLayout(resultDialog.getContentPane(), BoxLayout.Y_AXIS));\r\n resultDialog.setAlwaysOnTop(true);\r\n Utilities.centerWindowTo(resultDialog, parentFrame);\r\n resultDialog.add(createResultLabel());\r\n resultDialog.add(createButtonDescription());\r\n resultDialog.add(createConfirmationButtons());\r\n resultDialog.pack();\r\n resultDialog.setVisible(true);\r\n }", "public void open(){\n dialog.setLocation\n (parent.getLocation().x + 10, parent.getLocation().y + 10);\n dialog.setSize(PREF_SIZE);\n dialog.setResizable(false);\n dialog.setVisible(true);\n dialog.setResizable(true);\n }", "public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingWorker<Void,Void> worker = new SwingWorker<Void,Void>()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\tinfomation.drawStart();\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\twait = new waittingDialog();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}).start();\n\t\t\t\t\t\t\tcenter.start();\n\t\t\t\t\t\t\twait.startSucess();\n\t\t\t\t\t\t\tstartButton.setEnabled(false);\n\t\t\t\t\t\t\tcloseButton.setEnabled(true);\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew IODialog();\n\t\t\t\t\t\t} catch (CipherException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t\t\tnew BlockChainDialog();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\tnew ExceptionDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t};\n\t\t\t\tworker.execute();\n\t\t\t}", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "Point showDialog()\n\t{\n\t\tsize = new Point(0, 0);\t//returned if user exits the dialog vice clicking \"Play\"\n\t\tthis.setVisible(true);\n\t\treturn size;\n\t}", "private void showDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJButton btn = (JButton) e.getSource();\n\t lev_no = (int) btn.getClientProperty(\"column\") + 3 * ((int) btn.getClientProperty(\"row\"));\n\t\t\tselect.setVisible(false);\n\t\t\ttitle.setVisible(true);\n\t\t\tstart.setVisible(true);\n\t\t\texit.setVisible(true);\n\t\t\tlev_button.setVisible(true);\n\t \n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tregistro.setLocation(thisobject.getX()+100, thisobject.getY());\n\t\t\t\tregistro.setVisible(true);\n\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"1\");\n\t\t\t\t}", "public void actionPerformed(ActionEvent evt) {\n\t\tsetEnabled(false);\n\n\t\tSwingUtils.showCentered(getFrame(), getDialog());\n\t}", "void startPopupDialog(String windowTitle, int colSize)\n { /* startPopupDialog */\n Panel buttonPanel= null;\t /* place buttons here */\n Button\n ok,\t\t /* update data */\n cancel;\t\t \t/* use default data */\n GridLayout gl; /* for layout of text fields, label, etc */\n \n \n /* [1] initialize */\n gl= new GridLayout(4,1);\n this.setLayout(gl);\t /* set gridlayout to frame */\n \n /* [1] Create User instruction label */\n label= new Label(spaces);\n \n /* [2] Create the buttons and arrange to handle button clicks */\n if(addButtonsCnt>0)\n { /* add button panel */\n buttonPanel= new Panel();\n \n if(addButtonsCnt==1)\n ok= new Button(\"Continue\");\n else ok= new Button(\"Ok\");\n ok.addActionListener(this);\n buttonPanel.add(\"Center\",ok);\n \n if(addButtonsCnt==2)\n {\n cancel= new Button(\" Cancel\");\n cancel.addActionListener(this);\n buttonPanel.add(\"Center\", cancel);\n }\n } /* add button panel */\n \n /* [3] add data text fields to panel */\n this.add(label); /* add to grid. data description label */\n if(addButtonsCnt>=2)\n {\n optionPanel= new Panel();\n this.add(optionPanel);\n \n textField= new TextField(colSize);\n this.add(textField); /* editable text */\n }\n \n /* [4] add buttons panel */\n if(buttonPanel!=null)\n this.add(buttonPanel); /* buttons (ok & cancel) */\n this.addWindowListener(this); /* listener for window events */\n \n /* [5] add components and create frame */\n this.setTitle(windowTitle); /* frame title */\n this.pack();\n \n /* Center frame on the screen, PC only */\n Dimension screen= Toolkit.getDefaultToolkit().getScreenSize();\n Point pos= new Point((screen.width-frame.getSize().width)/2,\n (screen.height-frame.getSize().height)/2);\n this.setLocation(pos);\n \n this.setVisible(false);\t /* hide frame which can be shown later */\n }", "public Confirm() {\n initComponents();\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n }", "private void buildSuccessDialog(){\n\t\tmainDialog = new JDialog(mainWindow,\"Success!\");\n\t\t//mainDialog.getContentPane().removeAll();\n\t\tJPanel p1 = new JPanel (new BorderLayout());\n\t\tp1.setBackground(Color.white);\n\t\t//success text\n\t\tJLabel lab = new JLabel(\"Login Successful!\");\n\t\tlab.setFont( new Font(\"URW Gothic L\",Font.BOLD, 15));\n\t\tlab.setAlignmentX(Component.LEFT_ALIGNMENT);\n\t\tp1.add(lab, BorderLayout.NORTH);\n\t\t\n\t\t//success image\n\t\tImageIcon img = new ImageIcon (\"./client_images/success.png\");\n\t\timg = new ImageIcon ( img.getImage().getScaledInstance(100,100,Image.SCALE_DEFAULT));\n\t\tJLabel imgLabel = new JLabel(img);\n\t\tp1.add(imgLabel,BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton (\"Ok\");\n\t\t//pressing ok closes the application\n\t\t//register action listener (anonymous inner class is sufficient)\n\t\tok.addActionListener (new ActionListener(){\n\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\t//call GUI's close up method to gracefully release all\n\t\t\t\t\t\t\t//resources\n\t\t\t\t\t\t\tClientGui.this.closeUp();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\tp1.add(ok,BorderLayout.SOUTH);\n\n\t\t//settings of the dialog box\n\t\tmainDialog.getContentPane().add(p1);\n\t\tmainDialog.setLocationRelativeTo(mainWindow);\n\t\tmainDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);\n\t\tmainDialog.setModal(true);\n\t\tmainDialog.setMinimumSize(new Dimension(300,200));\n\t\tmainDialog.setMaximumSize(new Dimension(300,200));\n\t\tmainDialog.setResizable(false);\n\t\tmainDialog.setVisible(true);\n\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t_startPosition.moveTopCenter();\n\t\t_startPosition.closeWindow();\n\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"3\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "public void display() {\r\n subAwardDlgWindow.setVisible(true);\r\n }", "private void jMenuItemControlAsistenciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemControlAsistenciaActionPerformed\n JDialogControlAsistencia vca = new JDialogControlAsistencia(this, modal, listaDeportes);\n LOG.info(\"Launching JDialogControlAsistencia...\");\n vca.setLocationRelativeTo(this);\n vca.setVisible(true);\n}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"2\");\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null,\"对话框\");\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Juego del Ahorcado creado en Java con Swing y AWT \"\n\t\t\t\t\t\t+ \"\\n \\nCreadores: \\nVictor Lozano, Cesar Torrelles, Giovanny Rodriguez\" + \"\\n Version 1.0\");\n\n\t\t\t}", "private void miDespreActionPerformed(java.awt.event.ActionEvent evt) { \n diInfo.setVisible(true);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tStudentManagement studentManagement =new StudentManagement();\n\t\t\t studentManagement.setModal(true);\n\t\t\t studentManagement.setVisible(true);\n\t\t\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tDodajStudentaDialog dodajStudenta = new DodajStudentaDialog();\n\t\tdodajStudenta.setVisible(true);\n\t}", "private void jMenuItemIniciarJuegosOlimpicosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemIniciarJuegosOlimpicosActionPerformed\n JDialogVerAsistencia dialogVerAsistencia = new JDialogVerAsistencia(listaDeportes);\n LOG.info(\"Launching JDialogVerAsistencia...\");\n dialogVerAsistencia.setModalityType(ModalityType.APPLICATION_MODAL);\n dialogVerAsistencia.setLocationRelativeTo(this);\n dialogVerAsistencia.setVisible(true);\n}", "public deal_complete() {\r\n\t\tsetTitle(\"Deal complete\");\r\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tsetBounds(740, 200, 800, 740);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\t\t\r\n\t\tJLabel lblWelcome = new JLabel(\"Your meal is being prepared!\");\r\n\t\tlblWelcome.setFont(new Font(\"Times New Roman\", Font.PLAIN, 49));\r\n\t\tlblWelcome.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblWelcome.setBounds(62, 95, 690, 80);\r\n\t\tcontentPane.add(lblWelcome);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBounds(177, 590, 436, 209);\r\n\t\tcontentPane.add(panel);\r\n\t\t\r\n\t\tJButton finish = new JButton(\"finish\");\r\n\t\tfinish.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(e.getSource() == finish) {\r\n\t\t\t\t\tsetVisible(false);\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tfinish.setFont(new Font(\"Times NewˇˇRoman\", Font.PLAIN, 22));\r\n\t\tfinish.setBounds(234, 44, 175, 123);\r\n\t\tpanel.add(finish);\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"thanks for your patronize\");\r\n\t\tlblNewLabel.setFont(new Font(\"MV Boli\", Font.PLAIN, 36));\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setBounds(104, 188, 586, 64);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\t\t\r\n\t\tImageIcon image1 =new ImageIcon(\"picture//thanks.png\");\r\n\t\tJLabel imagelable1 = new JLabel(image1);\r\n\t\timagelable1.setBounds(150, 148, 500, 500);\r\n\t\tcontentPane.add(imagelable1);\r\n\t\t\r\n\t\tsetVisible(true);\r\n\t}", "private void footerBtnDialogActionPerformed(ActionEvent evt) {\n }", "private void showSubmitBtn(){\n\t\tmainWindow.addLayer(submitBtn, BUTTON_LAYER, submitBtnX, submitBtnY);\n\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\tif (mActionToPerform == \"showDialog\")\n\t\t{\n\t\t\tmDialog = new CartogramWizardConstrainedLayerWindow();\n\t\t\tmDialog.setVisible(true);\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithoutSaving\")\n\t\t{\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithSaving\")\n\t\t{\n\t\t\tmDialog.saveChanges();\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ventanaReset = new javax.swing.JDialog();\n botonReiniciar = new javax.swing.JButton();\n labelGanador = new javax.swing.JLabel();\n labelPerdedor = new javax.swing.JLabel();\n\n ventanaReset.getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n botonReiniciar.setText(\"Reiniciar\");\n botonReiniciar.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mousePressed(java.awt.event.MouseEvent evt) {\n botonReiniciarMousePressed(evt);\n }\n });\n ventanaReset.getContentPane().add(botonReiniciar, new org.netbeans.lib.awtextra.AbsoluteConstraints(200, 120, -1, -1));\n\n labelGanador.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n labelGanador.setText(\"HAS GANADO, FELICIDADES\");\n labelGanador.setPreferredSize(new java.awt.Dimension(400, 20));\n ventanaReset.getContentPane().add(labelGanador, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 10, -1, -1));\n\n labelPerdedor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n labelPerdedor.setText(\"HAS PERDIDO POR IMBECIL\");\n labelPerdedor.setPreferredSize(new java.awt.Dimension(400, 20));\n labelPerdedor.setRequestFocusEnabled(false);\n ventanaReset.getContentPane().add(labelPerdedor, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 10, -1, -1));\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 780, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 364, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tpDashboard.setVisible(true);\r\n\t\t\t\tpHangHoa.setVisible(false);\r\n\t\t\t\tpLichLamViec.setVisible(false);\r\n\t\t\t\tpKhachHang.setVisible(false);\r\n\t\t\t}", "public About(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n // here's the part where i center the jframe on screen\n this.setLocationRelativeTo(null); \n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPedidoMesa pedidomesa;\n\t\t\t\ttry {\n\t\t\t\t\tpedidomesa = new PedidoMesa();\n\t\t\t\t\tpedidomesa.setLocationRelativeTo(null);\n\t\t\t\t\tpedidomesa.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tpedidomesa.setVisible(true);\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPedidoMesa pedidomesa;\n\t\t\t\ttry {\n\t\t\t\t\tpedidomesa = new PedidoMesa();\n\t\t\t\t\tpedidomesa.setLocationRelativeTo(null);\n\t\t\t\t\tpedidomesa.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tpedidomesa.setVisible(true);\n\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void show_dialog_box (){\n //show the message of turning on the location\n Dialog dialog = new Dialog(this);\n dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n dialog.setContentView(R.layout.location_message_r);\n dialog.show();\n }", "private void jMenuItemEliminarAlumnoActionPerformed(java.awt.event.ActionEvent evt) {\n JFrameSistemaDeMenu frame= new JFrameSistemaDeMenu();\ndialogo=new JDialogEliminarEmpleado(frame,true);\ndialogo.setSize(400, 380);\ndialogo.setLocationRelativeTo(frame);\ndialogo.setVisible(true);\n\n}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroCardapio cadastrocardapio;\n\t\t\t\ttry {\n\t\t\t\t\tcadastrocardapio = new CadastroCardapio();\n\t\t\t\t\tcadastrocardapio.setLocationRelativeTo(null);\n\t\t\t\t\tcadastrocardapio.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastrocardapio.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMoneyManagement moneyManagement = new MoneyManagement();\n\t\t\t\tmoneyManagement.setModal(true);\n\t\t\t\tmoneyManagement.setVisible(true);\n\t\t\t}", "DialogResult show();", "@Override\n public void actionPerformed(ActionEvent e) {\n TelaInvestimentos telaInvestimentos = new TelaInvestimentos(cliente, telaQueChamou);\n telaInvestimentos.pack();\n telaInvestimentos.setLocation(920, 250); // Posição inicial da TelaConta no monitor do pc\n telaInvestimentos.setVisible(true);\n }", "@Override\r\n public void actionPerformed(ActionEvent el) {\n \r\n \r\n if(el.getSource()==b9)\r\n {\r\n adminsuccess l1=new adminsuccess();\r\n l1.setVisible(true);\r\n l1.setLocationRelativeTo(null);\r\n dispose();\r\n }\r\n \r\n \r\n }", "private void centerDialog(Shell dlg) {\r\n\t\t// coordinates\r\n\t\tint x, y;\r\n\t\tPoint parentSize = dlg.getParent().getSize();\r\n\t\tPoint dlgSize = dlg.getSize();\r\n\t\tPoint parentLeft = dlg.getParent().getLocation();\r\n\t\t\r\n\t\tif (parentSize.x > dlgSize.x) \r\n\t\t x = ((parentSize.x - dlgSize.x)/2) + parentLeft.x;\r\n\t\telse \r\n\t\t x = parentLeft.x;\r\n\r\n\t\tif (parentSize.y > dlgSize.y) \r\n\t\t y = ((parentSize.y - dlgSize.y)/2) + parentLeft.y;\r\n\t\telse \r\n\t\t y = parentLeft.y;\r\n\t\t\r\n\t\tdlg.setLocation(x, y);\r\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void showpDialog() {\n if (!pDialog.isShowing())\n pDialog.show();\n }", "private void jMenuItemCentroInscripcionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCentroInscripcionesActionPerformed\n LOG.trace(evt.paramString());\n\n JDialogCentroInscripciones vci = new JDialogCentroInscripciones(listaDeportes);\n LOG.info(\"Launching JDialogCentroInscripciones...\");\n vci.setModalityType(modal);\n vci.setLocationRelativeTo(this);\n vci.setVisible(true);\n}", "public void popup(String a){\n pop.setLayout(null);\n ControlAction c = new ControlAction();\n pop.setBounds(420, 320, 460, 160);\n pop.setBorder(new LineBorder(Color.BLACK, 2));\n //condition for showing popup message\n if(a.startsWith(\"1\")){\n mas.setText(\"Selamat Anda Telah Melakukan Peminjaman\");\n nolocker.setText(\"No. Locker Anda Yaitu 17\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(true);\n }else if(a.equals(WARN1)){\n mas.setText(\"Maaf Anda Telah Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.equals(WARN2)){\n mas.setText(\"Maaf Anda Belum Melakukan Peminjaman\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n }else if(a.contains(\"BUKA\")){\n mas.setText(\"Anda Ingin Mengakhiri Peminjaman ?\");\n yes.setVisible(true);\n String key = a.substring(4);\n yes.setActionCommand(\"YES\"+key);\n no.setVisible(true);\n nolocker.setVisible(false);\n }else if(a.equals(NO)){\n mas.setText(\"Loker Anda Telah Terbuka\");\n yes.setVisible(false);\n no.setVisible(false);\n nolocker.setVisible(false);\n } \n mas.setFont(new Font(\"arial\", Font.BOLD, 20));\n mas.setOpaque(false);\n mas.setForeground(Color.BLACK);\n Dimension si1 = mas.getPreferredSize();\n mas.setBounds(10, 40, si1.width, si1.height);\n nolocker.setFont(new Font(\"arial\", Font.BOLD, 20));\n nolocker.setOpaque(false);\n nolocker.setForeground(Color.BLACK);\n Dimension si3 = nolocker.getPreferredSize();\n nolocker.setBounds(10, 70, si3.width, si3.height);\n //close button handling\n close.addActionListener(c);\n close.setActionCommand(EXIT);\n Dimension si2 = close.getPreferredSize();\n close.setBounds(420, 10, si2.width, si2.height);\n close.setBorder(BorderFactory.createEmptyBorder());\n close.setContentAreaFilled(false);\n //yes button handling\n yes.addActionListener(c);\n Dimension si4 = yes.getPreferredSize();\n yes.setBounds(100, 100, si4.width, si4.height);\n yes.setBorder(BorderFactory.createEmptyBorder());\n yes.setContentAreaFilled(false);\n //no button handling\n no.addActionListener(c);\n no.setActionCommand(NO);\n Dimension si5 = no.getPreferredSize();\n no.setBounds(250, 100, si5.width, si5.height);\n no.setBorder(BorderFactory.createEmptyBorder());\n no.setContentAreaFilled(false);\n //add to card3 top most layer\n card3.add(pop,6,0);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\thid();\n\t\t\t\tfinal JDialog jDialog=new JDialog();\n\t\t\t\tjDialog.setTitle(\"添加在线书架\");\n\t\t\t\tjDialog.setLayout(null);\n//\t\t\t\tjDialog.setLocationRelativeTo(null);\n\t\t\t\tjDialog.setSize(300, 200);\n\t\t\t\tJLabel jLabel=new JLabel(\"书架名\");\n\t\t\t\tjLabel.setBounds(50, 50, 80, 20);\n\t\t\t\tfinal JTextArea jTextArea=new JTextArea();\n\t\t\t\tjTextArea.setBounds(100, 50, 100, 20);\n\t\t\t\tjTextArea.setBorder(BorderFactory.createMatteBorder (1,1,1,1, Color.gray));\n\t\t\t\tJButton confirm=new JButton(\"确认\");\n\t\t\t\tconfirm.setBounds(50, 100, 80, 20);\n\t\t\t\tJButton cancel=new JButton(\"取消\");\n\t\t\t\tcancel.setBounds(150, 100, 80, 20);\n\t\t\t\tjDialog.add(jTextArea);\n\t\t\t\tjDialog.add(jLabel);\n\t\t\t\tjDialog.add(confirm);\n\t\t\t\tjDialog.add(cancel);\n\t\t\t\tjDialog.setVisible(true);\n\t\t\t\tjDialog.setAlwaysOnTop(true);\n\t\t\t\tconfirm.addActionListener(new ActionListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tjDialog.dispose();\n\t\t\t\t\t\tAddOnlineShelf addOnlineShelf=new AddOnlineShelf(jTextArea.getText());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tcancel.addActionListener(new ActionListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tjDialog.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "private void newLabButton(){\n NewLabNameTextfield.setText(\"\");\n NewLabDialog.setVisible(true);\n NewLabNameTextfield.requestFocusInWindow();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClassManagement classManagement = new ClassManagement();\n\t\t\t\tclassManagement.setModal(true);\n\t\t\t\tclassManagement.setVisible(true);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.err.println(\"action\");\n\t\t\t\tFTPSiteDialog dialog = new FTPSiteDialog(FTP_Client_Frame.this);\n\t\t\t\tdialog.setVisible(true);\n\t\t\t}", "public void go() {\n\t\tjfad.setVisible(true);\n\t}", "public void actionPerformed(ActionEvent e)\n {\n new AutoAnswerOptionsDialog(providerService, parentMenu)\n .setVisible(true);\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n l6.setVisible(true);l66.setVisible(true);t6.setVisible(true);\r\n b4.setVisible(true);jp1.setVisible(true);\r\n \r\n }", "public void showForm(JFrame inFrame,String name,boolean isModal){\r\n this.mdiForm = (CoeusAppletMDIForm)inFrame;\r\n //dlgRolMaint = new JDialog(inFrame,name,isModal);\r\n dlgWindow = new CoeusDlgWindow(inFrame,name,isModal){\r\n protected JRootPane createRootPane() {\r\n ActionListener actionListener = new ActionListener() {\r\n public void actionPerformed(ActionEvent actionEvent) {\r\n try{\r\n if (dataChanged) {\r\n try{\r\n int result = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (result == JOptionPane.YES_OPTION) {\r\n saveRolodexInfo();\r\n }else if (result == JOptionPane.NO_OPTION){\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception e){\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else {\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }catch(Exception ex){\r\n CoeusOptionPane.showErrorDialog(ex.getMessage());\r\n }\r\n }\r\n };\r\n JRootPane rootPane = new JRootPane();\r\n KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE,\r\n 0);\r\n rootPane.registerKeyboardAction(actionListener, stroke,\r\n JComponent.WHEN_IN_FOCUSED_WINDOW);\r\n return rootPane;\r\n }//RolodexMaintenanceDetailForm\r\n };\r\n JPanel dlgPanel = (JPanel)this.getRolodexComponent();\r\n dlgWindow.getRootPane().setDefaultButton(btnOK);\r\n dlgWindow.getContentPane().add(dlgPanel);\r\n dlgWindow.pack();\r\n //dlgWindow.setSize(660,450);\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n Dimension dlgSize = dlgWindow.getSize();\r\n dlgWindow.setLocation(screenSize.width/2 - (dlgSize.width/2),\r\n screenSize.height/2 - (dlgSize.height/2));\r\n screenSize = null;\r\n /* This will catch the window closing event and checks any data is\r\n * modified.If any changes are done by the user the system will ask for\r\n * confirmation of Saving the info.\r\n */\r\n dlgWindow.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\r\n \r\n dlgWindow.addWindowListener(new WindowAdapter(){\r\n public void windowOpened(WindowEvent evnt){\r\n dataChanged = false;\r\n if (functionType == 'V') {\r\n btnCancel.setRequestFocusEnabled(true);\r\n btnCancel.requestFocus();\r\n }else {\r\n txtLastName.setRequestFocusEnabled(true);\r\n txtLastName.requestFocus();\r\n }\r\n }\r\n public void windowClosing(WindowEvent evnt){\r\n performWindowClosing();\r\n }\r\n });\r\n dlgWindow.addEscapeKeyListener(\r\n new AbstractAction(\"escPressed\"){\r\n public void actionPerformed(ActionEvent ae) {\r\n performWindowClosing();\r\n }\r\n });\r\n dlgWindow.setResizable(false);\r\n dlgWindow.show();\r\n }", "public main() {\n initComponents();\n\n Timer();\n\n this.addKeyListener(this);\n this.setExtendedState(MAXIMIZED_BOTH);\n\n loader();\n this.jDialog11.setLocationRelativeTo(this.jDesktopPane);\n this.jDialog11.setVisible(true);\n//pantallaResolucion();\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks financial assistant button the visibility of the frame for the home screen will be set to false\n new FinancialAssistant();//displays the financial assistant page\n }", "public void jMenuHelpAbout_actionPerformed(ActionEvent e) {\n\t\tMainFrame_AboutBox dlg = new MainFrame_AboutBox(this);\n\t\tDimension dlgSize = dlg.getPreferredSize();\n\t\tDimension frmSize = getSize();\n\t\tPoint loc = getLocation();\n\t\tdlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);\n\t\tdlg.setModal(true);\n\t\tdlg.show();\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmsgsnd(\"start\");\r\n\t\t\t\ttoppanel.setVisible(true);\r\n\t\t\t\tbottompanel.setVisible(true);\r\n\t\t\t\tanswer.requestFocus();\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(mainscreen, \"Created by Saadia Aman and Ammar Israr\");\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t\tUpdateCompany ucp = new UpdateCompany();\n\t\t\t\tucp.setVisible(true);\n \t\t\n\t\t\t}", "void show() {\n\t\t\n\t\tthis.frame.validate();\n\t\tthis.frame.setVisible(true);\n\t\tthis.frame.toFront();\n\t\tthis.frame.requestFocus();\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\tif (mActionToPerform == \"showDialog\")\n\t\t{\n\t\t\tmDialog = new CartogramWizardSimulaneousLayerWindow();\n\t\t\tmDialog.setVisible(true);\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithoutSaving\")\n\t\t{\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\telse if (mActionToPerform == \"closeDialogWithSaving\")\n\t\t{\n\t\t\tmDialog.saveChanges();\n\t\t\tmDialog.setVisible(false);\n\t\t\tmDialog.dispose();\n\t\t}\n\t\t\n\t\n\t}", "public void initComponents(){\t\r\n\t\tsetName(\"dialog01\");\r\n\t\tsetTitle(\"Candle Exercise\");\r\n\t\tsetBounds(100, 100, 356, 300);\r\n\t\tgetContentPane().setLayout(new BorderLayout());\r\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\r\n\t\tcontentPanel.setLayout(null);\r\n\t\tFont font = new Font(\"Tahoma\", Font.PLAIN, 13);\r\n\r\n\t\tbtnCurrent = new JButton(\"Show Labels\");\r\n\t\tbtnCurrent.setToolTipText(\"shows current best data saved\");\r\n\t\tbtnCurrent.setFont(new Font(\"Tahoma\", Font.PLAIN, 13));\r\n\t\tbtnCurrent.setFocusPainted(false);\r\n\t\tbtnCurrent.setBounds(68, 77, 214, 88);\r\n\t\tcontentPanel.add(btnCurrent);\r\n\r\n\t}", "public void actionPerformed(ActionEvent ae) {\n\n GUI_dialoog dialoog = new GUI_dialoog();\n dialoog.setVisible(true);\n\n }", "public void showLifeCycleDialog() {\n\t\t\tlifeCycleDialogBox = new DialogBox(true);\n\t\t\tlifeCycleDialogBox.setGlassEnabled(true);\n\t\t\tlifeCycleDialogBox.setText(\"Seguimiento del Documento\");\n\n\t\t\t// Vertical Panel\n\t\t\tVerticalPanel vp = new VerticalPanel();\n\t\t\tvp.setSize(\"100%\", \"100%\");\n\t\t\tvp.add(lifeCycleCellTree);\n\t\t\tvp.add(new HTML(\"&nbsp;\"));\n\t\t\tvp.add(lifeCycleCloseButton);\n\n\t\t\t// Scroll Panel\n\t\t\tScrollPanel scrollPanel = new ScrollPanel();\n\t\t\tif (getUiParams().isMobile())\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() + \"px\", Window.getClientHeight() + \"px\");\n\t\t\telse\n\t\t\t\tscrollPanel.setSize(Window.getClientWidth() * .4 + \"px\", Window.getClientHeight() * .3 + \"px\");\n\t\t\tscrollPanel.setWidget(vp);\n\t\t\tlifeCycleDialogBox.setWidget(scrollPanel);\n\n\t\t\tDouble d = Window.getClientWidth() * .3;\n\t\t\tif (!getUiParams().isMobile()) \n\t\t\t\tlifeCycleDialogBox.setPopupPosition(d.intValue(), UiTemplate.NORTHSIZE * 3);\n\n\t\t\tlifeCycleDialogBox.show();\n\t\t}", "protected void dialog() {\n TextInputDialog textInput = new TextInputDialog(\"\");\n textInput.setTitle(\"Text Input Dialog\");\n textInput.getDialogPane().setContentText(\"Nyt bord nr: \");\n textInput.showAndWait()\n .ifPresent(response -> {\n if (!response.isEmpty()) {\n newOrderbutton(response.toUpperCase());\n }\n });\n }", "public void view(Frame owner, FeatureCollection fc) {\n\t\t\tJDialog dialog = new JDialog(owner, \"Replace geometry with circles centered on points\", true);\n\t\t\tContainer parent = dialog.getContentPane();\n\t\t\t\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroMesas cadastromesas;\n\t\t\t\ttry {\n\t\t\t\t\tcadastromesas = new CadastroMesas();\n\t\t\t\t\tcadastromesas.setLocationRelativeTo(null);\n\t\t\t\t\tcadastromesas.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastromesas.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public void mostrar() {\n\t\tlimpiarCampos();\n\t\tthis.setVisible(true);\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCoachManagement coachManagement = new CoachManagement();\n\t\t\t\tcoachManagement.setModal(true);\n\t\t\t\tcoachManagement.setVisible(true);\n\t\t\t}", "private void jbtn_exitActionPerformed(ActionEvent evt) {\n\t\t\t\tJFrame frame = new JFrame(\"Exit\");\n\t\t \tif(JOptionPane.showConfirmDialog(frame,\"Confirm you want to exit\",\"Medicine Info\",JOptionPane.YES_NO_OPTION)==JOptionPane.YES_OPTION)\n\t\t \t{\n\t\t \t\t\n\t\t \t\tnew medicine();\n\t\t \t\tshow_medicine.this.setVisible(false);\n\t\t \t\t\n\t\t \t}\n\t\t\t\t\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LibrarianLogin().setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "public TranslationStartDialog(JFrame parent) {\n super();\n initialize();\n pack();\n setLocationRelativeTo(parent);\n }", "public void show() {\n\t\tsetLocation(\n\t\t\tgetOwner().getX() + (getOwner().getWidth() - getWidth()) / 2, \n\t\t\tgetOwner().getY() + (getOwner().getHeight() - getHeight()) / 2 );\n\n\t\tsuper.show();\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcustomerFrame cf = new customerFrame(user);\r\n\t\t\t\tcf.setVisible(true);\r\n\t\t\t\tsetVisible(false);\r\n\t\t\t}", "public void actionPerformed (ActionEvent event) {\n RainRunGUI.c1.show(RainRunGUI.cards, RainRunGUI.MENUPANEL);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.getAppointView().updateUI();\n\t\t\t\tcontroller.getAppointView().display(true);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSwingWorker<Void,Void> worker = new SwingWorker<Void,Void>()\n\t\t\t\t{\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground() throws Exception {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\texit = new ExitDialog();\n\t\t\t\t\t\t\t}});\n\t\t\t\t\t\tcenter.exit();\n\t\t\t\t\t\texit.closeSucess();\n\t\t\t\t\t\tcloseButton.setEnabled(false);\n\t\t\t\t\t\tstartButton.setEnabled(true);\n\t\t\t\t\t\t//infomation = new closeJPanel();\n\t\t\t\t\t\t//frmIpfs.getContentPane().add(infomation,BorderLayout.CENTER);\n\t\t\t\t\t\t//new Thread(infomation).start();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t};\n\t\t\t\tworker.execute();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\npublic void actionPerformed(ActionEvent e) {\n\tif (e.getSource()==b1) {\n\t\t//触发进入按钮,则进入银行管理系统\n\t\tthis.setVisible(false);\n\t\tzhufacea a=new zhufacea();\n\t\ta.pack();\n\t\ta.setLocationRelativeTo(null);\n\t\ta.setBackground(Color.white);\n\t\ta.setDefaultLookAndFeelDecorated(true);\n\t\ta.setVisible(true);\n\t\treturn ;\n\t}\n\telse if (e.getSource()==b2) {\n\t\t//触发退出系统的时候,关闭显示窗口\n\t\tJOptionPane.showMessageDialog(this, \"欢迎下次光临!\");\n\t\tSystem.exit(0);\n\t}\n}", "private void basicUIButtonActionPerformed() {\n dbCopyFrame basicFrame = new dbCopyFrame(mainFrame, true);\n basicFrame.pack();\n basicFrame.setVisible(true);\n }", "private void showButtonDemo(){\n Button submitButton = new Button(\"Submit\");\n\n Button cancelButton = new Button(\"Cancel\");\n\n submitButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n Question2Query ans = new Question2Query();\n String val= \"Sorry, we are unable to answer\";\n try {\n val = ans.ask(text.getText());\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n statusLabel.setText(\"\\n\"+val);\n }\n });\n\n cancelButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n statusLabel.setText(\"Cancel Button clicked.\");\n }\n });\n\n //controlPanel.add(okButton);\n controlPanel.add(submitButton);\n controlPanel.add(cancelButton);\n mainFrame.setVisible(true);\n }", "private ShowFitaMT() {\r\n setLocationRelativeTo(null);\r\n initComponents();\r\n setSize(600,120);\r\n setModal(true);\r\n }", "public void show(){\n frame.setContentPane(mainPanel); //puts all our buttons and other objects on the window\n frame.setSize(700, 500);\n frame.setLocationRelativeTo(null); //opens our window in the center of the screen\n frame.setResizable(false);\n frame.setVisible(true); //displays the window\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tCadastroMesas cadastromesas;\n\t\t\t\ttry {\n\t\t\t\t\tcadastromesas = new CadastroMesas();\n\t\t\t\t\tcadastromesas.setLocationRelativeTo(null);\n\t\t\t\t\tcadastromesas.SetMainDashboard(main);\n\n\t\t\t\t\tmain.frmSistemaDeCadastro.setEnabled(false);\n\t\t\t\t\tcadastromesas.setVisible(true);\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMantenedorCapacitacion cap = new MantenedorCapacitacion();\r\n\t\t\t\tcap.setVisible(true);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tnew AddComplaintsShop().setVisible(true);\n\t\t\t}", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n JButton jb = (JButton) e.getSource();\n if(jb == next_button){\n\n layout.extractInformation(number_of_rows,number_of_cols,dataEntries);\n JOptionPane.showMessageDialog(this, \"Your input has been successfully acquired. Press OK to continue.\\n\");\n this.setVisible(false);\n AdminGUI startGui = new AdminGUI(dataEntries , layout);\n //TODO: Uncomment layout start\n layout.start();\n }\n\n\n }", "private void initialize() {\n frmInfoCursa = new JFrame();\n frmInfoCursa.setTitle(\"informatii cursa\");\n frmInfoCursa.getContentPane().setBackground(new Color(127, 255, 212));\n frmInfoCursa.setBounds(100, 100, 450, 300);\n frmInfoCursa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frmInfoCursa.getContentPane().setLayout(null);\n frmInfoCursa.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n int result = JOptionPane.showConfirmDialog(frmInfoCursa,\"Leave\" +\n \" ?\",\"Confirmare iesire :\", JOptionPane.YES_NO_OPTION);\n if (result == JOptionPane.YES_OPTION)\n frmInfoCursa.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n else\n frmInfoCursa.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }\n });\n\n btnNewButton = new JButton(\"Inapoi\");\n btnNewButton.setBounds(152, 184, 115, 29);\n btnNewButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n flag = true;\n DriverPage.afiseaza();\n frmInfoCursa.setVisible(false);\n }\n });\n frmInfoCursa.getContentPane().add(btnNewButton);\n\n JLabel lblNewLabel = new JLabel(\"Durata cursa:\");\n lblNewLabel.setFont(new Font(\"Showcard Gothic\", Font.BOLD, 16));\n lblNewLabel.setBounds(82, 48, 136, 26);\n frmInfoCursa.getContentPane().add(lblNewLabel);\n\n JLabel lblNewLabel_1 = new JLabel(\"\\tPret cursa:\");\n lblNewLabel_1.setFont(new Font(\"Showcard Gothic\", Font.PLAIN, 16));\n lblNewLabel_1.setBounds(82, 132, 136, 26);\n frmInfoCursa.getContentPane().add(lblNewLabel_1);\n\n JLabel lblNewLabel_2 = new JLabel(\"\" + distanta * 3 + \" lei\");\n lblNewLabel_2.setBounds(261, 50, 69, 20);\n frmInfoCursa.getContentPane().add(lblNewLabel_2);\n\n JLabel lblNewLabel_3 = new JLabel(distanta * 2 + \" minute\");\n lblNewLabel_3.setBounds(261, 134, 69, 20);\n frmInfoCursa.getContentPane().add(lblNewLabel_3);\n }" ]
[ "0.7413791", "0.72059286", "0.7138436", "0.70818603", "0.7044508", "0.6962745", "0.69540095", "0.69082975", "0.68524224", "0.68418694", "0.6765784", "0.6749975", "0.6695033", "0.6666761", "0.66460615", "0.66325337", "0.6618835", "0.66072375", "0.6594632", "0.65826946", "0.65617675", "0.6560848", "0.6556177", "0.65404916", "0.65361327", "0.6513612", "0.6508521", "0.6506799", "0.6506773", "0.6489578", "0.642994", "0.64219934", "0.6412918", "0.639692", "0.6387375", "0.636735", "0.6325719", "0.63211626", "0.63160783", "0.6310581", "0.63101345", "0.6297256", "0.6289742", "0.6288139", "0.6284941", "0.62840754", "0.62793934", "0.62724274", "0.62695473", "0.62619436", "0.6247613", "0.6246359", "0.62460834", "0.6241201", "0.6237065", "0.62321126", "0.6230163", "0.62299514", "0.6222669", "0.61962426", "0.6187211", "0.61804754", "0.6174634", "0.6173988", "0.61679107", "0.6155158", "0.61543804", "0.6153584", "0.615101", "0.61498433", "0.61402076", "0.61353236", "0.61266136", "0.6125325", "0.6121673", "0.61212695", "0.6118325", "0.6113681", "0.61085415", "0.60996866", "0.6096948", "0.6095682", "0.608513", "0.60826254", "0.60779494", "0.6077533", "0.60695785", "0.60692245", "0.60606486", "0.6059884", "0.60594", "0.60575086", "0.6057349", "0.60511667", "0.6042029", "0.6040929", "0.6039192", "0.6039183", "0.6038729", "0.60380876", "0.6031656" ]
0.0
-1
Method to replace the child fragment
public void replaceChildFragment(Fragment parentFragment, Fragment fragment, int containerId, String strFragmentTag, boolean flagIsAddToBackStack) { FragmentManager fragmentManager = parentFragment.getChildFragmentManager(); FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(containerId, fragment, strFragmentTag); if (flagIsAddToBackStack) fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n //mis tarjetas\n fragment = new CardsActivity();\n break;\n case 1:\n //buscador online\n fragment = new CardsActivityOnline();\n break;\n case 2:\n //active camera\n Intent it = new Intent(this, com.google.zxing.client.android.CaptureActivity.class);\n startActivityForResult(it, 0);\n break;\n case 3:\n ParseUser.getCurrentUser().logOut();\n finish();\n onBackPressed();\n break;\n default:\n //fragment = new CardsActivity();\n break;\n }\n\n if(null!=fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.main_content, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }", "protected void replaceLoginFragment() {\n\n\n }", "private void fragmentChange(){\n HCFragment newFragment = new HCFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.hc_layout, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "public void replaceFragment(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.content_frame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.addToBackStack(null).commit();\n }", "private void replaceFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.addToBackStack(null);\n if (fragment == listFragment) {\n transaction.replace(R.id.fragment_content, fragment, LIST_FRAGMENT_TAG);\n } else if (fragment == supportMapFragment) {\n transaction.replace(R.id.fragment_content, fragment, SUPPORT_FRAGMENT_TAG);\n }\n transaction.commit();\n }", "@Override\r\n public void changeFragment() {\r\n fm.beginTransaction()\r\n .replace(R.id.fragmentContainer, new ListWonderFragment())\r\n .commit();\r\n }", "@Override\n public void onClick(View v) {\n CompteEtudiant nextFrag = new CompteEtudiant();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onClick(View v) {\n CompteEnsg nextFrag = new CompteEnsg();\n getActivity().getFragmentManager().beginTransaction()\n .replace(R.id.content_frame, nextFrag, \"TAG_FRAGMENT\")\n .addToBackStack(null)\n .commit();\n }", "public void replaceFragment(Fragment fragment, String TAG) {\n\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.popBackStack(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);\n FragmentTransaction fragmentTransaction = fragmentManager .beginTransaction();\n fragmentTransaction .replace(R.id.content_restaurant_main_cl_fragment, fragment);\n fragmentTransaction .addToBackStack(TAG);\n fragmentTransaction .commit();\n//\n// getSupportFragmentManager()\n// .beginTransaction()\n// .disallowAddToBackStack()\n//// .setCustomAnimations(R.anim.slide_left, R.anim.slide_right)\n// .replace(R.id.content_restaurant_main_cl_fragment, fragment, TAG)\n// .commit();\n }", "@Override\n public void onViewSelected (int wordPosition) {\n // replace the fragment\n replaceFragment(wordPosition);\n }", "protected void replaceLoginFragment() {\n\n// fragmentManager\n// .beginTransaction()\n// .setCustomAnimations(R.anim.left_enter, R.anim.right_out)\n// .replace(R.id.frameContainer, new Login_Fragment(),\n// Utils.Login_Fragment).commit();\n }", "@Override\n public void onClick(View v) {\n FragmentManager fragmentManager = ((AppCompatActivity) getContext()).getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.rel_main_parentAllView, new FragmentFavoritesApp());\n transaction.commit();\n }", "public void replaceFragment(int wordPosition){\n // access the fragment manager and begin transaction\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n\n // create word fragment and get the word from the recycler view fragment\n // word position is the list position of the word in the list of words\n WordFragment wordFragment = new WordFragment();\n Bundle args = new Bundle();\n args.putInt(WordFragment.WORD_INDEX, wordPosition);\n wordFragment.setArguments(args);\n // replace the word list with the word fragment\n ft.replace(R.id.fragment_container_top, wordFragment);\n ft.addToBackStack(null);\n\n ft.commit();\n }", "private void changeFragment() {\n TeacherAddNotificationFragment fragment = new TeacherAddNotificationFragment();\n // Put classIds to bundle and set bundle to fragment\n Bundle bundle = new Bundle();\n bundle.putString(\"ListIDs\", classesIds);\n fragment.setArguments(bundle);\n\n // Replace fragment\n getFragmentManager().beginTransaction().replace(R.id.main, fragment)\n .addToBackStack(null)\n .commit();\n }", "public void replaceFragment1(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.UpcomingFrame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.commit();\n }", "public void updateFragment(int CAT_ID){\n ViewContentFragment f_c_s=new ViewContentFragment();\n if(CAT_ID>0){\n f_c_s.setCat_id(CAT_ID);\n }else{\n f_c_s.setCat_id(1);\n }\n // replace the fragment with the new fragment and add it to BackStack,\n // then pop it from BackStack to get to the old fragment without overlapping the\n // old fragments...\n\n getFragmentManager().beginTransaction().replace(R.id.content_Layout,f_c_s).\n addToBackStack(String.valueOf(CAT_ID)).commit();\n getFragmentManager().popBackStack();\n }", "protected void switchContent(Fragment to) {\n if (mFragment != to) {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.activity_my_movie_content,to).commitAllowingStateLoss();\n mFragment = to;\n }\n }", "private ScreenShotable replaceFragment(ScreenShotable screenShotable, String name) {\n switch (name) {\n case ContentFragment.GAMES:\n logger.logEvent(\"Games Menu\");\n Log.v(LOG_TAG, \"Games Menu\");\n getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, GamesFragment.newInstance()).setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom).addToBackStack(\"Games\").commit();\n getSupportActionBar().setTitle(\"Games\");\n break;\n case ContentFragment.GROUPS:\n logger.logEvent(\"Groups Menu\");\n Log.v(LOG_TAG, \"Groups Menu\");\n getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, GroupsFragment.newInstance()).setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom).commit();\n getSupportActionBar().setTitle(\"Groups\");\n break;\n case ContentFragment.FRIENDS:\n logger.logEvent(\"Friends Menu\");\n Log.v(LOG_TAG, \"Friends Menu\");\n getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, FriendStatus.newInstance()).setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom).commit();\n getSupportActionBar().setTitle(\"Friends\");\n break;\n case ContentFragment.SETTINGS:\n logger.logEvent(\"Settings Menu\");\n Log.v(LOG_TAG, \"Settings Menu\");\n getSupportFragmentManager().beginTransaction().replace(R.id.content_frame, SettingsFragment.newInstance()).setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom).commit();\n getSupportActionBar().setTitle(\"Settings\");\n break;\n }\n return contentFragment;\n }", "protected void replaceFragment(Fragment fragment, String id, int resId) {\n getSupportFragmentManager()\n .beginTransaction()\n .add(resId, fragment, id)\n .addToBackStack(id)\n .commit();\n }", "@Override\n public void refreshFragment() {\n }", "public void goToPortfolioFragment(){\n Fragment fragment = new PortfolioFragment();\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.contentFragment, fragment);\n transaction.commit();\n }", "void switchToFragment(Fragment newFrag) {\n getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment, newFrag)\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void gonearbypage() {\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container_home,new NearbyFragment()).addToBackStack(\"Homepage\").commit();\n }", "private void fillUpFragment() {\n try {\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n sensorFragment = getSensorFragment();\n transaction.replace(R.id.sensor_frame, sensorFragment, getSensorName());\n transaction.commit();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void replaceFragment(int id_content, Fragment fragment) {\r\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n transaction.replace(id_content, fragment);\r\n transaction.commit();\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.root_fragment, container, false);\n//replace root_frame with newGameView\n FragmentTransaction transaction = getFragmentManager()\n .beginTransaction();\n transaction.replace(R.id.root_frame, new NewGameView());\n transaction.commit();\n\n return view;\n }", "public void replaceFragment(Fragment destFragment)\n {\n FragmentManager fragmentManager = this.getSupportFragmentManager();\n\n // Begin Fragment transaction.\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n\n // Replace the layout holder with the required Fragment object.\n fragmentTransaction.replace(R.id.MissedFrame, destFragment);\n\n // Commit the Fragment replace action.\n fragmentTransaction.commit();\n }", "private void defaultFragment() {\n\n Fragment fragment = new Helpline();\n FragmentManager fm = getFragmentManager();\n //TODO: try this with add\n fm.beginTransaction().replace(R.id.content_frame,fragment).commit();\n }", "private void replaceFragment(int pos) {\n Fragment fragment = null;\n switch (pos) {\n case 0:\n Intent intent = new Intent(GestioneViaggioGalleriaActivity.this, MainActivity.class);\n startActivity(intent);\n break;\n case 1:\n Intent intent_creaViaggio = new Intent(GestioneViaggioGalleriaActivity.this, CreaIlTuoViaggioActivity.class);\n startActivity(intent_creaViaggio);\n break;\n case 2:\n Intent intent_viaggi = new Intent(GestioneViaggioGalleriaActivity.this, ProfiloViaggiActivity.class);\n intent_viaggi.putExtra(\"viaggio\", \"viaggio\");\n startActivity(intent_viaggi);\n break;\n case 3:\n Intent intent_preferiti = new Intent(GestioneViaggioGalleriaActivity.this, ProfiloViaggiActivity.class);\n intent_preferiti.putExtra(\"preferiti\", \"preferiti\");\n startActivity(intent_preferiti);\n break;\n case 4:\n Intent intent_impostazioni = new Intent(GestioneViaggioGalleriaActivity.this, SettingsActivity.class);\n startActivity(intent_impostazioni);\n break;\n case 5: new android.support.v7.app.AlertDialog.Builder(GestioneViaggioGalleriaActivity.this)\n .setTitle(\"Let's go\")\n .setMessage(\"Questa applicazione è stata creata da: \" +\n \"Alessandro Barlocco, Annalisa Bovone, Paola Silvestre\")\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .setIcon(R.drawable.logo_pani_piccolo)\n .show();\n break;\n default:\n break;\n }\n\n if (fragment != null) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction transaction = fragmentManager.beginTransaction();\n transaction.replace(R.id.activity_main, fragment);\n transaction.commit();\n }\n }", "private void placeNewFragment(Fragment f) {\r\n\t\tFragmentManager manager = getSupportFragmentManager();\r\n FragmentTransaction fragmentTransaction = manager.beginTransaction();\r\n fragmentTransaction.replace(R.id.fragmentHolder, f);\r\n fragmentTransaction.addToBackStack(null);\r\n fragmentTransaction.commit();\r\n\t}", "private void changeFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.flContainer, fragment);\n fragmentTransaction.commit();\n closeDrawer();\n }", "public static void replaceFragmentHistory(Fragment fragment, AppCompatActivity context) {\n /* if (isUsedBundle) {\n Bundle args = new Bundle();\n args.putInt(bundleParameterName, bundleValue);\n fragment.setArguments(args);\n }*/\n if (context != null) {\n try {\n FragmentTransaction transaction =\n context.getSupportFragmentManager().beginTransaction();\n transaction.setCustomAnimations(R.anim.slide_in_left, R.anim.slide_in_right);\n\n transaction.replace(R.id.menuContainer, fragment);\n transaction.addToBackStack(null);\n transaction.commitAllowingStateLoss();\n\n } catch (IllegalStateException e) {\n e.printStackTrace();\n context.finish();\n }\n }\n }", "private void updateFragment() {\n Fragment fragment = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (fragment != null) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n ft.detach(fragment).attach(fragment).commit();\n }\n }", "private void resetFragment() {\n\t\tFragment fragment = hMapTabs.get(mSelectedTab).get(0);\n\t\thMapTabs.get(mSelectedTab).clear();\n\t\thMapTabs.get(mSelectedTab).add(fragment);\n\t\tFragmentManager manager = getSupportFragmentManager();\n\t\tFragmentTransaction ft = manager.beginTransaction();\n\t\tft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n\t\tft.replace(R.id.realtabcontent, fragment);\n\t\tft.commit();\n\n\t\tshouldDisplayHomeUp();\n\n\t}", "@Override\n public void onClick(View v) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment fragment = new FavoriteFragment();\n ft.replace(R.id.layout_fragment, fragment, \"FavoriteFragment\");\n ft.commit();\n }", "private void loadFragment(String name) {\n FragmentTransaction fragmentTransaction = MainActivity.fm.beginTransaction();\n // replace the FrameLayout with the new Fragment\n fragmentTransaction.replace(R.id.mainFrameLayout, MainActivity.currentFragment);\n fragmentTransaction.addToBackStack(name);\n fragmentTransaction.commit();\n }", "public void switchToAddFragment() {\n FragmentManager manager = getSupportFragmentManager();\n manager.beginTransaction().replace(R.id.fragment_container, new AddActivity()).commit();\n }", "private void insertNestedFragment(int position) {\n FragmentTransaction transaction = getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_pager_view_container, getFragmentForPosition(position)).commit();\n }", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH2 demoFragment = new ShowFragmentXXH2();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "private void setFragmentMovie(Fragment fragmentMovie){\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_fav, fragmentMovie)\n .addToBackStack(null)\n .commit();\n }", "private void displayCareerFragment() {\n getSupportFragmentManager().beginTransaction().replace(R.id.container, UserProfileCareerFragment.getInstance()).commit();\n\n }", "@Override\n\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\n\t\tft.replace(R.id.fragment_container, fragment);\n\n\t}", "public void RitiroLibri()\r\n {\r\n ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(\"Ritiro Libri\");\r\n FragmentManager fragmentManager = getFragmentManager();\r\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\r\n fragmentTransaction.replace(R.id.main_conteiner, new SistudiaFragmentRitiroLibri());\r\n fragmentTransaction.commit();\r\n }", "@Override\n public void onEstadoCambiado() {\n fragment = new ListadoPeticionesRecibidasVista();\n getFragmentManager().beginTransaction().replace(R.id.content_main, fragment ).commit();\n\n }", "@Override\n public void gofavouritepage() {\n getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container_home,new FavouriteFragment()).addToBackStack(\"Homepage\").commit();\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH1 demoFragment = new ShowFragmentXXH1();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n insertNestedFragment(position);\n }", "private void setFragment(Fragment fragment){\n FragmentTransaction fragmentTransaction = getActivity().getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.slide_from_right,R.anim.slideout_from_left);\n fragmentTransaction.replace(parentFrameLayout.getId(),fragment);\n fragmentTransaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.main_frame, fragment);\n// fragmentTransaction.addToBackStack(null);\n fragmentTransaction.commit();\n }", "private void switchFragment(Fragment fragment, Bundle arguments) {\n // replace the current showed fragment\n Fragment current = getSupportFragmentManager().findFragmentByTag(CURRENT_FRAGMENT);\n if (current != fragment) {\n fragment.setArguments(arguments);\n getSupportFragmentManager().beginTransaction().\n replace(R.id.frame_layout, fragment, CURRENT_FRAGMENT).commit();\n }\n }", "private void setFragmentTv(Fragment fragmentTv) {\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.frame_fav, fragmentTv)\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "public void replaceFragmentWithoutBack(Fragment mFragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.tabswitch, mFragment)\n .commit();\n }", "@Override\n public void onClick(View v) {\n Fragment f = new RecordingFragment();\n mng.beginTransaction().replace(R.id.content_frame, f).addToBackStack(null).commit();\n }", "public void onClick(View v) {\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyContactFragment()).commit();\n\n // Replace\n Toast.makeText( getActivity(),\"Emergency contact\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n Fragment newFragment = new NewMovimientoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack\n transaction.replace(R.id.frame_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "private void setViewFragment(Fragment fragment) {\n currentFragment = fragment;\n FragmentManager manager = getFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.replace(R.id.container, fragment);\n transaction.commit();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tFragmentHelper.replaceFragment(R.id.fl_fragment_holder, getFragmentManager(), ShareFansFragment.class);\n\t\t\t}", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, PlaceholderFragment.newInstance(position + 1))\n .commit();\n }", "@Override\n public void onClick(View view) {\n Fragment newCase=new TripNoteAddFragment();\n FragmentTransaction transaction=getFragmentManager().beginTransaction();\n transaction.replace(R.id.content_frames,newCase); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame, fragment);\n fragmentTransaction.commit();\n\n }", "private void loadFragment(Fragment fragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(com.limkee1.R.id.flContent, fragment);\n fragmentTransaction.commit();\n\n }", "public void replaceFragment(Fragment fragment, String tag) {\n for (int i = 0; i < fragmentManager.getBackStackEntryCount(); ++i) {\n fragmentManager.popBackStackImmediate();\n }\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, fragment);\n fragmentTransaction.commit();\n fragmentTransaction.addToBackStack(tag);\n\n }", "@Override\n public void onClick(View view) {\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new EditContactFragment()).commit();\n }", "public void onClick(View v) {\n android.support.v4.app.FragmentManager fm = getFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ProductFragment itemListFragment = ((MainActivity)getActivity()).getItemListFragment();\n ft.replace(R.id.container, itemListFragment, \"List\");\n ft.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View rootView = inflater.inflate( R.layout.fragment_perfil_fragmento, container, false );\n cambiarDato = rootView.findViewById(R.id.cambiarDatos);\n cambiarDato.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n RelativeLayout f1 = (RelativeLayout) getActivity().findViewById(R.id.fragPer);\n f1.removeAllViews();\n FragmentTransaction transaction = getChildFragmentManager().beginTransaction();\n transaction.replace(R.id.fragPer, new AjustesFragmento());\n transaction.addToBackStack(null);\n TextView textTitle = getActivity().findViewById(R.id.textTitle);\n textTitle.setText(\"Ajustes\");\n transaction.commit();\n }\n });\n return rootView;\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void onClick(View view) {\n Fragment newFragment = new QuestFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void run() {\n Fragment fragment = getHomeFragment();\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,\n android.R.anim.fade_out);\n fragmentTransaction.replace(R.id.frame, fragment, CURRENT_TAG);\n fragmentTransaction.commitAllowingStateLoss();\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction FT = getSupportFragmentManager().beginTransaction();\n FT.replace(R.id.Frame_Fragments, new simplefragment());\n FT.commit();\n\n button2.setVisibility(View.GONE);\n button.setVisibility(View.VISIBLE);\n }", "private void getFragment(Fragment fragment) {\n // create a FragmentManager\n FragmentManager fm = getFragmentManager();\n // create a FragmentTransaction to begin the transaction and replace the Fragment\n FragmentTransaction fragmentTransaction = fm.beginTransaction();\n // replace the FrameLayout with new Fragment\n fragmentTransaction.replace(R.id.fragment_layout, fragment);\n // save the changes\n fragmentTransaction.commit();\n }", "private void setFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_layout, fragment);\n fragmentTransaction.commit();\n\n }", "private void addFragments() {\n\n Fragment f = SideFilterFragment.newInstance();\n getFragmentManager().beginTransaction().replace(R.id.side_filter_container, f).commit();\n }", "private void addBaseFragment(Fragment fragment) {\n\n if (mFragmentManager == null)\n mFragmentManager = getSupportFragmentManager();\n\n FragmentTransaction mFragmentTransaction = mFragmentManager.beginTransaction();\n mFragmentTransaction.replace(R.id.content_frame, fragment, fragment.getClass().getSimpleName().toString()).commit();\n\n }", "@Override\n public void onClick(View v){\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.frame_layout,new final_confirmation());\n transaction.commit();\n }", "private void switchFragment(int pos) {\n Fragment fragment=bottomBarList.get(pos);\n String backStateName = fragment.getClass().getName();\n String fragmentTag = backStateName;\n\n FragmentManager manager = getSupportFragmentManager();\n boolean fragmentPopped = manager.popBackStackImmediate (backStateName, 0);\n\n if (!fragmentPopped && manager.findFragmentByTag(fragmentTag) == null){ //fragment not in back stack, create it.\n FragmentTransaction ft = manager.beginTransaction();\n ft.replace(R.id.bottomNavFrameLayout, fragment, fragmentTag);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n ft.addToBackStack(backStateName);\n ft.commit();\n }\n\n\n }", "@Override\n public void onNavigationDrawerItemSelected(int position) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.container, createFragment(position + 1))\n .commit();\n }", "public void replaceFragmentWithBack(Fragment mFragment) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.tabswitch, mFragment).addToBackStack(null)\n .commit();\n }", "public void switchToDescriptionPanel() {\n FragmentManager manager = getActivity().getSupportFragmentManager();\n FragmentTransaction transaction = manager.beginTransaction();\n transaction.replace(R.id.container, new DescriptionPanelFragment());\n transaction.commit();\n }", "@Override\n public void onClick(View view) {\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.container, new CadastrarFragments())\n .commitNow();\n }", "@Override\n public void run() {\n confirmImage.setVisibility(View.GONE);\n activity.replaceFragment(new Fragment_Buyer_Orders());\n\n }", "@Override\n public void onClick(View view) {\n Fragment fragment = null;\n fragment = new CommentPeopleDetail();\n Bundle bundle = new Bundle();\n bundle.putString(\"queid\", details.getQueId());\n\n if (fragment != null) {\n fragment.setArguments(bundle);\n FragmentManager fm = ((FragmentActivity) context).getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.frame_contain_layout, fragment);\n transaction.commit();\n }\n }", "@Override\n public void itemClicked(long id) {\n CookieFragment frag = new CookieFragment(); // create new fragment to add/replace\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n frag.setCookie(id);\n ft.replace(R.id.fragment_container, frag);\n ft.addToBackStack(null);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);\n ft.commit();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n getSupportFragmentManager().beginTransaction().\n replace(R.id.container, PlaceholderFragment.newInstance(id)).commit();\n\n return super.onOptionsItemSelected(item);\n }", "public void onUPP()\r\n {\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .show(frag)\r\n .commit();\r\n\r\n }", "@Override\n public void onEditHat() {\n\n moveToFragment(0);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tgetActivity().setContentView(R.layout.fragment);\n\n\t\tFragmentTransaction tx = getActivity().getSupportFragmentManager()\n\t\t\t\t.beginTransaction();\n\t\tswitch (v.getId()) {\n\n\t\tcase R.id.item1: {\n\t\t\ttx.replace(R.id.content_frame,\n\t\t\t\t\tFragment.instantiate(getActivity(), tab_array[0]));\n\t\t\ttx.commit();\n\t\t\tbreak;\n\t\t}\n\t\tcase R.id.item2: {\n\t\t\ttx.replace(R.id.content_frame,\n\t\t\t\t\tFragment.instantiate(getActivity(), tab_array[1]));\n\t\t\ttx.commit();\n\t\t\tbreak;\n\t\t}\n\t\tcase R.id.item3: {\n\t\t\ttx.replace(R.id.content_frame,\n\t\t\t\t\tFragment.instantiate(getActivity(), tab_array[2]));\n\t\t\ttx.commit();\n\t\t\tbreak;\n\t\t}\n\t\tcase R.id.item4: {\n\t\t\ttx.replace(R.id.content_frame,\n\t\t\t\t\tFragment.instantiate(getActivity(), tab_array[3]));\n\t\t\ttx.commit();\n\t\t\tbreak;\n\t\t}\n\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n frameLayoutSearch.setVisibility(View.GONE);\n songBelongAlbumFragment = new SongBelongAlbumFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"nameSongOfAlbum\",tvAlbumName.getText().toString());\n songBelongAlbumFragment.setArguments(bundle);\n android.support.v4.app.FragmentTransaction fragmentTransaction = ( (FragmentActivity)context).getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, songBelongAlbumFragment);\n fragmentTransaction.commit();\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "public static void replaceFragment(Context context, int layout_Id, Fragment fragment) {\n FragmentActivity activity = (FragmentActivity) context;\n FragmentTransaction fragmentTransaction = activity.getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(layout_Id, fragment);\n fragmentTransaction.commit();\n }", "private void openTeacherCheck() {\n FragmentTransaction fr1 = getFragmentManager().beginTransaction().addToBackStack(\"Tag\");\n fr1.replace(R.id.fragment_container, new Fragment_View_In_Out());\n fr1.commit();\n }", "private void showHome(){\n fragment = new HomeFragment();\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.mainLayout, fragment, fragment.getTag()).commit();\n }" ]
[ "0.7135298", "0.7012213", "0.69645244", "0.68708926", "0.6861415", "0.6857358", "0.6848308", "0.6839962", "0.6827649", "0.67639214", "0.6728757", "0.6714596", "0.6708843", "0.6706346", "0.6702917", "0.6646055", "0.6641206", "0.66341186", "0.66334754", "0.6600974", "0.660056", "0.6586609", "0.6577471", "0.65766263", "0.65635353", "0.6558309", "0.65540826", "0.65431046", "0.65406156", "0.6532701", "0.6526121", "0.6505852", "0.65020347", "0.6495795", "0.6448836", "0.6438119", "0.642726", "0.6426276", "0.64091694", "0.6400538", "0.63831383", "0.6345026", "0.6328595", "0.63188887", "0.6312225", "0.6310117", "0.63036066", "0.6292073", "0.62872416", "0.62591624", "0.62575245", "0.62445444", "0.6240058", "0.6233624", "0.6233624", "0.62307614", "0.62274134", "0.6221969", "0.62131125", "0.6210887", "0.62026685", "0.6201131", "0.61914825", "0.6185544", "0.6182949", "0.61747694", "0.61539507", "0.6152655", "0.61486834", "0.61248904", "0.6115533", "0.61122155", "0.61122155", "0.61122155", "0.61122155", "0.61122155", "0.61122155", "0.61037374", "0.6102526", "0.610052", "0.6098379", "0.60938156", "0.60930794", "0.6091529", "0.6082443", "0.60776544", "0.60634285", "0.6061051", "0.6042659", "0.60415304", "0.6031878", "0.6026668", "0.602087", "0.6020691", "0.6016203", "0.6015364", "0.6012538", "0.6008241", "0.5968145", "0.59635216" ]
0.6817295
9
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'AL'. No error/alert expected
@Test public void test1() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message1 = new File(classLoader.getResource(message1FileName).getFile()); String messageString = FileUtils.readFileToString(message1); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public ReportAckMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "void mo7352a(C1655s sVar, AdError adError);", "final /* synthetic */ void m36052a(String str, String str2, ReportCause reportCause, @Nullable String str3, Response response) {\n this.f29981a.showReportSuccessful();\n m36040a(null, str, str2, null, reportCause, str3, ReportingSource.PROFILE);\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "private void verifySpecimensPresent(int aaa07Count, int controlCount, int baq00051Count)\r\n {\n assertTextPresent(\"AAA07\", aaa07Count * 2);\r\n assertTextPresent(\"AssayTestControl\", controlCount * 2);\r\n assertTextPresent(\"BAQ00051\", baq00051Count * 2);\r\n }", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public static void execMT_ACK(Putter p){\n\t\n\t\ttry {\n\t\t\tString ret=send_ACK(PPGMain.props.getProperty(\"cpgCPmt_70mt_ack\"),p.get(\"mobile\"),p.get(\"spnum\"),\n\t\t\t\t\tp.get(\"keyword\"),p.get(\"content\"),p.get(\"out_linkid\"),p.get(\"oprator\"));\n\t\t\tp.set(\"retcode\", ret.equals(\"1\")?\"0\":ret);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tp.set(\"retcode\",\"3\");\n\t\t\tp.set(\"retmsg\", e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "boolean hasJsonAckMsg();", "boolean getLockstepAck();", "void format01(String line, int lineCount) {\n\n // only 1 survey is allowed per load file - max of 9 code 01 lines\n code01Count++;\n if (prevCode > 1) {\n outputError((lineCount-1) + \" - Fatal - \" +\n \"More than 1 survey in data file : \" + code01Count);\n } // if (prevCode != 1)\n\n // get the data from the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n int subCode = 0;\n if (t.hasMoreTokens()) subCode = toInteger(t.nextToken());\n switch (subCode) {\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '1' n/a\n //03 a9 survey_id e.g. '1997/0001' survey\n //04 a10 planam Platform name inventory\n case 1: if (t.hasMoreTokens()) survey.setSurveyId(t.nextToken());\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n platformName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setPlanam(dummy); //ub06\n if (dbg) System.out.println(\"planam = \" + platformName + \" \" + survey.getPlanam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '2' n/a\n //03 a15 expnam Expedition name, e.g. 'AJAXL2' survey\n case 2: if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n expeditionName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setExpnam(dummy); //ub06\n if (dbg) System.out.println(\"expnam = \" + expeditionName + \" \" + survey.getExpnam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '3' n/a\n //03 a3 institute 3-letter Institute code, e.g. 'RIO' survey\n //04 a28 prjnam project name, e.g. 'HEAVYMETAL' survey\n case 3: survey.setInstitute(t.nextToken());\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n projectName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setPrjnam(dummy); //ub06\n if (dbg) System.out.println(\"prjnam = \" + projectName + \" \" + survey.getPrjnam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '4' n/a\n //03 a10 domain e.g. 'SURFZONE', 'DEEPSEA' survey\n // domain corrected by user in form\n //case 4: inventory.setDomain(toString(line.substring(5)));\n //case 4: if (!loadFlag) inventory.setDomain(toString(line.substring(5)));\n case 4: //if (!loadFlag) {\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n inventory.setDomain(dummy); //ub06\n } // if (t.hasMoreTokens())\n //} // if (!loadFlag)\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '5' n/a\n //03 a10 arenam Area name, e.g. 'AGULHAS BK' survey\n // area name corrected by user in form\n //case 5: inventory.setAreaname(toString(line.substring(5)));\n //case 5: if (!loadFlag) inventory.setAreaname(toString(line.substring(5)));\n case 5: //if (!loadFlag) {\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n if (dummy.length() > 20) dummy = dummy.substring(0, 20);//ub06\n inventory.setAreaname(dummy); //ub06\n } // if (t.hasMoreTokens())\n //} // if (!loadFlag)\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '6' n/a\n //04 a10 insitute e.g. 'World Ocean database' inventory\n case 6: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n instituteName = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n instituteName += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '7' n/a\n //04 a10 chief scientist inventory\n case 7: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n chiefScientist = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n chiefScientist += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '8' n/a\n //04 a10 country e.g. 'Germany' inventory\n case 8: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n countryName = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n countryName += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '8' n/a\n //04 a10 submitting scientist load log\n case 9: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n submitScientist = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n submitScientist += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //!} // if (!loadFlag) //ub03\n break;\n } // switch (subCode)\n\n //survey.setSurveyId(toString(line.substring(2,11)));\n //survey.setPlanam(toString(line.substring(11,21)));\n //survey.setExpnam(toString(line.substring(21,31)));\n //survey.setInstitute(toString(line.substring(31,34)));\n //survey.setPrjnam(toString(line.substring(34,44)));\n //if (!loadFlag) {\n // inventory.setAreaname(toString(line.substring(44,54))); // use as default to show on screen\n // inventory.setDomain(toString(line.substring(54,64))); // use as default to show on screen\n //} // if (!loadFlag)\n\n if (dbg) System.out.println(\"<br>format01: line = \" + line);\n if (dbg) System.out.println(\"<br>format01: subCode = \" + subCode);\n\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "public int checkForAlert() {\n return 0;\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "@Test\n public void testClaimXrefHicNbr() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setXrefHicNbr,\n RdaFissClaim::getXrefHicNbr,\n RdaFissClaim.Fields.xrefHicNbr,\n 12);\n }", "private void m34892a(C13288k kVar) {\n try {\n C13262e.this.f34198l.execute(new C13276c(\"OkHttp %s ACK Settings\", new Object[]{C13262e.this.f34194h}, kVar));\n } catch (RejectedExecutionException unused) {\n }\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }", "public void setHcErr( String hcErr )\n {\n this.hcErr = hcErr;\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "private final int m21406a(C7619i iVar) {\n if (Intrinsics.areEqual((Object) iVar.mo20545c(), (Object) LinkSubscriptionPartialError.INSTANCE)) {\n return C7904t.paywall_sdk_error_link_subscription_partial_error;\n }\n return C7904t.paywall_sdk_error;\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "void mo23214a(Message message);", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "public ReportAckMsg(int data_length, int base_offset) {\n super(data_length, base_offset);\n amTypeSet(AM_TYPE);\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "private static void acknowledgeTeltonikaModem(Channel ch, int recordsNum) {\n\t\tChannelBuffer buf = ChannelBuffers.buffer(4);\n\t\tbyte b[] = intToByteArray(recordsNum);\n\t\tbuf.writeBytes(b);\n\t\tLOGGER.info(\"Response to device about data reception with package amount: \" + recordsNum);\n\t\tch.write(buf);\n\t}", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "public ReportAckMsg(byte[] data, int base_offset, int data_length) {\n super(data, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void processSurveyAck( UserSurvey userSurvey,String status);", "@Override\r\n\tpublic void alarm() {\n\t\tSystem.out.println(\"H1型号是这样鸣笛的.....\");\r\n\t}", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "static void perform_sphl(String passed){\n\t\tint type = type_of_sphl(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\ttransfer_hl_to_sp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "@Test\n public void testClaimProcNewHicInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setProcNewHicIndEnum,\n RdaFissClaim::getProcNewHicInd,\n FissProcessNewHealthInsuranceClaimNumberIndicator.PROCESS_NEW_HIC_INDICATOR_Y,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setProcNewHicIndUnrecognized,\n RdaFissClaim::getProcNewHicInd,\n RdaFissClaim.Fields.procNewHicInd,\n 1);\n }", "void mo13373a(int i, ErrorCode errorCode, ByteString byteString);", "String mo7388hl() throws RemoteException;", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "void mo1507n();", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "private void m20200a(int reason) {\n C8466a aVar = this.f18650f;\n if (aVar != null) {\n aVar.mo25956a(reason);\n }\n }", "private static final void m705b(akx akx) {\n if (akx.mo356d() == 2) {\n akx.mo364l();\n }\n }", "public String provideAlwasDefResponse()\n {\n return (\"d\") ;\n }", "private static akh[] m701a(bgl bgl) {\n int f = bgl != null ? bgl.mo1835f() : 0;\n akh[] akhArr = new akh[f];\n for (int i = 0; i < f; i++) {\n akhArr[i] = bgl.mo1828a(i);\n }\n return akhArr;\n }", "final /* synthetic */ void m36055a(String str, @Nullable String str2, @Nullable String str3, Attribution attribution, ReportCause reportCause, @Nullable String str4, String str5) {\n m36040a(str, str2, str3, attribution, reportCause, str4, ReportingSource.CHAT);\n m36042a(str, str5, str4, (boolean) null);\n this.f29981a.showReportSuccessful();\n }", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "@Then(\"^the appointment request is linked to the HCP (.+)$\")\n public void request_linked_to_HCP (long hmid) throws Throwable {\n \t//getHCP()?\n \t//System.out.print(appt.getHcp()); part of testing if hmid was really being set, but wasnt - fixed test and feature file 2/2/2017 Carolyn \n \t//System.out.print(hmid);\n \tAssert.assertTrue(appt.getHcp() == hmid);\n }", "@Then ( \"^The labor and delivery report is documented successfully$\" )\n public void documentedSuccessfully () {\n waitForAngular();\n // confirm that the error message is displayed\n driver.get( baseUrl );\n final WebDriverWait wait = new WebDriverWait( driver, 20 );\n wait.until( ExpectedConditions.titleContains( \"HCP Home\" ) );\n assertEquals( \"iTrust2: HCP Home\", driver.getTitle() );\n wait.until( ExpectedConditions.elementToBeClickable( By.name( \"transactionTypeCell\" ) ) );\n assertTextPresent( \"HCP views an OB/GYN Labor and Delivery Report\" );\n }" ]
[ "0.5746755", "0.5716969", "0.5679747", "0.5676038", "0.56277496", "0.5589825", "0.55146587", "0.54585576", "0.54254806", "0.5414846", "0.54041314", "0.5400012", "0.5368732", "0.53669244", "0.53662956", "0.53630555", "0.53437966", "0.5321463", "0.5310733", "0.530074", "0.52998304", "0.5294567", "0.52517694", "0.52485156", "0.52222073", "0.5167522", "0.51567864", "0.51490116", "0.5147717", "0.51377416", "0.51274526", "0.51235676", "0.5103402", "0.508213", "0.50628716", "0.50510687", "0.5036971", "0.5032986", "0.50325865", "0.5023923", "0.5017777", "0.5017215", "0.49916053", "0.4987434", "0.49870658", "0.49870515", "0.4949619", "0.4927122", "0.49158344", "0.49113595", "0.4911128", "0.49109405", "0.4909849", "0.49040544", "0.489929", "0.4892334", "0.4888196", "0.4887408", "0.48796126", "0.48773846", "0.48718756", "0.4870529", "0.48701042", "0.4869272", "0.48675326", "0.48654187", "0.48632038", "0.48624066", "0.4850012", "0.48417723", "0.48404628", "0.48341054", "0.48233762", "0.48205227", "0.4818117", "0.4811995", "0.4797857", "0.4791483", "0.4785549", "0.47788724", "0.47780466", "0.4772478", "0.4760122", "0.4759603", "0.4754559", "0.47529614", "0.47517198", "0.4744042", "0.47429606", "0.4737494", "0.47351387", "0.47343472", "0.4733094", "0.473294", "0.47294757", "0.47268018", "0.47266755", "0.4726245", "0.4724019", "0.47238082" ]
0.54224753
9
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'NE'. No error/alert
@Test public void test2() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message2 = new File(classLoader.getResource(message2FileName).getFile()); String messageString = FileUtils.readFileToString(message2); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "boolean hasJsonAckMsg();", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public OctetString getMsg1015()\n {\n\treturn this.msg1015;\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "boolean getLockstepAck();", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public OctetString getMsg1016()\n {\n\treturn this.msg1016;\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public OctetString getMsg1019()\n {\n\treturn this.msg1019;\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "boolean getAck();", "boolean hasMsg();", "boolean hasAck();", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "private boolean noMessage() {\n\t\treturn nbmsg==0;\n\t}", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public static void m29980i() {\n String str = \"TpnsChannel\";\n try {\n long currentTimeMillis = System.currentTimeMillis();\n if (f23269d == 0) {\n f23269d = currentTimeMillis;\n } else if (currentTimeMillis - f23269d < 30000) {\n return;\n }\n if (C6973b.m29776f() != null) {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"srv_stime\", XGPushServiceV4.f23078a);\n jSONObject.put(\"srv_etime\", System.currentTimeMillis());\n jSONObject.put(\"srv_startTime\", XGPushServiceV4.f23079b);\n if (XGPushServiceV4.f23080c != null) {\n jSONObject.put(\"srv_freason\", XGPushServiceV4.f23080c);\n }\n jSONObject.put(\"hb_suc\", f23267b);\n jSONObject.put(\"hb_failed\", f23268c);\n if (f23273h != null) {\n jSONObject.put(\"hb_freason\", f23273h);\n }\n jSONObject.put(\"con_suc\", f23270e);\n jSONObject.put(\"con_failed\", f23271f);\n if (f23272g != null) {\n jSONObject.put(\"con_freason\", f23272g);\n }\n C7055h.m30172b(C6973b.m29776f(), \"service_state\", jSONObject.toString());\n f23269d = currentTimeMillis;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Service bi state \");\n sb.append(jSONObject.toString());\n C6864a.m29303e(str, sb.toString());\n }\n } catch (Throwable th) {\n C6864a.m29302d(str, \"saveBIReportJson \", th);\n }\n }", "boolean hasUnknown71();", "private void m34892a(C13288k kVar) {\n try {\n C13262e.this.f34198l.execute(new C13276c(\"OkHttp %s ACK Settings\", new Object[]{C13262e.this.f34194h}, kVar));\n } catch (RejectedExecutionException unused) {\n }\n }", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void __getReplyNoReport() {\n __getReply(false);\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "boolean hasUnknown13();", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "public OctetString getMsg1013()\n {\n\treturn this.msg1013;\n }", "void mo1507n();", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "public synchronized void m29983k() {\n if (this.f23294u.isEmpty()) {\n if (this.f23286B == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (this.f23286B.f23372f == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeat \");\n }\n m29967a(-1, this.f23286B);\n if ((f23266a > 0 && f23266a % 3 == 0) || f23266a == 2) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7056i.m30212h(C6973b.m29776f());\n }\n });\n }\n }\n m29985m();\n C6860a.m29257b(C6973b.m29776f());\n C7059f.m30231a(C6973b.m29776f()).mo34155a();\n m29980i();\n if (XGPushConfig.isLocationEnable(C6973b.m29776f())) {\n if (f23264F == 0) {\n f23264F = C7055h.m30167a(C6973b.m29776f(), Constants.LOC_REPORT_TIME, 0);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23264F == 0 || Math.abs(currentTimeMillis - f23264F) > ((long) f23281p)) {\n final JSONObject reportLocationJson = CustomDeviceInfos.getReportLocationJson(C6973b.m29776f());\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7046a.m30130b(C6973b.m29776f(), \"location\", reportLocationJson);\n }\n });\n f23264F = currentTimeMillis;\n C7055h.m30171b(C6973b.m29776f(), Constants.LOC_REPORT_TIME, currentTimeMillis);\n }\n }\n }", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }", "public int getOkulHesapNo() {\n\t\t\n\t\t\n\t\treturn okulHesapNo;\n\t}", "public static SparseArray<BoxResponse> formatResponseCode(byte[] bytes) {\n\n String responseCode = JMLUtils.bytesToHexString(bytes);\n if (responseCode == null || responseCode.length() != 40 || !responseCode.toLowerCase().startsWith(\"dbde\")) {\n return null;\n }\n responseCode = responseCode.toLowerCase();//\n // 去掉dbde\n responseCode = responseCode.substring(4);\n\n // 新建数组,每两个放一起\n List<Integer> array = new ArrayList<>();\n char[] chars = responseCode.toCharArray();\n for (int i = 0; i < chars.length / 2; i++) {\n\n Integer tmp;\n try {\n tmp = JMLUtils.getIntBy16(\"\" + chars[i * 2] + chars[i * 2 + 1]);\n } catch (Exception e) {\n// e.printStackTrace();\n return null;\n }\n array.add(tmp);\n }\n\n // 应答数据长度\n int len1 = array.get(0);\n\n // 去掉长度 -- 上面的07\n array.remove(0);\n\n Integer _index, _be, _id, _success;\n\n // 判断是否是应答指令\n // 这边解析是否正确\n if (array.get(1) == BoxKey.HELM_NOTIFY_ID) {\n // db de 08 01 54 xxxxxxxx\n List<Integer> data1 = new ArrayList<>(array.subList(0, 2));\n array.subList(0, 2).clear(); // 删掉前2个\n len1 -= 2;\n _index = data1.get(0);\n _be = null;\n _id = data1.get(1);\n _success = 0;\n } else {\n // 序列号(值我发送的计数,每次不一样), be说明是应答指令, 51 应答命令ID, 00成功状态--成功\n List<Integer> data1 = new ArrayList<>(array.subList(0, 4));\n array.subList(0, 4).clear(); // 删掉前4个\n len1 -= 4;\n _index = data1.get(0);\n _be = data1.get(1);\n _id = data1.get(2);\n _success = data1.get(3);\n }\n\n if (_success != 0) {\n BleLog.d(\"_success\" + _success + \"\");\n return null;\n }\n\n // 开始递归 取传的值 = 应答数据\n\n SparseArray<BoxResponse> _detailValue = new SparseArray<>();\n\n if (_id == BoxKey.BOX_SEND_ID || _id == BoxKey.HELM_NOTIFY_ID) {\n while (true) {\n int _len = array.get(0);\n if (len1 <= 0) {\n break;\n } else {\n // 长度\n array.remove(0);\n\n // type\n int key = array.get(0);\n array.remove(0);\n\n _detailValue.put(key, new BoxResponse(_id, _index, key, new ArrayList<>(array.subList(0, _len - 1))));\n array.subList(0, _len - 1).clear();\n }\n len1 -= (_len + 1);\n }\n } else {\n // 只有一条命令 -- 没有分指令的长度\n // key 为 _id\n BleLog.d(len1 + \"\");\n if (len1 >= 0 && array.size() >= len1) {\n _detailValue.put(0, new BoxResponse(_id, _index, 0, new ArrayList<>(array.subList(0, len1))));\n }\n }\n return _detailValue;\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "static C2395k m11986e() {\n return new C2395k(\"Protocol message contained an invalid tag (zero).\");\n }", "public boolean sdp200AckEnabled();", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "public boolean hasNSignalChHad() {\n return fieldSetFlags()[7];\n }", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "int getClientMsgNo();", "public void know_doc_Report()\n {\n\t boolean knowedgepresent =knowdoc.size()>0;\n\t if(knowedgepresent)\n\t {\n\t\t // System.out.println(\"Knowledge document details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Knowledge document details report is not present\");\n\t }\n }", "protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }", "public OctetString getMsg1006()\n {\n\treturn this.msg1006;\n }", "boolean hasRemsg();", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public OctetString getMsg1007()\n {\n\treturn this.msg1007;\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "pb4server.EatPoisonNumAskReq getEatPoisonNumAskReq();", "public static void execMT_ACK(Putter p){\n\t\n\t\ttry {\n\t\t\tString ret=send_ACK(PPGMain.props.getProperty(\"cpgCPmt_70mt_ack\"),p.get(\"mobile\"),p.get(\"spnum\"),\n\t\t\t\t\tp.get(\"keyword\"),p.get(\"content\"),p.get(\"out_linkid\"),p.get(\"oprator\"));\n\t\t\tp.set(\"retcode\", ret.equals(\"1\")?\"0\":ret);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tp.set(\"retcode\",\"3\");\n\t\t\tp.set(\"retmsg\", e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "void mo7352a(C1655s sVar, AdError adError);", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "public int checkForAlert() {\n return 0;\n }", "public String checkConfirmNo(DtoEntrprs dto){\n\t\treturn null;\r\n\t}", "public OctetString getMsg1001()\n {\n\treturn this.msg1001;\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "public OctetString getMsg1012()\n {\n\treturn this.msg1012;\n }", "public OctetString getMsg1010()\n {\n\treturn this.msg1010;\n }", "public OctetString getMsg1011()\n {\n\treturn this.msg1011;\n }", "public OctetString getMsg1031()\n {\n\treturn this.msg1031;\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "private final void m134907b(EventMessage abVar) {\n C28082z zVar = abVar.f96686j;\n Integer num = abVar.f96684h;\n int value = EventCode.ApplyForConnect.getValue();\n if (num != null && num.intValue() == value) {\n MqttBus a = MqttBus.f97541a.mo118711a();\n ApplyForConnectEvent bVar = zVar.f97419p;\n C32569u.m150513a((Object) bVar, C6969H.m41409d(\"G6C95D014AB7EAA39F6028977F4EAD1E86A8CDB14BA33BF\"));\n a.mo118710a(bVar);\n return;\n }\n int value2 = EventCode.PermitConnect.getValue();\n if (num != null && num.intValue() == value2) {\n MqttBus a2 = MqttBus.f97541a.mo118711a();\n PermitConnectEvent asVar = zVar.f97420q;\n C32569u.m150513a((Object) asVar, C6969H.m41409d(\"G6C95D014AB7EBB2CF403995CCDE6CCD96786D60E\"));\n a2.mo118710a(asVar);\n return;\n }\n int value3 = EventCode.RefuseConnect.getValue();\n if (num != null && num.intValue() == value3) {\n MqttBus a3 = MqttBus.f97541a.mo118711a();\n RefuseConnectEvent axVar = zVar.f97428y;\n C32569u.m150513a((Object) axVar, C6969H.m41409d(\"G6C95D014AB7EB92CE01B834DCDE6CCD96786D60E\"));\n a3.mo118710a(axVar);\n return;\n }\n int value4 = EventCode.BanConnection.getValue();\n if (num != null && num.intValue() == value4) {\n MqttBus a4 = MqttBus.f97541a.mo118711a();\n BanConnectionEvent cVar = zVar.f97429z;\n C32569u.m150513a((Object) cVar, C6969H.m41409d(\"G6C95D014AB7EA928E8319347FCEBC6D47D8ADA14\"));\n a4.mo118710a(cVar);\n return;\n }\n int value5 = EventCode.Disconnect.getValue();\n if (num != null && num.intValue() == value5) {\n MqttBus a5 = MqttBus.f97541a.mo118711a();\n DisconnectEvent nVar = zVar.f97372A;\n C32569u.m150513a((Object) nVar, C6969H.m41409d(\"G6C95D014AB7EAF20F50D9F46FCE0C0C3\"));\n a5.mo118710a(nVar);\n return;\n }\n int value6 = EventCode.ConfirmConnect.getValue();\n if (num != null && num.intValue() == value6) {\n MqttBus a6 = MqttBus.f97541a.mo118711a();\n ConfirmConnectEvent eVar = zVar.f97373B;\n C32569u.m150513a((Object) eVar, C6969H.m41409d(\"G6C95D014AB7EA826E808995AFFDAC0D8678DD019AB\"));\n a6.mo118710a(eVar);\n return;\n }\n int value7 = EventCode.ConnectTimeout.getValue();\n if (num != null && num.intValue() == value7) {\n MqttBus a7 = MqttBus.f97541a.mo118711a();\n ConnectTimeoutEvent hVar = zVar.f97378G;\n C32569u.m150513a((Object) hVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD7DE6486DA0FAB\"));\n a7.mo118710a(hVar);\n return;\n }\n int value8 = EventCode.ConnectSuccess.getValue();\n if (num != null && num.intValue() == value8) {\n MqttBus a8 = MqttBus.f97541a.mo118711a();\n ConnectSuccessEvent gVar = zVar.f97421r;\n C32569u.m150513a((Object) gVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD0C26A80D009AC\"));\n a8.mo118710a(gVar);\n return;\n }\n int value9 = EventCode.ConnectExit.getValue();\n if (num != null && num.intValue() == value9) {\n MqttBus a9 = MqttBus.f97541a.mo118711a();\n ConnectExitEvent fVar = zVar.f97422s;\n C32569u.m150513a((Object) fVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAC6CF6097\"));\n a9.mo118710a(fVar);\n return;\n }\n int value10 = EventCode.NewBullet.getValue();\n if (num != null && num.intValue() == value10) {\n MqttBus a10 = MqttBus.f97541a.mo118711a();\n NewBulletEvent anVar = zVar.f97405b;\n C32569u.m150513a((Object) anVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131925DFEE9C6C3\"));\n Integer num2 = abVar.f96691o;\n a10.mo118710a(new CommentNormal(anVar, num2 != null ? num2.intValue() : 0));\n return;\n }\n int value11 = EventCode.EnterTheater.getValue();\n if (num == null || num.intValue() != value11) {\n int value12 = EventCode.NewGift.getValue();\n if (num != null && num.intValue() == value12) {\n MqttBus a11 = MqttBus.f97541a.mo118711a();\n NewGiftEvent aoVar = zVar.f97407d;\n C32569u.m150513a((Object) aoVar, C6969H.m41409d(\"G6C95D014AB7EA52CF1319741F4F1\"));\n a11.mo118710a(aoVar);\n return;\n }\n int value13 = EventCode.UpdateContributors.getValue();\n if (num == null || num.intValue() != value13) {\n int value14 = EventCode.UpdateHotValue.getValue();\n if (num != null && num.intValue() == value14) {\n MqttBus a12 = MqttBus.f97541a.mo118711a();\n UpdateHotValueEvent bmVar = zVar.f97409f;\n C32569u.m150513a((Object) bmVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDEDCCC35695D416AA35\"));\n a12.mo118710a(bmVar);\n return;\n }\n int value15 = EventCode.NewStatement.getValue();\n if (num != null && num.intValue() == value15) {\n MqttBus a13 = MqttBus.f97541a.mo118711a();\n NewStatementEvent aqVar = zVar.f97410g;\n C32569u.m150513a((Object) aqVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131835CF3F1C6DA6C8DC1\"));\n a13.mo118710a(aqVar);\n return;\n }\n int value16 = EventCode.Interact.getValue();\n if (num != null && num.intValue() == value16) {\n MqttBus a14 = MqttBus.f97541a.mo118711a();\n InteractEvent ahVar = zVar.f97411h;\n C32569u.m150513a((Object) ahVar, C6969H.m41409d(\"G6C95D014AB7EA227F20B8249F1F1\"));\n a14.mo118710a(ahVar);\n return;\n }\n int value17 = EventCode.ReplyStatement.getValue();\n if (num != null && num.intValue() == value17) {\n MqttBus a15 = MqttBus.f97541a.mo118711a();\n ReplyStatementEvent azVar = zVar.f97417n;\n C32569u.m150513a((Object) azVar, C6969H.m41409d(\"G6C95D014AB7EB92CF6028977E1F1C2C36C8ED014AB\"));\n a15.mo118710a(azVar);\n return;\n }\n int value18 = EventCode.RepliedStatement.getValue();\n if (num != null && num.intValue() == value18) {\n MqttBus a16 = MqttBus.f97541a.mo118711a();\n RepliedStatementEvent ayVar = zVar.f97418o;\n C32569u.m150513a((Object) ayVar, C6969H.m41409d(\"G6C95D014AB7EB92CF602994DF6DAD0C36897D017BA3EBF\"));\n a16.mo118710a(ayVar);\n return;\n }\n int value19 = EventCode.TalkStart.getValue();\n if (num != null && num.intValue() == value19) {\n MqttBus a17 = MqttBus.f97541a.mo118711a();\n TalkStartEvent beVar = zVar.f97423t;\n C32569u.m150513a((Object) beVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF5BE6E4D1C3\"));\n a17.mo118710a(beVar);\n return;\n }\n int value20 = EventCode.TalkEnd.getValue();\n if (num != null && num.intValue() == value20) {\n MqttBus a18 = MqttBus.f97541a.mo118711a();\n TalkEndEvent bdVar = zVar.f97424u;\n C32569u.m150513a((Object) bdVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF4DFCE1\"));\n a18.mo118710a(bdVar);\n return;\n }\n int value21 = EventCode.DramaStart.getValue();\n if (num != null && num.intValue() == value21) {\n MqttBus a19 = MqttBus.f97541a.mo118711a();\n DramaStartEvent wVar = zVar.f97425v;\n C32569u.m150513a((Object) wVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E1F1C2C57D\"));\n a19.mo118710a(wVar);\n return;\n }\n int value22 = EventCode.DramaEnd.getValue();\n if (num != null && num.intValue() == value22) {\n MqttBus a20 = MqttBus.f97541a.mo118711a();\n DramaEndEvent sVar = zVar.f97426w;\n C32569u.m150513a((Object) sVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F7EBC7\"));\n a20.mo118710a(sVar);\n return;\n }\n int value23 = EventCode.ConnectorChange.getValue();\n if (num != null && num.intValue() == value23) {\n MqttBus a21 = MqttBus.f97541a.mo118711a();\n ConnectorChangeEvent jVar = zVar.f97427x;\n C32569u.m150513a((Object) jVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6EAD1E86A8BD414B835\"));\n a21.mo118710a(jVar);\n return;\n }\n int value24 = EventCode.UpdateDramaIncome.getValue();\n if (num != null && num.intValue() == value24) {\n MqttBus a22 = MqttBus.f97541a.mo118711a();\n UpdateDramaIncomeEvent bjVar = zVar.f97412i;\n C32569u.m150513a((Object) bjVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA13B133A424E3\"));\n a22.mo118710a(bjVar);\n return;\n }\n int value25 = EventCode.DramaMustClose.getValue();\n if (num != null && num.intValue() == value25) {\n MqttBus a23 = MqttBus.f97541a.mo118711a();\n DramaMustCloseEvent uVar = zVar.f97374C;\n C32569u.m150513a((Object) uVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177FFF0D0C35680D915AC35\"));\n a23.mo118710a(uVar);\n return;\n }\n int value26 = EventCode.TheaterMustLeave.getValue();\n if (num != null && num.intValue() == value26) {\n MqttBus a24 = MqttBus.f97541a.mo118711a();\n TheaterMustLeaveEvent bgVar = zVar.f97375D;\n C32569u.m150513a((Object) bgVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DACEC27A97EA16BA31BD2C\"));\n a24.mo118710a(bgVar);\n return;\n }\n int value27 = EventCode.FollowActor.getValue();\n if (num != null && num.intValue() == value27) {\n MqttBus a25 = MqttBus.f97541a.mo118711a();\n FollowActorEvent agVar = zVar.f97379H;\n C32569u.m150513a((Object) agVar, C6969H.m41409d(\"G6C95D014AB7EAD26EA029F5FCDE4C0C36691\"));\n a25.mo118710a(agVar);\n return;\n }\n int value28 = EventCode.EjectMember.getValue();\n if (num != null && num.intValue() == value28) {\n MqttBus a26 = MqttBus.f97541a.mo118711a();\n EjectMemberEvent xVar = zVar.f97382K;\n C32569u.m150513a((Object) xVar, C6969H.m41409d(\"G6C95D014AB7EAE23E30D8477FFE0CED56C91\"));\n a26.mo118710a(xVar);\n return;\n }\n int value29 = EventCode.QuietMember.getValue();\n if (num != null && num.intValue() == value29) {\n MqttBus a27 = MqttBus.f97541a.mo118711a();\n QuietMemberEvent awVar = zVar.f97380I;\n C32569u.m150513a((Object) awVar, C6969H.m41409d(\"G6C95D014AB7EBA3CEF0B8477FFE0CED56C91\"));\n a27.mo118710a(awVar);\n return;\n }\n int value30 = EventCode.CancelQuietMember.getValue();\n if (num != null && num.intValue() == value30) {\n MqttBus a28 = MqttBus.f97541a.mo118711a();\n CancelQuietMemberEvent dVar = zVar.f97381J;\n C32569u.m150513a((Object) dVar, C6969H.m41409d(\"G6C95D014AB7EA828E80D9544CDF4D6DE6C97EA17BA3DA92CF4\"));\n a28.mo118710a(dVar);\n return;\n }\n int value31 = EventCode.DeleteBullet.getValue();\n if (num != null && num.intValue() == value31) {\n MqttBus a29 = MqttBus.f97541a.mo118711a();\n DeleteBulletEvent lVar = zVar.f97383L;\n C32569u.m150513a((Object) lVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDE7D6DB6586C1\"));\n a29.mo118710a(lVar);\n return;\n }\n int value32 = EventCode.Ping.getValue();\n if (num != null && num.intValue() == value32) {\n MqttBus a30 = MqttBus.f97541a.mo118711a();\n PingEvent atVar = zVar.f97387P;\n C32569u.m150513a((Object) atVar, C6969H.m41409d(\"G6C95D014AB7EBB20E809\"));\n a30.mo118710a(atVar);\n return;\n }\n int value33 = EventCode.Alert.getValue();\n if (num != null && num.intValue() == value33) {\n MqttBus a31 = MqttBus.f97541a.mo118711a();\n AlertEvent aVar = zVar.f97385N;\n C32569u.m150513a((Object) aVar, C6969H.m41409d(\"G6C95D014AB7EAA25E31C84\"));\n a31.mo118710a(aVar);\n return;\n }\n int value34 = EventCode.MustDisconnect.getValue();\n if (num != null && num.intValue() == value34) {\n MqttBus a32 = MqttBus.f97541a.mo118711a();\n MustDisconnectEvent amVar = zVar.f97386O;\n C32569u.m150513a((Object) amVar, C6969H.m41409d(\"G6C95D014AB7EA63CF51AAF4CFBF6C0D8678DD019AB\"));\n a32.mo118710a(amVar);\n return;\n }\n int value35 = EventCode.DeleteStatement.getValue();\n if (num != null && num.intValue() == value35) {\n MqttBus a33 = MqttBus.f97541a.mo118711a();\n DeleteStatementEvent mVar = zVar.f97384M;\n C32569u.m150513a((Object) mVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDF6D7D67D86D81FB124\"));\n a33.mo118710a(mVar);\n return;\n }\n int value36 = EventCode.DramaContinue.getValue();\n if (num != null && num.intValue() == value36) {\n MqttBus a34 = MqttBus.f97541a.mo118711a();\n DramaContinueEvent rVar = zVar.f97377F;\n C32569u.m150513a((Object) rVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F1EACDC3608DC01F\"));\n a34.mo118710a(rVar);\n return;\n }\n int value37 = EventCode.DramaPause.getValue();\n if (num != null && num.intValue() == value37) {\n MqttBus a35 = MqttBus.f97541a.mo118711a();\n DramaPauseEvent vVar = zVar.f97376E;\n C32569u.m150513a((Object) vVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E2E4D6C46C\"));\n a35.mo118710a(vVar);\n return;\n }\n int value38 = EventCode.CreatePoll.getValue();\n if (num != null && num.intValue() == value38) {\n MqttBus a36 = MqttBus.f97541a.mo118711a();\n CreatePollEvent kVar = zVar.f97388Q;\n C32569u.m150513a((Object) kVar, C6969H.m41409d(\"G6C95D014AB7EA83BE30F844DCDF5CCDB65\"));\n a36.mo118710a(kVar);\n return;\n }\n int value39 = EventCode.FinishPoll.getValue();\n if (num != null && num.intValue() == value39) {\n MqttBus a37 = MqttBus.f97541a.mo118711a();\n FinishPollEvent afVar = zVar.f97389R;\n C32569u.m150513a((Object) afVar, C6969H.m41409d(\"G6C95D014AB7EAD20E8078340CDF5CCDB65\"));\n a37.mo118710a(afVar);\n return;\n }\n int value40 = EventCode.PollVote.getValue();\n if (num != null && num.intValue() == value40) {\n MqttBus a38 = MqttBus.f97541a.mo118711a();\n PollVoteEvent avVar = zVar.f97413j;\n C32569u.m150513a((Object) avVar, C6969H.m41409d(\"G6C95D014AB7EBB26EA02AF5EFDF1C6\"));\n a38.mo118710a(avVar);\n return;\n }\n int value41 = EventCode.UpdatePollStatistics.getValue();\n if (num != null && num.intValue() == value41) {\n MqttBus a39 = MqttBus.f97541a.mo118711a();\n UpdatePollStatisticsEvent bnVar = zVar.f97414k;\n C32569u.m150513a((Object) bnVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF5CCDB65BCC60EBE24A23AF207935B\"));\n a39.mo118710a(bnVar);\n return;\n }\n int value42 = EventCode.ObtainRedPacket.getValue();\n if (num != null && num.intValue() == value42) {\n MqttBus a40 = MqttBus.f97541a.mo118711a();\n ObtainRedPacketEvent arVar = zVar.f97391T;\n C32569u.m150513a((Object) arVar, C6969H.m41409d(\"G6C95D014AB7EA42BF20F9946CDF7C6D35693D419B435BF\"));\n a40.mo118710a(arVar);\n return;\n }\n int value43 = EventCode.NewRedPacket.getValue();\n if (num != null && num.intValue() == value43) {\n MqttBus a41 = MqttBus.f97541a.mo118711a();\n NewRedPacketEvent apVar = zVar.f97390S;\n C32569u.m150513a((Object) apVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131824DF6DAD3D66A88D00E\"));\n a41.mo118710a(apVar);\n return;\n }\n int value44 = EventCode.FansTeamLevelUpgrade.getValue();\n if (num != null && num.intValue() == value44) {\n MqttBus a42 = MqttBus.f97541a.mo118711a();\n FansTeamLevelUpgradeEvent adVar = zVar.f97392U;\n C32569u.m150513a((Object) adVar, C6969H.m41409d(\"G6C95D014AB7EAD28E81DAF5CF7E4CEE86586C31FB30FBE39E11C914CF7\"));\n a42.mo118710a(adVar);\n return;\n }\n int value45 = EventCode.JoinFansTeam.getValue();\n if (num != null && num.intValue() == value45) {\n MqttBus a43 = MqttBus.f97541a.mo118711a();\n JoinFansTeamEvent ajVar = zVar.f97393V;\n C32569u.m150513a((Object) ajVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4EF3EBD0E87D86D417\"));\n a43.mo118710a(ajVar);\n return;\n }\n int value46 = EventCode.TheaterActivity.getValue();\n if (num != null && num.intValue() == value46) {\n MqttBus a44 = MqttBus.f97541a.mo118711a();\n TheaterActivityEvent bfVar = zVar.f97394W;\n C32569u.m150513a((Object) bfVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DAC2D47D8AC313AB29\"));\n a44.mo118710a(bfVar);\n return;\n }\n int value47 = EventCode.VideoFocusApply.getValue();\n if (num != null && num.intValue() == value47) {\n MqttBus a45 = MqttBus.f97541a.mo118711a();\n VideoFocusApplyEvent bpVar = zVar.f97395X;\n C32569u.m150513a((Object) bpVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD40AAF3CB2\"));\n a45.mo118710a(bpVar);\n return;\n }\n int value48 = EventCode.VideoFocusRefused.getValue();\n if (num != null && num.intValue() == value48) {\n MqttBus a46 = MqttBus.f97541a.mo118711a();\n VideoFocusRefusedEvent brVar = zVar.f97396Y;\n C32569u.m150513a((Object) brVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC71FB925B82CE2\"));\n a46.mo118710a(brVar);\n return;\n }\n int value49 = EventCode.UpdateDramaMemberIncome.getValue();\n if (num != null && num.intValue() == value49) {\n MqttBus a47 = MqttBus.f97541a.mo118711a();\n UpdateDramaMemberIncomeEvent bkVar = zVar.f97415l;\n C32569u.m150513a((Object) bkVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA17BA3DA92CF4319946F1EACED2\"));\n a47.mo118710a(bkVar);\n return;\n }\n int value50 = EventCode.SyncDramaAudioStatus.getValue();\n if (num != null && num.intValue() == value50) {\n MqttBus a48 = MqttBus.f97541a.mo118711a();\n SyncDramaAudioStatusEvent bcVar = zVar.f97400ac;\n C32569u.m150513a((Object) bcVar, C6969H.m41409d(\"G6C95D014AB7EB830E80DAF4CE0E4CED65682C01EB63F943AF20F845DE1\"));\n a48.mo118710a(bcVar);\n return;\n }\n int value51 = EventCode.StatementVoteCountMilestone.getValue();\n if (num != null && num.intValue() == value51) {\n MqttBus a49 = MqttBus.f97541a.mo118711a();\n StatementVoteCountMilestoneEvent bbVar = zVar.f97399ab;\n C32569u.m150513a((Object) bbVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87F8CC11F8033A43CE81AAF45FBE9C6C47D8CDB1F\"));\n a49.mo118710a(bbVar);\n return;\n }\n int value52 = EventCode.StatementQuestionMilestone.getValue();\n if (num != null && num.intValue() == value52) {\n MqttBus a50 = MqttBus.f97541a.mo118711a();\n StatementQuestionMilestoneEvent baVar = zVar.f97403af;\n C32569u.m150513a((Object) baVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87896D009AB39A427D9039944F7F6D7D86786\"));\n a50.mo118710a(baVar);\n return;\n }\n int value53 = EventCode.VideoFocusTimeout.getValue();\n if (num != null && num.intValue() == value53) {\n MqttBus a51 = MqttBus.f97541a.mo118711a();\n VideoFocusTimeoutEvent bsVar = zVar.f97397Z;\n C32569u.m150513a((Object) bsVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC113B235A43CF2\"));\n a51.mo118710a(bsVar);\n return;\n }\n int value54 = EventCode.VideoFocusEnd.getValue();\n if (num != null && num.intValue() == value54) {\n MqttBus a52 = MqttBus.f97541a.mo118711a();\n VideoFocusEndEvent bqVar = zVar.f97398aa;\n C32569u.m150513a((Object) bqVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD014BB\"));\n a52.mo118710a(bqVar);\n return;\n }\n int value55 = EventCode.UpdateDramaCampStatistics.getValue();\n if (num != null && num.intValue() == value55) {\n MqttBus a53 = MqttBus.f97541a.mo118711a();\n UpdateDramaCampStatisticsEvent biVar = zVar.f97416m;\n C32569u.m150513a((Object) biVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA19BE3DBB16F51A915CFBF6D7DE6A90\"));\n a53.mo118710a(biVar);\n return;\n }\n int value56 = EventCode.JoinDramaCamp.getValue();\n if (num != null && num.intValue() == value56) {\n MqttBus a54 = MqttBus.f97541a.mo118711a();\n JoinDramaCampEvent aiVar = zVar.f97401ad;\n C32569u.m150513a((Object) aiVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4CE0E4CED65680D417AF\"));\n a54.mo118710a(aiVar);\n return;\n }\n int value57 = EventCode.UpdateTheaterConfig.getValue();\n if (num != null && num.intValue() == value57) {\n MqttBus a55 = MqttBus.f97541a.mo118711a();\n UpdateTheaterConfigEvent boVar = zVar.f97402ae;\n C32569u.m150513a((Object) boVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF1CBD26897D0088033A427E00797\"));\n a55.mo118710a(boVar);\n return;\n }\n int value58 = EventCode.UpdateDurationTreasureBox.getValue();\n if (num != null && num.intValue() == value58) {\n MqttBus a56 = MqttBus.f97541a.mo118711a();\n UpdateDurationTreasureBoxEvent blVar = zVar.f97404ag;\n C32569u.m150513a((Object) blVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D6C56897DC15B10FBF3BE30F835DE0E0FCD5669B\"));\n a56.mo118710a(blVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.UpdateContributors.getValue())) {\n MqttBus a57 = MqttBus.f97541a.mo118711a();\n UpdateContributorsEvent bhVar = zVar.f97408e;\n C32569u.m150513a((Object) bhVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE6CCD97D91DC18AA24A43BF5\"));\n a57.mo118710a(bhVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.EnterTheater.getValue())) {\n MqttBus a58 = MqttBus.f97541a.mo118711a();\n EnterTheaterEvent yVar = zVar.f97406c;\n C32569u.m150513a((Object) yVar, C6969H.m41409d(\"G6C95D014AB7EAE27F20B8277E6EDC6D67D86C7\"));\n a58.mo118710a(yVar);\n }\n }", "pb4server.SendNoticeToLeaderAskReq getSendNoticeToLeaderAskReq();", "void mo23214a(Message message);", "boolean needsAck() { return true; }", "@Test\n public void t10() {\n try {\n sampleRule = \"&8=\\\"FIX.4.2Aqua\\\";&9000[0]->&9001=\\\"D\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(TestCustomDictionary.customMsg42, \"FIX.4.2Aqua\"); // System.out.println(result);\n resultStore = StaticTestingUtils.parseMessage(result);\n String r = resultStore.get(\"9001\").get(0);\n Assert.assertEquals(r, \"D\");\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2Aqua\");\n System.out.println(StaticTestingUtils.rs(result));\n sampleRule = \"&8=\\\"FIX.4.2\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(result, \"FIX.4.2Aqua\");\n resultStore = StaticTestingUtils.parseMessage(result);\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2\");\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "private boolean verifyMessagePresence(){\n boolean overallResult = true;\n \n for(int ii = 0; ii < 3; ii = ii +1){\n if(121 == getHidden(ii)){\n overallResult = true;\n }else{\n overallResult = false;\n }\n }\n \n return overallResult;\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "private static String m20561a(C6709k kVar) {\n if (kVar.mo16134k()) {\n C6712o o = kVar.mo16138o();\n if (o.mo16159q()) {\n return String.valueOf(o.mo15997b());\n }\n if (o.mo16156a()) {\n return Boolean.toString(o.mo16004h());\n }\n if (o.mo16160r()) {\n return o.mo15998c();\n }\n throw new AssertionError();\n } else if (kVar.mo16135l()) {\n return TEVideoRecorder.FACE_BEAUTY_NULL;\n } else {\n throw new AssertionError();\n }\n }", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }" ]
[ "0.5686338", "0.5626648", "0.55724156", "0.55721295", "0.555067", "0.54942447", "0.5482454", "0.5476184", "0.54705966", "0.5469264", "0.5429496", "0.5417011", "0.53503567", "0.53436357", "0.5325179", "0.531314", "0.5312265", "0.53077364", "0.527877", "0.5277185", "0.5266691", "0.52535886", "0.524608", "0.5236886", "0.5216512", "0.5208486", "0.5203683", "0.5203286", "0.5200632", "0.51966006", "0.5175129", "0.51742816", "0.5156017", "0.51482344", "0.51480377", "0.5146399", "0.51416034", "0.51323426", "0.51289135", "0.51128167", "0.5099731", "0.5093362", "0.507987", "0.50757134", "0.50650257", "0.50649714", "0.50616825", "0.50507736", "0.5047073", "0.5042781", "0.5036326", "0.503152", "0.50285643", "0.50241745", "0.5023986", "0.50168705", "0.50071114", "0.5003347", "0.49913913", "0.4987705", "0.4981207", "0.4980391", "0.4975756", "0.49742743", "0.49711895", "0.4970814", "0.49671918", "0.49587288", "0.49471936", "0.49462235", "0.49430752", "0.49421299", "0.4938652", "0.49257016", "0.49241418", "0.49199688", "0.49151033", "0.4911573", "0.49061394", "0.49029106", "0.49006224", "0.4899165", "0.4892403", "0.48879495", "0.4882886", "0.4879543", "0.48760056", "0.48710907", "0.48689133", "0.48681536", "0.48628145", "0.48573428", "0.48546857", "0.48536885", "0.4850667", "0.4849762", "0.48495093", "0.48475525", "0.4838704", "0.48314518" ]
0.50714874
44
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'ER'. No error/alert alert expected
@Test public void test3() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message3 = new File(classLoader.getResource(message3FileName).getFile()); String messageString = FileUtils.readFileToString(message3); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "public void setHcErr( String hcErr )\n {\n this.hcErr = hcErr;\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public OctetString getMsg1015()\n {\n\treturn this.msg1015;\n }", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public int checkForAlert() {\n return 0;\n }", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "boolean hasJsonAckMsg();", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public static void execMT_ACK(Putter p){\n\t\n\t\ttry {\n\t\t\tString ret=send_ACK(PPGMain.props.getProperty(\"cpgCPmt_70mt_ack\"),p.get(\"mobile\"),p.get(\"spnum\"),\n\t\t\t\t\tp.get(\"keyword\"),p.get(\"content\"),p.get(\"out_linkid\"),p.get(\"oprator\"));\n\t\t\tp.set(\"retcode\", ret.equals(\"1\")?\"0\":ret);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tp.set(\"retcode\",\"3\");\n\t\t\tp.set(\"retmsg\", e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "boolean getLockstepAck();", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public OctetString getMsg1019()\n {\n\treturn this.msg1019;\n }", "public void know_doc_Report()\n {\n\t boolean knowedgepresent =knowdoc.size()>0;\n\t if(knowedgepresent)\n\t {\n\t\t // System.out.println(\"Knowledge document details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Knowledge document details report is not present\");\n\t }\n }", "@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingElectricityErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the anonymous submit meter read page for error message validation\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRUser1\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.validateElectricityreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "@Test\n public void testClaimXrefHicNbr() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setXrefHicNbr,\n RdaFissClaim::getXrefHicNbr,\n RdaFissClaim.Fields.xrefHicNbr,\n 12);\n }", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "public ReportAckMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test01ConfRespSignedByRecepient() throws Exception {\n log.trace(\">test01ConfRespSignedByRecepient\");\n\n this.cmpConfiguration.setResponseProtection(cmpAlias, \"signature\");\n this.cmpConfiguration.setCMPDefaultCA(cmpAlias, \"\");\n this.globalConfigurationSession.saveConfiguration(ADMIN, this.cmpConfiguration);\n\n byte[] nonce = CmpMessageHelper.createSenderNonce();\n byte[] transid = CmpMessageHelper.createSenderNonce();\n\n // Send a confirm message to the CA\n String hash = \"foo123\";\n PKIMessage confirm = genCertConfirm(userDN, this.cacert, nonce, transid, hash, 0, null);\n assertNotNull(confirm);\n ByteArrayOutputStream bao = new ByteArrayOutputStream();\n ASN1OutputStream dOut = ASN1OutputStream.create(bao, ASN1Encoding.DER);\n dOut.writeObject(confirm);\n byte[] ba = bao.toByteArray();\n // Send request and receive response\n byte[] resp = sendCmpHttp(ba, 200, cmpAlias);\n checkCmpResponseGeneral(resp, this.testx509ca.getSubjectDN(), userDN, this.cacert, nonce, transid, true, null, PKCSObjectIdentifiers.sha256WithRSAEncryption.getId());\n checkCmpPKIConfirmMessage(userDN, this.cacert, resp);\n\n log.trace(\"<test01ConfRespSignedByRecepient\");\n }", "public OctetString getMsg1013()\n {\n\treturn this.msg1013;\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "private void getrec() {\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00010 Product not found on Contract_Detail\n\t\tif (nmfkpinds.pgmInd36()) {\n\t\t\tmsgObjIdx = setMsgObj(\"OES0115\", \"XWABCD\", msgObjIdx, messages);\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t\telse {\n\t\t\tif (nmfkpinds.pgmInd66()) {\n\t\t\t\tif (fileds.filests == 1218) {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"Y3U9999\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0004\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalidt();\n\t\t\t}\n\t\t}\n\t}", "public void processSurveyAck( UserSurvey userSurvey,String status);", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "@Test\n public void t10() {\n try {\n sampleRule = \"&8=\\\"FIX.4.2Aqua\\\";&9000[0]->&9001=\\\"D\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(TestCustomDictionary.customMsg42, \"FIX.4.2Aqua\"); // System.out.println(result);\n resultStore = StaticTestingUtils.parseMessage(result);\n String r = resultStore.get(\"9001\").get(0);\n Assert.assertEquals(r, \"D\");\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2Aqua\");\n System.out.println(StaticTestingUtils.rs(result));\n sampleRule = \"&8=\\\"FIX.4.2\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(result, \"FIX.4.2Aqua\");\n resultStore = StaticTestingUtils.parseMessage(result);\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2\");\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "@Test\n public void testClaimProcNewHicInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setProcNewHicIndEnum,\n RdaFissClaim::getProcNewHicInd,\n FissProcessNewHealthInsuranceClaimNumberIndicator.PROCESS_NEW_HIC_INDICATOR_Y,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setProcNewHicIndUnrecognized,\n RdaFissClaim::getProcNewHicInd,\n RdaFissClaim.Fields.procNewHicInd,\n 1);\n }", "int getClientMsgNo();", "public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "public OctetString getMsg1016()\n {\n\treturn this.msg1016;\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "String mo7388hl() throws RemoteException;", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "void mo23214a(Message message);", "void mo1507n();", "public OctetString getMsg1012()\n {\n\treturn this.msg1012;\n }", "private static void acknowledgeTeltonikaModem(Channel ch, int recordsNum) {\n\t\tChannelBuffer buf = ChannelBuffers.buffer(4);\n\t\tbyte b[] = intToByteArray(recordsNum);\n\t\tbuf.writeBytes(b);\n\t\tLOGGER.info(\"Response to device about data reception with package amount: \" + recordsNum);\n\t\tch.write(buf);\n\t}", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "@Override\n public void onAcknowledgement(RecordMetadata rm, Exception excptn) {\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }" ]
[ "0.60983485", "0.59624845", "0.59433264", "0.5918614", "0.5853592", "0.57830495", "0.56864345", "0.5673985", "0.5650687", "0.5649031", "0.5643198", "0.5639503", "0.5625838", "0.56102395", "0.55852455", "0.55077475", "0.5409869", "0.5353464", "0.5351459", "0.53372824", "0.53250414", "0.53173894", "0.5307338", "0.5282217", "0.524683", "0.523371", "0.52196753", "0.5215434", "0.5165588", "0.5134281", "0.5103499", "0.50798637", "0.50792444", "0.5076477", "0.5071592", "0.5060901", "0.5055329", "0.5052291", "0.5046639", "0.5045397", "0.50453", "0.50409216", "0.50406253", "0.50404966", "0.503927", "0.5036374", "0.5034467", "0.5030346", "0.5011093", "0.5010864", "0.5005425", "0.49942714", "0.49851683", "0.4983844", "0.49825057", "0.4980381", "0.49648967", "0.49646312", "0.494608", "0.4944195", "0.49395803", "0.4933523", "0.49311137", "0.4921603", "0.49176863", "0.49158388", "0.49068937", "0.49048615", "0.49013844", "0.48985174", "0.48965752", "0.48943448", "0.4886209", "0.48782828", "0.48721477", "0.48671007", "0.48485124", "0.48478502", "0.4844122", "0.4840408", "0.48396957", "0.48386583", "0.48365265", "0.48318443", "0.48289293", "0.48248455", "0.48241544", "0.4818612", "0.4817094", "0.48170888", "0.48166803", "0.4814984", "0.4814602", "0.48125848", "0.48119274", "0.4798073", "0.4794901", "0.47948265", "0.4784282", "0.4782766" ]
0.5592601
14
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'SU'. No error/alert
@Test public void test4() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message4 = new File(classLoader.getResource(message4FileName).getFile()); String messageString = FileUtils.readFileToString(message4); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "public OctetString getMsg1015()\n {\n\treturn this.msg1015;\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "public static void execMT_ACK(Putter p){\n\t\n\t\ttry {\n\t\t\tString ret=send_ACK(PPGMain.props.getProperty(\"cpgCPmt_70mt_ack\"),p.get(\"mobile\"),p.get(\"spnum\"),\n\t\t\t\t\tp.get(\"keyword\"),p.get(\"content\"),p.get(\"out_linkid\"),p.get(\"oprator\"));\n\t\t\tp.set(\"retcode\", ret.equals(\"1\")?\"0\":ret);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tp.set(\"retcode\",\"3\");\n\t\t\tp.set(\"retmsg\", e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "boolean hasJsonAckMsg();", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private void m34892a(C13288k kVar) {\n try {\n C13262e.this.f34198l.execute(new C13276c(\"OkHttp %s ACK Settings\", new Object[]{C13262e.this.f34194h}, kVar));\n } catch (RejectedExecutionException unused) {\n }\n }", "public void processSurveyAck( UserSurvey userSurvey,String status);", "void mo7352a(C1655s sVar, AdError adError);", "public void mo55257a(Void voidR) {\n C3490e3.m665e(\"Analytics sent successfully\");\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "private static byte[] createHeader() {\n Random r = new Random();\n\n byte[] output = new byte[12];\n\n // Create random message id\n short messageID = (short) r.nextInt(Short.MAX_VALUE + 1);\n\n // Create a buffer we can construct the header in.\n ByteBuffer buf = ByteBuffer.wrap(output);\n\n // Place the message into the buffer.\n buf.putShort(messageID);\n\n // Sets QR, OPCODE, AA, TC, RD, RA, and RCODE\n buf.put((byte)0x01);\n buf.put((byte)0x20);\n\n // QDCOUNT, we're making one request.\n buf.putShort((short) 1);\n\n // Rest are 0\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n buf.putShort((short) 0);\n\n return output;\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public int checkForAlert() {\n return 0;\n }", "private static void acknowledgeTeltonikaModem(Channel ch, int recordsNum) {\n\t\tChannelBuffer buf = ChannelBuffers.buffer(4);\n\t\tbyte b[] = intToByteArray(recordsNum);\n\t\tbuf.writeBytes(b);\n\t\tLOGGER.info(\"Response to device about data reception with package amount: \" + recordsNum);\n\t\tch.write(buf);\n\t}", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void mo55257a(Void voidR) {\n C3490e3.m665e(\"Analytics v2 sent successfully\");\n this.f1481a.mo55257a(this.f1482b);\n }", "public void setHcErr( String hcErr )\n {\n this.hcErr = hcErr;\n }", "boolean getLockstepAck();", "@Override\n public void swipCardSucess(String cardNumber) {\n showLogMessage(\"PAN:\" + cardNumber.toString());\n Message updateMessage = mMainMessageHandler.obtainMessage();\n updateMessage.obj = \"\";\n updateMessage.what = 0x98;\n updateMessage.sendToTarget();\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "public static void m29980i() {\n String str = \"TpnsChannel\";\n try {\n long currentTimeMillis = System.currentTimeMillis();\n if (f23269d == 0) {\n f23269d = currentTimeMillis;\n } else if (currentTimeMillis - f23269d < 30000) {\n return;\n }\n if (C6973b.m29776f() != null) {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"srv_stime\", XGPushServiceV4.f23078a);\n jSONObject.put(\"srv_etime\", System.currentTimeMillis());\n jSONObject.put(\"srv_startTime\", XGPushServiceV4.f23079b);\n if (XGPushServiceV4.f23080c != null) {\n jSONObject.put(\"srv_freason\", XGPushServiceV4.f23080c);\n }\n jSONObject.put(\"hb_suc\", f23267b);\n jSONObject.put(\"hb_failed\", f23268c);\n if (f23273h != null) {\n jSONObject.put(\"hb_freason\", f23273h);\n }\n jSONObject.put(\"con_suc\", f23270e);\n jSONObject.put(\"con_failed\", f23271f);\n if (f23272g != null) {\n jSONObject.put(\"con_freason\", f23272g);\n }\n C7055h.m30172b(C6973b.m29776f(), \"service_state\", jSONObject.toString());\n f23269d = currentTimeMillis;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Service bi state \");\n sb.append(jSONObject.toString());\n C6864a.m29303e(str, sb.toString());\n }\n } catch (Throwable th) {\n C6864a.m29302d(str, \"saveBIReportJson \", th);\n }\n }", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "public int getOkulHesapNo() {\n\t\t\n\t\t\n\t\treturn okulHesapNo;\n\t}", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public void createValue() {\r\n value = new qa.gov.mol.ProcessAcknowledgment();\r\n }", "public OctetString getMsg1016()\n {\n\treturn this.msg1016;\n }", "void mo1507n();", "public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }", "public synchronized void m29983k() {\n if (this.f23294u.isEmpty()) {\n if (this.f23286B == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (this.f23286B.f23372f == null) {\n this.f23286B = new C7030c(7, null, this.f23290J);\n }\n if (XGPushConfig.enableDebug) {\n C6864a.m29298c(\"TpnsChannel\", \"Action -> send heartbeat \");\n }\n m29967a(-1, this.f23286B);\n if ((f23266a > 0 && f23266a % 3 == 0) || f23266a == 2) {\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7056i.m30212h(C6973b.m29776f());\n }\n });\n }\n }\n m29985m();\n C6860a.m29257b(C6973b.m29776f());\n C7059f.m30231a(C6973b.m29776f()).mo34155a();\n m29980i();\n if (XGPushConfig.isLocationEnable(C6973b.m29776f())) {\n if (f23264F == 0) {\n f23264F = C7055h.m30167a(C6973b.m29776f(), Constants.LOC_REPORT_TIME, 0);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23264F == 0 || Math.abs(currentTimeMillis - f23264F) > ((long) f23281p)) {\n final JSONObject reportLocationJson = CustomDeviceInfos.getReportLocationJson(C6973b.m29776f());\n C6901c.m29459a().mo33104a((Runnable) new Runnable() {\n public void run() {\n C7046a.m30130b(C6973b.m29776f(), \"location\", reportLocationJson);\n }\n });\n f23264F = currentTimeMillis;\n C7055h.m30171b(C6973b.m29776f(), Constants.LOC_REPORT_TIME, currentTimeMillis);\n }\n }\n }", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "boolean isSetSchufaResponseData();", "public RegistryReportsRegistrationStatus(int ss, String infoString){\n\t\tstatus = ss;\n\t\tinformationString = infoString;\n\t\ttry{\n\t\t\tinfoStringBytes = infoString.getBytes(\"US-ASCII\");\n\t\t}catch(UnsupportedEncodingException e){\n\t\t\tSystem.out.println(\"RRRS: Error, US-ASCII not supported\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tlength = infoStringBytes.length;\n\n\t\ttry{\n\t\t\tmessage = null;\n\t\t\tByteArrayOutputStream baOutputStream = new ByteArrayOutputStream();\n\t\t\tDataOutputStream dout = new DataOutputStream(new BufferedOutputStream(baOutputStream));\n\t\t\tdout.writeInt(messageType);\n\t\t\tdout.writeInt(status);\n\t\t\tdout.writeInt(length);\n\t\t\tdout.write(infoStringBytes);\n\t\t\tdout.flush();\n\t\t\tmessage = baOutputStream.toByteArray();\n\t\t\tbaOutputStream.close();\n\t\t\tdout.close();\n\t\t}catch(IOException e){\n\t\t\tSystem.out.println(\"ONSR: Error Marshalling\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}", "void mo23214a(Message message);", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "@Override // jcifs.smb.SmbComTransactionResponse\n public int readSetupWireFormat(byte[] buffer, int bufferIndex, int len) {\n return 0;\n }", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "protected int handleAck(Msg msg)\n {\n System.out.println(\"Received AckMsg for stream \" + msg.streamId());\n MsgKey key = msg.msgKey();\n\n //print out item name from key if it has it\n if (key != null && key.checkHasName())\n {\n System.out.println(key.name() + \"\\nDOMAIN: \" +\n DomainTypes.toString(msg.domainType()));\n }\n\n AckMsg ackMsg = (AckMsg)msg;\n System.out.println(\"\\tackId=\" + ackMsg.ackId() + (ackMsg.checkHasSeqNum() ? \"\\tseqNum=\" + ackMsg.seqNum() : \"\") +\n (ackMsg.checkHasNakCode() ? \"\\tnakCode=\" + ackMsg.nakCode() : \"\") +\n (ackMsg.checkHasText() ? \"\\ttext=\" + ackMsg.text().toString() : \"\"));\n return CodecReturnCodes.SUCCESS;\n }", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "String mo7388hl() throws RemoteException;", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_noalrertchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey without alret\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alretnonchecked(smrProfile); \n\t\t\t \t}", "public void mo21783H() {\n }", "private String displayCSCResponse(String vCSCResultCode) {\r\n\r\n\t\tString result = \"\";\r\n\t\tif (vCSCResultCode != null || vCSCResultCode.length() == 0) {\r\n\r\n\t\t\tif (vCSCResultCode.equalsIgnoreCase(\"Unsupported\") || vCSCResultCode.equalsIgnoreCase(\"No Value Returned\")) {\r\n\t\t\t\tresult = \"CSC not supported or there was no CSC data provided\";\r\n\t\t\t} else {\r\n\t\t\t\t// Java cannot switch on a string so turn everything to a char\r\n\t\t\t\tchar input = vCSCResultCode.charAt(0);\r\n\r\n\t\t\t\tswitch (input) {\r\n\t\t\t\tcase 'M':\r\n\t\t\t\t\tresult = \"Exact code match\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'S':\r\n\t\t\t\t\tresult = \"Merchant has indicated that CSC is not present on the card (MOTO situation)\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'P':\r\n\t\t\t\t\tresult = \"Code not processed\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'U':\r\n\t\t\t\t\tresult = \"Card issuer is not registered and/or certified\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'N':\r\n\t\t\t\t\tresult = \"Code invalid or not matched\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tresult = \"Unable to be determined\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tresult = \"null response\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public OctetString getMsg1006()\n {\n\treturn this.msg1006;\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "String mo7390hn() throws RemoteException;", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "String mo729c() throws RemoteException;", "private void m6597N() {\n C0938a.m5002a(\"SR/SoundRecorder\", \"<popClearDialogBox>\");\n String lowerCase = this.f5399S.mo6173f().getAbsolutePath().toLowerCase();\n if (this.f5419h) {\n C1492b.m7431a((Context) this, (CharSequence) getResources().getString(R.string.phone_mtp_space_expired_smartkey), 1).show();\n this.f5419h = false;\n }\n Intent intent = new Intent(\"com.iqoo.secure.LOW_MEMORY_WARNING\");\n intent.addFlags(268435456);\n intent.putExtra(\"require_size\", 5242880);\n intent.putExtra(\"pkg_name\", getPackageName());\n intent.putExtra(\"extra_loc\", 1);\n intent.putExtra(\"tips_title\", getResources().getString(R.string.manager_title));\n intent.putExtra(\"tips_title_all\", getResources().getString(R.string.unable_to_record));\n try {\n startActivity(intent);\n } catch (Exception unused) {\n Intent intent2 = new Intent();\n intent2.putExtra(\"BBKPhoneCardName\", lowerCase);\n intent2.setComponent(new ComponentName(\"com.android.filemanager\", \"com.android.filemanager.FileManagerActivity\"));\n startActivity(intent2);\n }\n }", "public void Click_defineSetupPage_Alert() {\r\n\t\tclickOn(SensorConfiguration_Btn);\r\n\t}", "private final SystemMessage m43300h(ApiMessage apiMessage) {\n String id = apiMessage.getId();\n if (id == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String matchId = apiMessage.getMatchId();\n if (matchId == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String to = apiMessage.getTo();\n if (to == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String from = apiMessage.getFrom();\n if (from == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String message = apiMessage.getMessage();\n if (message != null) {\n return new SystemMessage(null, id, matchId, to, from, message, m43292a(apiMessage.getSentDate()), false, false, DeliveryStatus.SUCCESS, 1, null);\n }\n throw new IllegalStateException(\"Required value was null.\".toString());\n }", "public ReportAckMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "public OctetString getMsg1019()\n {\n\treturn this.msg1019;\n }", "void mo13373a(int i, ErrorCode errorCode, ByteString byteString);", "public boolean handleSIEM(String command) {\n boolean result = false;\n String patt = \".zip was sent successfully\";\n String res = agent.findPattern(command, patt);\n JLog.logger.info(\"res: \" + res);\n if (res == null)\n return false;\n Vector<String> zipFiles = extractFileNames(res, \"dla_\", \".zip\");\n\n for (int i = 0; i < zipFiles.size(); i++) {\n res = lennyActions.numLinesinFile(scp_path + zipFiles.elementAt(i), EP_Syslog_pattern);\n JLog.logger.info(\"res: \" + res);\n if ((null != res) && (res.contains(right_result)))\n result = true;\n else {\n result = false;\n break;\n }\n }\n return result;\n }", "public HL7Segment processPV1ToUFD(String pHL7MessageBlock) throws ICANException {\n\n HL7Message aHL7Message = new HL7Message(mHL7Message);\n HL7Segment aPV1Segment = new HL7Segment(\"PV1\");\n\n CodeLookUp aPayClass = new CodeLookUp(\"CSC_PayClass.table\", mFacility, mEnvironment);\n\n\n// Special processing for PV1 segments received in A28 and A31 messages.\n if (aHL7Message.isEvent(\"A28, A31\")) {\n aPV1Segment.set(HL7_23.PV1_1_set_ID, \"1\");\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"R\");\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_facility_ID, mFacility);\n aPV1Segment.set(HL7_23.PV1_18_patient_type, \"R\");\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"R\".concat(mPatientUR));\n if (mFacility.matches(\"BHH|MAR|PJC|ANG\")) {\n HL7Segment aInPV1Segment = new HL7Segment(aHL7Message.getSegment(HL7_23.PV1));\n String aPV1_8ReferringDoc = aInPV1Segment.get(HL7_23.PV1_8_referring_doctor);\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, aPV1_8ReferringDoc);\n }\n } else { // For all other message types ... i.e. \"A01 to A17\"\n aHL7Message = new HL7Message(pHL7MessageBlock);\n aPV1Segment.setSegment(aHL7Message.getSegment(HL7_23.PV1));\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"I\");\n\n// Sandringham funny Facility in Room position ....\n if (aPV1Segment.get(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n if (aPV1Segment.get(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"I\".concat(aPV1Segment.get(HL7_23.PV1_19_visit_number)));\n\n// Translate the Financial Class\n if (mFacility.equalsIgnoreCase(\"BHH\") ||\n mFacility.equalsIgnoreCase(\"MAR\") ||\n mFacility.equalsIgnoreCase(\"ANG\") ||\n mFacility.equalsIgnoreCase(\"PJC\")) {\n\n //aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(mFacility + \"-\" + aPV1Segment.get(HL7_23.PV1_2_patient_class) + \"-\" + aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n } else {\n aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n }\n\n\n// Check each of the Dr's have a valid Bayside code\n String aDr;\n// ... Attending Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Refering Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Consulting Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// Check for CSC sending invalid discharge/admit times of\n aPV1Segment.set(HL7_23.PV1_44_admit_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_44_admit_date_time)));\n aPV1Segment.set(HL7_23.PV1_45_discharge_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_45_discharge_date_time)));\n }\n return aPV1Segment;\n\n }", "public void UpCheck_status1(MajorChange mc) ;", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "@Test\n public void testClaimXrefHicNbr() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setXrefHicNbr,\n RdaFissClaim::getXrefHicNbr,\n RdaFissClaim.Fields.xrefHicNbr,\n 12);\n }", "final /* synthetic */ void m36052a(String str, String str2, ReportCause reportCause, @Nullable String str3, Response response) {\n this.f29981a.showReportSuccessful();\n m36040a(null, str, str2, null, reportCause, str3, ReportingSource.PROFILE);\n }" ]
[ "0.56689787", "0.56416655", "0.54996353", "0.54984546", "0.5496727", "0.54800785", "0.5474895", "0.54597574", "0.5406907", "0.5380975", "0.53386635", "0.5331083", "0.5297106", "0.5295433", "0.5284907", "0.527891", "0.52477443", "0.5234338", "0.52292305", "0.52030635", "0.52004725", "0.51867294", "0.5165601", "0.5155267", "0.51541424", "0.51517195", "0.51485395", "0.5117795", "0.51157606", "0.5110973", "0.51012194", "0.5098456", "0.50972784", "0.5096593", "0.5096253", "0.5088475", "0.5051759", "0.50463533", "0.5031884", "0.50235736", "0.5012344", "0.4997771", "0.49805883", "0.49738532", "0.49376476", "0.4929467", "0.49254304", "0.49002787", "0.48940265", "0.48807263", "0.48753282", "0.48672986", "0.4866101", "0.4857696", "0.48573762", "0.4857165", "0.48547816", "0.48507652", "0.4848414", "0.48393267", "0.4837962", "0.4833793", "0.48331422", "0.48295897", "0.48188797", "0.4803875", "0.4794998", "0.47898325", "0.4788095", "0.4787572", "0.47865427", "0.47817788", "0.47813788", "0.47805434", "0.47790998", "0.477322", "0.47687474", "0.4766786", "0.47643965", "0.47631562", "0.4762593", "0.476194", "0.4759402", "0.4758377", "0.4757588", "0.47565913", "0.47510913", "0.47476718", "0.47422507", "0.47416332", "0.4735933", "0.47348094", "0.47318828", "0.47303784", "0.4726527", "0.47248387", "0.471821", "0.47175482", "0.4717341", "0.47164994" ]
0.519282
21
MSH21 Not present, MSH16 present and valued NE. Two errors, no alert expected.
@Test public void test5() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message5 = new File(classLoader.getResource(message5FileName).getFile()); String messageString = FileUtils.readFileToString(message5); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "void mo7352a(C1655s sVar, AdError adError);", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1507n();", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s15()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2\", \"0xA0182\");\r\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M|=3 m\", \"0xA0184\");\r\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidNewHpgn() {\n eckIdServiceUtil.replaceStampseudonym(INVALID_HPGN, validHpgnOld, null);\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidOldHpgn() {\n eckIdServiceUtil.replaceStampseudonym(validHpgnNew, INVALID_HPGN, null);\n }", "public void validateRpd13s13()\n {\n // This guideline cannot be automatically tested.\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "public void validateRpd13s12()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM|=3\", \"0xA0184\");\r\n }", "abstract C0451h mo1607e();", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd15s5()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S-=4km\", \"0xA0177\");\r\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S+=4km\", \"0xA0176\");\r\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "private void m50421s() {\n if (this.f30709E0 == null && TextUtils.isEmpty(m50429w())) {\n m50375a(this.f30731b0);\n }\n if (TextUtils.isEmpty(m50432x())) {\n m50375a(this.f30732c0);\n }\n if (TextUtils.isEmpty(m50428v())) {\n m50375a(this.f30733d0);\n }\n if (TextUtils.isEmpty(m50433y())) {\n m50375a(this.f30734e0);\n }\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S%=3m\", \"0xA0189\");\r\n }", "public void validateRpd22s5()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM&=2\", \"0xA0183\");\r\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testNESM() {\n CuteNetlibCase.doTest(\"NESM.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "public void validateRpd13s10()\n {\n // This guideline cannot be automatically tested.\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "public void validateRpd13s9()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasUnknown71();", "public void validateRpd13s2()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s8()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS+=4km\", \"0xA0176\");\r\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M/=\\\"Hello\\\"\", \"0xA0179\");\r\n }", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS-=4km\", \"0xA0177\");\r\n }", "boolean hasS7();", "public String getMlSdef16() {\n return mlSdef16;\n }", "C32446a mo21077h() throws Exception;", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM>>>=2\", \"0xA0188\");\r\n }", "C1458cs mo7613iS();", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "private final void m46517V() {\n if (this.f40707H != null) {\n C15600ck ckVar = this.f40707H.f44224a;\n if (!(ckVar == null || C14793ay.m42898d().mo39086a() == null)) {\n C14793ay.m42898d().mo39086a().mo41449a(ckVar);\n }\n }\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>>=varI_M\", \"0xA0188\");\r\n }", "public void validateRpd8s21()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M&=varI_M\", \"0xA0183\");\r\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varM*=varM\", \"0xA0178\");\r\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void mo1538a(boolean manual) {\n if (manual) {\n C2201w.m8370a((int) C0965R.string.ota_net_error);\n }\n }", "private void m125718m() {\n mo110584h();\n TopicMainViewModel kVar = this.f90217G;\n if (kVar != null) {\n kVar.mo110106a(kVar.mo110112h(), this.f90217G.mo110109e());\n }\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M<<=3 m\", \"0xA0187\");\r\n }", "public void validateRpd11s9()\n {\n // This guideline cannot be automatically tested.\n }", "private void m81855s() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA1BAF209420E2\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58082n = Integer.parseInt(c);\n }\n } catch (Throwable th) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), th.getMessage());\n this.f58082n = 0;\n }\n if (this.f58082n == 0 && C6969H.m41409d(\"G7E94C254A538A221F3409347FF\").equals(this.f58071c.getHost())) {\n this.f58082n = AppIdRouterHelper.m81728a(this.f58072d.getPath());\n }\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice((-1403), 2125570549, 4832, 4832);\n assertEquals(\"id=-1403 unknown=4832.0 canAutoExecute\", string0);\n }", "public void validateRpd7s2()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidBinaryXorAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M^=3 m\", \"0xA0185\");\r\n }", "private void m125726u() {\n TopicTabConfig dVar = this.f90230w;\n if (dVar != null && dVar.mo109356a(C6969H.m41409d(\"G608DC108B0\"))) {\n m125696a(true, false);\n }\n }", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM<<=3\", \"0xA0187\");\r\n }", "public void validateRpd8s13()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1501h();", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public void validateRpd13s14()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidDoubleRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>=3m\", \"0xA0186\");\r\n }", "public void validateRpd2s7()\n {\n // This guideline cannot be automatically tested.\n }", "public static void m22735h() {\n if (f20301b.mo18963a()) {\n f20301b.mo18962a(C7268n.m22763a().mo18998b());\n }\n }", "public void mo21797V() {\n this.f24532d.mo21926U();\n }", "@Test\r\n public void testInvalidBinaryXorAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM^=3 m\", \"0xA0185\");\r\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varD_S%=3\", \"0xA0189\");\r\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "C0832f m5767a() throws C0841b, WDException;", "public void validateRpd16s3()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "@Test\r\n public void testInvalidDecPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"--varS\", \"0xA0173\");\r\n }", "@Test\r\n public void testInvalidMinusPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"-varS\", \"0xA0175\");\r\n }", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }" ]
[ "0.5837577", "0.5803697", "0.57654977", "0.5758043", "0.5741833", "0.5683225", "0.56741506", "0.56531656", "0.5618555", "0.5603432", "0.5577549", "0.5541876", "0.5540666", "0.5534815", "0.55136675", "0.5467361", "0.5455391", "0.5448795", "0.5445361", "0.5439777", "0.543365", "0.5432227", "0.54240483", "0.5419789", "0.5414932", "0.5397286", "0.53937113", "0.5379955", "0.5366814", "0.5356405", "0.5356178", "0.53357315", "0.5332318", "0.5317222", "0.5315893", "0.5313929", "0.5313149", "0.5312606", "0.53007513", "0.5284456", "0.5282144", "0.52794194", "0.5278641", "0.5244754", "0.5240838", "0.52311873", "0.52292883", "0.52258164", "0.52257985", "0.5225384", "0.5225176", "0.5219226", "0.52181774", "0.5217307", "0.521174", "0.5211301", "0.5210753", "0.5206233", "0.5200877", "0.5192912", "0.51894563", "0.5186829", "0.5184693", "0.5176931", "0.5175301", "0.51744914", "0.5172776", "0.5172651", "0.51651394", "0.5159798", "0.5156736", "0.51547885", "0.51518166", "0.5149806", "0.5142017", "0.51385045", "0.51379395", "0.5135308", "0.51339275", "0.5132113", "0.5131975", "0.5129128", "0.5126303", "0.5115312", "0.511387", "0.5107478", "0.5104628", "0.51045203", "0.51004857", "0.5100014", "0.5094805", "0.5091817", "0.50898814", "0.50884837", "0.50870866", "0.508606", "0.50823873", "0.50811976", "0.5077587", "0.50765264", "0.50720483" ]
0.0
-1
MSH21 Not present, MSH16 not present. Two errors, no alert expected.
@Test public void test6() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message6 = new File(classLoader.getResource(message6FileName).getFile()); String messageString = FileUtils.readFileToString(message6); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "C32446a mo21077h() throws Exception;", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "void mo1507n();", "void mo7352a(C1655s sVar, AdError adError);", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1501h();", "public static String m114841h() {\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.GetEffectVersionFromLib)) {\n return \"6.0.0\";\n }\n return C45252ac.m142769b();\n }", "public void mo21783H() {\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void validateRpd13s12()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s15()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "boolean hasS7();", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "private void m50421s() {\n if (this.f30709E0 == null && TextUtils.isEmpty(m50429w())) {\n m50375a(this.f30731b0);\n }\n if (TextUtils.isEmpty(m50432x())) {\n m50375a(this.f30732c0);\n }\n if (TextUtils.isEmpty(m50428v())) {\n m50375a(this.f30733d0);\n }\n if (TextUtils.isEmpty(m50433y())) {\n m50375a(this.f30734e0);\n }\n }", "public void validateRpd13s13()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd8s21()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "C0832f m5767a() throws C0841b, WDException;", "public void mo55177a() {\n long unused = C3615m3.this.f1452k = System.currentTimeMillis();\n if (C3615m3.this.f1443b) {\n C3615m3.this.m1171c(new MDExternalError(MDExternalError.ExternalError.SDK_INITIALIZATION_IN_PROGRESS), this.f1467a);\n } else if (!C3615m3.this.f1447f.mo55921b() || C3615m3.this.f1447f.mo55918a()) {\n C3615m3.this.f1449h.updateFilePath(C3595k3.m1060d().mo55511a());\n boolean unused2 = C3615m3.this.f1443b = true;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n if (C3723s4.m1629b() || C3723s4.m1628a()) {\n C3490e3.m665e(\"SDK Upgrade - delete UUID and local configuration storage\");\n C3661o5.m1405a();\n Pair<String, Boolean> a = C3729t0.m1642a();\n if (a != null) {\n AnalyticsBridge.getInstance().reportDeleteStorageEvent((String) a.first, ((Boolean) a.second).booleanValue());\n }\n }\n C3723s4.m1630c();\n C3615m3.this.m1172c(this.f1467a);\n C3580j createApiToken = ModelFactory.getInstance().createApiToken(this.f1468b);\n if (createApiToken == null) {\n boolean unused3 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1158a((C3665p2) new C3593k1(C3586j3.C3587a.API_TOKEN_PARSE_ERROR), this.f1467a);\n C3615m3.this.clearAndDisconnect();\n } else if (!C3615m3.this.f1442a || C3604l2.m1115c().mo55538b() == null || !C3604l2.m1115c().mo55538b().mo55850a().equals(createApiToken.mo55850a())) {\n C3604l2.m1115c().mo55537a(createApiToken);\n if (!C3604l2.m1115c().mo55538b().mo55850a().equals(C3659o3.m1391f().mo55687a(C3815z4.C3816a.API_TOKEN))) {\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.API_TOKEN, C3604l2.m1115c().mo55538b().mo55850a());\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.ACCESS_TOKEN, (String) null);\n }\n C3490e3.m665e(\"SDK init started\");\n AnalyticsBridge.getInstance().reportInitEvent();\n C3767w0.m1812b().mo55893a();\n C3646n3.m1337m().mo55661a(60000, 3, 60000, 0, 512, 3);\n C3615m3.this.m1150a(this.f1467a);\n } else {\n boolean unused4 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_ALREADY_INITIALIZED), this.f1467a);\n }\n } else {\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_KILLED), this.f1467a);\n C3461c3.m562g().clearAndDisconnect();\n }\n }", "public void validateRpd13s8()\n {\n // This guideline cannot be automatically tested.\n }", "public void testGetManagementSpecVersion() {\n String specVersion = mb.getManagementSpecVersion();\n assertNotNull(specVersion);\n assertTrue(specVersion.length() > 0);\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "public void validateRpd7s2()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo6081a() {\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd13s9()\n {\n // This guideline cannot be automatically tested.\n }", "public final /* synthetic */ void mo9021h() {\n C3517a.m12962a(this.f8025c, this.f8025c.getString(R.string.f0k));\n }", "public void validateRpd22s5()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "public void validateRpd8s13()\n {\n // This guideline cannot be automatically tested.\n }", "abstract C0451h mo1607e();", "public void v_Verify_Guest7_Hidden(){\n\t}", "public void validateRpd13s2()\n {\n // This guideline cannot be automatically tested.\n }", "protected void mo6255a() {\n }", "public void validateRpd2s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s10()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidNewHpgn() {\n eckIdServiceUtil.replaceStampseudonym(INVALID_HPGN, validHpgnOld, null);\n }", "public static void m22735h() {\n if (f20301b.mo18963a()) {\n f20301b.mo18962a(C7268n.m22763a().mo18998b());\n }\n }", "public abstract boolean mo9737c();", "private void m125726u() {\n TopicTabConfig dVar = this.f90230w;\n if (dVar != null && dVar.mo109356a(C6969H.m41409d(\"G608DC108B0\"))) {\n m125696a(true, false);\n }\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public boolean mo43870j() {\n return ((String) this.f42902g.get(C13822a.Application)).equals(\"dns-sd\") && ((String) this.f42902g.get(C13822a.Instance)).equals(\"_services\");\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidOldHpgn() {\n eckIdServiceUtil.replaceStampseudonym(validHpgnNew, INVALID_HPGN, null);\n }", "boolean mo7389hm() throws RemoteException;", "private void m50366E() {\n }", "public void validateRpd8s23()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "boolean hasUnknown71();", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void mo55254a() {\n }", "public void validateRpd11s9()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean mo43867h() {\n boolean z = false;\n if (!((String) this.f42902g.get(C13822a.Application)).equals(\"dns-sd\")) {\n return false;\n }\n String name = (String) this.f42902g.get(C13822a.Instance);\n if (\"b\".equals(name) || \"db\".equals(name) || \"r\".equals(name) || \"dr\".equals(name) || \"lb\".equals(name)) {\n z = true;\n }\n return z;\n }", "public void validateRpd3s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo21797V() {\n this.f24532d.mo21926U();\n }", "C1458cs mo7613iS();", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd15s5()\n {\n // This guideline cannot be automatically tested.\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "public void validateRpd16s3()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean check_WndsHelp_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_WndsHelp_Icon = driver.findElementByAccessibilityId(\"WindowsHelpAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_WndsHelp_Icon);\r\n\t}", "public void validateRpd13s14()\n {\n // This guideline cannot be automatically tested.\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "void mo1637a();", "public void validateRpd22s9()\n {\n // This guideline cannot be automatically tested.\n }", "private void m125718m() {\n mo110584h();\n TopicMainViewModel kVar = this.f90217G;\n if (kVar != null) {\n kVar.mo110106a(kVar.mo110112h(), this.f90217G.mo110109e());\n }\n }", "Info mo7564ix();", "public void v_Verify_Guest8_Hidden(){\n\t}", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "public final void mo7596sH(String str) {\n }", "public void v_Verify_Guest9_Hidden(){\n\t}" ]
[ "0.56478155", "0.5631602", "0.56026715", "0.5591999", "0.5591474", "0.5566383", "0.55658376", "0.55613774", "0.5518713", "0.5486247", "0.5476801", "0.5446047", "0.54448915", "0.544354", "0.5423961", "0.54091924", "0.54090035", "0.5404829", "0.5389915", "0.53891826", "0.53837425", "0.5380179", "0.53770125", "0.53719413", "0.53569454", "0.5346111", "0.53426474", "0.5339851", "0.5329777", "0.53206414", "0.5288971", "0.52776426", "0.527165", "0.5265005", "0.5264811", "0.526216", "0.5261158", "0.52572256", "0.5254539", "0.52341187", "0.5226704", "0.52226335", "0.52199537", "0.5200737", "0.51984847", "0.5192409", "0.51869994", "0.5174336", "0.5173286", "0.5167285", "0.5164875", "0.5161121", "0.51555383", "0.51539946", "0.51525974", "0.51416856", "0.5135799", "0.51262754", "0.51238054", "0.5117533", "0.5116823", "0.51166314", "0.51166314", "0.51166314", "0.51166314", "0.51166314", "0.51166314", "0.51166314", "0.5111634", "0.5110104", "0.5082397", "0.5077973", "0.5077484", "0.5077405", "0.5076818", "0.50669074", "0.506535", "0.50561506", "0.5054116", "0.5046359", "0.50386596", "0.5032725", "0.50311804", "0.5030989", "0.50281215", "0.5027869", "0.50264865", "0.5024819", "0.5023025", "0.5015461", "0.5012953", "0.500762", "0.50043124", "0.49929965", "0.49914753", "0.49914372", "0.49878773", "0.49870208", "0.4984838", "0.49843255", "0.49842685" ]
0.0
-1
MSH21.1 = PHLabReportAck, MSH16 is present and valued 'AB'. One error, no alert expected
@Test public void test7() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message7 = new File(classLoader.getResource(message7FileName).getFile()); String messageString = FileUtils.readFileToString(message7); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "private void verifySpecimensPresent(int aaa07Count, int controlCount, int baq00051Count)\r\n {\n assertTextPresent(\"AAA07\", aaa07Count * 2);\r\n assertTextPresent(\"AssayTestControl\", controlCount * 2);\r\n assertTextPresent(\"BAQ00051\", baq00051Count * 2);\r\n }", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "@Test\n public void testClaimXrefHicNbr() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setXrefHicNbr,\n RdaFissClaim::getXrefHicNbr,\n RdaFissClaim.Fields.xrefHicNbr,\n 12);\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "void mo7352a(C1655s sVar, AdError adError);", "private void m34892a(C13288k kVar) {\n try {\n C13262e.this.f34198l.execute(new C13276c(\"OkHttp %s ACK Settings\", new Object[]{C13262e.this.f34194h}, kVar));\n } catch (RejectedExecutionException unused) {\n }\n }", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "final /* synthetic */ void m36052a(String str, String str2, ReportCause reportCause, @Nullable String str3, Response response) {\n this.f29981a.showReportSuccessful();\n m36040a(null, str, str2, null, reportCause, str3, ReportingSource.PROFILE);\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "private final void m134907b(EventMessage abVar) {\n C28082z zVar = abVar.f96686j;\n Integer num = abVar.f96684h;\n int value = EventCode.ApplyForConnect.getValue();\n if (num != null && num.intValue() == value) {\n MqttBus a = MqttBus.f97541a.mo118711a();\n ApplyForConnectEvent bVar = zVar.f97419p;\n C32569u.m150513a((Object) bVar, C6969H.m41409d(\"G6C95D014AB7EAA39F6028977F4EAD1E86A8CDB14BA33BF\"));\n a.mo118710a(bVar);\n return;\n }\n int value2 = EventCode.PermitConnect.getValue();\n if (num != null && num.intValue() == value2) {\n MqttBus a2 = MqttBus.f97541a.mo118711a();\n PermitConnectEvent asVar = zVar.f97420q;\n C32569u.m150513a((Object) asVar, C6969H.m41409d(\"G6C95D014AB7EBB2CF403995CCDE6CCD96786D60E\"));\n a2.mo118710a(asVar);\n return;\n }\n int value3 = EventCode.RefuseConnect.getValue();\n if (num != null && num.intValue() == value3) {\n MqttBus a3 = MqttBus.f97541a.mo118711a();\n RefuseConnectEvent axVar = zVar.f97428y;\n C32569u.m150513a((Object) axVar, C6969H.m41409d(\"G6C95D014AB7EB92CE01B834DCDE6CCD96786D60E\"));\n a3.mo118710a(axVar);\n return;\n }\n int value4 = EventCode.BanConnection.getValue();\n if (num != null && num.intValue() == value4) {\n MqttBus a4 = MqttBus.f97541a.mo118711a();\n BanConnectionEvent cVar = zVar.f97429z;\n C32569u.m150513a((Object) cVar, C6969H.m41409d(\"G6C95D014AB7EA928E8319347FCEBC6D47D8ADA14\"));\n a4.mo118710a(cVar);\n return;\n }\n int value5 = EventCode.Disconnect.getValue();\n if (num != null && num.intValue() == value5) {\n MqttBus a5 = MqttBus.f97541a.mo118711a();\n DisconnectEvent nVar = zVar.f97372A;\n C32569u.m150513a((Object) nVar, C6969H.m41409d(\"G6C95D014AB7EAF20F50D9F46FCE0C0C3\"));\n a5.mo118710a(nVar);\n return;\n }\n int value6 = EventCode.ConfirmConnect.getValue();\n if (num != null && num.intValue() == value6) {\n MqttBus a6 = MqttBus.f97541a.mo118711a();\n ConfirmConnectEvent eVar = zVar.f97373B;\n C32569u.m150513a((Object) eVar, C6969H.m41409d(\"G6C95D014AB7EA826E808995AFFDAC0D8678DD019AB\"));\n a6.mo118710a(eVar);\n return;\n }\n int value7 = EventCode.ConnectTimeout.getValue();\n if (num != null && num.intValue() == value7) {\n MqttBus a7 = MqttBus.f97541a.mo118711a();\n ConnectTimeoutEvent hVar = zVar.f97378G;\n C32569u.m150513a((Object) hVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD7DE6486DA0FAB\"));\n a7.mo118710a(hVar);\n return;\n }\n int value8 = EventCode.ConnectSuccess.getValue();\n if (num != null && num.intValue() == value8) {\n MqttBus a8 = MqttBus.f97541a.mo118711a();\n ConnectSuccessEvent gVar = zVar.f97421r;\n C32569u.m150513a((Object) gVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD0C26A80D009AC\"));\n a8.mo118710a(gVar);\n return;\n }\n int value9 = EventCode.ConnectExit.getValue();\n if (num != null && num.intValue() == value9) {\n MqttBus a9 = MqttBus.f97541a.mo118711a();\n ConnectExitEvent fVar = zVar.f97422s;\n C32569u.m150513a((Object) fVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAC6CF6097\"));\n a9.mo118710a(fVar);\n return;\n }\n int value10 = EventCode.NewBullet.getValue();\n if (num != null && num.intValue() == value10) {\n MqttBus a10 = MqttBus.f97541a.mo118711a();\n NewBulletEvent anVar = zVar.f97405b;\n C32569u.m150513a((Object) anVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131925DFEE9C6C3\"));\n Integer num2 = abVar.f96691o;\n a10.mo118710a(new CommentNormal(anVar, num2 != null ? num2.intValue() : 0));\n return;\n }\n int value11 = EventCode.EnterTheater.getValue();\n if (num == null || num.intValue() != value11) {\n int value12 = EventCode.NewGift.getValue();\n if (num != null && num.intValue() == value12) {\n MqttBus a11 = MqttBus.f97541a.mo118711a();\n NewGiftEvent aoVar = zVar.f97407d;\n C32569u.m150513a((Object) aoVar, C6969H.m41409d(\"G6C95D014AB7EA52CF1319741F4F1\"));\n a11.mo118710a(aoVar);\n return;\n }\n int value13 = EventCode.UpdateContributors.getValue();\n if (num == null || num.intValue() != value13) {\n int value14 = EventCode.UpdateHotValue.getValue();\n if (num != null && num.intValue() == value14) {\n MqttBus a12 = MqttBus.f97541a.mo118711a();\n UpdateHotValueEvent bmVar = zVar.f97409f;\n C32569u.m150513a((Object) bmVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDEDCCC35695D416AA35\"));\n a12.mo118710a(bmVar);\n return;\n }\n int value15 = EventCode.NewStatement.getValue();\n if (num != null && num.intValue() == value15) {\n MqttBus a13 = MqttBus.f97541a.mo118711a();\n NewStatementEvent aqVar = zVar.f97410g;\n C32569u.m150513a((Object) aqVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131835CF3F1C6DA6C8DC1\"));\n a13.mo118710a(aqVar);\n return;\n }\n int value16 = EventCode.Interact.getValue();\n if (num != null && num.intValue() == value16) {\n MqttBus a14 = MqttBus.f97541a.mo118711a();\n InteractEvent ahVar = zVar.f97411h;\n C32569u.m150513a((Object) ahVar, C6969H.m41409d(\"G6C95D014AB7EA227F20B8249F1F1\"));\n a14.mo118710a(ahVar);\n return;\n }\n int value17 = EventCode.ReplyStatement.getValue();\n if (num != null && num.intValue() == value17) {\n MqttBus a15 = MqttBus.f97541a.mo118711a();\n ReplyStatementEvent azVar = zVar.f97417n;\n C32569u.m150513a((Object) azVar, C6969H.m41409d(\"G6C95D014AB7EB92CF6028977E1F1C2C36C8ED014AB\"));\n a15.mo118710a(azVar);\n return;\n }\n int value18 = EventCode.RepliedStatement.getValue();\n if (num != null && num.intValue() == value18) {\n MqttBus a16 = MqttBus.f97541a.mo118711a();\n RepliedStatementEvent ayVar = zVar.f97418o;\n C32569u.m150513a((Object) ayVar, C6969H.m41409d(\"G6C95D014AB7EB92CF602994DF6DAD0C36897D017BA3EBF\"));\n a16.mo118710a(ayVar);\n return;\n }\n int value19 = EventCode.TalkStart.getValue();\n if (num != null && num.intValue() == value19) {\n MqttBus a17 = MqttBus.f97541a.mo118711a();\n TalkStartEvent beVar = zVar.f97423t;\n C32569u.m150513a((Object) beVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF5BE6E4D1C3\"));\n a17.mo118710a(beVar);\n return;\n }\n int value20 = EventCode.TalkEnd.getValue();\n if (num != null && num.intValue() == value20) {\n MqttBus a18 = MqttBus.f97541a.mo118711a();\n TalkEndEvent bdVar = zVar.f97424u;\n C32569u.m150513a((Object) bdVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF4DFCE1\"));\n a18.mo118710a(bdVar);\n return;\n }\n int value21 = EventCode.DramaStart.getValue();\n if (num != null && num.intValue() == value21) {\n MqttBus a19 = MqttBus.f97541a.mo118711a();\n DramaStartEvent wVar = zVar.f97425v;\n C32569u.m150513a((Object) wVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E1F1C2C57D\"));\n a19.mo118710a(wVar);\n return;\n }\n int value22 = EventCode.DramaEnd.getValue();\n if (num != null && num.intValue() == value22) {\n MqttBus a20 = MqttBus.f97541a.mo118711a();\n DramaEndEvent sVar = zVar.f97426w;\n C32569u.m150513a((Object) sVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F7EBC7\"));\n a20.mo118710a(sVar);\n return;\n }\n int value23 = EventCode.ConnectorChange.getValue();\n if (num != null && num.intValue() == value23) {\n MqttBus a21 = MqttBus.f97541a.mo118711a();\n ConnectorChangeEvent jVar = zVar.f97427x;\n C32569u.m150513a((Object) jVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6EAD1E86A8BD414B835\"));\n a21.mo118710a(jVar);\n return;\n }\n int value24 = EventCode.UpdateDramaIncome.getValue();\n if (num != null && num.intValue() == value24) {\n MqttBus a22 = MqttBus.f97541a.mo118711a();\n UpdateDramaIncomeEvent bjVar = zVar.f97412i;\n C32569u.m150513a((Object) bjVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA13B133A424E3\"));\n a22.mo118710a(bjVar);\n return;\n }\n int value25 = EventCode.DramaMustClose.getValue();\n if (num != null && num.intValue() == value25) {\n MqttBus a23 = MqttBus.f97541a.mo118711a();\n DramaMustCloseEvent uVar = zVar.f97374C;\n C32569u.m150513a((Object) uVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177FFF0D0C35680D915AC35\"));\n a23.mo118710a(uVar);\n return;\n }\n int value26 = EventCode.TheaterMustLeave.getValue();\n if (num != null && num.intValue() == value26) {\n MqttBus a24 = MqttBus.f97541a.mo118711a();\n TheaterMustLeaveEvent bgVar = zVar.f97375D;\n C32569u.m150513a((Object) bgVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DACEC27A97EA16BA31BD2C\"));\n a24.mo118710a(bgVar);\n return;\n }\n int value27 = EventCode.FollowActor.getValue();\n if (num != null && num.intValue() == value27) {\n MqttBus a25 = MqttBus.f97541a.mo118711a();\n FollowActorEvent agVar = zVar.f97379H;\n C32569u.m150513a((Object) agVar, C6969H.m41409d(\"G6C95D014AB7EAD26EA029F5FCDE4C0C36691\"));\n a25.mo118710a(agVar);\n return;\n }\n int value28 = EventCode.EjectMember.getValue();\n if (num != null && num.intValue() == value28) {\n MqttBus a26 = MqttBus.f97541a.mo118711a();\n EjectMemberEvent xVar = zVar.f97382K;\n C32569u.m150513a((Object) xVar, C6969H.m41409d(\"G6C95D014AB7EAE23E30D8477FFE0CED56C91\"));\n a26.mo118710a(xVar);\n return;\n }\n int value29 = EventCode.QuietMember.getValue();\n if (num != null && num.intValue() == value29) {\n MqttBus a27 = MqttBus.f97541a.mo118711a();\n QuietMemberEvent awVar = zVar.f97380I;\n C32569u.m150513a((Object) awVar, C6969H.m41409d(\"G6C95D014AB7EBA3CEF0B8477FFE0CED56C91\"));\n a27.mo118710a(awVar);\n return;\n }\n int value30 = EventCode.CancelQuietMember.getValue();\n if (num != null && num.intValue() == value30) {\n MqttBus a28 = MqttBus.f97541a.mo118711a();\n CancelQuietMemberEvent dVar = zVar.f97381J;\n C32569u.m150513a((Object) dVar, C6969H.m41409d(\"G6C95D014AB7EA828E80D9544CDF4D6DE6C97EA17BA3DA92CF4\"));\n a28.mo118710a(dVar);\n return;\n }\n int value31 = EventCode.DeleteBullet.getValue();\n if (num != null && num.intValue() == value31) {\n MqttBus a29 = MqttBus.f97541a.mo118711a();\n DeleteBulletEvent lVar = zVar.f97383L;\n C32569u.m150513a((Object) lVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDE7D6DB6586C1\"));\n a29.mo118710a(lVar);\n return;\n }\n int value32 = EventCode.Ping.getValue();\n if (num != null && num.intValue() == value32) {\n MqttBus a30 = MqttBus.f97541a.mo118711a();\n PingEvent atVar = zVar.f97387P;\n C32569u.m150513a((Object) atVar, C6969H.m41409d(\"G6C95D014AB7EBB20E809\"));\n a30.mo118710a(atVar);\n return;\n }\n int value33 = EventCode.Alert.getValue();\n if (num != null && num.intValue() == value33) {\n MqttBus a31 = MqttBus.f97541a.mo118711a();\n AlertEvent aVar = zVar.f97385N;\n C32569u.m150513a((Object) aVar, C6969H.m41409d(\"G6C95D014AB7EAA25E31C84\"));\n a31.mo118710a(aVar);\n return;\n }\n int value34 = EventCode.MustDisconnect.getValue();\n if (num != null && num.intValue() == value34) {\n MqttBus a32 = MqttBus.f97541a.mo118711a();\n MustDisconnectEvent amVar = zVar.f97386O;\n C32569u.m150513a((Object) amVar, C6969H.m41409d(\"G6C95D014AB7EA63CF51AAF4CFBF6C0D8678DD019AB\"));\n a32.mo118710a(amVar);\n return;\n }\n int value35 = EventCode.DeleteStatement.getValue();\n if (num != null && num.intValue() == value35) {\n MqttBus a33 = MqttBus.f97541a.mo118711a();\n DeleteStatementEvent mVar = zVar.f97384M;\n C32569u.m150513a((Object) mVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDF6D7D67D86D81FB124\"));\n a33.mo118710a(mVar);\n return;\n }\n int value36 = EventCode.DramaContinue.getValue();\n if (num != null && num.intValue() == value36) {\n MqttBus a34 = MqttBus.f97541a.mo118711a();\n DramaContinueEvent rVar = zVar.f97377F;\n C32569u.m150513a((Object) rVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F1EACDC3608DC01F\"));\n a34.mo118710a(rVar);\n return;\n }\n int value37 = EventCode.DramaPause.getValue();\n if (num != null && num.intValue() == value37) {\n MqttBus a35 = MqttBus.f97541a.mo118711a();\n DramaPauseEvent vVar = zVar.f97376E;\n C32569u.m150513a((Object) vVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E2E4D6C46C\"));\n a35.mo118710a(vVar);\n return;\n }\n int value38 = EventCode.CreatePoll.getValue();\n if (num != null && num.intValue() == value38) {\n MqttBus a36 = MqttBus.f97541a.mo118711a();\n CreatePollEvent kVar = zVar.f97388Q;\n C32569u.m150513a((Object) kVar, C6969H.m41409d(\"G6C95D014AB7EA83BE30F844DCDF5CCDB65\"));\n a36.mo118710a(kVar);\n return;\n }\n int value39 = EventCode.FinishPoll.getValue();\n if (num != null && num.intValue() == value39) {\n MqttBus a37 = MqttBus.f97541a.mo118711a();\n FinishPollEvent afVar = zVar.f97389R;\n C32569u.m150513a((Object) afVar, C6969H.m41409d(\"G6C95D014AB7EAD20E8078340CDF5CCDB65\"));\n a37.mo118710a(afVar);\n return;\n }\n int value40 = EventCode.PollVote.getValue();\n if (num != null && num.intValue() == value40) {\n MqttBus a38 = MqttBus.f97541a.mo118711a();\n PollVoteEvent avVar = zVar.f97413j;\n C32569u.m150513a((Object) avVar, C6969H.m41409d(\"G6C95D014AB7EBB26EA02AF5EFDF1C6\"));\n a38.mo118710a(avVar);\n return;\n }\n int value41 = EventCode.UpdatePollStatistics.getValue();\n if (num != null && num.intValue() == value41) {\n MqttBus a39 = MqttBus.f97541a.mo118711a();\n UpdatePollStatisticsEvent bnVar = zVar.f97414k;\n C32569u.m150513a((Object) bnVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF5CCDB65BCC60EBE24A23AF207935B\"));\n a39.mo118710a(bnVar);\n return;\n }\n int value42 = EventCode.ObtainRedPacket.getValue();\n if (num != null && num.intValue() == value42) {\n MqttBus a40 = MqttBus.f97541a.mo118711a();\n ObtainRedPacketEvent arVar = zVar.f97391T;\n C32569u.m150513a((Object) arVar, C6969H.m41409d(\"G6C95D014AB7EA42BF20F9946CDF7C6D35693D419B435BF\"));\n a40.mo118710a(arVar);\n return;\n }\n int value43 = EventCode.NewRedPacket.getValue();\n if (num != null && num.intValue() == value43) {\n MqttBus a41 = MqttBus.f97541a.mo118711a();\n NewRedPacketEvent apVar = zVar.f97390S;\n C32569u.m150513a((Object) apVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131824DF6DAD3D66A88D00E\"));\n a41.mo118710a(apVar);\n return;\n }\n int value44 = EventCode.FansTeamLevelUpgrade.getValue();\n if (num != null && num.intValue() == value44) {\n MqttBus a42 = MqttBus.f97541a.mo118711a();\n FansTeamLevelUpgradeEvent adVar = zVar.f97392U;\n C32569u.m150513a((Object) adVar, C6969H.m41409d(\"G6C95D014AB7EAD28E81DAF5CF7E4CEE86586C31FB30FBE39E11C914CF7\"));\n a42.mo118710a(adVar);\n return;\n }\n int value45 = EventCode.JoinFansTeam.getValue();\n if (num != null && num.intValue() == value45) {\n MqttBus a43 = MqttBus.f97541a.mo118711a();\n JoinFansTeamEvent ajVar = zVar.f97393V;\n C32569u.m150513a((Object) ajVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4EF3EBD0E87D86D417\"));\n a43.mo118710a(ajVar);\n return;\n }\n int value46 = EventCode.TheaterActivity.getValue();\n if (num != null && num.intValue() == value46) {\n MqttBus a44 = MqttBus.f97541a.mo118711a();\n TheaterActivityEvent bfVar = zVar.f97394W;\n C32569u.m150513a((Object) bfVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DAC2D47D8AC313AB29\"));\n a44.mo118710a(bfVar);\n return;\n }\n int value47 = EventCode.VideoFocusApply.getValue();\n if (num != null && num.intValue() == value47) {\n MqttBus a45 = MqttBus.f97541a.mo118711a();\n VideoFocusApplyEvent bpVar = zVar.f97395X;\n C32569u.m150513a((Object) bpVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD40AAF3CB2\"));\n a45.mo118710a(bpVar);\n return;\n }\n int value48 = EventCode.VideoFocusRefused.getValue();\n if (num != null && num.intValue() == value48) {\n MqttBus a46 = MqttBus.f97541a.mo118711a();\n VideoFocusRefusedEvent brVar = zVar.f97396Y;\n C32569u.m150513a((Object) brVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC71FB925B82CE2\"));\n a46.mo118710a(brVar);\n return;\n }\n int value49 = EventCode.UpdateDramaMemberIncome.getValue();\n if (num != null && num.intValue() == value49) {\n MqttBus a47 = MqttBus.f97541a.mo118711a();\n UpdateDramaMemberIncomeEvent bkVar = zVar.f97415l;\n C32569u.m150513a((Object) bkVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA17BA3DA92CF4319946F1EACED2\"));\n a47.mo118710a(bkVar);\n return;\n }\n int value50 = EventCode.SyncDramaAudioStatus.getValue();\n if (num != null && num.intValue() == value50) {\n MqttBus a48 = MqttBus.f97541a.mo118711a();\n SyncDramaAudioStatusEvent bcVar = zVar.f97400ac;\n C32569u.m150513a((Object) bcVar, C6969H.m41409d(\"G6C95D014AB7EB830E80DAF4CE0E4CED65682C01EB63F943AF20F845DE1\"));\n a48.mo118710a(bcVar);\n return;\n }\n int value51 = EventCode.StatementVoteCountMilestone.getValue();\n if (num != null && num.intValue() == value51) {\n MqttBus a49 = MqttBus.f97541a.mo118711a();\n StatementVoteCountMilestoneEvent bbVar = zVar.f97399ab;\n C32569u.m150513a((Object) bbVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87F8CC11F8033A43CE81AAF45FBE9C6C47D8CDB1F\"));\n a49.mo118710a(bbVar);\n return;\n }\n int value52 = EventCode.StatementQuestionMilestone.getValue();\n if (num != null && num.intValue() == value52) {\n MqttBus a50 = MqttBus.f97541a.mo118711a();\n StatementQuestionMilestoneEvent baVar = zVar.f97403af;\n C32569u.m150513a((Object) baVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87896D009AB39A427D9039944F7F6D7D86786\"));\n a50.mo118710a(baVar);\n return;\n }\n int value53 = EventCode.VideoFocusTimeout.getValue();\n if (num != null && num.intValue() == value53) {\n MqttBus a51 = MqttBus.f97541a.mo118711a();\n VideoFocusTimeoutEvent bsVar = zVar.f97397Z;\n C32569u.m150513a((Object) bsVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC113B235A43CF2\"));\n a51.mo118710a(bsVar);\n return;\n }\n int value54 = EventCode.VideoFocusEnd.getValue();\n if (num != null && num.intValue() == value54) {\n MqttBus a52 = MqttBus.f97541a.mo118711a();\n VideoFocusEndEvent bqVar = zVar.f97398aa;\n C32569u.m150513a((Object) bqVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD014BB\"));\n a52.mo118710a(bqVar);\n return;\n }\n int value55 = EventCode.UpdateDramaCampStatistics.getValue();\n if (num != null && num.intValue() == value55) {\n MqttBus a53 = MqttBus.f97541a.mo118711a();\n UpdateDramaCampStatisticsEvent biVar = zVar.f97416m;\n C32569u.m150513a((Object) biVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA19BE3DBB16F51A915CFBF6D7DE6A90\"));\n a53.mo118710a(biVar);\n return;\n }\n int value56 = EventCode.JoinDramaCamp.getValue();\n if (num != null && num.intValue() == value56) {\n MqttBus a54 = MqttBus.f97541a.mo118711a();\n JoinDramaCampEvent aiVar = zVar.f97401ad;\n C32569u.m150513a((Object) aiVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4CE0E4CED65680D417AF\"));\n a54.mo118710a(aiVar);\n return;\n }\n int value57 = EventCode.UpdateTheaterConfig.getValue();\n if (num != null && num.intValue() == value57) {\n MqttBus a55 = MqttBus.f97541a.mo118711a();\n UpdateTheaterConfigEvent boVar = zVar.f97402ae;\n C32569u.m150513a((Object) boVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF1CBD26897D0088033A427E00797\"));\n a55.mo118710a(boVar);\n return;\n }\n int value58 = EventCode.UpdateDurationTreasureBox.getValue();\n if (num != null && num.intValue() == value58) {\n MqttBus a56 = MqttBus.f97541a.mo118711a();\n UpdateDurationTreasureBoxEvent blVar = zVar.f97404ag;\n C32569u.m150513a((Object) blVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D6C56897DC15B10FBF3BE30F835DE0E0FCD5669B\"));\n a56.mo118710a(blVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.UpdateContributors.getValue())) {\n MqttBus a57 = MqttBus.f97541a.mo118711a();\n UpdateContributorsEvent bhVar = zVar.f97408e;\n C32569u.m150513a((Object) bhVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE6CCD97D91DC18AA24A43BF5\"));\n a57.mo118710a(bhVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.EnterTheater.getValue())) {\n MqttBus a58 = MqttBus.f97541a.mo118711a();\n EnterTheaterEvent yVar = zVar.f97406c;\n C32569u.m150513a((Object) yVar, C6969H.m41409d(\"G6C95D014AB7EAE27F20B8277E6EDC6D67D86C7\"));\n a58.mo118710a(yVar);\n }\n }", "public int checkForAlert() {\n return 0;\n }", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public void createValue() {\r\n value = new qa.gov.mol.ProcessAcknowledgment();\r\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public final void mo78011m() {\n GiftInfo value = this.f53586k.getValue();\n if (value != null) {\n C32569u.m150513a((Object) value, C6969H.m41409d(\"G6E8AD30E963EAD26A8189144E7E0838833C3C71FAB25B927\"));\n m75163p().mo77847b(value.f53605id).compose(C16943dj.m83994a(bindToLifecycle())).subscribe(C15128e.f53596a, C15129f.f53597a);\n }\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "void format01(String line, int lineCount) {\n\n // only 1 survey is allowed per load file - max of 9 code 01 lines\n code01Count++;\n if (prevCode > 1) {\n outputError((lineCount-1) + \" - Fatal - \" +\n \"More than 1 survey in data file : \" + code01Count);\n } // if (prevCode != 1)\n\n // get the data from the line\n java.util.StringTokenizer t = new java.util.StringTokenizer(line, \" \");\n String dummy = t.nextToken(); // get 'rid' of the code\n int subCode = 0;\n if (t.hasMoreTokens()) subCode = toInteger(t.nextToken());\n switch (subCode) {\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '1' n/a\n //03 a9 survey_id e.g. '1997/0001' survey\n //04 a10 planam Platform name inventory\n case 1: if (t.hasMoreTokens()) survey.setSurveyId(t.nextToken());\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n platformName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setPlanam(dummy); //ub06\n if (dbg) System.out.println(\"planam = \" + platformName + \" \" + survey.getPlanam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '2' n/a\n //03 a15 expnam Expedition name, e.g. 'AJAXL2' survey\n case 2: if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n expeditionName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setExpnam(dummy); //ub06\n if (dbg) System.out.println(\"expnam = \" + expeditionName + \" \" + survey.getExpnam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '3' n/a\n //03 a3 institute 3-letter Institute code, e.g. 'RIO' survey\n //04 a28 prjnam project name, e.g. 'HEAVYMETAL' survey\n case 3: survey.setInstitute(t.nextToken());\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n projectName = dummy;\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n survey.setPrjnam(dummy); //ub06\n if (dbg) System.out.println(\"prjnam = \" + projectName + \" \" + survey.getPrjnam(\"\"));\n } // if (t.hasMoreTokens())\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '4' n/a\n //03 a10 domain e.g. 'SURFZONE', 'DEEPSEA' survey\n // domain corrected by user in form\n //case 4: inventory.setDomain(toString(line.substring(5)));\n //case 4: if (!loadFlag) inventory.setDomain(toString(line.substring(5)));\n case 4: //if (!loadFlag) {\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n if (dummy.length() > 10) dummy = dummy.substring(0, 10);//ub06\n inventory.setDomain(dummy); //ub06\n } // if (t.hasMoreTokens())\n //} // if (!loadFlag)\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '5' n/a\n //03 a10 arenam Area name, e.g. 'AGULHAS BK' survey\n // area name corrected by user in form\n //case 5: inventory.setAreaname(toString(line.substring(5)));\n //case 5: if (!loadFlag) inventory.setAreaname(toString(line.substring(5)));\n case 5: //if (!loadFlag) {\n if (t.hasMoreTokens()) {\n dummy = t.nextToken(); //ub08\n while (t.hasMoreTokens()) dummy += \" \" + t.nextToken(); //ub08\n if (dummy.length() > 20) dummy = dummy.substring(0, 20);//ub06\n inventory.setAreaname(dummy); //ub06\n } // if (t.hasMoreTokens())\n //} // if (!loadFlag)\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '6' n/a\n //04 a10 insitute e.g. 'World Ocean database' inventory\n case 6: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n instituteName = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n instituteName += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '7' n/a\n //04 a10 chief scientist inventory\n case 7: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n chiefScientist = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n chiefScientist += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '8' n/a\n //04 a10 country e.g. 'Germany' inventory\n case 8: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n countryName = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n countryName += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //} // if (!loadFlag) //ub03\n break;\n //01 a2 format code Always '01' n/a\n //02 a1 format subCode Always '8' n/a\n //04 a10 submitting scientist load log\n case 9: //if (!loadFlag) { //ub03\n if (t.hasMoreTokens()) { //ub03\n submitScientist = t.nextToken(); //ub03\n while (t.hasMoreTokens()) //ub03\n submitScientist += \" \" + t.nextToken(); //ub03\n } // if (t.hasMoreTokens()) //ub03\n //!} // if (!loadFlag) //ub03\n break;\n } // switch (subCode)\n\n //survey.setSurveyId(toString(line.substring(2,11)));\n //survey.setPlanam(toString(line.substring(11,21)));\n //survey.setExpnam(toString(line.substring(21,31)));\n //survey.setInstitute(toString(line.substring(31,34)));\n //survey.setPrjnam(toString(line.substring(34,44)));\n //if (!loadFlag) {\n // inventory.setAreaname(toString(line.substring(44,54))); // use as default to show on screen\n // inventory.setDomain(toString(line.substring(54,64))); // use as default to show on screen\n //} // if (!loadFlag)\n\n if (dbg) System.out.println(\"<br>format01: line = \" + line);\n if (dbg) System.out.println(\"<br>format01: subCode = \" + subCode);\n\n }", "private void getrec() {\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00010 Product not found on Contract_Detail\n\t\tif (nmfkpinds.pgmInd36()) {\n\t\t\tmsgObjIdx = setMsgObj(\"OES0115\", \"XWABCD\", msgObjIdx, messages);\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t\telse {\n\t\t\tif (nmfkpinds.pgmInd66()) {\n\t\t\t\tif (fileds.filests == 1218) {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"Y3U9999\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0004\", \"\", msgObjIdx, messages);\n\t\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tvalidt();\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "public ReportAckMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "public final void mo19837a(C7889b bVar) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Error: Message: \");\n sb.append(bVar.mo20805b());\n sb.append(\"; Type: \");\n sb.append(bVar.mo20804a());\n Timber.m44526b(sb.toString(), new Object[0]);\n PaywallError a = bVar.mo20804a();\n if (Intrinsics.areEqual((Object) a, (Object) C6256e.f14295a)) {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20467a(Integer.valueOf(C7906v.paywall_error_purchase_restore_fail_expired));\n aVar.mo20466a(C7904t.paywall_restore_error);\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n } else if (Intrinsics.areEqual((Object) a, (Object) C6258g.f14297a)) {\n this.f15660a.mo20489a(C7576g.ERROR, C7906v.purchase_restore_error_no_products);\n } else {\n C7547h hVar2 = this.f15660a;\n C7544a aVar2 = new C7544a();\n aVar2.mo20475d(bVar.mo20805b());\n aVar2.mo20466a(C7904t.paywall_generic_error);\n aVar2.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar2.mo20491b(aVar2.mo20465a());\n }\n }", "void mo1507n();", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public void verifyreport()\t\n{\n\tif(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Phonakpro\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(2));\n\t}\n\telse if(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Unitron\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(0));\n\t}\n\t\n\t//SELECT REPORT MENU ITEM\n\tjScriptClick(settingsMenuItem.get(1));\n\t//SELECT THE REPORT DROP DOWN\n\tjScriptClick(reportDropDownbutton.get(0));\n\t\n\t// ENTER THE SCREENER NAME\n\tsendkeys(reportDropDownInputText.get(1),\"automatescreener\");\n\t//SELECT THE FIRST SCREENER IF THE SCREENER HAS THE SAME NAME\n\tjScriptClick(reportDropDownScreenersListOptions.get(0));\n\tjScriptClick(dateReportDropDownbutton.get(1));\n\tjScriptClick(reportDropDownbutton.get(1));\n\tjScriptClick(dateReportDropDownoptionToday);\n\tjScriptClick(dateOptionOkButton);\n}", "public void testMOBILE_CHARGE7() throws Exception {\n\t\tObject retval = execLexer(\"MOBILE_CHARGE\", 68, \"annulet\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"MOBILE_CHARGE\", expecting, actual);\n\t}", "public static void execMT_ACK(Putter p){\n\t\n\t\ttry {\n\t\t\tString ret=send_ACK(PPGMain.props.getProperty(\"cpgCPmt_70mt_ack\"),p.get(\"mobile\"),p.get(\"spnum\"),\n\t\t\t\t\tp.get(\"keyword\"),p.get(\"content\"),p.get(\"out_linkid\"),p.get(\"oprator\"));\n\t\t\tp.set(\"retcode\", ret.equals(\"1\")?\"0\":ret);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tp.set(\"retcode\",\"3\");\n\t\t\tp.set(\"retmsg\", e.getMessage());\n\t\t}\n\t\t\n\t\t\n\t}", "void mo13373a(int i, ErrorCode errorCode, ByteString byteString);", "public HL7Segment processPV1ToUFD(String pHL7MessageBlock) throws ICANException {\n\n HL7Message aHL7Message = new HL7Message(mHL7Message);\n HL7Segment aPV1Segment = new HL7Segment(\"PV1\");\n\n CodeLookUp aPayClass = new CodeLookUp(\"CSC_PayClass.table\", mFacility, mEnvironment);\n\n\n// Special processing for PV1 segments received in A28 and A31 messages.\n if (aHL7Message.isEvent(\"A28, A31\")) {\n aPV1Segment.set(HL7_23.PV1_1_set_ID, \"1\");\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"R\");\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_facility_ID, mFacility);\n aPV1Segment.set(HL7_23.PV1_18_patient_type, \"R\");\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"R\".concat(mPatientUR));\n if (mFacility.matches(\"BHH|MAR|PJC|ANG\")) {\n HL7Segment aInPV1Segment = new HL7Segment(aHL7Message.getSegment(HL7_23.PV1));\n String aPV1_8ReferringDoc = aInPV1Segment.get(HL7_23.PV1_8_referring_doctor);\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, aPV1_8ReferringDoc);\n }\n } else { // For all other message types ... i.e. \"A01 to A17\"\n aHL7Message = new HL7Message(pHL7MessageBlock);\n aPV1Segment.setSegment(aHL7Message.getSegment(HL7_23.PV1));\n aPV1Segment.set(HL7_23.PV1_2_patient_class, \"I\");\n\n// Sandringham funny Facility in Room position ....\n if (aPV1Segment.get(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_3_assigned_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n if (aPV1Segment.get(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room).equalsIgnoreCase(\"23\")) {\n aPV1Segment.set(HL7_23.PV1_6_prior_patient_location, HL7_23.PL_room, \"SDMH\");\n }\n aPV1Segment.set(HL7_23.PV1_19_visit_number, \"I\".concat(aPV1Segment.get(HL7_23.PV1_19_visit_number)));\n\n// Translate the Financial Class\n if (mFacility.equalsIgnoreCase(\"BHH\") ||\n mFacility.equalsIgnoreCase(\"MAR\") ||\n mFacility.equalsIgnoreCase(\"ANG\") ||\n mFacility.equalsIgnoreCase(\"PJC\")) {\n\n //aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(mFacility + \"-\" + aPV1Segment.get(HL7_23.PV1_2_patient_class) + \"-\" + aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n } else {\n aPV1Segment.set(HL7_23.PV1_20_financial_class, aPayClass.getValue(aPV1Segment.get(HL7_23.PV1_20_financial_class)));\n }\n\n\n// Check each of the Dr's have a valid Bayside code\n String aDr;\n// ... Attending Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_7_attending_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Refering Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_8_referring_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// ... Consulting Dr ....\n aDr = doDrTranslate(aPV1Segment.get(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num));\n if (aDr.equalsIgnoreCase(k.NULL)) {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, \"\");\n } else {\n aPV1Segment.set(HL7_23.PV1_9_consulting_doctor, HL7_23.XCN_ID_num, aDr);\n }\n\n// Check for CSC sending invalid discharge/admit times of\n aPV1Segment.set(HL7_23.PV1_44_admit_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_44_admit_date_time)));\n aPV1Segment.set(HL7_23.PV1_45_discharge_date_time, doValidTimeCheck(aPV1Segment.get(HL7_23.PV1_45_discharge_date_time)));\n }\n return aPV1Segment;\n\n }", "private void m10420a(AppEntitySignal appEntitySignal) {\n int signalType = appEntitySignal.getSignalType();\n if (signalType != 666) {\n switch (signalType) {\n case 662:\n p140me.bridgefy.entities.Message b = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b != null) {\n b.setStatus(4);\n this.f9294c.mo28337a(b);\n m10417a(b);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n case 663:\n p140me.bridgefy.entities.Message b2 = this.f9294c.mo28341b(appEntitySignal.getMessageId());\n if (b2 != null) {\n b2.setStatus(3);\n this.f9294c.mo28337a(b2);\n m10417a(b2);\n return;\n }\n Log.w(\"MessageCenter\", \"Message to be ACK'd wasn't found. Maybe the user deleted it before we could confirm it.\");\n return;\n default:\n return;\n }\n } else {\n Iterator it = ((ArrayList) this.f9294c.mo28332a(appEntitySignal.getMessageId().split(\",\"))).iterator();\n while (it.hasNext()) {\n MessageDTO messageDTO = (MessageDTO) it.next();\n messageDTO.setStatus(5);\n this.f9294c.mo28338a(messageDTO);\n m10417a(new p140me.bridgefy.entities.Message(messageDTO));\n }\n }\n }", "void mo23214a(Message message);", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "private void validateTransactionCode(ATMSparrowMessage atmSparrowMessage, BankFusionEnvironment env) {\n boolean result = isTransactionSupported(atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType(), env);\n if (result) {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.AUTHORIZED_MESSAGE_FLAG);\n // String ubTransCode =\n // atmHelper.getBankTransactionCode(atmSparrowMessage.getMessageType()\n // + atmSparrowMessage.getTransactionType(), env);\n // //UBTransaction type mapped or not?\n // try {\n // IBOMisTransactionCodes misTransactionCodes =\n // (IBOMisTransactionCodes)env.getFactory().findByPrimaryKey(IBOMisTransactionCodes.BONAME,\n // ubTransCode);\n // } catch (FinderException bfe) {\n // Object[] field = new Object[] { ubTransCode };\n // atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n // if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0))\n // {\n // populateErrorDetails (ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.WARNING, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // } else if\n // (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_1)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_2)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_3)\n // ||\n // atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_7))\n // {\n // populateErrorDetails (ATMConstants.AUTHORIZED_MESSAGE_FLAG,\n // ATMConstants.CRITICAL, 7508, BankFusionMessages.ERROR_LEVEL,\n // atmSparrowMessage, field, env);\n // if (controlDetails != null) {\n // ubTransCode = controlDetails.getAtmTransactionType();\n // }\n // }\n // }\n }\n else {\n atmSparrowMessage.setAuthorisedFlag(ATMConstants.NOTAUTHORIZED_MESSAGE_FLAG);\n /*\n * String errorMessage = BankFusionMessages.getFormattedMessage(BankFusionMessages\n * .ERROR_LEVEL, 7506, env, new Object[] { atmSparrowMessage .getMessageType() +\n * atmSparrowMessage.getTransactionType() });\n */\n String errorMessage = BankFusionMessages.getInstance().getFormattedEventMessage(40407506,\n new Object[] { atmSparrowMessage.getMessageType() + atmSparrowMessage.getTransactionType() },\n BankFusionThreadLocal.getUserSession().getUserLocale());\n String errorStatus = null;\n if (atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_0)\n || atmSparrowMessage.getForcePost().equals(ATMConstants.FORCEPOST_6)) {\n errorStatus = ATMConstants.WARNING;\n logger.warn(errorMessage);\n }\n else {\n errorStatus = ATMConstants.CRITICAL;\n logger.error(errorMessage);\n }\n atmSparrowMessage.setErrorCode(errorStatus);\n atmSparrowMessage.setErrorDescription(errorMessage);\n }\n }", "@Test\n public void t10() {\n try {\n sampleRule = \"&8=\\\"FIX.4.2Aqua\\\";&9000[0]->&9001=\\\"D\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(TestCustomDictionary.customMsg42, \"FIX.4.2Aqua\"); // System.out.println(result);\n resultStore = StaticTestingUtils.parseMessage(result);\n String r = resultStore.get(\"9001\").get(0);\n Assert.assertEquals(r, \"D\");\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2Aqua\");\n System.out.println(StaticTestingUtils.rs(result));\n sampleRule = \"&8=\\\"FIX.4.2\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(result, \"FIX.4.2Aqua\");\n resultStore = StaticTestingUtils.parseMessage(result);\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2\");\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "@Test\n public void testClaimHicNo() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setHicNo, RdaFissClaim::getHicNo, \"hicNo\", 12);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "public void Click_defineSetupPage_Alert() {\r\n\t\tclickOn(SensorConfiguration_Btn);\r\n\t}", "boolean hasJsonAckMsg();", "private static akh[] m701a(bgl bgl) {\n int f = bgl != null ? bgl.mo1835f() : 0;\n akh[] akhArr = new akh[f];\n for (int i = 0; i < f; i++) {\n akhArr[i] = bgl.mo1828a(i);\n }\n return akhArr;\n }", "@Override\n public void onSuccess(int code, Header[] header, byte[] data) {\n super.onSuccess(code, header, data);\n try {\n String consafdg = new String(data);\n if (!Util.isEmpty(consafdg)) {\n JSONObject jsonObject = new JSONObject(consafdg);\n if (jsonObject.has(\"AQI_class\")) {\n condition = jsonObject\n .getString(\"AQI_class\");\n if (condition.length() > 3) {\n tvCondition.setTextSize(\n TypedValue.COMPLEX_UNIT_SP, 10);\n }\n tvCondition.setText(condition);\n }\n }\n } catch (JSONException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "private static final void m705b(akx akx) {\n if (akx.mo356d() == 2) {\n akx.mo364l();\n }\n }", "private static void acknowledgeTeltonikaModem(Channel ch, int recordsNum) {\n\t\tChannelBuffer buf = ChannelBuffers.buffer(4);\n\t\tbyte b[] = intToByteArray(recordsNum);\n\t\tbuf.writeBytes(b);\n\t\tLOGGER.info(\"Response to device about data reception with package amount: \" + recordsNum);\n\t\tch.write(buf);\n\t}", "bdm mo1784a(akh akh);", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "final /* synthetic */ void m36055a(String str, @Nullable String str2, @Nullable String str3, Attribution attribution, ReportCause reportCause, @Nullable String str4, String str5) {\n m36040a(str, str2, str3, attribution, reportCause, str4, ReportingSource.CHAT);\n m36042a(str, str5, str4, (boolean) null);\n this.f29981a.showReportSuccessful();\n }", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "public static Message makeACK(Message message) throws HL7Exception, IOException {\n\t\treturn makeACK((Segment)message.get(\"MSH\"));\n\t}", "private final void m703b() {\n int i;\n akc akc = this.f529n;\n akp akp = this.f533r;\n if (akp != akc.f503a || akc.f504b > 0 || akc.f505c) {\n Handler handler = this.f524i;\n int i2 = akc.f504b;\n if (akc.f505c) {\n i = akc.f506d;\n } else {\n i = -1;\n }\n handler.obtainMessage(0, i2, i, akp).sendToTarget();\n akc akc2 = this.f529n;\n akc2.f503a = this.f533r;\n akc2.f504b = 0;\n akc2.f505c = false;\n }\n }" ]
[ "0.5760446", "0.57159054", "0.5699122", "0.56056166", "0.5583114", "0.5473406", "0.54666275", "0.54441696", "0.5391585", "0.5389862", "0.5386463", "0.5373202", "0.53516847", "0.5348851", "0.5342484", "0.5334529", "0.53320205", "0.53297293", "0.53091305", "0.53000385", "0.52990204", "0.52773887", "0.52607477", "0.52526325", "0.52521455", "0.52462596", "0.5233627", "0.52266043", "0.52057546", "0.51735336", "0.5150283", "0.51209515", "0.5094331", "0.5089646", "0.50890106", "0.5087497", "0.5073279", "0.50537336", "0.5001829", "0.49867824", "0.49842462", "0.49748188", "0.49728078", "0.49680805", "0.4966135", "0.49515125", "0.49441013", "0.4939042", "0.4936778", "0.49339935", "0.49310297", "0.49304542", "0.4922231", "0.49211398", "0.49027374", "0.4888441", "0.48842543", "0.48668534", "0.48647216", "0.48609284", "0.48576817", "0.48551685", "0.48516238", "0.48437357", "0.48427665", "0.48394397", "0.48375016", "0.48313817", "0.48210448", "0.48176444", "0.4813068", "0.48126078", "0.48084465", "0.48076814", "0.48065862", "0.4796125", "0.47917175", "0.47787884", "0.47787884", "0.47778857", "0.47689956", "0.47597286", "0.47572967", "0.47572035", "0.47566548", "0.47556072", "0.47549945", "0.475451", "0.47522599", "0.4751247", "0.4750117", "0.4750117", "0.47477624", "0.47470346", "0.4735814", "0.47328278", "0.47279713", "0.47277018", "0.4724571", "0.47221538" ]
0.54602754
7
MSH21.1 = PHLabReportAck, MSH16 is not present. Two errors, no alert expected
@Test public void test8() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message8 = new File(classLoader.getResource(message8FileName).getFile()); String messageString = FileUtils.readFileToString(message8); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "public void failReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "public void successReport (COPSPdpOSReqStateMan man, List<COPSClientSI> reportSIs);", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "private void verifySpecimensPresent(int aaa07Count, int controlCount, int baq00051Count)\r\n {\n assertTextPresent(\"AAA07\", aaa07Count * 2);\r\n assertTextPresent(\"AssayTestControl\", controlCount * 2);\r\n assertTextPresent(\"BAQ00051\", baq00051Count * 2);\r\n }", "public int checkForAlert() {\n return 0;\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingElectricityErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the anonymous submit meter read page for error message validation\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRUser1\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.validateElectricityreadingFiledErrormsg(smrProfile);\t\t\t\n}", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "public void tracking_Report()\n {\n\t boolean trackingpresent =trackingreport.size()>0;\n\t if(trackingpresent)\n\t {\n\t\t //System.out.println(\"Tracking report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Tracking report is not present\");\n\t }\n }", "public void verifyreport()\t\n{\n\tif(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Phonakpro\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(2));\n\t}\n\telse if(ReadPropertyFile.get(\"Application\").equalsIgnoreCase(\"Unitron\"))\n\t{\n\t\t// handling the windows tab using below code\n\t\t \n\t\tArrayList<String> newTab = new ArrayList<String>(DriverManager.getDriver().getWindowHandles());\n\t \n\t //if you traverse forward the next tab from the existing tab\n\t DriverManager.getDriver().switchTo().window(newTab.get(0));\n\t}\n\t\n\t//SELECT REPORT MENU ITEM\n\tjScriptClick(settingsMenuItem.get(1));\n\t//SELECT THE REPORT DROP DOWN\n\tjScriptClick(reportDropDownbutton.get(0));\n\t\n\t// ENTER THE SCREENER NAME\n\tsendkeys(reportDropDownInputText.get(1),\"automatescreener\");\n\t//SELECT THE FIRST SCREENER IF THE SCREENER HAS THE SAME NAME\n\tjScriptClick(reportDropDownScreenersListOptions.get(0));\n\tjScriptClick(dateReportDropDownbutton.get(1));\n\tjScriptClick(reportDropDownbutton.get(1));\n\tjScriptClick(dateReportDropDownoptionToday);\n\tjScriptClick(dateOptionOkButton);\n}", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\n\t\t\t public void AnonymousGasSmrCR_singleregister_alreatchecked(){\n\t\t\t\tReport.createTestLogHeader(\"Anonymous SMR\", \"Verify whether the anonymous Gas customer is able to do SMR journey\");\n\t\t\t\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGasCRdata\");\n\t\t\t\tCrmUserProfile crmuserProfile = new TestDataHelper().getCrmUserProfile(\"CrmDetailsforSMR\");\n\t\t\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"ViewuserVerifynew\");\t\t\n\t\t\t new SubmitMeterReadAction()\n\t\t\t .openSMRpageCRGas(\"Gas\")\t\t\t \n\t\t\t .verifyAnonymousSAPGasCus_CR_Multiplereg_newuser_alertchecked(smrProfile) ;\n\t\t\t // .VerifySAPCRM_SMR(crmuserProfile,userProfile,smrProfile);\n\t\t\t \t}", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "private void chkPRMST()\n\t{\n\t\ttry\n\t\t{\n\t\t\tM_strSQLQRY = \"Select count(*) from co_prmst\";\n\t\t\tM_strSQLQRY += \" where pr_prdcd = '\"+strPRDCD+\"'\";\n\t\t\tif(cl_dat.getRECCNT(M_strSQLQRY) > 0)\n\t\t\t\tupdPRMST();\n\t\t\telse{\n\t\t\t\tsetMSG(\"Record does not exist in CO_PRMST\",'E');\n\t\t\t\tcl_dat.M_flgLCUPD_pbst = false;\n\t\t\t\t}\n\t\t\t//System.out.println(M_strSQLQRY);\n\t}catch(Exception L_EX){\n\t\t\tsetMSG(L_EX,\"chkPRMST\");\n\t\t}\n\t}", "private void prnHEADER()\n\t{ \n\t try\n\t {\n\t\t\tcl_dat.M_PAGENO +=1;\n\t\t\tcl_dat.M_intLINNO_pbst=0;\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"<B>\");\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC1+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC2+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(strISODC3+\"\\n\");\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\" \",100));\n\t\t\tdosREPORT.writeBytes(\"------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',cl_dat.M_strCMPNM_pbst ,100));\n\t\t\tdosREPORT.writeBytes(\"Report Date:\"+ cl_dat.M_strLOGDT_pbst + \"\\n\");\t\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Stock Statement as on \"+(rdbDYOPN.isSelected() ? strREFDT+\" at 07:00 Hrs\" : cl_dat.M_txtCLKDT_pbst.getText()+\" \"+cl_dat.M_txtCLKTM_pbst.getText()+\" Hrs\"),100));\t\t\t\n\t\t\tdosREPORT.writeBytes(\"Page No. :\" + String.valueOf(cl_dat.M_PAGENO) + \"\\n\");\t\t\t\t\t\t\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\n\t\t\t\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\" \",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('R',\"Product & Size\",28));\n\t\t\t//System.out.println(\"LM_COUNT = \"+LM_COUNT);\n\t\t\tfor(i=0;i<LM_COUNT;i++)\n\t\t\t\tdosREPORT.writeBytes(padSTRING('L',staMNLDS[i],12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Tot.Sq.Mts\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"S/Rtn\",12));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Res.Qty\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Q/Hold\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Cub.Mtrs\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"M.Tons\",10));\n\t\t\tdosREPORT.writeBytes(padSTRING('L',\"Pcs\",10));\n\t\t\tdosREPORT.writeBytes(\"\\n\");\n\t\t\t//crtLINE(136);\n\t\t\t//dosREPORT.writeBytes(\"\\n\");\n\t\t\tdosREPORT.writeBytes(\"---------------------------------------------------------------------------------------------------------------------------------------\\n\");\t\t\n\t\t\t\n\t\t\tif(cl_dat.M_cmbOPTN_pbst.getSelectedItem().toString().equals(cl_dat.M_OPPRN_pbst) && (M_rdbTEXT.isSelected()))\n\t\t\t\tprnFMTCHR(dosREPORT,M_strNOBOLD);\n\t\t\tif(M_rdbHTML.isSelected())\n\t\t\t\tdosREPORT.writeBytes(\"</B>\");\n\t\t\tcl_dat.M_intLINNO_pbst += 11;\n\t }\n\t catch(Exception L_EX)\n\t {\n\t\t\tsetMSG(L_EX + \" prnHEADER\",'E');\n\t\t}\n\t}", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "public void Verify_UnfortunatelyMessage() throws InterruptedException\r\n\t{\r\n\t\tExplicitWait(Checkavailability);\r\n\t\tThread.sleep(3000);\r\n\t\tif(showRoomInfo.getText().contains(\"Unfortunately, there are no available rooms.\")||(showRoomInfo.getText().contains(\"Or try our partner hotels below.\"))||(showRoomInfo.getText().contains(\"Please try adjusting your search criteria.\")))\r\n\t\t{\r\n\t\t\t//System.out.println(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\tlogger.info(\"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t\ttest.log(Status.PASS, \"After Closing the room/rate using House Control ,rooms are not showing in Booking Engine \");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tlogger.error(\"Room/rate are not closed properly in Admin\");\r\n\t\t\ttest.log(Status.FAIL, \"Room/rate are not closed properly in Admin\");\r\n\t\t}\r\n\t}", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void TitileFieldErrorValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Title drop down and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRElectricityUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.verifyAndValidateSMRTitleFieldContent(smrProfile); \n}", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\n\tpublic void completeHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfCompleteHires() == 2);\n\t}", "public void transferWrite( String sContract,String sMchCode,String sMchNameDes,String sMchCodeCont,String sTestPointId,String sPmNo,String pmDescription,String insNote) \n {\n ASPManager mgr = getASPManager();\n String repby=null;\n\n cmd = trans.addEmptyCommand(\"HEAD\",\"FAULT_REPORT_API.New__\",headblk);\n cmd.setOption(\"ACTION\",\"PREPARE\");\n trans = mgr.perform(trans);\n data = trans.getBuffer(\"HEAD/DATA\");\n\n trans.clear();\n cmd = trans.addCustomFunction(\"GETUSER\",\"Fnd_Session_API.Get_Fnd_User\",\"ISUSER\");\n\n cmd = trans.addCustomFunction(\"GETREPBY\",\"Person_Info_API.Get_Id_For_User\",\"REPORTED_BY\");\n cmd.addReference(\"ISUSER\",\"GETUSER/DATA\");\n\n cmd = trans.addCustomFunction(\"REPBYID\",\"Company_Emp_API.Get_Max_Employee_Id\",\"REPORTED_BY_ID\");\n cmd.addParameter(\"COMPANY\",data.getFieldValue(\"COMPANY\"));\n cmd.addReference(\"REPORTED_BY\",\"GETREPBY/DATA\");\n\n trans = mgr.perform(trans);\n repby = trans.getValue(\"GETREPBY/DATA/REPORTED_BY\");\n reportById = trans.getValue(\"REPBYID/DATA/REPORTED_BY_ID\");\n\n data.setValue(\"REPORTED_BY\",repby);\n data.setValue(\"REPORTED_BY_ID\",reportById);\n data.setValue(\"CONTRACT\",sContract);\n data.setValue(\"MCH_CODE\",sMchCode);\n data.setValue(\"MCH_CODE_DESCRIPTION\",sMchNameDes);\n data.setValue(\"MCH_CODE_CONTRACT\",sMchCodeCont);\n data.setValue(\"TEST_POINT_ID\",sTestPointId);\n data.setValue(\"PM_NO\",sPmNo);\n data.setValue(\"PM_DESCR\",pmDescription);\n data.setValue(\"NOTE\",insNote);\n //Bug 76003, start\n data.setValue(\"CONNECTION_TYPE_DB\",\"EQUIPMENT\");\n //Bug 76003, end\n\n headset.addRow(data);\n }", "public void know_doc_Report()\n {\n\t boolean knowedgepresent =knowdoc.size()>0;\n\t if(knowedgepresent)\n\t {\n\t\t // System.out.println(\"Knowledge document details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Knowledge document details report is not present\");\n\t }\n }", "public void Verify_Home_error_msg_displayed_on_Empty_Search()\r\n\t{\r\n\t\tString Runtime_text=Home_error_msg.getText();\r\n\t\tif(Runtime_text.contains(Exp_home_err_msg))\r\n\t\t\tSystem.out.println(\"As expected error msg displayed at webpage\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Expected home error message displayed at webpage\");\r\n\t}", "@Test\n\tvoid lackOfDataTest() {\n\t\tparkName = \"Haifa Park\";\n\t\tdate = new Date(120, 8, 1);\n\t\texpected = \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0\";\n\t\tresult = ReportsController.getReport(date, reportType, parkName);\n\n\t\tassertEquals(expected, result);\n\n\t}", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "@Then ( \"^The labor and delivery report is not documented successfully$\" )\n public void documentedUnsuccessfully () {\n waitForAngular();\n // confirm that the error message is displayed\n try {\n if ( driver.findElement( By.name( \"success\" ) ).getText()\n .contains( \"Labor and Delivery Report created successfully\" ) ) {\n fail();\n }\n }\n catch ( final Exception e ) {\n }\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRGas(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates meter read submission and Email to customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .overlay()\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "private final int m21406a(C7619i iVar) {\n if (Intrinsics.areEqual((Object) iVar.mo20545c(), (Object) LinkSubscriptionPartialError.INSTANCE)) {\n return C7904t.paywall_sdk_error_link_subscription_partial_error;\n }\n return C7904t.paywall_sdk_error;\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "public void validateRpd7s2()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s12()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void issue4707() throws IOException {\n Collection<FileAnnotation> warnings = new GccParser().parse(openFile(\"issue4707.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 22, warnings.size());\n Iterator<FileAnnotation> iterator = warnings.iterator();\n checkWarning(iterator.next(),\n 1128,\n \"NULL used in arithmetic\",\n \"/Users/rthomson/hudson/jobs/Bryce7-MacWarnings/workspace/bryce7/src/Bryce/Plugins/3DSExport/3DSExport.cpp\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "public void handleReport(boolean r70) {\n /*\n r69 = this;\n r1 = r69\n r2 = r70\n long r3 = android.os.SystemClock.elapsedRealtime()\n long r5 = r1.mKeyguardDrawn\n r7 = 0\n int r0 = (r5 > r7 ? 1 : (r5 == r7 ? 0 : -1))\n if (r0 <= 0) goto L_0x0011\n goto L_0x0012\n L_0x0011:\n r5 = r3\n L_0x0012:\n r1.mKeyguardDrawn = r5\n long r5 = r1.mKeyguardDrawn\n long r9 = r1.mBlockScreenOnBegin\n long r5 = r5 - r9\n java.lang.String r9 = r69.getScreenOnDetail()\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n r0.<init>()\n r0.append(r9)\n java.lang.String r10 = \" block2keyDrawn=\"\n r0.append(r10)\n r0.append(r5)\n java.lang.String r10 = \" hasOn:\"\n r0.append(r10)\n r0.append(r2)\n java.lang.String r0 = r0.toString()\n java.lang.String r10 = \"ScreenOnMonitor\"\n android.util.Slog.i(r10, r0)\n java.lang.String r0 = r1.mTimeoutSummary\n if (r0 == 0) goto L_0x007e\n long r11 = r1.mLastReportTime\n int r0 = (r11 > r7 ? 1 : (r11 == r7 ? 0 : -1))\n if (r0 == 0) goto L_0x0051\n long r11 = r3 - r11\n r13 = 14400000(0xdbba00, double:7.1145453E-317)\n int r0 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1))\n if (r0 <= 0) goto L_0x007b\n L_0x0051:\n r1.mLastReportTime = r3\n miui.mqsas.sdk.event.ScreenOnEvent r0 = new miui.mqsas.sdk.event.ScreenOnEvent\n r0.<init>()\n java.lang.String r11 = r1.mTimeoutSummary\n r0.setTimeoutSummary(r11)\n r0.setmTimeOutDetail(r9)\n java.lang.String r11 = r1.mWakeSource\n r0.setWakeSource(r11)\n long r11 = r1.mTimeStamp\n java.lang.String r11 = r1.toCalendarTime(r11)\n r0.setTimeStamp(r11)\n java.lang.String r11 = \"lt_screen_on\"\n r0.setScreenOnType(r11)\n miui.mqsas.sdk.MQSEventManagerDelegate r11 = miui.mqsas.sdk.MQSEventManagerDelegate.getInstance()\n r11.reportScreenOnEvent(r0)\n L_0x007b:\n r0 = 0\n r1.mTimeoutSummary = r0\n L_0x007e:\n if (r2 == 0) goto L_0x053a\n long r11 = r1.mStopTime\n long r13 = r1.mStartTime\n long r11 = r11 - r13\n r13 = 1000(0x3e8, double:4.94E-321)\n int r0 = (r11 > r13 ? 1 : (r11 == r13 ? 0 : -1))\n if (r0 >= 0) goto L_0x053a\n java.lang.String r0 = android.os.Build.VERSION.INCREMENTAL\n java.lang.String r11 = r1.mUploadVersion\n boolean r0 = r0.equals(r11)\n if (r0 != 0) goto L_0x0532\n long r11 = r1.mStopTime\n long r13 = r1.mStartTime\n long r11 = r11 - r13\n long r13 = r1.mSetDisplayStateEnd\n long r7 = r1.mSetDisplayStateBegin\n long r13 = r13 - r7\n long r7 = r1.mBlockScreenOnEnd\n r19 = r3\n long r2 = r1.mBlockScreenOnBegin\n long r7 = r7 - r2\n boolean[] r0 = r1.mNeedRecord\n r2 = 0\n boolean r0 = r0[r2]\n if (r0 == 0) goto L_0x00ca\n int[] r0 = r1.mAvgCount\n r3 = r0[r2]\n int r3 = r3 + 1\n r0[r2] = r3\n long[] r0 = r1.mTotalScreenOnTime\n r3 = r0[r2]\n long r3 = r3 + r11\n r0[r2] = r3\n long[] r0 = r1.mTotalSetDisplayTime\n r3 = r0[r2]\n long r3 = r3 + r13\n r0[r2] = r3\n long[] r0 = r1.mTotalBlockScreenOnTime\n r3 = r0[r2]\n long r3 = r3 + r7\n r0[r2] = r3\n L_0x00ca:\n int[] r0 = r1.mAvgCount\n r0 = r0[r2]\n long r3 = (long) r0\n r21 = 50\n int r0 = (r3 > r21 ? 1 : (r3 == r21 ? 0 : -1))\n java.lang.String r4 = \",\"\n if (r0 != 0) goto L_0x0155\n miui.mqsas.sdk.event.ScreenOnEvent r0 = new miui.mqsas.sdk.event.ScreenOnEvent\n r0.<init>()\n long[] r15 = r1.mTotalScreenOnTime\n r15 = r15[r2]\n int[] r3 = r1.mAvgCount\n r3 = r3[r2]\n long r2 = (long) r3\n long r2 = r15 / r2\n r0.setTotalTime(r2)\n long[] r2 = r1.mTotalSetDisplayTime\n r3 = 0\n r15 = r2[r3]\n int[] r2 = r1.mAvgCount\n r2 = r2[r3]\n r25 = r4\n long r3 = (long) r2\n long r2 = r15 / r3\n r0.setSetDisplayTime(r2)\n long[] r2 = r1.mTotalBlockScreenOnTime\n r3 = 0\n r15 = r2[r3]\n int[] r2 = r1.mAvgCount\n r2 = r2[r3]\n long r2 = (long) r2\n long r2 = r15 / r2\n r0.setBlockScreenTime(r2)\n java.lang.String r2 = \"avg_screen_on\"\n r0.setScreenOnType(r2)\n miui.mqsas.sdk.MQSEventManagerDelegate r2 = miui.mqsas.sdk.MQSEventManagerDelegate.getInstance()\n r2.reportScreenOnEvent(r0)\n long[] r2 = r1.mTotalScreenOnTime\n r3 = 0\n r15 = 0\n r2[r3] = r15\n long[] r2 = r1.mTotalSetDisplayTime\n r2[r3] = r15\n long[] r2 = r1.mTotalBlockScreenOnTime\n r2[r3] = r15\n int[] r2 = r1.mAvgCount\n r2[r3] = r3\n boolean[] r2 = r1.mNeedRecord\n r2[r3] = r3\n java.lang.StringBuilder r2 = r1.mTypeNeedRecordSb\n r4 = 49\n r2.setCharAt(r3, r4)\n java.lang.String r2 = PROPERTY_SCREEN_ON_UPLOAD\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n r3.<init>()\n java.lang.StringBuilder r4 = r1.mTypeNeedRecordSb\n java.lang.String r4 = r4.toString()\n r3.append(r4)\n r4 = r25\n r3.append(r4)\n java.lang.String r15 = r1.mUploadVersion\n r3.append(r15)\n java.lang.String r3 = r3.toString()\n android.os.SystemProperties.set(r2, r3)\n L_0x0155:\n java.lang.String r0 = r1.mWakeSource\n int r2 = r1.getWakeupSrcIndex(r0)\n r0 = 4\n if (r2 != r0) goto L_0x043e\n r15 = r11\n long r11 = r1.mFingerSuccess\n r17 = 0\n int r0 = (r11 > r17 ? 1 : (r11 == r17 ? 0 : -1))\n if (r0 == 0) goto L_0x042e\n r25 = r11\n long r11 = r1.mFingerDown\n int r0 = (r11 > r17 ? 1 : (r11 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x0170\n goto L_0x0172\n L_0x0170:\n r11 = r25\n L_0x0172:\n r1.mFingerDown = r11\n long r11 = r1.mKeyGoingAway\n int r0 = (r11 > r17 ? 1 : (r11 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x017b\n goto L_0x017d\n L_0x017b:\n r11 = r19\n L_0x017d:\n r1.mKeyGoingAway = r11\n long r11 = r1.mKeyExitAnim\n int r0 = (r11 > r17 ? 1 : (r11 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x0186\n goto L_0x0188\n L_0x0186:\n r11 = r19\n L_0x0188:\n r1.mKeyExitAnim = r11\n long r11 = r1.mFingerSuccess\n r25 = r2\n long r2 = r1.mFingerDown\n r26 = r5\n long r5 = r11 - r2\n r28 = r9\n r0 = r10\n long r9 = r1.mStartTime\n long r11 = r9 - r11\n r29 = r13\n long r13 = r1.mBlockScreenOnBegin\n long r13 = r13 - r9\n r31 = r7\n long r7 = r1.mStopTime\n long r7 = r7 - r2\n long r2 = r1.mKeyGoingAway\n r33 = r7\n long r7 = r2 - r9\n r35 = r7\n long r7 = r1.mKeyExitAnim\n r37 = r13\n long r13 = r7 - r2\n r39 = r13\n long r13 = r1.mKeyguardDrawn\n r41 = r11\n long r11 = r13 - r7\n r43 = r11\n long r11 = r1.mBlockScreenOnEnd\n long r13 = r11 - r13\n r45 = r13\n long r13 = r1.mSetDisplayStateBegin\n long r13 = r13 - r9\n long r9 = r1.mSetDisplayStateEnd\n r47 = r13\n long r13 = r7 - r9\n long r11 = r11 - r7\n long r7 = r9 - r2\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"fingerDown2suc2wake=\"\n r2.append(r3)\n r2.append(r5)\n r2.append(r4)\n r9 = r41\n r2.append(r9)\n java.lang.String r3 = \"; wake2block2un=\"\n r2.append(r3)\n r9 = r37\n r2.append(r9)\n r2.append(r4)\n r9 = r31\n r2.append(r9)\n java.lang.String r3 = \"; wake2away2exit2drawn2un=\"\n r2.append(r3)\n r9 = r35\n r2.append(r9)\n r2.append(r4)\n r9 = r39\n r2.append(r9)\n r2.append(r4)\n r9 = r43\n r2.append(r9)\n r2.append(r4)\n r9 = r45\n r2.append(r9)\n java.lang.String r3 = \"; wake2disp2on2exit2un=\"\n r2.append(r3)\n r9 = r47\n r2.append(r9)\n r2.append(r4)\n r9 = r29\n r2.append(r9)\n r2.append(r4)\n r2.append(r13)\n r2.append(r4)\n r2.append(r11)\n java.lang.String r3 = \"; away2on:\"\n r2.append(r3)\n r2.append(r7)\n java.lang.String r3 = \" all=\"\n r2.append(r3)\n r29 = r11\n r11 = r33\n r2.append(r11)\n java.lang.String r2 = r2.toString()\n android.util.Slog.d(r0, r2)\n r17 = 0\n int r0 = (r5 > r17 ? 1 : (r5 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x025a\n r23 = r5\n goto L_0x025c\n L_0x025a:\n r23 = 1000(0x3e8, double:4.94E-321)\n L_0x025c:\n r2 = r23\n int r0 = (r7 > r17 ? 1 : (r7 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x0264\n r5 = r7\n goto L_0x0266\n L_0x0264:\n r5 = r17\n L_0x0266:\n int r0 = (r41 > r17 ? 1 : (r41 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x02ba\n int r0 = (r31 > r17 ? 1 : (r31 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x02ba\n int r0 = (r35 > r17 ? 1 : (r35 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x02ba\n int r0 = (r39 > r17 ? 1 : (r39 == r17 ? 0 : -1))\n if (r0 <= 0) goto L_0x02ba\n int r0 = r1.mTotalFingerAvgCount\n int r0 = r0 + 1\n r1.mTotalFingerAvgCount = r0\n long r7 = r1.mTotalFingerDown2SuccessTime\n long r7 = r7 + r2\n r1.mTotalFingerDown2SuccessTime = r7\n long r7 = r1.mTotalFingerSuccess2WakeTime\n long r7 = r7 + r41\n r1.mTotalFingerSuccess2WakeTime = r7\n long r7 = r1.mTotalFingerWake2BlockTime\n long r7 = r7 + r37\n r1.mTotalFingerWake2BlockTime = r7\n long r7 = r1.mTotalFingerBlockScreenOnTime\n long r7 = r7 + r31\n r1.mTotalFingerBlockScreenOnTime = r7\n long r7 = r1.mTotalFingerDisplayOnTime\n long r7 = r7 + r9\n r1.mTotalFingerDisplayOnTime = r7\n long r7 = r1.mTotalFingerAllTime\n long r7 = r7 + r11\n r1.mTotalFingerAllTime = r7\n long r7 = r1.mTotalFingerBlock2KeyDrawn\n long r7 = r7 + r26\n r1.mTotalFingerBlock2KeyDrawn = r7\n long r7 = r1.mTotalFingerWake2Away\n long r7 = r7 + r35\n r1.mTotalFingerWake2Away = r7\n long r7 = r1.mTotalFingerAway2Exit\n long r7 = r7 + r39\n r1.mTotalFingerAway2Exit = r7\n long r7 = r1.mTotalFingerExit2Draw\n long r7 = r7 + r43\n r1.mTotalFingerExit2Draw = r7\n long r7 = r1.mTotalFingerAway2On\n long r7 = r7 + r5\n r1.mTotalFingerAway2On = r7\n L_0x02ba:\n int r0 = r1.mTotalFingerAvgCount\n long r7 = (long) r0\n int r0 = (r7 > r21 ? 1 : (r7 == r21 ? 0 : -1))\n if (r0 != 0) goto L_0x041e\n org.json.JSONObject r0 = new org.json.JSONObject\n r0.<init>()\n r7 = r0\n r23 = r2\n long r2 = r1.mTotalFingerDown2SuccessTime // Catch:{ JSONException -> 0x040c }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x040c }\n r33 = r5\n long r5 = (long) r0\n long r2 = r2 / r5\n long r5 = r1.mTotalFingerSuccess2WakeTime // Catch:{ JSONException -> 0x03ff }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03ff }\n r49 = r11\n long r11 = (long) r0\n long r5 = r5 / r11\n long r11 = r1.mTotalFingerWake2BlockTime // Catch:{ JSONException -> 0x03f4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03f4 }\n r51 = r13\n long r13 = (long) r0\n long r11 = r11 / r13\n long r13 = r1.mTotalFingerBlockScreenOnTime // Catch:{ JSONException -> 0x03eb }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03eb }\n r53 = r9\n long r8 = (long) r0\n long r13 = r13 / r8\n r8 = r13\n long r13 = r1.mTotalFingerDisplayOnTime // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r55 = r8\n long r8 = (long) r0 // Catch:{ JSONException -> 0x03e4 }\n long r13 = r13 / r8\n r8 = r13\n long r13 = r1.mTotalFingerAllTime // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r57 = r8\n long r8 = (long) r0 // Catch:{ JSONException -> 0x03e4 }\n long r13 = r13 / r8\n r8 = r13\n long r13 = r1.mTotalFingerBlock2KeyDrawn // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r59 = r8\n long r8 = (long) r0 // Catch:{ JSONException -> 0x03e4 }\n long r13 = r13 / r8\n r8 = r13\n long r13 = r1.mTotalFingerWake2Away // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r61 = r8\n long r8 = (long) r0 // Catch:{ JSONException -> 0x03e4 }\n long r13 = r13 / r8\n r8 = r13\n long r13 = r1.mTotalFingerAway2Exit // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r63 = r11\n long r10 = (long) r0 // Catch:{ JSONException -> 0x03e4 }\n long r13 = r13 / r10\n r10 = r13\n long r12 = r1.mTotalFingerExit2Draw // Catch:{ JSONException -> 0x03e4 }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03e4 }\n r65 = r15\n long r14 = (long) r0\n long r12 = r12 / r14\n long r14 = r1.mTotalFingerAway2On // Catch:{ JSONException -> 0x03df }\n int r0 = r1.mTotalFingerAvgCount // Catch:{ JSONException -> 0x03df }\n long r0 = (long) r0\n long r14 = r14 / r0\n r0 = r14\n java.lang.String r14 = \"authenticatedTime\"\n java.lang.StringBuilder r15 = new java.lang.StringBuilder // Catch:{ JSONException -> 0x03d9 }\n r15.<init>() // Catch:{ JSONException -> 0x03d9 }\n r16 = r4\n java.lang.String r4 = \"##w2a:\"\n r15.append(r4) // Catch:{ JSONException -> 0x03d7 }\n r15.append(r8) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r4 = \"##a2e:\"\n r15.append(r4) // Catch:{ JSONException -> 0x03d7 }\n r15.append(r10) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r4 = \"##e2d\"\n r15.append(r4) // Catch:{ JSONException -> 0x03d7 }\n r15.append(r12) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r4 = r15.toString() // Catch:{ JSONException -> 0x03d7 }\n r7.put(r14, r4) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r4 = \"wakeupTime\"\n java.lang.StringBuilder r14 = new java.lang.StringBuilder // Catch:{ JSONException -> 0x03d7 }\n r14.<init>() // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"authen:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##suc2wake:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r14.append(r5) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##w2b:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r67 = r2\n r2 = r63\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##blockScr:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r63 = r2\n r2 = r55\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r14 = r14.toString() // Catch:{ JSONException -> 0x03d7 }\n r7.put(r4, r14) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r4 = \"ext\"\n java.lang.StringBuilder r14 = new java.lang.StringBuilder // Catch:{ JSONException -> 0x03d7 }\n r14.<init>() // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"all:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r55 = r2\n r2 = r59\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##setDisp:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r59 = r2\n r2 = r57\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##keyDrawn:\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r57 = r2\n r2 = r61\n r14.append(r2) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r15 = \"##a2e\"\n r14.append(r15) // Catch:{ JSONException -> 0x03d7 }\n r14.append(r0) // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r14 = r14.toString() // Catch:{ JSONException -> 0x03d7 }\n r7.put(r4, r14) // Catch:{ JSONException -> 0x03d7 }\n miui.mqsas.sdk.MQSEventManagerDelegate r4 = miui.mqsas.sdk.MQSEventManagerDelegate.getInstance() // Catch:{ JSONException -> 0x03d7 }\n java.lang.String r14 = \"fingerprintScreenOn\"\n java.lang.String r15 = r7.toString() // Catch:{ JSONException -> 0x03d7 }\n r61 = r0\n r1 = 0\n r4.reportEvent(r14, r15, r1) // Catch:{ JSONException -> 0x03d7 }\n r4 = r69\n r4.mTotalFingerAvgCount = r1 // Catch:{ JSONException -> 0x03d5 }\n goto L_0x044d\n L_0x03d5:\n r0 = move-exception\n goto L_0x041a\n L_0x03d7:\n r0 = move-exception\n goto L_0x03dc\n L_0x03d9:\n r0 = move-exception\n r16 = r4\n L_0x03dc:\n r4 = r69\n goto L_0x041a\n L_0x03df:\n r0 = move-exception\n r16 = r4\n r4 = r1\n goto L_0x041a\n L_0x03e4:\n r0 = move-exception\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x041a\n L_0x03eb:\n r0 = move-exception\n r53 = r9\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x041a\n L_0x03f4:\n r0 = move-exception\n r53 = r9\n r51 = r13\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x041a\n L_0x03ff:\n r0 = move-exception\n r53 = r9\n r49 = r11\n r51 = r13\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x041a\n L_0x040c:\n r0 = move-exception\n r33 = r5\n r53 = r9\n r49 = r11\n r51 = r13\n r65 = r15\n r16 = r4\n r4 = r1\n L_0x041a:\n r0.printStackTrace()\n goto L_0x044d\n L_0x041e:\n r23 = r2\n r33 = r5\n r53 = r9\n r49 = r11\n r51 = r13\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x044d\n L_0x042e:\n r25 = r2\n r26 = r5\n r31 = r7\n r28 = r9\n r53 = r13\n r65 = r15\n r16 = r4\n r4 = r1\n goto L_0x044d\n L_0x043e:\n r25 = r2\n r16 = r4\n r26 = r5\n r31 = r7\n r28 = r9\n r65 = r11\n r53 = r13\n r4 = r1\n L_0x044d:\n r1 = 0\n r4.mFingerDown = r1\n r4.mFingerSuccess = r1\n r4.mKeyGoingAway = r1\n r4.mKeyExitAnim = r1\n r4.mKeyguardDrawn = r1\n r0 = -1\n r1 = r25\n if (r1 != r0) goto L_0x045f\n return\n L_0x045f:\n boolean[] r0 = r4.mNeedRecord\n boolean r0 = r0[r1]\n if (r0 == 0) goto L_0x0485\n int[] r0 = r4.mAvgCount\n r2 = r0[r1]\n int r2 = r2 + 1\n r0[r1] = r2\n long[] r0 = r4.mTotalScreenOnTime\n r2 = r0[r1]\n long r2 = r2 + r65\n r0[r1] = r2\n long[] r0 = r4.mTotalSetDisplayTime\n r2 = r0[r1]\n long r2 = r2 + r53\n r0[r1] = r2\n long[] r0 = r4.mTotalBlockScreenOnTime\n r2 = r0[r1]\n long r2 = r2 + r31\n r0[r1] = r2\n L_0x0485:\n int[] r0 = r4.mAvgCount\n r0 = r0[r1]\n long r2 = (long) r0\n int r0 = (r2 > r21 ? 1 : (r2 == r21 ? 0 : -1))\n if (r0 != 0) goto L_0x0541\n miui.mqsas.sdk.event.ScreenOnEvent r0 = new miui.mqsas.sdk.event.ScreenOnEvent\n r0.<init>()\n long[] r2 = r4.mTotalScreenOnTime\n r2 = r2[r1]\n int[] r5 = r4.mAvgCount\n r5 = r5[r1]\n long r5 = (long) r5\n long r2 = r2 / r5\n r0.setTotalTime(r2)\n long[] r2 = r4.mTotalSetDisplayTime\n r2 = r2[r1]\n int[] r5 = r4.mAvgCount\n r5 = r5[r1]\n long r5 = (long) r5\n long r2 = r2 / r5\n r0.setSetDisplayTime(r2)\n long[] r2 = r4.mTotalBlockScreenOnTime\n r2 = r2[r1]\n int[] r5 = r4.mAvgCount\n r5 = r5[r1]\n long r5 = (long) r5\n long r2 = r2 / r5\n r0.setBlockScreenTime(r2)\n java.lang.String[] r2 = miui.mqsas.sdk.event.ScreenOnEvent.TYPE_SCREEN_ON\n r2 = r2[r1]\n r0.setScreenOnType(r2)\n java.lang.String r2 = r4.mWakeSource\n r0.setWakeSource(r2)\n miui.mqsas.sdk.MQSEventManagerDelegate r2 = miui.mqsas.sdk.MQSEventManagerDelegate.getInstance()\n r2.reportScreenOnEvent(r0)\n long[] r2 = r4.mTotalScreenOnTime\n r5 = 0\n r2[r1] = r5\n long[] r2 = r4.mTotalSetDisplayTime\n r2[r1] = r5\n long[] r2 = r4.mTotalBlockScreenOnTime\n r2[r1] = r5\n int[] r2 = r4.mAvgCount\n r3 = 0\n r2[r1] = r3\n boolean[] r2 = r4.mNeedRecord\n r2[r1] = r3\n java.lang.StringBuilder r2 = r4.mTypeNeedRecordSb\n r3 = 49\n r2.setCharAt(r1, r3)\n java.lang.String r2 = PROPERTY_SCREEN_ON_UPLOAD\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n r3.<init>()\n java.lang.StringBuilder r5 = r4.mTypeNeedRecordSb\n java.lang.String r5 = r5.toString()\n r3.append(r5)\n r5 = r16\n r3.append(r5)\n java.lang.String r6 = r4.mUploadVersion\n r3.append(r6)\n java.lang.String r3 = r3.toString()\n android.os.SystemProperties.set(r2, r3)\n boolean r2 = r69.needRecordScreenOn()\n if (r2 != 0) goto L_0x0541\n java.lang.String r2 = PROPERTY_SCREEN_ON_UPLOAD\n java.lang.StringBuilder r3 = new java.lang.StringBuilder\n r3.<init>()\n java.lang.StringBuilder r6 = r4.mTypeNeedRecordSb\n java.lang.String r6 = r6.toString()\n r3.append(r6)\n r3.append(r5)\n java.lang.String r5 = android.os.Build.VERSION.INCREMENTAL\n r3.append(r5)\n java.lang.String r3 = r3.toString()\n android.os.SystemProperties.set(r2, r3)\n goto L_0x0541\n L_0x0532:\n r19 = r3\n r26 = r5\n r28 = r9\n r4 = r1\n goto L_0x0541\n L_0x053a:\n r19 = r3\n r26 = r5\n r28 = r9\n r4 = r1\n L_0x0541:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.server.ScreenOnMonitor.handleReport(boolean):void\");\n }", "public void handleSMSAlert()\n\t{\n\t\t\n\t\tWebDriverWait wait=new WebDriverWait(driver, 60);\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tif(checker.getText().contains(\"verification could not be completed\"))\n\t\t\t\tAssert.fail(\"Phone Verification failed\");\n\t\t\t\n\t\t\tLog.info(\"== Handling SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twaitOnProgressBarId(60);\n\t\t}\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tLog.info(\"== Handling second SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t}", "private void report() {\n\t\t\n\t}", "public void validateRpd13s8()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void smrConfirmationPageWithinMRCollective(){\n\tReport.createTestLogHeader(\"SubmitMeterRead\", \"Validates whether Submit meter read is successful for customers submitting within MR window for logged in customer\");\n\t SMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SMRLoggedin\");\n\t new SubmitMeterReadAction()\n\t \t .BgbnavigateToLogin()\n\t .BgbloginDetails(smrProfile)\n\t .clickManageAccountLinkWithAccNo(smrProfile)\n\t .submitMeterReadLink(smrProfile)\n\t .enterMultiDialReads(smrProfile)\n\t .emailConfirmation()\n\t .verifyAuditLeadTable(smrProfile);\n}", "public void Click_defineSetupPage_Alert() {\r\n\t\tclickOn(SensorConfiguration_Btn);\r\n\t}", "public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "@Test\r\n public void test7() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(20,0,0,5555),Consts.FULLTIME_MAX_INCOME +1 , 101, 100);\r\n \t assertTrue(loan == Consts.ZERO);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 7, correct : 0, got : \"+ loan);\r\n \t}\r\n \r\n }", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "public void outOfStockSummary() {\n\t\tExtentTest test = extent.createTest(\"Out of Stock Summary Reports: \");\n\n\t\tdriver.switchTo().frame(\"furl\");\n\t\tdriver.findElement(\n\t\t\t\tBy.xpath(\"(.//*[normalize-space(text()) and normalize-space(.)='Trade'])[1]/following::b[1]\")).click();\n\t\tdriver.findElement(By.xpath(\n\t\t\t\t\"(.//*[normalize-space(text()) and normalize-space(.)='Out of Stock Summary'])[2]/following::span[1]\"))\n\t\t\t\t.click();\n\t\tdriver.switchTo().frame(\"mainFrame\");\n\t\tdriver.findElement(By.linkText(\"ASM Daily Visit - PDF\")).click();\n\t\tdriver.switchTo().frame(\"mainFrame\");\n\t\tdriver.findElement(By.id(\"zoneId\")).click();\n\t\tnew Select(driver.findElement(By.id(\"zoneId\"))).selectByVisibleText(\"Center\");\n\t\tdriver.findElement(By.id(\"zoneId\")).click();\n\t\tdriver.findElement(By.id(\"regionId\")).click();\n\t\tnew Select(driver.findElement(By.id(\"regionId\"))).selectByVisibleText(\"Lahore A\");\n\t\tdriver.findElement(By.id(\"regionId\")).click();\n\t\tdriver.findElement(By.id(\"startDate\")).click();\n\t\tdriver.findElement(By.linkText(\"25\")).click();\n\t\tdriver.findElement(By.id(\"surveyorId\")).click();\n\n\t\tdriver.findElement(By.xpath(\"(.//*[normalize-space(text()) and normalize-space(.)='ASM:'])[1]/following::i[1]\"))\n\t\t\t\t.click();\n\t\ttest.pass(\"Login Successfully\");\n\t\ttest.info(\"This Login success info:\");\n\t}", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "public void Req_detail()\n {\n\t boolean reqpresent=reqdetails.size()>0;\n\t // boolean reqpresent = driver.findElements(By.linkText(\"Requests details\")).size()>0;\n\t if(reqpresent)\n\t {\n\t\t // System.out.println(\"Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Request details report is not present\");\n\t }\n }", "@Override\n\t\tpublic boolean checkReportIfExist(ArrayList<Object> msg) {\n\t\t\tString parkName = (String) msg.get(2);\n\t\t\tint month = ((Date) msg.get(1)).getMonth() + 1;\n\t\t\tif (hashMapDB.get(parkName).get(month) == null)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}", "public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyCancelButtonOnGasYourDetails()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Gas meter read Your details Back button\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\n\t\t.yourdetailsCancelButtons();\n}", "public void validateRpd13s13()\n {\n // This guideline cannot be automatically tested.\n }" ]
[ "0.6250409", "0.618904", "0.6084767", "0.60504955", "0.5954539", "0.59502906", "0.5845462", "0.58181536", "0.5813489", "0.5807858", "0.58029526", "0.5788721", "0.5769314", "0.5766205", "0.5715835", "0.5682614", "0.56803924", "0.5609862", "0.558002", "0.55461484", "0.54527354", "0.54275894", "0.54245245", "0.53960925", "0.53952676", "0.53903246", "0.53746873", "0.536739", "0.5357727", "0.53437984", "0.5338956", "0.53363514", "0.5288785", "0.5265108", "0.5249285", "0.52427995", "0.5241204", "0.5233473", "0.52097636", "0.520351", "0.5201246", "0.51975495", "0.51971644", "0.51825696", "0.51698685", "0.51685804", "0.51605886", "0.5156839", "0.5155365", "0.51505625", "0.514593", "0.5134166", "0.51299095", "0.5125161", "0.5117661", "0.51157254", "0.5113505", "0.5103344", "0.5103211", "0.51021415", "0.50904083", "0.50901085", "0.5086337", "0.508591", "0.50823975", "0.50617206", "0.50534815", "0.5047856", "0.50466484", "0.5039752", "0.5037853", "0.50347507", "0.5031735", "0.50298405", "0.5025971", "0.5025089", "0.50227237", "0.50217193", "0.50105536", "0.5009176", "0.49890745", "0.4988363", "0.49859118", "0.49822697", "0.49817985", "0.49815792", "0.49763992", "0.49760196", "0.49730146", "0.4968154", "0.4963263", "0.49621955", "0.4961174", "0.49578625", "0.49528897", "0.49491766", "0.49411586", "0.4939214", "0.49386653", "0.4929792" ]
0.5805402
10
MSH21.1 not present, MSH16 is valued AL. Two errors, no alert expected
@Test public void test9() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message9 = new File(classLoader.getResource(message9FileName).getFile()); String messageString = FileUtils.readFileToString(message9); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(2, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo7352a(C1655s sVar, AdError adError);", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "void mo1501h();", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "void mo1507n();", "C1458cs mo7613iS();", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public abstract void mo38032a(C13281h hVar) throws IOException;", "public void mo21870l() {\n this.f24516S = true;\n mo21800a();\n this.f24516S = false;\n }", "abstract C0451h mo1607e();", "private static akh[] m701a(bgl bgl) {\n int f = bgl != null ? bgl.mo1835f() : 0;\n akh[] akhArr = new akh[f];\n for (int i = 0; i < f; i++) {\n akhArr[i] = bgl.mo1828a(i);\n }\n return akhArr;\n }", "C32446a mo21077h() throws Exception;", "protected void mo6255a() {\n }", "public void mo1538a(boolean manual) {\n if (manual) {\n C2201w.m8370a((int) C0965R.string.ota_net_error);\n }\n }", "void mo1637a();", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "public final void arJ() {\n this.gHW = arl();\n this.gHX = arm();\n if (!C5046bo.isNullOrNil(this.gHW)) {\n if (!this.gHW.equals(this.gHX)) {\n mo53562a(C18796a.TwoPasswordsNotMatch);\n } else if (this.gHW.length() > 16) {\n mo53562a(C18796a.BeyondMaximumLength);\n } else if (C5046bo.amT(this.gHW)) {\n C30379h.m48467g(this, C25738R.string.dkt, C25738R.string.dln);\n } else if (C5046bo.amY(this.gHW)) {\n aqX();\n final C1207m ark = ark();\n C1720g.m3540Rg().mo14541a(ark, 0);\n getString(C25738R.string.f9238tz);\n this.ehJ = mo53561a(this, getString(C25738R.string.dju), new OnCancelListener() {\n public final void onCancel(DialogInterface dialogInterface) {\n AppMethodBeat.m2504i(125566);\n C1720g.m3540Rg().mo14547c(ark);\n AppMethodBeat.m2505o(125566);\n }\n });\n if (aru() && !this.gHY) {\n C4990ab.m7410d(\"MicroMsg.SetPwdUI\", \"cpan settpassword cancel 11868 0\");\n C7060h.pYm.mo8381e(11868, Integer.valueOf(0));\n }\n } else if (this.gHW.length() < 8 || this.gHW.length() >= 16) {\n mo53562a(C18796a.NotReachMinimumLength);\n } else {\n mo53562a(C18796a.DisallowShortNumericPassword);\n }\n }\n }", "public void mo6081a() {\n }", "public void mo3370l() {\n }", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "private final void m46517V() {\n if (this.f40707H != null) {\n C15600ck ckVar = this.f40707H.f44224a;\n if (!(ckVar == null || C14793ay.m42898d().mo39086a() == null)) {\n C14793ay.m42898d().mo39086a().mo41449a(ckVar);\n }\n }\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public CWE getRxa14_AdministeredStrengthUnits() { \r\n\t\tCWE retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "public interface C0407a {\n void shakeDetected();\n }", "bdm mo1784a(akh akh);", "private void m125718m() {\n mo110584h();\n TopicMainViewModel kVar = this.f90217G;\n if (kVar != null) {\n kVar.mo110106a(kVar.mo110112h(), this.f90217G.mo110109e());\n }\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo21783H() {\n }", "int mo27480a();", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "void mo304a(C0366h c0366h);", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "C0832f m5767a() throws C0841b, WDException;", "public void mo1531a() {\n }", "public void mo21797V() {\n this.f24532d.mo21926U();\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public final void mo3856d() {\n StringBuilder sb;\n String str;\n int i;\n C0735ko koVar = this.f3511b;\n C0544go goVar = C0544go.f2351M;\n Boolean bool = Boolean.TRUE;\n koVar.getClass();\n String b = C0432eo.m1607b(C0489fo.BLUETOOTH);\n if (b == null) {\n b = C0200av.m970a(-22762010006700L);\n }\n String str2 = b;\n if (!str2.isEmpty() || goVar.mo2961a()) {\n int i2 = -999;\n if (Build.VERSION.SDK_INT < 28) {\n String str3 = goVar.f2410c;\n if (goVar == C0544go.f2374g || goVar == C0544go.f2376h || goVar == C0544go.f2352N) {\n str3 = C0200av.m970a(-25996120380588L);\n }\n try {\n i2 = ((Integer) (C0735ko.f3016e.getParameterTypes().length == 4 ? C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, str3}) : C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2}))).intValue();\n } catch (Exception e) {\n Throwable d = C0279ch.m1107d(-26979667891372L, C0279ch.m1118o(e, C0279ch.m1104a(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-26077724759212L)), e, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), e);\n if (d != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), d, C0200av.m970a(-27061272269996L), d);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(e);\n i = -999;\n }\n } else if (koVar.f3020a == null) {\n C0550gu.m1819a(C0200av.m970a(-24411277448364L), C0200av.m970a(-24441342219436L));\n i = 1;\n String a = C0200av.m970a(-26322537895084L);\n StringBuilder sb2 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb2, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb2, i);\n str = a;\n sb = sb2;\n } else {\n String a2 = C0200av.m970a(-24518651630764L);\n try {\n if (C0735ko.f3017f.getParameterTypes().length == 3) {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, a2});\n } else {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, a2});\n }\n i2 = 0;\n } catch (Throwable th) {\n Throwable e2 = C0279ch.m1108e(-26979667891372L, C0279ch.m1123t(th, C0279ch.m1105b(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-24600256009388L)), th, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), th);\n if (e2 != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), e2, C0200av.m970a(-27061272269996L), e2);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(th);\n }\n }\n i = i2;\n String a3 = C0200av.m970a(-26322537895084L);\n StringBuilder sb22 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb22, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb22, i);\n str = a3;\n sb = sb22;\n } else {\n str = C0200av.m970a(-26107789530284L);\n sb = new StringBuilder();\n C0279ch.m1112i(-26137854301356L, sb, 35, -26206573778092L);\n }\n C0550gu.m1820b(str, sb.toString());\n AudioManager audioManager = this.f3511b.f3020a;\n if (audioManager != null) {\n audioManager.stopBluetoothSco();\n }\n }", "public void mo5972i() {\n int i = this.f5435p;\n if (i == 2) {\n this.f5396P.sendEmptyMessage(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(true);\n } else if (m6595L()) {\n this.f5391K.setRecordState(true);\n } else {\n this.f5392L.setRecordState(true);\n }\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n } else if (i == 4) {\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused2) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n }\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "private final void m718m() {\n boolean z;\n akl akl = this.f531p.f603f;\n if (this.f539x) {\n z = true;\n } else {\n z = akl != null && akl.f577a.mo1491f();\n }\n akp akp = this.f533r;\n if (z != akp.f617g) {\n this.f533r = new akp(akp.f611a, akp.f612b, akp.f613c, akp.f614d, akp.f615e, akp.f616f, z, akp.f618h, akp.f619i, akp.f620j, akp.f621k, akp.f622l, akp.f623m);\n }\n }", "public void mo55254a() {\n }", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "private void m18352o() throws InitializationException {\n this.f16616j.block();\n this.f16621o = m18353p();\n int audioSessionId = this.f16621o.getAudioSessionId();\n if (f16579a && C8509F.f18793a < 21) {\n AudioTrack audioTrack = this.f16620n;\n if (!(audioTrack == null || audioSessionId == audioTrack.getAudioSessionId())) {\n m18355r();\n }\n if (this.f16620n == null) {\n this.f16620n = m18340c(audioSessionId);\n }\n }\n if (this.f16605Y != audioSessionId) {\n this.f16605Y = audioSessionId;\n C8109a aVar = this.f16619m;\n if (aVar != null) {\n aVar.mo25069a(audioSessionId);\n }\n }\n this.f16581A = this.f16630x ? this.f16610d.mo25072a(this.f16581A) : C8438u.f18482a;\n m18357t();\n this.f16617k.mo25125a(this.f16621o, this.f16627u, this.f16589I, this.f16631y);\n m18356s();\n int i = this.f16606Z.f16717a;\n if (i != 0) {\n this.f16621o.attachAuxEffect(i);\n this.f16621o.setAuxEffectSendLevel(this.f16606Z.f16718b);\n }\n }", "public abstract boolean mo9737c();", "public abstract boolean mo40165a(C4217w wVar, C3434fs fsVar);", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2\", \"0xA0182\");\r\n }", "private final void m711f() {\n /*\n r25 = this;\n r6 = r25\n long r7 = android.os.SystemClock.uptimeMillis()\n awv r0 = r6.f534s\n r11 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n r14 = 1\n r15 = 0\n if (r0 != 0) goto L_0x0013\n goto L_0x0224\n L_0x0013:\n int r1 = r6.f511B\n if (r1 > 0) goto L_0x0221\n akn r0 = r6.f531p\n long r1 = r6.f513D\n r0.mo453a(r1)\n akn r0 = r6.f531p\n akl r1 = r0.f603f\n if (r1 != 0) goto L_0x0025\n goto L_0x0041\n L_0x0025:\n akm r2 = r1.f582f\n boolean r2 = r2.f597g\n if (r2 != 0) goto L_0x00e4\n boolean r1 = r1.mo441b()\n if (r1 == 0) goto L_0x00e4\n akl r1 = r0.f603f\n akm r1 = r1.f582f\n long r1 = r1.f595e\n int r3 = (r1 > r11 ? 1 : (r1 == r11 ? 0 : -1))\n if (r3 == 0) goto L_0x00e4\n int r0 = r0.f604g\n r1 = 100\n if (r0 >= r1) goto L_0x00e4\n L_0x0041:\n akn r0 = r6.f531p\n long r1 = r6.f513D\n akp r3 = r6.f533r\n akl r4 = r0.f603f\n if (r4 == 0) goto L_0x0050\n akm r0 = r0.mo449a(r4, r1)\n goto L_0x005a\n L_0x0050:\n awt r1 = r3.f612b\n long r4 = r3.f614d\n long r2 = r3.f613c\n akm r0 = r0.mo451a(r1, r2)\n L_0x005a:\n if (r0 == 0) goto L_0x00c8\n akn r1 = r6.f531p\n aky[] r2 = r6.f519d\n bgq r3 = r6.f520e\n akk r4 = r6.f522g\n ajd r4 = (p000.ajd) r4\n bhz r4 = r4.f433a\n awv r5 = r6.f534s\n bgr r13 = r6.f521f\n akl r9 = r1.f603f\n if (r9 == 0) goto L_0x007e\n long r11 = r9.f586j\n akm r9 = r9.f582f\n long r9 = r9.f595e\n long r11 = r11 + r9\n long r9 = r0.f592b\n long r9 = r11 - r9\n r18 = r9\n goto L_0x0086\n L_0x007e:\n awt r9 = r0.f591a\n boolean r9 = r9.mo1504a()\n r18 = 0\n L_0x0086:\n akl r9 = new akl\n r16 = r9\n r17 = r2\n r20 = r3\n r21 = r4\n r22 = r5\n r23 = r0\n r24 = r13\n r16.<init>(r17, r18, r20, r21, r22, r23, r24)\n akl r2 = r1.f603f\n if (r2 == 0) goto L_0x00a1\n r2.mo439a(r9)\n goto L_0x00a5\n L_0x00a1:\n r1.f601d = r9\n r1.f602e = r9\n L_0x00a5:\n r2 = 0\n r1.f605h = r2\n r1.f603f = r9\n int r2 = r1.f604g\n int r2 = r2 + r14\n r1.f604g = r2\n aws r1 = r9.f577a\n long r2 = r0.f592b\n r1.mo1483a(r6, r2)\n akn r0 = r6.f531p\n akl r0 = r0.f601d\n if (r0 != r9) goto L_0x00c3\n long r0 = r9.mo434a()\n r6.m691a(r0)\n L_0x00c3:\n r6.m706b(r15)\n goto L_0x00e4\n L_0x00c8:\n akn r0 = r6.f531p\n akl r0 = r0.f603f\n if (r0 == 0) goto L_0x00df\n akx[] r0 = r6.f535t\n int r1 = r0.length\n r2 = 0\n L_0x00d2:\n if (r2 >= r1) goto L_0x00df\n r3 = r0[r2]\n boolean r3 = r3.mo359g()\n if (r3 == 0) goto L_0x00e4\n int r2 = r2 + 1\n goto L_0x00d2\n L_0x00df:\n awv r0 = r6.f534s\n r0.mo1494d()\n L_0x00e4:\n boolean r0 = r6.f539x\n if (r0 == 0) goto L_0x00f2\n boolean r0 = r25.m717l()\n r6.f539x = r0\n r25.m718m()\n goto L_0x00f5\n L_0x00f2:\n r25.m716k()\n L_0x00f5:\n akn r0 = r6.f531p\n akl r0 = r0.f602e\n if (r0 == 0) goto L_0x01ba\n akl r1 = r0.f583g\n if (r1 != 0) goto L_0x012b\n akm r1 = r0.f582f\n boolean r1 = r1.f597g\n if (r1 != 0) goto L_0x0107\n goto L_0x01ba\n L_0x0107:\n r1 = 0\n L_0x0109:\n akx[] r2 = r6.f518c\n int r3 = r2.length\n if (r1 >= r3) goto L_0x0129\n r2 = r2[r1]\n axx[] r3 = r0.f579c\n r3 = r3[r1]\n if (r3 != 0) goto L_0x0117\n goto L_0x0126\n L_0x0117:\n axx r4 = r2.mo358f()\n if (r4 != r3) goto L_0x0126\n boolean r3 = r2.mo359g()\n if (r3 == 0) goto L_0x0126\n r2.mo361i()\n L_0x0126:\n int r1 = r1 + 1\n goto L_0x0109\n L_0x0129:\n goto L_0x01ba\n L_0x012b:\n boolean r1 = r25.m714i()\n if (r1 == 0) goto L_0x01ba\n akl r1 = r0.f583g\n boolean r1 = r1.f580d\n if (r1 == 0) goto L_0x01ba\n bgr r0 = r0.f585i\n akn r1 = r6.f531p\n akl r2 = r1.f602e\n if (r2 == 0) goto L_0x0147\n akl r2 = r2.f583g\n if (r2 == 0) goto L_0x0145\n r2 = 1\n goto L_0x0148\n L_0x0145:\n L_0x0147:\n r2 = 0\n L_0x0148:\n p000.bks.m3512b(r2)\n akl r2 = r1.f602e\n akl r2 = r2.f583g\n r1.f602e = r2\n akl r1 = r1.f602e\n bgr r2 = r1.f585i\n aws r3 = r1.f577a\n long r3 = r3.mo1486c()\n r9 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n int r5 = (r3 > r9 ? 1 : (r3 == r9 ? 0 : -1))\n if (r5 == 0) goto L_0x016a\n r25.m715j()\n r0 = 0\n goto L_0x01bb\n L_0x016a:\n r3 = 0\n L_0x016b:\n akx[] r4 = r6.f518c\n int r5 = r4.length\n if (r3 >= r5) goto L_0x01b9\n r4 = r4[r3]\n boolean r5 = r0.mo1867a(r3)\n if (r5 != 0) goto L_0x0179\n goto L_0x01b6\n L_0x0179:\n boolean r5 = r4.mo362j()\n if (r5 != 0) goto L_0x01b6\n bgm r5 = r2.f3835c\n bgl r5 = r5.mo1861a(r3)\n boolean r9 = r2.mo1867a(r3)\n aky[] r10 = r6.f519d\n r10 = r10[r3]\n int r10 = r10.mo344a()\n akz[] r11 = r0.f3834b\n r11 = r11[r3]\n akz[] r12 = r2.f3834b\n r12 = r12[r3]\n if (r9 == 0) goto L_0x01b3\n boolean r9 = r12.equals(r11)\n if (r9 == 0) goto L_0x01b3\n r9 = 6\n if (r10 != r9) goto L_0x01a5\n goto L_0x01b3\n L_0x01a5:\n akh[] r5 = m701a(r5)\n axx[] r9 = r1.f579c\n r9 = r9[r3]\n long r10 = r1.f586j\n r4.mo353a(r5, r9, r10)\n goto L_0x01b6\n L_0x01b3:\n r4.mo361i()\n L_0x01b6:\n int r3 = r3 + 1\n goto L_0x016b\n L_0x01b9:\n L_0x01ba:\n r0 = 0\n L_0x01bb:\n boolean r1 = r6.f537v\n if (r1 == 0) goto L_0x0224\n akn r1 = r6.f531p\n akl r2 = r1.f601d\n if (r2 == 0) goto L_0x0224\n akl r3 = r2.f583g\n if (r3 == 0) goto L_0x0224\n akl r1 = r1.f602e\n if (r2 == r1) goto L_0x01ce\n goto L_0x01d4\n L_0x01ce:\n boolean r1 = r25.m714i()\n if (r1 == 0) goto L_0x0224\n L_0x01d4:\n long r1 = r6.f513D\n long r3 = r3.mo434a()\n int r5 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r5 < 0) goto L_0x0224\n if (r0 != 0) goto L_0x01e1\n goto L_0x01e4\n L_0x01e1:\n r25.m703b()\n L_0x01e4:\n akn r0 = r6.f531p\n akl r9 = r0.f601d\n akl r0 = r0.f602e\n if (r9 == r0) goto L_0x01ed\n goto L_0x01f0\n L_0x01ed:\n r25.m715j()\n L_0x01f0:\n akn r0 = r6.f531p\n akl r0 = r0.mo448a()\n r6.m693a(r9)\n akm r0 = r0.f582f\n awt r1 = r0.f591a\n long r2 = r0.f592b\n r4 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n r0 = r25\n akp r0 = r0.m686a(r1, r2, r4)\n r6.f533r = r0\n akm r0 = r9.f582f\n boolean r0 = r0.f596f\n if (r0 != 0) goto L_0x0214\n r0 = 3\n goto L_0x0216\n L_0x0214:\n r0 = 0\n L_0x0216:\n akc r1 = r6.f529n\n r1.mo409b(r0)\n r25.m710e()\n r0 = 1\n goto L_0x01bb\n L_0x0221:\n r0.mo1494d()\n L_0x0224:\n akp r0 = r6.f533r\n int r0 = r0.f615e\n if (r0 != r14) goto L_0x022c\n goto L_0x03b3\n L_0x022c:\n r1 = 4\n if (r0 == r1) goto L_0x03b3\n akn r0 = r6.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x03ad\n java.lang.String r4 = \"doSomeWork\"\n p000.blk.m3619a(r4)\n r25.m710e()\n boolean r4 = r0.f580d\n r9 = 1000(0x3e8, double:4.94E-321)\n if (r4 == 0) goto L_0x02b5\n long r4 = android.os.SystemClock.elapsedRealtime()\n long r4 = r4 * r9\n aws r11 = r0.f577a\n akp r12 = r6.f533r\n long r12 = r12.f623m\n long r14 = r6.f527l\n long r12 = r12 - r14\n r11.mo1489d(r12)\n r11 = 0\n r12 = 1\n r14 = 1\n L_0x0258:\n akx[] r13 = r6.f518c\n int r15 = r13.length\n if (r11 >= r15) goto L_0x02b2\n r13 = r13[r11]\n int r15 = r13.mo356d()\n if (r15 == 0) goto L_0x02ad\n long r2 = r6.f513D\n r13.mo484a(r2, r4)\n if (r12 == 0) goto L_0x0275\n boolean r2 = r13.mo486w()\n if (r2 == 0) goto L_0x0274\n r12 = 1\n goto L_0x0276\n L_0x0274:\n L_0x0275:\n r12 = 0\n L_0x0276:\n axx[] r2 = r0.f579c\n r2 = r2[r11]\n axx r3 = r13.mo358f()\n if (r2 != r3) goto L_0x028c\n akl r15 = r0.f583g\n if (r15 == 0) goto L_0x028c\n boolean r15 = r13.mo359g()\n if (r15 == 0) goto L_0x028c\n r15 = 1\n goto L_0x028d\n L_0x028c:\n r15 = 0\n L_0x028d:\n if (r2 == r3) goto L_0x0291\n L_0x028f:\n r2 = 1\n goto L_0x02a0\n L_0x0291:\n if (r15 != 0) goto L_0x028f\n boolean r2 = r13.mo485v()\n if (r2 != 0) goto L_0x028f\n boolean r2 = r13.mo486w()\n if (r2 != 0) goto L_0x028f\n r2 = 0\n L_0x02a0:\n if (r14 != 0) goto L_0x02a4\n L_0x02a2:\n r14 = 0\n goto L_0x02a7\n L_0x02a4:\n if (r2 == 0) goto L_0x02a2\n r14 = 1\n L_0x02a7:\n if (r2 != 0) goto L_0x02ad\n r13.mo363k()\n goto L_0x02ae\n L_0x02ad:\n L_0x02ae:\n int r11 = r11 + 1\n goto L_0x0258\n L_0x02b2:\n r16 = r12\n goto L_0x02be\n L_0x02b5:\n aws r2 = r0.f577a\n r2.mo1482a()\n r14 = 1\n r16 = 1\n L_0x02be:\n akm r2 = r0.f582f\n long r2 = r2.f595e\n r4 = 2\n if (r16 != 0) goto L_0x02c6\n goto L_0x02e9\n L_0x02c6:\n boolean r5 = r0.f580d\n if (r5 == 0) goto L_0x02e9\n r11 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n int r5 = (r2 > r11 ? 1 : (r2 == r11 ? 0 : -1))\n if (r5 == 0) goto L_0x02db\n akp r5 = r6.f533r\n long r11 = r5.f623m\n int r5 = (r2 > r11 ? 1 : (r2 == r11 ? 0 : -1))\n if (r5 > 0) goto L_0x02e9\n L_0x02db:\n akm r0 = r0.f582f\n boolean r0 = r0.f597g\n if (r0 == 0) goto L_0x02e9\n r6.m690a(r1)\n r25.m709d()\n goto L_0x036b\n L_0x02e9:\n akp r0 = r6.f533r\n int r2 = r0.f615e\n if (r2 == r4) goto L_0x02f0\n goto L_0x034c\n L_0x02f0:\n akx[] r2 = r6.f535t\n int r2 = r2.length\n if (r2 != 0) goto L_0x02fc\n boolean r0 = r25.m712g()\n if (r0 == 0) goto L_0x034c\n goto L_0x033f\n L_0x02fc:\n if (r14 == 0) goto L_0x034c\n boolean r0 = r0.f617g\n if (r0 == 0) goto L_0x033f\n akn r0 = r6.f531p\n akl r0 = r0.f603f\n boolean r2 = r0.mo441b()\n if (r2 != 0) goto L_0x030d\n L_0x030c:\n goto L_0x0314\n L_0x030d:\n akm r0 = r0.f582f\n boolean r0 = r0.f597g\n if (r0 != 0) goto L_0x033f\n goto L_0x030c\n L_0x0314:\n akk r0 = r6.f522g\n long r2 = r25.m719n()\n ajf r5 = r6.f528m\n akq r5 = r5.mo376Q()\n float r5 = r5.f625b\n boolean r11 = r6.f538w\n long r2 = p000.blm.m3661b(r2, r5)\n if (r11 == 0) goto L_0x032f\n ajd r0 = (p000.ajd) r0\n long r11 = r0.f438f\n goto L_0x0333\n L_0x032f:\n ajd r0 = (p000.ajd) r0\n long r11 = r0.f437e\n L_0x0333:\n r15 = 0\n int r0 = (r11 > r15 ? 1 : (r11 == r15 ? 0 : -1))\n if (r0 <= 0) goto L_0x033f\n int r0 = (r2 > r11 ? 1 : (r2 == r11 ? 0 : -1))\n if (r0 >= 0) goto L_0x033f\n goto L_0x034c\n L_0x033f:\n r0 = 3\n r6.m690a(r0)\n boolean r0 = r6.f537v\n if (r0 == 0) goto L_0x036b\n r25.m707c()\n goto L_0x036b\n L_0x034c:\n akp r0 = r6.f533r\n int r0 = r0.f615e\n r2 = 3\n if (r0 != r2) goto L_0x036b\n akx[] r0 = r6.f535t\n int r0 = r0.length\n if (r0 != 0) goto L_0x035f\n boolean r0 = r25.m712g()\n if (r0 != 0) goto L_0x036b\n goto L_0x0361\n L_0x035f:\n if (r14 != 0) goto L_0x036b\n L_0x0361:\n boolean r0 = r6.f537v\n r6.f538w = r0\n r6.m690a(r4)\n r25.m709d()\n L_0x036b:\n akp r0 = r6.f533r\n int r0 = r0.f615e\n if (r0 != r4) goto L_0x037f\n akx[] r0 = r6.f535t\n int r2 = r0.length\n r3 = 0\n L_0x0375:\n if (r3 >= r2) goto L_0x037f\n r5 = r0[r3]\n r5.mo363k()\n int r3 = r3 + 1\n goto L_0x0375\n L_0x037f:\n boolean r0 = r6.f537v\n if (r0 != 0) goto L_0x0384\n goto L_0x038b\n L_0x0384:\n akp r0 = r6.f533r\n int r0 = r0.f615e\n r2 = 3\n if (r0 == r2) goto L_0x0391\n L_0x038b:\n akp r0 = r6.f533r\n int r0 = r0.f615e\n if (r0 != r4) goto L_0x0392\n L_0x0391:\n goto L_0x03a4\n L_0x0392:\n akx[] r2 = r6.f535t\n int r2 = r2.length\n if (r2 != 0) goto L_0x0398\n goto L_0x039e\n L_0x0398:\n if (r0 == r1) goto L_0x039e\n r6.m692a(r7, r9)\n goto L_0x03a9\n L_0x039e:\n bkp r0 = r6.f516a\n r0.mo2044a()\n goto L_0x03a9\n L_0x03a4:\n r0 = 10\n r6.m692a(r7, r0)\n L_0x03a9:\n p000.blk.m3618a()\n return\n L_0x03ad:\n r0 = 10\n r6.m692a(r7, r0)\n return\n L_0x03b3:\n bkp r0 = r6.f516a\n r0.mo2044a()\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m711f():void\");\n }", "private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "public void case7(int mthMD, int appType){\n\t\tint input = randInt(10000, 500000);\n\t\tint output = randInt(5, 10);\n\t\tint latencyLocal = randInt(7, 10);\n\t\tdouble Tp = (double)latencyLocal/4;\n\t\tsetLatencyParameters(input, output);\n\t\tsetEnergyParameters(Ts, Tr);\n\t\t//System.out.println(\"Hello from setLatencyRemote \" + Ts + \" \" + Tr );\n\t\tMDResDes[0][mthMD] = input;\n\t\tMDResDes[1][mthMD] = output ;\n\t\tMDResDes[2][mthMD] = latencyLocal;\n\t\tMDResDes[3][mthMD] = Tp;\t\n\t\tMDResDes[4][mthMD] = Ts;\n\t\tMDResDes[5][mthMD] = Tr;\n\t\tMDResDes[6][mthMD] = Es;\n\t\tMDResDes[7][mthMD] = Er;\n\t\tMDResDes[8][mthMD] = appType;\n\t\t//setEnergyLo6cal(mthMD, latencyLocal);\n\t\t//setEnergyRemote(mthMD, input, output);\n\t\t//setRhoMN(mthMD, 7);\n\t\t}", "public void mo35052a() {\n this.f30707l = true;\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public final void mo66559hj() {\n int hl = m72695hl() | m72696hm();\n m72697hn();\n if (hl != 0) {\n m72694hk();\n notifyChanged();\n }\n }", "public void mo4359a() {\n }", "public int mo25006a() {\n int i = this.f16512l;\n if (i == -1) {\n return -1;\n }\n int i2 = this.f16513m;\n if (i2 == -1) {\n return -1;\n }\n return i * i2;\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S+=4km\", \"0xA0176\");\r\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M|=3 m\", \"0xA0184\");\r\n }", "void mo21070b();", "public void mo55177a() {\n long unused = C3615m3.this.f1452k = System.currentTimeMillis();\n if (C3615m3.this.f1443b) {\n C3615m3.this.m1171c(new MDExternalError(MDExternalError.ExternalError.SDK_INITIALIZATION_IN_PROGRESS), this.f1467a);\n } else if (!C3615m3.this.f1447f.mo55921b() || C3615m3.this.f1447f.mo55918a()) {\n C3615m3.this.f1449h.updateFilePath(C3595k3.m1060d().mo55511a());\n boolean unused2 = C3615m3.this.f1443b = true;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n if (C3723s4.m1629b() || C3723s4.m1628a()) {\n C3490e3.m665e(\"SDK Upgrade - delete UUID and local configuration storage\");\n C3661o5.m1405a();\n Pair<String, Boolean> a = C3729t0.m1642a();\n if (a != null) {\n AnalyticsBridge.getInstance().reportDeleteStorageEvent((String) a.first, ((Boolean) a.second).booleanValue());\n }\n }\n C3723s4.m1630c();\n C3615m3.this.m1172c(this.f1467a);\n C3580j createApiToken = ModelFactory.getInstance().createApiToken(this.f1468b);\n if (createApiToken == null) {\n boolean unused3 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1158a((C3665p2) new C3593k1(C3586j3.C3587a.API_TOKEN_PARSE_ERROR), this.f1467a);\n C3615m3.this.clearAndDisconnect();\n } else if (!C3615m3.this.f1442a || C3604l2.m1115c().mo55538b() == null || !C3604l2.m1115c().mo55538b().mo55850a().equals(createApiToken.mo55850a())) {\n C3604l2.m1115c().mo55537a(createApiToken);\n if (!C3604l2.m1115c().mo55538b().mo55850a().equals(C3659o3.m1391f().mo55687a(C3815z4.C3816a.API_TOKEN))) {\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.API_TOKEN, C3604l2.m1115c().mo55538b().mo55850a());\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.ACCESS_TOKEN, (String) null);\n }\n C3490e3.m665e(\"SDK init started\");\n AnalyticsBridge.getInstance().reportInitEvent();\n C3767w0.m1812b().mo55893a();\n C3646n3.m1337m().mo55661a(60000, 3, 60000, 0, 512, 3);\n C3615m3.this.m1150a(this.f1467a);\n } else {\n boolean unused4 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_ALREADY_INITIALIZED), this.f1467a);\n }\n } else {\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_KILLED), this.f1467a);\n C3461c3.m562g().clearAndDisconnect();\n }\n }", "void mo7358f(C1655s sVar);", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public void mo3812h() {\n for (int i = 0; i < 6; i++) {\n this.f1426A[i].mo3751a().mo3882c();\n }\n }", "public static void m22735h() {\n if (f20301b.mo18963a()) {\n f20301b.mo18962a(C7268n.m22763a().mo18998b());\n }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void mo1535a(int code) {\n this.f4002h.mo1526d();\n C2201w.m8370a((int) C0965R.string.ota_download_fail);\n }", "private void m20211h() throws IOException {\n this.f18662r = 0;\n if (m20209f()) {\n this.f18645a.mo25941a(this.f18660p, this.f18661q);\n }\n }", "public void mo3770E() {\n int i = this.f1434I;\n int i2 = this.f1435J;\n this.f1462ak = i;\n this.f1463al = i2;\n this.f1464am = (this.f1430E + i) - i;\n this.f1465an = (this.f1431F + i2) - i2;\n }", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "public abstract int mo123249h();", "public void mo3723e() {\n if (!this.f1904d.mo3709a()) {\n this.f1901a.mo3741w();\n } else if (this.f1905e.mo3710a().getLevel() == Level.INFECTED) {\n this.f1902b.mo3744b();\n } else {\n this.f1902b.mo3746d();\n }\n }", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "public final void mo3855c() {\n StringBuilder sb;\n String str;\n int i;\n C0735ko koVar = this.f3511b;\n C0544go goVar = C0544go.f2351M;\n Boolean bool = Boolean.TRUE;\n koVar.getClass();\n String b = C0432eo.m1607b(C0489fo.BLUETOOTH);\n if (b == null) {\n b = C0200av.m970a(-22762010006700L);\n }\n String str2 = b;\n if (!str2.isEmpty() || goVar.mo2961a()) {\n int i2 = -999;\n if (Build.VERSION.SDK_INT < 28) {\n String str3 = goVar.f2410c;\n if (goVar == C0544go.f2374g || goVar == C0544go.f2376h || goVar == C0544go.f2352N) {\n str3 = C0200av.m970a(-25996120380588L);\n }\n try {\n i2 = ((Integer) (C0735ko.f3016e.getParameterTypes().length == 4 ? C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, str3}) : C0735ko.f3016e.invoke(C0735ko.f3015d, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2}))).intValue();\n } catch (Exception e) {\n Throwable d = C0279ch.m1107d(-26979667891372L, C0279ch.m1118o(e, C0279ch.m1104a(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-26077724759212L)), e, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), e);\n if (d != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), d, C0200av.m970a(-27061272269996L), d);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(e);\n i = -999;\n }\n } else if (koVar.f3020a == null) {\n C0550gu.m1819a(C0200av.m970a(-24411277448364L), C0200av.m970a(-24441342219436L));\n i = 1;\n String a = C0200av.m970a(-26322537895084L);\n StringBuilder sb2 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb2, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb2, i);\n str = a;\n sb = sb2;\n } else {\n String a2 = C0200av.m970a(-24518651630764L);\n try {\n if (C0735ko.f3017f.getParameterTypes().length == 3) {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, a2});\n } else {\n C0735ko.f3017f.invoke(koVar.f3020a, new Object[]{Integer.valueOf(goVar.f2409b), 1, str2, a2});\n }\n i2 = 0;\n } catch (Throwable th) {\n Throwable e2 = C0279ch.m1108e(-26979667891372L, C0279ch.m1123t(th, C0279ch.m1105b(-26756329591980L, C0279ch.m1106c(C0200av.m970a(-24600256009388L)), th, C0200av.m970a(-26726264820908L), -26919538349228L), -26949603120300L), th);\n if (e2 != null) {\n C0279ch.m1115l(-27091337041068L, new StringBuilder(), e2, C0200av.m970a(-27061272269996L), e2);\n } else {\n C0550gu.m1819a(C0200av.m970a(-27125696779436L), C0200av.m970a(-27155761550508L));\n }\n C0550gu.m1821c(th);\n }\n }\n i = i2;\n String a3 = C0200av.m970a(-26322537895084L);\n StringBuilder sb22 = new StringBuilder();\n C0279ch.m1113j(-26352602666156L, sb22, 35, -26374077502636L, bool, -26386962404524L, str2);\n C0279ch.m1111h(-26412732208300L, sb22, i);\n str = a3;\n sb = sb22;\n } else {\n str = C0200av.m970a(-26107789530284L);\n sb = new StringBuilder();\n C0279ch.m1112i(-26137854301356L, sb, 35, -26206573778092L);\n }\n C0279ch.m1117n(sb, str, 100);\n AudioManager audioManager = this.f3511b.f3020a;\n if (audioManager != null) {\n audioManager.startBluetoothSco();\n }\n }", "void mo35722a(C14235h hVar);", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM2() {\n CuteNetlibCase.doTest(\"SCFXM2.SIF\", \"36660.261564998815\", null, NumberContext.of(7, 4));\n }", "@Test\r\n public void test13()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(21,0,0,5555), 0 , 99, 100);\r\n assertTrue(loan == Consts.HALF_LOAN + Consts.HALF_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 13, correct : 4960, got : \"+ loan);\r\n \t}\r\n }", "public void mo38117a() {\n }", "public abstract C7034m mo24416a();", "private void m20200a(int reason) {\n C8466a aVar = this.f18650f;\n if (aVar != null) {\n aVar.mo25956a(reason);\n }\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }" ]
[ "0.60178906", "0.59933954", "0.57308155", "0.57057154", "0.56433445", "0.56027436", "0.55833495", "0.5541542", "0.5539028", "0.5516238", "0.5504279", "0.54884666", "0.54685444", "0.54624075", "0.5442817", "0.5438596", "0.54291946", "0.5421452", "0.5421049", "0.540996", "0.5402618", "0.5393542", "0.5390947", "0.5387695", "0.53817475", "0.5378993", "0.53677195", "0.53453356", "0.53453356", "0.53453356", "0.53453356", "0.53453356", "0.53453356", "0.53453356", "0.5343416", "0.53387994", "0.5336472", "0.5321671", "0.52919316", "0.528923", "0.52842575", "0.5281122", "0.5275459", "0.52719283", "0.52705616", "0.52643746", "0.5253267", "0.5253028", "0.52353853", "0.5233018", "0.5230727", "0.5208343", "0.5179949", "0.5176499", "0.51724535", "0.51706654", "0.51658845", "0.5156581", "0.5155704", "0.51539886", "0.5143031", "0.51422435", "0.51396143", "0.51376826", "0.5131229", "0.5129867", "0.51284593", "0.51266396", "0.5122797", "0.512087", "0.5117399", "0.51143587", "0.51105726", "0.5109299", "0.510217", "0.51019436", "0.5101438", "0.51013285", "0.5099982", "0.50995797", "0.5096647", "0.50935614", "0.5091308", "0.5090868", "0.5080519", "0.5078973", "0.5075041", "0.50730073", "0.50700366", "0.5069722", "0.5061252", "0.5061169", "0.50609547", "0.5060548", "0.5058393", "0.5055722", "0.50544584", "0.50543624", "0.5052111", "0.5050978", "0.50488925" ]
0.0
-1
MSH21.1 present, but different from PHLabReportAck, MSH16 is valued 'AL'. One error, no alert expected.
@Test public void test10() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message10 = new File(classLoader.getResource(message10FileName).getFile()); String messageString = FileUtils.readFileToString(message10); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "void mo7352a(C1655s sVar, AdError adError);", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "private static akh[] m701a(bgl bgl) {\n int f = bgl != null ? bgl.mo1835f() : 0;\n akh[] akhArr = new akh[f];\n for (int i = 0; i < f; i++) {\n akhArr[i] = bgl.mo1828a(i);\n }\n return akhArr;\n }", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "@Override\r\n\tpublic void alarm() {\n\t\tSystem.out.println(\"H1型号是这样鸣笛的.....\");\r\n\t}", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public ReportAckMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "void mo1507n();", "private static C10387b m26008a(String str) {\n String str2;\n int i;\n if (str == null) {\n return null;\n }\n int indexOf = str.indexOf(44);\n if (indexOf >= 0) {\n str2 = str.substring(0, indexOf);\n i = indexOf + 1;\n } else {\n str2 = \"\";\n i = 0;\n }\n int indexOf2 = str.indexOf(47, i);\n String str3 = \"LogSamplerImpl\";\n if (indexOf2 <= 0) {\n String str4 = \"Failed to parse the rule: \";\n String valueOf = String.valueOf(str);\n Log.e(str3, valueOf.length() != 0 ? str4.concat(valueOf) : new String(str4));\n return null;\n }\n try {\n long parseLong = Long.parseLong(str.substring(i, indexOf2));\n long parseLong2 = Long.parseLong(str.substring(indexOf2 + 1));\n if (parseLong < 0 || parseLong2 < 0) {\n StringBuilder sb = new StringBuilder(72);\n sb.append(\"negative values not supported: \");\n sb.append(parseLong);\n sb.append(Constants.URL_PATH_DELIMITER);\n sb.append(parseLong2);\n Log.e(str3, sb.toString());\n return null;\n }\n C10388a h = C10387b.m26478h();\n h.mo28112a(str2);\n h.mo28111a(parseLong);\n h.mo28113b(parseLong2);\n return (C10387b) h.mo27817c();\n } catch (NumberFormatException e) {\n String str5 = \"parseLong() failed while parsing: \";\n String valueOf2 = String.valueOf(str);\n Log.e(str3, valueOf2.length() != 0 ? str5.concat(valueOf2) : new String(str5), e);\n return null;\n }\n }", "void mo23214a(Message message);", "private final int m21406a(C7619i iVar) {\n if (Intrinsics.areEqual((Object) iVar.mo20545c(), (Object) LinkSubscriptionPartialError.INSTANCE)) {\n return C7904t.paywall_sdk_error_link_subscription_partial_error;\n }\n return C7904t.paywall_sdk_error;\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "final /* synthetic */ void m36052a(String str, String str2, ReportCause reportCause, @Nullable String str3, Response response) {\n this.f29981a.showReportSuccessful();\n m36040a(null, str, str2, null, reportCause, str3, ReportingSource.PROFILE);\n }", "private void m20200a(int reason) {\n C8466a aVar = this.f18650f;\n if (aVar != null) {\n aVar.mo25956a(reason);\n }\n }", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "void mo304a(C0366h c0366h);", "public int checkForAlert() {\n return 0;\n }", "static int type_of_sphl(String passed){\n\t\treturn 1;\n\t}", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "public String getADD_STRING7_MAND() {\r\n return ADD_STRING7_MAND;\r\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public ReportAckMsg(int data_length) {\n super(data_length);\n amTypeSet(AM_TYPE);\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "bdm mo1784a(akh akh);", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset) {\n super(msg, base_offset, DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "public ReportAckMsg(net.tinyos.message.Message msg, int base_offset, int data_length) {\n super(msg, base_offset, data_length);\n amTypeSet(AM_TYPE);\n }", "String mo7388hl() throws RemoteException;", "void mo7372a(C0802fh fhVar) throws RemoteException;", "static void perform_sphl(String passed){\n\t\tint type = type_of_sphl(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\ttransfer_hl_to_sp(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public String provideAlwasDefResponse()\n {\n return (\"d\") ;\n }", "public static void checkErrorCode(byte[] buffer)throws TopicException{\n byte curr = buffer[1];\n StringBuilder string = new StringBuilder();\n for(int i = 7; i > -1; i--){\n string.append(getMybit(curr, i));\n }\n\n int val = Integer.parseInt(String.valueOf(string), Constants.TWO);\n if(0 != val){\n throw new TopicException(ErrorCode.UNEXPECTEDERRORCODE);\n }\n }", "public ReportAckMsg(byte[] data, int base_offset) {\n super(data, base_offset);\n amTypeSet(AM_TYPE);\n }", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "private void m34892a(C13288k kVar) {\n try {\n C13262e.this.f34198l.execute(new C13276c(\"OkHttp %s ACK Settings\", new Object[]{C13262e.this.f34194h}, kVar));\n } catch (RejectedExecutionException unused) {\n }\n }", "private static final void m705b(akx akx) {\n if (akx.mo356d() == 2) {\n akx.mo364l();\n }\n }", "@Override\n\tpublic String[] toArray() {\n\t\tString strValue[] = new String[DSPPackager.PACKAGER_MBASE_88301I\n\t\t\t\t.getFieldDefinitionList().length];\n\t\tString strHostName = null;\n\t\ttry {\n\t\t\tstrHostName = InetAddress.getLocalHost().getHostAddress();\n\t\t} catch (UnknownHostException ex) {\n\t\t\tstrHostName = \"localhost\";\n\t\t}\n\t\tstrValue[0] = \"*LINX\"; // Header type\n\t\tstrValue[1] = strHostName; // Device Name\n\t\tstrValue[5] = \"213\"; // Header Length\n\t\tstrValue[7] = \"0200\"; // Version\n\t\tstrValue[8] = \"*DSP\"; // Version\n\t\tstrValue[9] = \"MBSD\"; // Data format\n\t\tstrValue[10] = \"*LINX\"; // Source ID\n\t\tstrValue[14] = \"01\"; // Source ID\n\t\tstrValue[17] = \"BBMBSLNMNTFNC\"; // Scenario Number\n\t\tstrValue[22] = \"1\";\n\t\tstrValue[23] = \"10\";\n\t\tstrValue[24] = aa.getTeller(); // User ID\n\t\tstrValue[25] = strHostName; // Terminal ID\n\t\tstrValue[26] = \"88301\"; // Supervisor ID\n\t\tstrValue[27] = \"N\";\n\t\tstrValue[31] = aa.getTeller(); // Message Header\n\t\tstrValue[32] = \"1\"; // Message Header\n\t\tstrValue[34] = \"*END\";\n\t\tstrValue[36] = \"BTS\";\n\t\tstrValue[37] = \"RBS\";\n\t\tstrValue[39] = strHostName; // Terminal ID\n\t\tstrValue[40] = \"27\"; // Journal Seq\n\t\tstrValue[41] = aa.getBranch(); // Branch Code\n\t\tstrValue[45] = \"88301\"; // Transaction Code\n\t\tstrValue[46] = \"C\"; // add\n\t\tstrValue[47] = \"R\"; // response\n\t\tstrValue[48] = \"1\"; // Work station\n\t\tstrValue[49] = \"N\";\n\t\tstrValue[50] = \"F\";\n\t\tstrValue[56] = \"\";\n\t\tstrValue[67] = aa.getApplicationNo(); // application Number\n\t\tstrValue[68] = aa.getCifNum();\n\t\tstrValue[69] = aa.getApplicationDate();\n\t\tstrValue[71] = aa.getBranch(); // lpad 5 '0'\n\t\tstrValue[72] = aa.getWorkingEx();\n\t\tstrValue[73] = aa.getSpecProvision(); // Y/N\n\t\tstrValue[74] = aa.getClasifielDate();\n\t\tstrValue[75] = aa.getCarCode();\n\t\tstrValue[76] = aa.getReviewDate();\n\t\tstrValue[77] = aa.getRetention();\n\t\tstrValue[78] = aa.getReviewReMark();\n\t\tstrValue[79] = aa.getRefinanceFrom();\n\t\tstrValue[80] = aa.getTucachPn();\n\t\tstrValue[81] = aa.getTinhHinhTc();\n\t\tstrValue[82] = aa.getKhaNangVayVon();\n\t\tstrValue[83] = aa.getDamBaoTienVay();\n\t\tstrValue[84] = aa.getLimitAmount();\n\t\tstrValue[85] = aa.getCurencyType();\n\t\tstrValue[86] = aa.getOfficeCode();\n\t\tstrValue[87] = aa.getClassification();\n\t\tstrValue[88] = aa.getMARemarck();\n\t\tstrValue[89] = aa.getMADate();\n\t\treturn strValue;\n\t}", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "public CWE[] getRxa19_Indication() {\r\n \tCWE[] retVal = this.getTypedField(19, new CWE[0]);\r\n \treturn retVal;\r\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public HL7A04(String name) {\n\t\tsuper(name);\n\t\taddSegment(new HL7Segment(\"MSH\"));\n\t\taddSegment(new HL7Segment(\"EVN\"));\n\t\taddSegment(new HL7Segment(\"PID\"));\n\t\taddSegment(new HL7Segment(\"PV1\"));\n\t}", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "final /* synthetic */ void m36055a(String str, @Nullable String str2, @Nullable String str3, Attribution attribution, ReportCause reportCause, @Nullable String str4, String str5) {\n m36040a(str, str2, str3, attribution, reportCause, str4, ReportingSource.CHAT);\n m36042a(str, str5, str4, (boolean) null);\n this.f29981a.showReportSuccessful();\n }", "public interface C0407a {\n void shakeDetected();\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "private final void m134907b(EventMessage abVar) {\n C28082z zVar = abVar.f96686j;\n Integer num = abVar.f96684h;\n int value = EventCode.ApplyForConnect.getValue();\n if (num != null && num.intValue() == value) {\n MqttBus a = MqttBus.f97541a.mo118711a();\n ApplyForConnectEvent bVar = zVar.f97419p;\n C32569u.m150513a((Object) bVar, C6969H.m41409d(\"G6C95D014AB7EAA39F6028977F4EAD1E86A8CDB14BA33BF\"));\n a.mo118710a(bVar);\n return;\n }\n int value2 = EventCode.PermitConnect.getValue();\n if (num != null && num.intValue() == value2) {\n MqttBus a2 = MqttBus.f97541a.mo118711a();\n PermitConnectEvent asVar = zVar.f97420q;\n C32569u.m150513a((Object) asVar, C6969H.m41409d(\"G6C95D014AB7EBB2CF403995CCDE6CCD96786D60E\"));\n a2.mo118710a(asVar);\n return;\n }\n int value3 = EventCode.RefuseConnect.getValue();\n if (num != null && num.intValue() == value3) {\n MqttBus a3 = MqttBus.f97541a.mo118711a();\n RefuseConnectEvent axVar = zVar.f97428y;\n C32569u.m150513a((Object) axVar, C6969H.m41409d(\"G6C95D014AB7EB92CE01B834DCDE6CCD96786D60E\"));\n a3.mo118710a(axVar);\n return;\n }\n int value4 = EventCode.BanConnection.getValue();\n if (num != null && num.intValue() == value4) {\n MqttBus a4 = MqttBus.f97541a.mo118711a();\n BanConnectionEvent cVar = zVar.f97429z;\n C32569u.m150513a((Object) cVar, C6969H.m41409d(\"G6C95D014AB7EA928E8319347FCEBC6D47D8ADA14\"));\n a4.mo118710a(cVar);\n return;\n }\n int value5 = EventCode.Disconnect.getValue();\n if (num != null && num.intValue() == value5) {\n MqttBus a5 = MqttBus.f97541a.mo118711a();\n DisconnectEvent nVar = zVar.f97372A;\n C32569u.m150513a((Object) nVar, C6969H.m41409d(\"G6C95D014AB7EAF20F50D9F46FCE0C0C3\"));\n a5.mo118710a(nVar);\n return;\n }\n int value6 = EventCode.ConfirmConnect.getValue();\n if (num != null && num.intValue() == value6) {\n MqttBus a6 = MqttBus.f97541a.mo118711a();\n ConfirmConnectEvent eVar = zVar.f97373B;\n C32569u.m150513a((Object) eVar, C6969H.m41409d(\"G6C95D014AB7EA826E808995AFFDAC0D8678DD019AB\"));\n a6.mo118710a(eVar);\n return;\n }\n int value7 = EventCode.ConnectTimeout.getValue();\n if (num != null && num.intValue() == value7) {\n MqttBus a7 = MqttBus.f97541a.mo118711a();\n ConnectTimeoutEvent hVar = zVar.f97378G;\n C32569u.m150513a((Object) hVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD7DE6486DA0FAB\"));\n a7.mo118710a(hVar);\n return;\n }\n int value8 = EventCode.ConnectSuccess.getValue();\n if (num != null && num.intValue() == value8) {\n MqttBus a8 = MqttBus.f97541a.mo118711a();\n ConnectSuccessEvent gVar = zVar.f97421r;\n C32569u.m150513a((Object) gVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAD0C26A80D009AC\"));\n a8.mo118710a(gVar);\n return;\n }\n int value9 = EventCode.ConnectExit.getValue();\n if (num != null && num.intValue() == value9) {\n MqttBus a9 = MqttBus.f97541a.mo118711a();\n ConnectExitEvent fVar = zVar.f97422s;\n C32569u.m150513a((Object) fVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6DAC6CF6097\"));\n a9.mo118710a(fVar);\n return;\n }\n int value10 = EventCode.NewBullet.getValue();\n if (num != null && num.intValue() == value10) {\n MqttBus a10 = MqttBus.f97541a.mo118711a();\n NewBulletEvent anVar = zVar.f97405b;\n C32569u.m150513a((Object) anVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131925DFEE9C6C3\"));\n Integer num2 = abVar.f96691o;\n a10.mo118710a(new CommentNormal(anVar, num2 != null ? num2.intValue() : 0));\n return;\n }\n int value11 = EventCode.EnterTheater.getValue();\n if (num == null || num.intValue() != value11) {\n int value12 = EventCode.NewGift.getValue();\n if (num != null && num.intValue() == value12) {\n MqttBus a11 = MqttBus.f97541a.mo118711a();\n NewGiftEvent aoVar = zVar.f97407d;\n C32569u.m150513a((Object) aoVar, C6969H.m41409d(\"G6C95D014AB7EA52CF1319741F4F1\"));\n a11.mo118710a(aoVar);\n return;\n }\n int value13 = EventCode.UpdateContributors.getValue();\n if (num == null || num.intValue() != value13) {\n int value14 = EventCode.UpdateHotValue.getValue();\n if (num != null && num.intValue() == value14) {\n MqttBus a12 = MqttBus.f97541a.mo118711a();\n UpdateHotValueEvent bmVar = zVar.f97409f;\n C32569u.m150513a((Object) bmVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDEDCCC35695D416AA35\"));\n a12.mo118710a(bmVar);\n return;\n }\n int value15 = EventCode.NewStatement.getValue();\n if (num != null && num.intValue() == value15) {\n MqttBus a13 = MqttBus.f97541a.mo118711a();\n NewStatementEvent aqVar = zVar.f97410g;\n C32569u.m150513a((Object) aqVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131835CF3F1C6DA6C8DC1\"));\n a13.mo118710a(aqVar);\n return;\n }\n int value16 = EventCode.Interact.getValue();\n if (num != null && num.intValue() == value16) {\n MqttBus a14 = MqttBus.f97541a.mo118711a();\n InteractEvent ahVar = zVar.f97411h;\n C32569u.m150513a((Object) ahVar, C6969H.m41409d(\"G6C95D014AB7EA227F20B8249F1F1\"));\n a14.mo118710a(ahVar);\n return;\n }\n int value17 = EventCode.ReplyStatement.getValue();\n if (num != null && num.intValue() == value17) {\n MqttBus a15 = MqttBus.f97541a.mo118711a();\n ReplyStatementEvent azVar = zVar.f97417n;\n C32569u.m150513a((Object) azVar, C6969H.m41409d(\"G6C95D014AB7EB92CF6028977E1F1C2C36C8ED014AB\"));\n a15.mo118710a(azVar);\n return;\n }\n int value18 = EventCode.RepliedStatement.getValue();\n if (num != null && num.intValue() == value18) {\n MqttBus a16 = MqttBus.f97541a.mo118711a();\n RepliedStatementEvent ayVar = zVar.f97418o;\n C32569u.m150513a((Object) ayVar, C6969H.m41409d(\"G6C95D014AB7EB92CF602994DF6DAD0C36897D017BA3EBF\"));\n a16.mo118710a(ayVar);\n return;\n }\n int value19 = EventCode.TalkStart.getValue();\n if (num != null && num.intValue() == value19) {\n MqttBus a17 = MqttBus.f97541a.mo118711a();\n TalkStartEvent beVar = zVar.f97423t;\n C32569u.m150513a((Object) beVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF5BE6E4D1C3\"));\n a17.mo118710a(beVar);\n return;\n }\n int value20 = EventCode.TalkEnd.getValue();\n if (num != null && num.intValue() == value20) {\n MqttBus a18 = MqttBus.f97541a.mo118711a();\n TalkEndEvent bdVar = zVar.f97424u;\n C32569u.m150513a((Object) bdVar, C6969H.m41409d(\"G6C95D014AB7EBF28EA05AF4DFCE1\"));\n a18.mo118710a(bdVar);\n return;\n }\n int value21 = EventCode.DramaStart.getValue();\n if (num != null && num.intValue() == value21) {\n MqttBus a19 = MqttBus.f97541a.mo118711a();\n DramaStartEvent wVar = zVar.f97425v;\n C32569u.m150513a((Object) wVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E1F1C2C57D\"));\n a19.mo118710a(wVar);\n return;\n }\n int value22 = EventCode.DramaEnd.getValue();\n if (num != null && num.intValue() == value22) {\n MqttBus a20 = MqttBus.f97541a.mo118711a();\n DramaEndEvent sVar = zVar.f97426w;\n C32569u.m150513a((Object) sVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F7EBC7\"));\n a20.mo118710a(sVar);\n return;\n }\n int value23 = EventCode.ConnectorChange.getValue();\n if (num != null && num.intValue() == value23) {\n MqttBus a21 = MqttBus.f97541a.mo118711a();\n ConnectorChangeEvent jVar = zVar.f97427x;\n C32569u.m150513a((Object) jVar, C6969H.m41409d(\"G6C95D014AB7EA826E800954BE6EAD1E86A8BD414B835\"));\n a21.mo118710a(jVar);\n return;\n }\n int value24 = EventCode.UpdateDramaIncome.getValue();\n if (num != null && num.intValue() == value24) {\n MqttBus a22 = MqttBus.f97541a.mo118711a();\n UpdateDramaIncomeEvent bjVar = zVar.f97412i;\n C32569u.m150513a((Object) bjVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA13B133A424E3\"));\n a22.mo118710a(bjVar);\n return;\n }\n int value25 = EventCode.DramaMustClose.getValue();\n if (num != null && num.intValue() == value25) {\n MqttBus a23 = MqttBus.f97541a.mo118711a();\n DramaMustCloseEvent uVar = zVar.f97374C;\n C32569u.m150513a((Object) uVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177FFF0D0C35680D915AC35\"));\n a23.mo118710a(uVar);\n return;\n }\n int value26 = EventCode.TheaterMustLeave.getValue();\n if (num != null && num.intValue() == value26) {\n MqttBus a24 = MqttBus.f97541a.mo118711a();\n TheaterMustLeaveEvent bgVar = zVar.f97375D;\n C32569u.m150513a((Object) bgVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DACEC27A97EA16BA31BD2C\"));\n a24.mo118710a(bgVar);\n return;\n }\n int value27 = EventCode.FollowActor.getValue();\n if (num != null && num.intValue() == value27) {\n MqttBus a25 = MqttBus.f97541a.mo118711a();\n FollowActorEvent agVar = zVar.f97379H;\n C32569u.m150513a((Object) agVar, C6969H.m41409d(\"G6C95D014AB7EAD26EA029F5FCDE4C0C36691\"));\n a25.mo118710a(agVar);\n return;\n }\n int value28 = EventCode.EjectMember.getValue();\n if (num != null && num.intValue() == value28) {\n MqttBus a26 = MqttBus.f97541a.mo118711a();\n EjectMemberEvent xVar = zVar.f97382K;\n C32569u.m150513a((Object) xVar, C6969H.m41409d(\"G6C95D014AB7EAE23E30D8477FFE0CED56C91\"));\n a26.mo118710a(xVar);\n return;\n }\n int value29 = EventCode.QuietMember.getValue();\n if (num != null && num.intValue() == value29) {\n MqttBus a27 = MqttBus.f97541a.mo118711a();\n QuietMemberEvent awVar = zVar.f97380I;\n C32569u.m150513a((Object) awVar, C6969H.m41409d(\"G6C95D014AB7EBA3CEF0B8477FFE0CED56C91\"));\n a27.mo118710a(awVar);\n return;\n }\n int value30 = EventCode.CancelQuietMember.getValue();\n if (num != null && num.intValue() == value30) {\n MqttBus a28 = MqttBus.f97541a.mo118711a();\n CancelQuietMemberEvent dVar = zVar.f97381J;\n C32569u.m150513a((Object) dVar, C6969H.m41409d(\"G6C95D014AB7EA828E80D9544CDF4D6DE6C97EA17BA3DA92CF4\"));\n a28.mo118710a(dVar);\n return;\n }\n int value31 = EventCode.DeleteBullet.getValue();\n if (num != null && num.intValue() == value31) {\n MqttBus a29 = MqttBus.f97541a.mo118711a();\n DeleteBulletEvent lVar = zVar.f97383L;\n C32569u.m150513a((Object) lVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDE7D6DB6586C1\"));\n a29.mo118710a(lVar);\n return;\n }\n int value32 = EventCode.Ping.getValue();\n if (num != null && num.intValue() == value32) {\n MqttBus a30 = MqttBus.f97541a.mo118711a();\n PingEvent atVar = zVar.f97387P;\n C32569u.m150513a((Object) atVar, C6969H.m41409d(\"G6C95D014AB7EBB20E809\"));\n a30.mo118710a(atVar);\n return;\n }\n int value33 = EventCode.Alert.getValue();\n if (num != null && num.intValue() == value33) {\n MqttBus a31 = MqttBus.f97541a.mo118711a();\n AlertEvent aVar = zVar.f97385N;\n C32569u.m150513a((Object) aVar, C6969H.m41409d(\"G6C95D014AB7EAA25E31C84\"));\n a31.mo118710a(aVar);\n return;\n }\n int value34 = EventCode.MustDisconnect.getValue();\n if (num != null && num.intValue() == value34) {\n MqttBus a32 = MqttBus.f97541a.mo118711a();\n MustDisconnectEvent amVar = zVar.f97386O;\n C32569u.m150513a((Object) amVar, C6969H.m41409d(\"G6C95D014AB7EA63CF51AAF4CFBF6C0D8678DD019AB\"));\n a32.mo118710a(amVar);\n return;\n }\n int value35 = EventCode.DeleteStatement.getValue();\n if (num != null && num.intValue() == value35) {\n MqttBus a33 = MqttBus.f97541a.mo118711a();\n DeleteStatementEvent mVar = zVar.f97384M;\n C32569u.m150513a((Object) mVar, C6969H.m41409d(\"G6C95D014AB7EAF2CEA0B844DCDF6D7D67D86D81FB124\"));\n a33.mo118710a(mVar);\n return;\n }\n int value36 = EventCode.DramaContinue.getValue();\n if (num != null && num.intValue() == value36) {\n MqttBus a34 = MqttBus.f97541a.mo118711a();\n DramaContinueEvent rVar = zVar.f97377F;\n C32569u.m150513a((Object) rVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177F1EACDC3608DC01F\"));\n a34.mo118710a(rVar);\n return;\n }\n int value37 = EventCode.DramaPause.getValue();\n if (num != null && num.intValue() == value37) {\n MqttBus a35 = MqttBus.f97541a.mo118711a();\n DramaPauseEvent vVar = zVar.f97376E;\n C32569u.m150513a((Object) vVar, C6969H.m41409d(\"G6C95D014AB7EAF3BE7039177E2E4D6C46C\"));\n a35.mo118710a(vVar);\n return;\n }\n int value38 = EventCode.CreatePoll.getValue();\n if (num != null && num.intValue() == value38) {\n MqttBus a36 = MqttBus.f97541a.mo118711a();\n CreatePollEvent kVar = zVar.f97388Q;\n C32569u.m150513a((Object) kVar, C6969H.m41409d(\"G6C95D014AB7EA83BE30F844DCDF5CCDB65\"));\n a36.mo118710a(kVar);\n return;\n }\n int value39 = EventCode.FinishPoll.getValue();\n if (num != null && num.intValue() == value39) {\n MqttBus a37 = MqttBus.f97541a.mo118711a();\n FinishPollEvent afVar = zVar.f97389R;\n C32569u.m150513a((Object) afVar, C6969H.m41409d(\"G6C95D014AB7EAD20E8078340CDF5CCDB65\"));\n a37.mo118710a(afVar);\n return;\n }\n int value40 = EventCode.PollVote.getValue();\n if (num != null && num.intValue() == value40) {\n MqttBus a38 = MqttBus.f97541a.mo118711a();\n PollVoteEvent avVar = zVar.f97413j;\n C32569u.m150513a((Object) avVar, C6969H.m41409d(\"G6C95D014AB7EBB26EA02AF5EFDF1C6\"));\n a38.mo118710a(avVar);\n return;\n }\n int value41 = EventCode.UpdatePollStatistics.getValue();\n if (num != null && num.intValue() == value41) {\n MqttBus a39 = MqttBus.f97541a.mo118711a();\n UpdatePollStatisticsEvent bnVar = zVar.f97414k;\n C32569u.m150513a((Object) bnVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF5CCDB65BCC60EBE24A23AF207935B\"));\n a39.mo118710a(bnVar);\n return;\n }\n int value42 = EventCode.ObtainRedPacket.getValue();\n if (num != null && num.intValue() == value42) {\n MqttBus a40 = MqttBus.f97541a.mo118711a();\n ObtainRedPacketEvent arVar = zVar.f97391T;\n C32569u.m150513a((Object) arVar, C6969H.m41409d(\"G6C95D014AB7EA42BF20F9946CDF7C6D35693D419B435BF\"));\n a40.mo118710a(arVar);\n return;\n }\n int value43 = EventCode.NewRedPacket.getValue();\n if (num != null && num.intValue() == value43) {\n MqttBus a41 = MqttBus.f97541a.mo118711a();\n NewRedPacketEvent apVar = zVar.f97390S;\n C32569u.m150513a((Object) apVar, C6969H.m41409d(\"G6C95D014AB7EA52CF131824DF6DAD3D66A88D00E\"));\n a41.mo118710a(apVar);\n return;\n }\n int value44 = EventCode.FansTeamLevelUpgrade.getValue();\n if (num != null && num.intValue() == value44) {\n MqttBus a42 = MqttBus.f97541a.mo118711a();\n FansTeamLevelUpgradeEvent adVar = zVar.f97392U;\n C32569u.m150513a((Object) adVar, C6969H.m41409d(\"G6C95D014AB7EAD28E81DAF5CF7E4CEE86586C31FB30FBE39E11C914CF7\"));\n a42.mo118710a(adVar);\n return;\n }\n int value45 = EventCode.JoinFansTeam.getValue();\n if (num != null && num.intValue() == value45) {\n MqttBus a43 = MqttBus.f97541a.mo118711a();\n JoinFansTeamEvent ajVar = zVar.f97393V;\n C32569u.m150513a((Object) ajVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4EF3EBD0E87D86D417\"));\n a43.mo118710a(ajVar);\n return;\n }\n int value46 = EventCode.TheaterActivity.getValue();\n if (num != null && num.intValue() == value46) {\n MqttBus a44 = MqttBus.f97541a.mo118711a();\n TheaterActivityEvent bfVar = zVar.f97394W;\n C32569u.m150513a((Object) bfVar, C6969H.m41409d(\"G6C95D014AB7EBF21E30F844DE0DAC2D47D8AC313AB29\"));\n a44.mo118710a(bfVar);\n return;\n }\n int value47 = EventCode.VideoFocusApply.getValue();\n if (num != null && num.intValue() == value47) {\n MqttBus a45 = MqttBus.f97541a.mo118711a();\n VideoFocusApplyEvent bpVar = zVar.f97395X;\n C32569u.m150513a((Object) bpVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD40AAF3CB2\"));\n a45.mo118710a(bpVar);\n return;\n }\n int value48 = EventCode.VideoFocusRefused.getValue();\n if (num != null && num.intValue() == value48) {\n MqttBus a46 = MqttBus.f97541a.mo118711a();\n VideoFocusRefusedEvent brVar = zVar.f97396Y;\n C32569u.m150513a((Object) brVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC71FB925B82CE2\"));\n a46.mo118710a(brVar);\n return;\n }\n int value49 = EventCode.UpdateDramaMemberIncome.getValue();\n if (num != null && num.intValue() == value49) {\n MqttBus a47 = MqttBus.f97541a.mo118711a();\n UpdateDramaMemberIncomeEvent bkVar = zVar.f97415l;\n C32569u.m150513a((Object) bkVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA17BA3DA92CF4319946F1EACED2\"));\n a47.mo118710a(bkVar);\n return;\n }\n int value50 = EventCode.SyncDramaAudioStatus.getValue();\n if (num != null && num.intValue() == value50) {\n MqttBus a48 = MqttBus.f97541a.mo118711a();\n SyncDramaAudioStatusEvent bcVar = zVar.f97400ac;\n C32569u.m150513a((Object) bcVar, C6969H.m41409d(\"G6C95D014AB7EB830E80DAF4CE0E4CED65682C01EB63F943AF20F845DE1\"));\n a48.mo118710a(bcVar);\n return;\n }\n int value51 = EventCode.StatementVoteCountMilestone.getValue();\n if (num != null && num.intValue() == value51) {\n MqttBus a49 = MqttBus.f97541a.mo118711a();\n StatementVoteCountMilestoneEvent bbVar = zVar.f97399ab;\n C32569u.m150513a((Object) bbVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87F8CC11F8033A43CE81AAF45FBE9C6C47D8CDB1F\"));\n a49.mo118710a(bbVar);\n return;\n }\n int value52 = EventCode.StatementQuestionMilestone.getValue();\n if (num != null && num.intValue() == value52) {\n MqttBus a50 = MqttBus.f97541a.mo118711a();\n StatementQuestionMilestoneEvent baVar = zVar.f97403af;\n C32569u.m150513a((Object) baVar, C6969H.m41409d(\"G6C95D014AB7EB83DE71A9545F7EBD7E87896D009AB39A427D9039944F7F6D7D86786\"));\n a50.mo118710a(baVar);\n return;\n }\n int value53 = EventCode.VideoFocusTimeout.getValue();\n if (num != null && num.intValue() == value53) {\n MqttBus a51 = MqttBus.f97541a.mo118711a();\n VideoFocusTimeoutEvent bsVar = zVar.f97397Z;\n C32569u.m150513a((Object) bsVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCC113B235A43CF2\"));\n a51.mo118710a(bsVar);\n return;\n }\n int value54 = EventCode.VideoFocusEnd.getValue();\n if (num != null && num.intValue() == value54) {\n MqttBus a52 = MqttBus.f97541a.mo118711a();\n VideoFocusEndEvent bqVar = zVar.f97398aa;\n C32569u.m150513a((Object) bqVar, C6969H.m41409d(\"G6C95D014AB7EBD20E20B9F77F4EAC0C27ABCD014BB\"));\n a52.mo118710a(bqVar);\n return;\n }\n int value55 = EventCode.UpdateDramaCampStatistics.getValue();\n if (num != null && num.intValue() == value55) {\n MqttBus a53 = MqttBus.f97541a.mo118711a();\n UpdateDramaCampStatisticsEvent biVar = zVar.f97416m;\n C32569u.m150513a((Object) biVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D1D66482EA19BE3DBB16F51A915CFBF6D7DE6A90\"));\n a53.mo118710a(biVar);\n return;\n }\n int value56 = EventCode.JoinDramaCamp.getValue();\n if (num != null && num.intValue() == value56) {\n MqttBus a54 = MqttBus.f97541a.mo118711a();\n JoinDramaCampEvent aiVar = zVar.f97401ad;\n C32569u.m150513a((Object) aiVar, C6969H.m41409d(\"G6C95D014AB7EA126EF00AF4CE0E4CED65680D417AF\"));\n a54.mo118710a(aiVar);\n return;\n }\n int value57 = EventCode.UpdateTheaterConfig.getValue();\n if (num != null && num.intValue() == value57) {\n MqttBus a55 = MqttBus.f97541a.mo118711a();\n UpdateTheaterConfigEvent boVar = zVar.f97402ae;\n C32569u.m150513a((Object) boVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDF1CBD26897D0088033A427E00797\"));\n a55.mo118710a(boVar);\n return;\n }\n int value58 = EventCode.UpdateDurationTreasureBox.getValue();\n if (num != null && num.intValue() == value58) {\n MqttBus a56 = MqttBus.f97541a.mo118711a();\n UpdateDurationTreasureBoxEvent blVar = zVar.f97404ag;\n C32569u.m150513a((Object) blVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE1D6C56897DC15B10FBF3BE30F835DE0E0FCD5669B\"));\n a56.mo118710a(blVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.UpdateContributors.getValue())) {\n MqttBus a57 = MqttBus.f97541a.mo118711a();\n UpdateContributorsEvent bhVar = zVar.f97408e;\n C32569u.m150513a((Object) bhVar, C6969H.m41409d(\"G6C95D014AB7EBE39E20F844DCDE6CCD97D91DC18AA24A43BF5\"));\n a57.mo118710a(bhVar);\n }\n } else if (FlowControlHelper.f97498a.mo118671a(EventCode.EnterTheater.getValue())) {\n MqttBus a58 = MqttBus.f97541a.mo118711a();\n EnterTheaterEvent yVar = zVar.f97406c;\n C32569u.m150513a((Object) yVar, C6969H.m41409d(\"G6C95D014AB7EAE27F20B8277E6EDC6D67D86C7\"));\n a58.mo118710a(yVar);\n }\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "private final void m46511P() {\n C15593cd.m50346a(this.f40707H.f44224a, this.f40705F, \"aeh2\");\n }", "public final void mo75278h(String str) {\n super.mo75278h(str);\n if (C25352e.m83221d(this.f77546j)) {\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click_source\").mo65283e(str).mo65270a(mo75261ab());\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\").mo65283e(str).mo65270a(mo75261ab());\n m110463ax();\n }\n }", "private static int[] m10288a(C9383t tVar) {\n int intValue = ((Integer) LiveSettingKeys.STREAM_DEFINITION_LEVEL.mo10240a()).intValue();\n if (intValue > 0 && intValue <= f8023g.length) {\n return f8023g[intValue - 1];\n }\n return new int[]{tVar.mo23063c(), tVar.mo23064d(), tVar.mo23065e(), tVar.f25784h};\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "public void testMOBILE_CHARGE7() throws Exception {\n\t\tObject retval = execLexer(\"MOBILE_CHARGE\", 68, \"annulet\", false);\n\t\tObject actual = examineExecResult(org.antlr.gunit.gUnitParser.OK, retval);\n\t\tObject expecting = \"OK\";\n\n\t\tassertEquals(\"testing rule \"+\"MOBILE_CHARGE\", expecting, actual);\n\t}", "public void mo1606a(Format format) {\n }", "private static String m20561a(C6709k kVar) {\n if (kVar.mo16134k()) {\n C6712o o = kVar.mo16138o();\n if (o.mo16159q()) {\n return String.valueOf(o.mo15997b());\n }\n if (o.mo16156a()) {\n return Boolean.toString(o.mo16004h());\n }\n if (o.mo16160r()) {\n return o.mo15998c();\n }\n throw new AssertionError();\n } else if (kVar.mo16135l()) {\n return TEVideoRecorder.FACE_BEAUTY_NULL;\n } else {\n throw new AssertionError();\n }\n }", "public void mo1538a(boolean manual) {\n if (manual) {\n C2201w.m8370a((int) C0965R.string.ota_net_error);\n }\n }", "public void mo5972i() {\n int i = this.f5435p;\n if (i == 2) {\n this.f5396P.sendEmptyMessage(1);\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(true);\n } else if (m6595L()) {\n this.f5391K.setRecordState(true);\n } else {\n this.f5392L.setRecordState(true);\n }\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n } else if (i == 4) {\n try {\n if (C1413m.m6844f()) {\n this.f5392L.setRecordState(false);\n } else if (m6595L()) {\n this.f5391K.setRecordState(false);\n } else {\n this.f5392L.setRecordState(false);\n }\n } catch (Exception unused2) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"onResume() RecordView or RecognizeVoiceView error:\");\n }\n }\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "public static Message makeACK(Message message) throws HL7Exception, IOException {\n\t\treturn makeACK((Segment)message.get(\"MSH\"));\n\t}", "private void m65921b(SearchTrack searchTrack) {\n if (searchTrack != null) {\n this.f56359a.m56664a(searchTrack, SpotifyMauType.SET_ANTHEM.toString(), SpotifyMauEventType.EXTERNAL_ENGAGEMENT.toString());\n }\n }" ]
[ "0.5642843", "0.55487996", "0.54839253", "0.5451315", "0.5427114", "0.54184747", "0.5409517", "0.5399814", "0.5352692", "0.5344209", "0.52950364", "0.5270139", "0.5257946", "0.52564025", "0.52492577", "0.52166677", "0.5208688", "0.5183381", "0.5155556", "0.5152402", "0.5150375", "0.5148741", "0.513211", "0.51266533", "0.5126334", "0.51257604", "0.5118548", "0.51083285", "0.5103049", "0.50882006", "0.5086125", "0.50613165", "0.50610775", "0.5052192", "0.5048905", "0.50430596", "0.5013202", "0.5006146", "0.4988578", "0.4980736", "0.49784908", "0.497707", "0.4962232", "0.49473792", "0.49363202", "0.4936294", "0.49325874", "0.49289343", "0.49267298", "0.49180388", "0.4906541", "0.4906541", "0.4903394", "0.49027297", "0.48919144", "0.48904634", "0.4888264", "0.48716834", "0.48681292", "0.4862651", "0.48608768", "0.4859405", "0.4854922", "0.48514387", "0.48489353", "0.48452172", "0.4837835", "0.482975", "0.48294246", "0.48283732", "0.48275423", "0.48140824", "0.48121876", "0.47988304", "0.47984257", "0.47976872", "0.4792718", "0.4790536", "0.47879726", "0.47862795", "0.47853658", "0.47832397", "0.47824907", "0.47705856", "0.47650945", "0.4763816", "0.47542864", "0.475078", "0.47455555", "0.47444266", "0.47431928", "0.47431928", "0.47399727", "0.4739827", "0.4739544", "0.4735239", "0.47332639", "0.47329018", "0.47287545", "0.47273698" ]
0.50532913
33
MSH21 not present, MSH16 is valued 'AL'. Three errors, no alert expected.
@Test public void test11() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message11 = new File(classLoader.getResource(message11FileName).getFile()); String messageString = FileUtils.readFileToString(message11); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(3, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo7352a(C1655s sVar, AdError adError);", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2\", \"0xA0182\");\r\n }", "private static akh[] m701a(bgl bgl) {\n int f = bgl != null ? bgl.mo1835f() : 0;\n akh[] akhArr = new akh[f];\n for (int i = 0; i < f; i++) {\n akhArr[i] = bgl.mo1828a(i);\n }\n return akhArr;\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "public void mo1538a(boolean manual) {\n if (manual) {\n C2201w.m8370a((int) C0965R.string.ota_net_error);\n }\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "void mo1507n();", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "C32446a mo21077h() throws Exception;", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S+=4km\", \"0xA0176\");\r\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public abstract void mo38032a(C13281h hVar) throws IOException;", "private void m50421s() {\n if (this.f30709E0 == null && TextUtils.isEmpty(m50429w())) {\n m50375a(this.f30731b0);\n }\n if (TextUtils.isEmpty(m50432x())) {\n m50375a(this.f30732c0);\n }\n if (TextUtils.isEmpty(m50428v())) {\n m50375a(this.f30733d0);\n }\n if (TextUtils.isEmpty(m50433y())) {\n m50375a(this.f30734e0);\n }\n }", "C0832f m5767a() throws C0841b, WDException;", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "void mo1637a();", "void mo1501h();", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M|=3 m\", \"0xA0184\");\r\n }", "public void mo1535a(int code) {\n this.f4002h.mo1526d();\n C2201w.m8370a((int) C0965R.string.ota_download_fail);\n }", "abstract C0451h mo1607e();", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo6081a() {\n }", "public void mo3370l() {\n }", "private void m50396e(String str) {\n C11991a aVar = this.f30754y0;\n if (aVar != null) {\n try {\n aVar.mo41070a(str);\n m50398f(true);\n } catch (PaymentException e) {\n mo38886a((String) null, e.getMessage());\n }\n }\n }", "public CWE getRxa14_AdministeredStrengthUnits() { \r\n\t\tCWE retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S-=4km\", \"0xA0177\");\r\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS+=4km\", \"0xA0176\");\r\n }", "protected void mo6255a() {\n }", "private final void m46517V() {\n if (this.f40707H != null) {\n C15600ck ckVar = this.f40707H.f44224a;\n if (!(ckVar == null || C14793ay.m42898d().mo39086a() == null)) {\n C14793ay.m42898d().mo39086a().mo41449a(ckVar);\n }\n }\n }", "C1458cs mo7613iS();", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "public void mo3723e() {\n if (!this.f1904d.mo3709a()) {\n this.f1901a.mo3741w();\n } else if (this.f1905e.mo3710a().getLevel() == Level.INFECTED) {\n this.f1902b.mo3744b();\n } else {\n this.f1902b.mo3746d();\n }\n }", "bdm mo1784a(akh akh);", "public void mo21783H() {\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M&=varI_M\", \"0xA0183\");\r\n }", "void mo304a(C0366h c0366h);", "protected void mo5421a(String str) {\n C2065a a = C1954e.m4637a(this.b, Integer.valueOf(0), Integer.valueOf(1));\n if (a != null) {\n mo5379a(a);\n } else {\n super.mo5421a(str);\n }\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "private void m81855s() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA1BAF209420E2\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58082n = Integer.parseInt(c);\n }\n } catch (Throwable th) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), th.getMessage());\n this.f58082n = 0;\n }\n if (this.f58082n == 0 && C6969H.m41409d(\"G7E94C254A538A221F3409347FF\").equals(this.f58071c.getHost())) {\n this.f58082n = AppIdRouterHelper.m81728a(this.f58072d.getPath());\n }\n }", "public static int m4329za(String str) {\n int i;\n AppMethodBeat.m2504i(101816);\n C42409s.ayO();\n new String[1][0] = \"dynamicInfo\";\n WxaAttributes zB = C42409s.m75085zB(str);\n String str2 = \"MicroMsg.AppServiceSettingMMManager\";\n String str3 = \"readAppOpendataLocalStorageMaxSizeInBytes, appId = %s, MaxLocalstorageSize = %d\";\n Object[] objArr = new Object[2];\n objArr[0] = str;\n if (zB == null) {\n i = -1;\n } else {\n i = zB.ayK().hib.hid;\n }\n objArr[1] = Integer.valueOf(i);\n C4990ab.m7417i(str2, str3, objArr);\n if (zB != null) {\n i = zB.ayK().hib.hid;\n } else {\n i = 5;\n }\n i *= 1048576;\n AppMethodBeat.m2505o(101816);\n return i;\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S%=3m\", \"0xA0189\");\r\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "int mo27480a();", "public abstract boolean mo40165a(C4217w wVar, C3434fs fsVar);", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "public final void arJ() {\n this.gHW = arl();\n this.gHX = arm();\n if (!C5046bo.isNullOrNil(this.gHW)) {\n if (!this.gHW.equals(this.gHX)) {\n mo53562a(C18796a.TwoPasswordsNotMatch);\n } else if (this.gHW.length() > 16) {\n mo53562a(C18796a.BeyondMaximumLength);\n } else if (C5046bo.amT(this.gHW)) {\n C30379h.m48467g(this, C25738R.string.dkt, C25738R.string.dln);\n } else if (C5046bo.amY(this.gHW)) {\n aqX();\n final C1207m ark = ark();\n C1720g.m3540Rg().mo14541a(ark, 0);\n getString(C25738R.string.f9238tz);\n this.ehJ = mo53561a(this, getString(C25738R.string.dju), new OnCancelListener() {\n public final void onCancel(DialogInterface dialogInterface) {\n AppMethodBeat.m2504i(125566);\n C1720g.m3540Rg().mo14547c(ark);\n AppMethodBeat.m2505o(125566);\n }\n });\n if (aru() && !this.gHY) {\n C4990ab.m7410d(\"MicroMsg.SetPwdUI\", \"cpan settpassword cancel 11868 0\");\n C7060h.pYm.mo8381e(11868, Integer.valueOf(0));\n }\n } else if (this.gHW.length() < 8 || this.gHW.length() >= 16) {\n mo53562a(C18796a.NotReachMinimumLength);\n } else {\n mo53562a(C18796a.DisallowShortNumericPassword);\n }\n }\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM|=3\", \"0xA0184\");\r\n }", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }", "@Test\r\n public void test13()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(21,0,0,5555), 0 , 99, 100);\r\n assertTrue(loan == Consts.HALF_LOAN + Consts.HALF_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 13, correct : 4960, got : \"+ loan);\r\n \t}\r\n }", "@Test\r\n public void testInvalidDecPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"--varS\", \"0xA0173\");\r\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM&=2\", \"0xA0183\");\r\n }", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M/=\\\"Hello\\\"\", \"0xA0179\");\r\n }", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS-=4km\", \"0xA0177\");\r\n }", "public static void m22735h() {\n if (f20301b.mo18963a()) {\n f20301b.mo18962a(C7268n.m22763a().mo18998b());\n }\n }", "C5727e mo33224a();", "public void mo1531a() {\n }", "static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "public final void mo7596sH(String str) {\n }", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>>=varI_M\", \"0xA0188\");\r\n }", "public abstract boolean mo9737c();", "public void mo21870l() {\n this.f24516S = true;\n mo21800a();\n this.f24516S = false;\n }", "public static C7260i m22723a() {\n return f20300a;\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varM*=varM\", \"0xA0178\");\r\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private void m125718m() {\n mo110584h();\n TopicMainViewModel kVar = this.f90217G;\n if (kVar != null) {\n kVar.mo110106a(kVar.mo110112h(), this.f90217G.mo110109e());\n }\n }", "public void validateRpd22s5()\n {\n // This guideline cannot be automatically tested.\n }" ]
[ "0.6054209", "0.58542305", "0.5748732", "0.5734768", "0.5710863", "0.56333417", "0.5610367", "0.56021065", "0.55711657", "0.5524169", "0.5520859", "0.55063516", "0.548001", "0.5478589", "0.547029", "0.5464033", "0.5448373", "0.54445034", "0.5399206", "0.5391242", "0.53771836", "0.5372361", "0.5371049", "0.5370162", "0.53669316", "0.53550255", "0.5351685", "0.53407514", "0.53247917", "0.5319107", "0.5314703", "0.53131866", "0.53095305", "0.5305719", "0.5285943", "0.5283193", "0.5274522", "0.52737606", "0.5270595", "0.5267077", "0.5257204", "0.5255518", "0.5251868", "0.52457625", "0.5244889", "0.52425605", "0.52404577", "0.5240271", "0.5239865", "0.5239705", "0.52373224", "0.52360386", "0.5232699", "0.5219036", "0.5213657", "0.5199854", "0.51964587", "0.5193405", "0.519125", "0.5188019", "0.5187046", "0.51832485", "0.5176056", "0.51631874", "0.51623267", "0.51597595", "0.51579076", "0.51508665", "0.51508665", "0.51508665", "0.51508665", "0.51508665", "0.51508665", "0.51508665", "0.51392955", "0.5128644", "0.5125932", "0.51256204", "0.51190245", "0.51188564", "0.511464", "0.5114613", "0.5111503", "0.51097465", "0.51090217", "0.509975", "0.5099433", "0.5095458", "0.50933343", "0.50911725", "0.50901043", "0.50897527", "0.50831634", "0.50759554", "0.5072008", "0.5070509", "0.5070111", "0.50628996", "0.50621694", "0.50607085" ]
0.5304495
34
MSH21.1 not present, MSH16 valued 'NE'. One error, no alert expected.
@Test public void test12() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message12 = new File(classLoader.getResource(message12FileName).getFile()); String messageString = FileUtils.readFileToString(message12); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S-=4km\", \"0xA0177\");\r\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_KMe2perHmSe4 = 3 mm/ks^3h^2\", \"0xA0182\");\r\n }", "@Test\r\n public void testInvalidMinusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS-=4km\", \"0xA0177\");\r\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S+=4km\", \"0xA0176\");\r\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testNESM() {\n CuteNetlibCase.doTest(\"NESM.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }", "void mo1507n();", "@Test\r\n public void testInvalidMinusPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"-varS\", \"0xA0175\");\r\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M|=3 m\", \"0xA0184\");\r\n }", "@Test\r\n public void testInvalidPlusAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varS+=4km\", \"0xA0176\");\r\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varD_S%=3m\", \"0xA0189\");\r\n }", "@Test\r\n public void testInvalidOrAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM|=3\", \"0xA0184\");\r\n }", "@Test\r\n public void testInvalidDecPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"--varS\", \"0xA0173\");\r\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM&=2\", \"0xA0183\");\r\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidNewHpgn() {\n eckIdServiceUtil.replaceStampseudonym(INVALID_HPGN, validHpgnOld, null);\n }", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M/=\\\"Hello\\\"\", \"0xA0179\");\r\n }", "@Test\r\n public void testInvalidBinaryXorAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M^=3 m\", \"0xA0185\");\r\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidOldHpgn() {\n eckIdServiceUtil.replaceStampseudonym(validHpgnNew, INVALID_HPGN, null);\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "@Test\r\n public void testInvalidRegularAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM = 3 m\", \"0xA0182\");\r\n }", "@Test\r\n public void testInvalidPlusPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"+varS\", \"0xA0174\");\r\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "@Test\r\n public void testInvalidAndAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M&=varI_M\", \"0xA0183\");\r\n }", "static C2395k m11986e() {\n return new C2395k(\"Protocol message contained an invalid tag (zero).\");\n }", "void mo7352a(C1655s sVar, AdError adError);", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M<<=3 m\", \"0xA0187\");\r\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\r\n public void testInvalidDecSuffixExpressionWithSIUnits() throws IOException {\n checkError(\"varS--\", \"0xA0171\");\r\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>>=varI_M\", \"0xA0188\");\r\n }", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varD_S%=3\", \"0xA0189\");\r\n }", "@Test\r\n public void testInvalidBinaryXorAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM^=3 m\", \"0xA0185\");\r\n }", "@Test\r\n public void testInvalidDoubleLeftAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM<<=3\", \"0xA0187\");\r\n }", "C1458cs mo7613iS();", "abstract C0451h mo1607e();", "@Test\r\n public void testInvalidLogicalRightAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM>>>=2\", \"0xA0188\");\r\n }", "@Test\r\n public void testInvalidDoubleRightAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M>>=3m\", \"0xA0186\");\r\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varI_M*=varI_M\", \"0xA0178\");\r\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n // Undeclared exception!\n try { \n EWrapperMsgGenerator.deltaNeutralValidation((-2236), (UnderComp) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.ib.client.EWrapperMsgGenerator\", e);\n }\n }", "@Test\r\n public void testInvalidIncSuffixExpressionWithSIUnits() throws IOException {\n checkError(\"varS++\", \"0xA0170\");\r\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varM*=varM\", \"0xA0178\");\r\n }", "boolean hasUnknown71();", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varM/=varM\", \"0xA0179\");\r\n }", "static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "boolean hasUnknown13();", "public abstract boolean mo36211n();", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(4, (-1897), 0.0, 325.9241391306, 13, 1470.6510545);\n assertEquals(\"id=4 unknown: vol = 0.0 delta = N/A\", string0);\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\r\n public void testInvalidDivideAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varI_M/=varI_M\", \"0xA0179\");\r\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n UnderComp underComp0 = new UnderComp();\n String string0 = EWrapperMsgGenerator.deltaNeutralValidation((-131), underComp0);\n assertEquals(\"id = -131 underComp.conId =0 underComp.delta =0.0 underComp.price =0.0\", string0);\n }", "public boolean mo1517e() {\n return false;\n }", "boolean hasUnknown12();", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "public void mo1538a(boolean manual) {\n if (manual) {\n C2201w.m8370a((int) C0965R.string.ota_net_error);\n }\n }", "@Test\r\n public void testInvalidIncPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"++varS\", \"0xA0172\");\r\n }", "private void m125726u() {\n TopicTabConfig dVar = this.f90230w;\n if (dVar != null && dVar.mo109356a(C6969H.m41409d(\"G608DC108B0\"))) {\n m125696a(true, false);\n }\n }", "C0832f m5767a() throws C0841b, WDException;", "private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }", "@Test\r\n public void test13()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(21,0,0,5555), 0 , 99, 100);\r\n assertTrue(loan == Consts.HALF_LOAN + Consts.HALF_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 13, correct : 4960, got : \"+ loan);\r\n \t}\r\n }", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "static void m14937e(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasUnknown73();", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM2() {\n CuteNetlibCase.doTest(\"SCFXM2.SIF\", \"36660.261564998815\", null, NumberContext.of(7, 4));\n }", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "@Test\r\n public void testInvalidDoubleRightAssignmentExpressionWithSIUnits2() throws IOException {\n checkError(\"varM>>=varM\", \"0xA0186\");\r\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasS7();", "public void v_Verify_Guest7_Hidden(){\n\t}", "@Test\n public void test13() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(98, (-2146523664), 1.0, 0.0, 98, 568.38);\n assertEquals(\"id=98 unknown: vol = 1.0 delta = 0.0\", string0);\n }", "@Test\n public void testEnegeryWOn() {\n byte[] dataBytes = new byte[4];\n dataBytes[0] = (byte) 0x6D; // MSB of Energy Metring Value\n dataBytes[1] = (byte) 0xD6; // LSB of Energy Metring Value Total, 28118\n dataBytes[2] = (byte) 0x01; // Unit of Energy Value\n dataBytes[3] = (byte) 0x0D; // 00001101\n // Servcie Mode: Normal Mode\n // Operation hours flag: No lamp operating hours available\n // Error State: No Error Present\n // Learn Bit: Data Telegram\n // Parameter Mode: Energy metering value\n // Status: 1 ON\n \n Map<EnoceanParameterAddress, Value> values = createBasicPacket(dataBytes);\n \n NumberWithUnit energyValue = (NumberWithUnit) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.ENERGY_METERING_VALUE));\n assertEquals(28118, ((Number) energyValue.getValue()).intValue());\n assertEquals(Unit.WATT, energyValue.getUnit());\n \n OnOffState status = (OnOffState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.POWER));\n assertEquals(OnOffState.ON, status);\n \n ExtendedLightingStatus.ErrorState errorState = (ExtendedLightingStatus.ErrorState) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.ERROR_STATE));\n assertEquals(ExtendedLightingStatus.ErrorState.NO_ERROR, errorState);\n \n ExtendedLightingStatus.OperationHoursFlag opHourFlag = (ExtendedLightingStatus.OperationHoursFlag) values.get(new EnoceanParameterAddress(sourceEnoceanId, Parameter.OPERATIONS_HOURS_FLAG));\n assertEquals(ExtendedLightingStatus.OperationHoursFlag.HOURS_NOT_AVAILABLE, opHourFlag);\n }", "@Test\n public void testAircraftPartNoNotApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787\";\n\n // verify on wing engine 777 is applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice((-1403), 2125570549, 4832, 4832);\n assertEquals(\"id=-1403 unknown=4832.0 canAutoExecute\", string0);\n }", "public static C0575e m1628a(String str) {\n return f1306d.get(str);\n }", "public void v_Verify_Guest6_Hidden(){\n\t}", "@Test\r\n public void testInvalidModuloAssignmentExpressionWithSIUnits3() throws IOException {\n checkError(\"varS%=3\", \"0xA0189\");\r\n }", "@Test\r\n public void test6() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(57,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.ZERO);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 6, correct : 0, got : \"+ loan);\r\n \t}\r\n \r\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(1, 13, 13.0, 706.315725916565, (-2212.473042787062), 1.7976931348623157E308);\n assertEquals(\"id=1 modelOptComp: vol = 13.0 delta = N/A: modelPrice = N/A: pvDividend = N/A\", string0);\n }", "boolean hasUnknown72();", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void creation_with_sensor_mac_not_valid()\n {\n Exception exception2=assertThrows(IllegalArgumentException.class,()->{\n Switch s=new Switch(\"B8:27:EB:B7:E3:4C\",\n \"D8:F1:5B:8D:33:\",\n \"stat/\",\n \"stat/B8:27:EB:B7:E3:4C/D8:F1:5B:8D:33:BF/POWER\",\n \"OFF\",\n \"POWER\",\n 0,\n new Timestamp(0));\n });\n String expectedMessage = \"il mac del sensore deve essere valido!\";\n String actualMessage = exception2.getMessage();\n assertTrue(actualMessage.contains(expectedMessage));\n }", "private String m29111g() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n String string = cVar.getString(\"UTDID2\");\n if (!C6804i.m29033a(string) && this.f22552a.mo32716a(string) != null) {\n return string;\n }\n }\n return null;\n }", "public static C2573hn m5600a(boolean z, boolean z2) {\n C2573hn hnVar;\n String str = \"\\\"\";\n Context c = C2505gd.m5298c();\n if (c == null) {\n return null;\n }\n try {\n WifiInfo connectionInfo = ((WifiManager) c.getSystemService(TapjoyConstants.TJC_CONNECTION_TYPE_WIFI)).getConnectionInfo();\n if (connectionInfo != null) {\n String bssid = connectionInfo.getBSSID();\n String ssid = connectionInfo.getSSID();\n if (bssid != null && !m5603a(z, ssid)) {\n hnVar = new C2573hn();\n try {\n hnVar.f5675a = m5599a(bssid);\n String substring = (ssid == null || !ssid.startsWith(str) || !ssid.endsWith(str)) ? ssid : ssid.substring(1, ssid.length() - 1);\n if (z2) {\n substring = null;\n }\n hnVar.f5676b = substring;\n hnVar.f5677c = connectionInfo.getRssi();\n hnVar.f5678d = connectionInfo.getIpAddress();\n } catch (Exception e) {\n e = e;\n C2463fd.m5161a().mo28382a(new C2495fz(e));\n return hnVar;\n }\n return hnVar;\n }\n }\n hnVar = null;\n } catch (Exception e2) {\n e = e2;\n hnVar = null;\n C2463fd.m5161a().mo28382a(new C2495fz(e));\n return hnVar;\n }\n return hnVar;\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "void mo7357e(C1655s sVar);", "void mo15005a(C4143se seVar);", "public void setHeardPercentNE(double heardPercentNE) {\n this.heardPercentNE = heardPercentNE;\n }", "public String getMlSdef16() {\n return mlSdef16;\n }" ]
[ "0.584148", "0.5744597", "0.57345164", "0.5711805", "0.5711552", "0.56838316", "0.5683623", "0.5682532", "0.56523746", "0.5623423", "0.56200755", "0.5588116", "0.5541649", "0.55366135", "0.5521495", "0.5489406", "0.5474654", "0.5474548", "0.5470106", "0.54674596", "0.54652536", "0.54594105", "0.54468817", "0.5431871", "0.5429181", "0.5427933", "0.54276794", "0.5424869", "0.5424585", "0.54089487", "0.5397069", "0.5385707", "0.5385121", "0.5384396", "0.5376175", "0.532314", "0.5305863", "0.5290402", "0.5281144", "0.5272849", "0.5266859", "0.526571", "0.52613103", "0.52555305", "0.52428514", "0.5239961", "0.5229405", "0.52036524", "0.5197853", "0.51963866", "0.5194689", "0.5183145", "0.518284", "0.51733166", "0.51605177", "0.5146821", "0.5128604", "0.51106066", "0.5105759", "0.5092153", "0.5079532", "0.5078052", "0.5076839", "0.5072213", "0.50720567", "0.5069475", "0.5066976", "0.5056832", "0.50552475", "0.5054018", "0.5050316", "0.50483733", "0.5047704", "0.5042039", "0.5040727", "0.5038973", "0.50367725", "0.50352883", "0.50350326", "0.50346285", "0.5034288", "0.5032995", "0.50310344", "0.5028037", "0.50244737", "0.50209206", "0.5020376", "0.5020196", "0.5018877", "0.5012279", "0.5004998", "0.50009894", "0.5000745", "0.500041", "0.49926615", "0.49843073", "0.49785683", "0.497807", "0.4969822", "0.49664608" ]
0.5130154
56
MSH21.1 not present, MSH16 not present. One error, no alert expected.
@Test public void test13() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message13 = new File(classLoader.getResource(message13FileName).getFile()); String messageString = FileUtils.readFileToString(message13); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(1, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "C32446a mo21077h() throws Exception;", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void m5015e() {\n if (C1663a.m5979a().m5993N() && (this.f3996b == null || \"\".equals(this.f3996b))) {\n C2201w.m8371a((int) C0965R.string.ota_low_version, 0);\n } else {\n this.f3997c.m4989a();\n }\n }", "public void validateRpd13s12()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "public static String m114841h() {\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.GetEffectVersionFromLib)) {\n return \"6.0.0\";\n }\n return C45252ac.m142769b();\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1507n();", "private final void m6487e() throws C0918i {\n try {\n WDAppManager.m2565a(f2486z[4], f2486z[5]);\n } catch (C0653m e) {\n throw new C0918i((int) C0607n.wd, e.getMessage());\n }\n }", "public void validateRpd13s15()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "static String m3302v() throws C1108a {\n if (f3067ki != null) {\n return f3067ki;\n }\n throw new C1108a();\n }", "public void validateRpd13s8()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd7s2()\n {\n // This guideline cannot be automatically tested.\n }", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "public void validateRpd8s13()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s13()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd8s21()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo55177a() {\n long unused = C3615m3.this.f1452k = System.currentTimeMillis();\n if (C3615m3.this.f1443b) {\n C3615m3.this.m1171c(new MDExternalError(MDExternalError.ExternalError.SDK_INITIALIZATION_IN_PROGRESS), this.f1467a);\n } else if (!C3615m3.this.f1447f.mo55921b() || C3615m3.this.f1447f.mo55918a()) {\n C3615m3.this.f1449h.updateFilePath(C3595k3.m1060d().mo55511a());\n boolean unused2 = C3615m3.this.f1443b = true;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n if (C3723s4.m1629b() || C3723s4.m1628a()) {\n C3490e3.m665e(\"SDK Upgrade - delete UUID and local configuration storage\");\n C3661o5.m1405a();\n Pair<String, Boolean> a = C3729t0.m1642a();\n if (a != null) {\n AnalyticsBridge.getInstance().reportDeleteStorageEvent((String) a.first, ((Boolean) a.second).booleanValue());\n }\n }\n C3723s4.m1630c();\n C3615m3.this.m1172c(this.f1467a);\n C3580j createApiToken = ModelFactory.getInstance().createApiToken(this.f1468b);\n if (createApiToken == null) {\n boolean unused3 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1158a((C3665p2) new C3593k1(C3586j3.C3587a.API_TOKEN_PARSE_ERROR), this.f1467a);\n C3615m3.this.clearAndDisconnect();\n } else if (!C3615m3.this.f1442a || C3604l2.m1115c().mo55538b() == null || !C3604l2.m1115c().mo55538b().mo55850a().equals(createApiToken.mo55850a())) {\n C3604l2.m1115c().mo55537a(createApiToken);\n if (!C3604l2.m1115c().mo55538b().mo55850a().equals(C3659o3.m1391f().mo55687a(C3815z4.C3816a.API_TOKEN))) {\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.API_TOKEN, C3604l2.m1115c().mo55538b().mo55850a());\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.ACCESS_TOKEN, (String) null);\n }\n C3490e3.m665e(\"SDK init started\");\n AnalyticsBridge.getInstance().reportInitEvent();\n C3767w0.m1812b().mo55893a();\n C3646n3.m1337m().mo55661a(60000, 3, 60000, 0, 512, 3);\n C3615m3.this.m1150a(this.f1467a);\n } else {\n boolean unused4 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_ALREADY_INITIALIZED), this.f1467a);\n }\n } else {\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_KILLED), this.f1467a);\n C3461c3.m562g().clearAndDisconnect();\n }\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void validateRpd22s5()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "void mo7352a(C1655s sVar, AdError adError);", "public void validateRpd13s9()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1501h();", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "public void testGetManagementSpecVersion() {\n String specVersion = mb.getManagementSpecVersion();\n assertNotNull(specVersion);\n assertTrue(specVersion.length() > 0);\n }", "public void validateRpd13s2()\n {\n // This guideline cannot be automatically tested.\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "public void validateRpd2s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void mo21783H() {\n }", "public void validateRpd13s10()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasS7();", "C0832f m5767a() throws C0841b, WDException;", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd8s23()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd15s5()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "public void validateRpd13s14()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "public void validateRpd3s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s9()\n {\n // This guideline cannot be automatically tested.\n }", "private static void m114826a(Application application, C35577n nVar) {\n f93238a = application;\n f93224F = nVar;\n f93239b = nVar.mo70085S();\n f93233O = new C35572j(application);\n f93240c = f93224F.mo70102q();\n f93241d = f93224F.mo70103r();\n f93242e = f93224F.mo70104s();\n f93243f = f93224F.mo70105t();\n f93244g = (C35582r) C17439m.m57962a(f93224F.mo70106u());\n f93245h = f93224F.mo70107v();\n f93246i = f93224F.mo70086a();\n f93256s = f93224F.mo70108w();\n f93257t = f93224F.mo70109x();\n f93247j = f93224F.mo70110y();\n f93248k = f93224F.mo70111z();\n f93249l = f93224F.mo70067A();\n f93250m = f93224F.mo70068B();\n f93251n = f93224F.mo70069C();\n f93252o = f93224F.mo70070D();\n f93258u = f93224F.mo70071E();\n f93259v = f93224F.mo70072F();\n f93260w = f93224F.mo70073G();\n f93261x = f93224F.mo70074H();\n f93262y = f93224F.mo70075I();\n f93263z = f93224F.mo70076J();\n f93219A = f93224F.mo70077K();\n f93220B = f93224F.mo70078L();\n f93221C = f93224F.mo70079M();\n f93222D = f93224F.mo70080N();\n f93223E = f93224F.mo70087b();\n f93225G = f93224F.mo70081O();\n f93226H = f93224F.mo70082P();\n f93227I = f93224F.mo70084R();\n f93228J = f93224F.mo70083Q();\n f93230L = f93224F.mo70091f();\n f93253p = new C35621k();\n f93231M = f93224F.mo70096k();\n f93254q = new C35619i();\n f93255r = new C35613e();\n f93232N = new C36963h();\n f93229K = (IIntegrationService) ServiceManager.get().getService(IIntegrationService.class);\n if (f93231M.mo93305a(Property.LoadLibraryFromExternal)) {\n TENativeLibsLoader.m67982a((C20488d) new C47452c(application, new C20486b()));\n }\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "protected void mo6255a() {\n }", "private void m50366E() {\n }", "private void m125726u() {\n TopicTabConfig dVar = this.f90230w;\n if (dVar != null && dVar.mo109356a(C6969H.m41409d(\"G608DC108B0\"))) {\n m125696a(true, false);\n }\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo6081a() {\n }", "public void validateRpd16s3()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\r\n public void testInvalidMultAssignmentExpressionWithSIUnits1() throws IOException {\n checkError(\"varI_M*=\\\"Hello\\\"\", \"0xA0178\");\r\n }", "public void validateRpd22s9()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }", "public void v_Verify_Guest7_Hidden(){\n\t}", "public void validateRpd6s2()\n {\n // This guideline cannot be automatically tested.\n }", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "public void validateRpd11s8()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd22s8()\n {\n // This guideline cannot be automatically tested.\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "abstract C0451h mo1607e();", "public void validateRpd22s1()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd3s12()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void testAircraftPartNoNotApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787\";\n\n // verify on wing engine 777 is applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }", "private void m50421s() {\n if (this.f30709E0 == null && TextUtils.isEmpty(m50429w())) {\n m50375a(this.f30731b0);\n }\n if (TextUtils.isEmpty(m50432x())) {\n m50375a(this.f30732c0);\n }\n if (TextUtils.isEmpty(m50428v())) {\n m50375a(this.f30733d0);\n }\n if (TextUtils.isEmpty(m50433y())) {\n m50375a(this.f30734e0);\n }\n }", "public void validateRpd15s1()\n {\n // This guideline cannot be automatically tested.\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "public void mo55254a() {\n }", "boolean hasUnknown71();", "public abstract boolean mo9737c();", "public void validateRpd3s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd8s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void m23075a() {\n }", "public void m7211c() {\n /*\n r34 = this;\n r16 = 0;\n r15 = 0;\n r5 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case -1172269795: goto L_0x002e;\n case 2157948: goto L_0x0038;\n case 2571565: goto L_0x0024;\n default: goto L_0x0018;\n };\n L_0x0018:\n r2 = r3;\n L_0x0019:\n switch(r2) {\n case 0: goto L_0x0042;\n case 1: goto L_0x0162;\n case 2: goto L_0x01a9;\n default: goto L_0x001c;\n };\n L_0x001c:\n r2 = \"Undefined type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n L_0x0023:\n return;\n L_0x0024:\n r4 = \"TEXT\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x002c:\n r2 = 0;\n goto L_0x0019;\n L_0x002e:\n r4 = \"STICKER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0036:\n r2 = 1;\n goto L_0x0019;\n L_0x0038:\n r4 = \"FILE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x0018;\n L_0x0040:\n r2 = 2;\n goto L_0x0019;\n L_0x0042:\n r4 = mobi.mmdt.ott.provider.p169c.C1594n.TEXT;\n r33 = r5;\n L_0x0046:\n r8 = mobi.mmdt.componentsutils.p079a.p084e.C1113a.m6421a();\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.IN;\n r0 = r34;\n r2 = r0.f4758b;\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.p109d.p111b.C1309a.m6934a(r3);\n r3 = r3.m6942b();\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x0064;\n L_0x0062:\n r10 = mobi.mmdt.ott.provider.p169c.C1592l.OUT;\n L_0x0064:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m7972a(r2, r3, r10);\n if (r2 != 0) goto L_0x0023;\n L_0x0072:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n if (r2 == 0) goto L_0x008a;\n L_0x007a:\n r2 = mobi.mmdt.ott.MyApplication.m6445a();\n r2 = r2.f4177h;\n r0 = r34;\n r3 = r0.f4759c;\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x024e;\n L_0x008a:\n r17 = 0;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x00b8;\n L_0x0098:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x00b8;\n L_0x00aa:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r17 = r2;\n L_0x00b8:\n r2 = new mobi.mmdt.ott.d.a.b;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.NOT_READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n r2.<init>(r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16, r17);\n r0 = r34;\n r3 = r0.f4757a;\n r3 = mobi.mmdt.ott.logic.p157e.C1509a.m7621a(r3);\n r0 = r34;\n r4 = r0.f4762f;\n r0 = r33;\n r3.m7626a(r2, r0, r4);\n L_0x00f2:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n if (r2 == 0) goto L_0x013c;\n L_0x00fe:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r2 = r2.isEmpty();\n if (r2 != 0) goto L_0x013c;\n L_0x0110:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"REPLY_ON_MESSAGE_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n mobi.mmdt.ott.provider.p169c.C1583c.m7976b(r3, r4, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r2 = mobi.mmdt.ott.provider.p169c.C1583c.m8003n(r3, r2);\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4761e;\n r5 = mobi.mmdt.ott.provider.p169c.C1595o.SINGLE;\n mobi.mmdt.ott.logic.p112a.p120c.p121a.p123b.C1387u.m7218a(r3, r4, r2, r5);\n L_0x013c:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"MINOR_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = \"TEXT\";\n r2 = r2.equals(r3);\n if (r2 != 0) goto L_0x0023;\n L_0x0150:\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.b;\n r0 = r34;\n r3 = r0.f4757a;\n r0 = r34;\n r4 = r0.f4762f;\n r2.<init>(r3, r15, r4);\n mobi.mmdt.ott.logic.C1494c.m7541c(r2);\n goto L_0x0023;\n L_0x0162:\n r6 = mobi.mmdt.ott.provider.p169c.C1594n.STICKER;\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"STICKER_ID\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r0 = r34;\n r3 = r0.f4762f;\n r4 = \"STICKER_PACKAGE_ID\";\n r3 = r3.get(r4);\n r3 = (java.lang.String) r3;\n r0 = r34;\n r4 = r0.f4762f;\n r7 = \"STICKER_VERSION\";\n r4 = r4.get(r7);\n r4 = (java.lang.String) r4;\n if (r4 == 0) goto L_0x02c9;\n L_0x018a:\n if (r2 == 0) goto L_0x02c9;\n L_0x018c:\n if (r3 == 0) goto L_0x02c9;\n L_0x018e:\n r7 = r4.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x0194:\n r7 = r2.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x019a:\n r7 = r3.isEmpty();\n if (r7 != 0) goto L_0x02c9;\n L_0x01a0:\n r16 = mobi.mmdt.ott.provider.p174h.C1629b.m8295a(r4, r3, r2);\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n L_0x01a9:\n r0 = r34;\n r2 = r0.f4762f;\n r3 = \"FILE_TYPE\";\n r2 = r2.get(r3);\n r2 = (java.lang.String) r2;\n r3 = -1;\n r4 = r2.hashCode();\n switch(r4) {\n case 327328941: goto L_0x01de;\n case 796404377: goto L_0x01ca;\n case 802160718: goto L_0x01e8;\n case 808293817: goto L_0x01d4;\n default: goto L_0x01bd;\n };\n L_0x01bd:\n r2 = r3;\n L_0x01be:\n switch(r2) {\n case 0: goto L_0x01f2;\n case 1: goto L_0x020c;\n case 2: goto L_0x0222;\n case 3: goto L_0x0238;\n default: goto L_0x01c1;\n };\n L_0x01c1:\n r2 = \"Undefined file type\";\n r0 = r34;\n mobi.mmdt.componentsutils.p079a.p080a.C1104b.m6366b(r0, r2);\n goto L_0x0023;\n L_0x01ca:\n r4 = \"FILE_TYPE_IMAGE\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01d2:\n r2 = 0;\n goto L_0x01be;\n L_0x01d4:\n r4 = \"FILE_TYPE_VIDEO\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01dc:\n r2 = 1;\n goto L_0x01be;\n L_0x01de:\n r4 = \"FILE_TYPE_PUSH_TO_TALK\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01e6:\n r2 = 2;\n goto L_0x01be;\n L_0x01e8:\n r4 = \"FILE_TYPE_OTHER\";\n r2 = r2.equals(r4);\n if (r2 == 0) goto L_0x01bd;\n L_0x01f0:\n r2 = 3;\n goto L_0x01be;\n L_0x01f2:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.IMAGE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.IMAGE;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n L_0x0207:\n r33 = r2;\n r4 = r3;\n goto L_0x0046;\n L_0x020c:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.VIDEO;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.VIDEO;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0222:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.PUSH_TO_TALK;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.PUSH_TO_TALK;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x0238:\n r3 = mobi.mmdt.ott.provider.p169c.C1594n.FILE;\n r2 = new mobi.mmdt.ott.logic.a.c.a.b.h;\n r0 = r34;\n r4 = r0.f4757a;\n r0 = r34;\n r5 = r0.f4762f;\n r6 = mobi.mmdt.ott.provider.p170d.C1605j.OTHER;\n r2.<init>(r4, r5, r6);\n r2 = r2.m7152a();\n goto L_0x0207;\n L_0x024e:\n if (r33 == 0) goto L_0x029c;\n L_0x0250:\n r0 = r34;\n r0 = r0.f4757a;\n r18 = r0;\n r19 = r33.m8082n();\n r20 = r33.m8069a();\n r21 = r33.m8079k();\n r22 = r33.m8073e();\n r23 = r33.m8078j();\n r24 = r33.m8077i();\n r26 = 0;\n r27 = r33.m8081m();\n r28 = r33.m8080l();\n r29 = r33.m8075g();\n r30 = r33.m8071c();\n r31 = r33.m8072d();\n r32 = r33.m8070b();\n r33 = r33.m8074f();\n r2 = mobi.mmdt.ott.provider.p170d.C1598c.m8100a(r18, r19, r20, r21, r22, r23, r24, r26, r27, r28, r29, r30, r31, r32, r33);\n r2 = r2.getLastPathSegment();\n r2 = java.lang.Long.parseLong(r2);\n r15 = java.lang.Long.valueOf(r2);\n L_0x029c:\n r0 = r34;\n r2 = r0.f4757a;\n r0 = r34;\n r3 = r0.f4761e;\n r0 = r34;\n r5 = r0.f4760d;\n r0 = r34;\n r6 = r0.f4762f;\n r7 = \"SEND_TIME_IN_GMT\";\n r6 = r6.get(r7);\n r6 = (java.lang.String) r6;\n r6 = java.lang.Long.parseLong(r6);\n r11 = mobi.mmdt.ott.provider.p169c.C1593m.READ;\n r0 = r34;\n r12 = r0.f4759c;\n r13 = mobi.mmdt.ott.provider.p169c.C1595o.GROUP;\n r0 = r34;\n r14 = r0.f4758b;\n mobi.mmdt.ott.provider.p169c.C1583c.m7966a(r2, r3, r4, r5, r6, r8, r10, r11, r12, r13, r14, r15, r16);\n goto L_0x00f2;\n L_0x02c9:\n r33 = r5;\n r4 = r6;\n goto L_0x0046;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: mobi.mmdt.ott.logic.a.c.a.b.s.c():void\");\n }", "static void m14937e(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }", "public void validateRpd15s2()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd3s14()\n {\n // This guideline cannot be automatically tested.\n }" ]
[ "0.5801291", "0.57316214", "0.57235587", "0.5721573", "0.5703738", "0.5700092", "0.56535363", "0.5650405", "0.56209844", "0.5606911", "0.5595981", "0.5594909", "0.55779505", "0.5574252", "0.5546643", "0.5544935", "0.55351245", "0.55204713", "0.55070275", "0.5504566", "0.5502388", "0.5489941", "0.54739", "0.5468185", "0.54337126", "0.5419613", "0.5413616", "0.539645", "0.53892964", "0.538764", "0.53865045", "0.5379753", "0.53777343", "0.537619", "0.53566927", "0.53506243", "0.5350602", "0.5350508", "0.5345904", "0.5342361", "0.53411955", "0.53304476", "0.5313834", "0.53114396", "0.5304548", "0.5303811", "0.52998424", "0.52905947", "0.5286303", "0.526474", "0.5245002", "0.52419674", "0.52377117", "0.5219697", "0.5219042", "0.52161944", "0.5200411", "0.51950425", "0.51891863", "0.51741195", "0.5166066", "0.5165196", "0.51650596", "0.51650596", "0.51650596", "0.51650596", "0.51650596", "0.51650596", "0.51650596", "0.5163208", "0.5158586", "0.5157108", "0.5156186", "0.51505435", "0.51373875", "0.5136404", "0.51358867", "0.51349765", "0.512485", "0.5123437", "0.51219106", "0.5118497", "0.511595", "0.51137745", "0.5112433", "0.51095283", "0.51077163", "0.51061153", "0.51035905", "0.50950176", "0.5093235", "0.50906706", "0.50885475", "0.5088271", "0.50833666", "0.50831157", "0.5074129", "0.50649995", "0.50645936", "0.5057481" ]
0.5512753
18
MSH21.1 present, but different from 'PHLabReportAck', MSH16 valued 'NE'. No error, no alert expected.
@Test public void test14() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message14 = new File(classLoader.getResource(message14FileName).getFile()); String messageString = FileUtils.readFileToString(message14); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "void mo1507n();", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "public C3244x1 mo12670e(String str) {\n C3244x1 x1Var = new C3244x1();\n if (str == null) {\n x1Var.mo12656a(510);\n x1Var.mo12658a(\"Event Name is null\");\n return x1Var;\n }\n for (String equalsIgnoreCase : f11728d) {\n if (str.equalsIgnoreCase(equalsIgnoreCase)) {\n x1Var.mo12656a((int) C0986h.f4408j);\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(\" is a restricted event name. Last event aborted.\");\n x1Var.mo12658a(sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(str);\n sb2.append(\" is a restricted system event name. Last event aborted.\");\n C3111h1.m14938f(sb2.toString());\n return x1Var;\n }\n }\n return x1Var;\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "boolean hasUnknown13();", "public OctetString getMsg1015()\n {\n\treturn this.msg1015;\n }", "boolean hasUnknown71();", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public OctetString getMsg1016()\n {\n\treturn this.msg1016;\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public void testParsing() throws Exception {\n Message message = new Message(\"8=FIX.4.2\\0019=40\\00135=A\\001\"\n + \"98=0\\001384=2\\001372=D\\001385=R\\001372=8\\001385=S\\00110=96\\001\",\n DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"40\", BodyLength.FIELD);\n assertEquals(\"wrong field value\", 40, message.getHeader().getInt(BodyLength.FIELD));\n assertHeaderField(message, \"A\", MsgType.FIELD);\n assertBodyField(message, \"0\", EncryptMethod.FIELD);\n assertTrailerField(message, \"96\", CheckSum.FIELD);\n NoMsgTypes valueMessageType = new Logon.NoMsgTypes();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"D\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"R\", valueMessageType.getString(MsgDirection.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"8\", valueMessageType.getString(RefMsgType.FIELD));\n assertEquals(\"wrong value\", \"S\", valueMessageType.getString(MsgDirection.FIELD));\n }", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n String string0 = EWrapperMsgGenerator.receiveFA((-510), \"askExch\");\n assertEquals(\"FA: null askExch\", string0);\n }", "@Test\n public void t10() {\n try {\n sampleRule = \"&8=\\\"FIX.4.2Aqua\\\";&9000[0]->&9001=\\\"D\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(TestCustomDictionary.customMsg42, \"FIX.4.2Aqua\"); // System.out.println(result);\n resultStore = StaticTestingUtils.parseMessage(result);\n String r = resultStore.get(\"9001\").get(0);\n Assert.assertEquals(r, \"D\");\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2Aqua\");\n System.out.println(StaticTestingUtils.rs(result));\n sampleRule = \"&8=\\\"FIX.4.2\\\"\";\n rules = new InfixActions(sampleRule);\n result = rules.transformFIXMsg(result, \"FIX.4.2Aqua\");\n resultStore = StaticTestingUtils.parseMessage(result);\n r = resultStore.get(\"8\").get(0);\n Assert.assertEquals(r, \"FIX.4.2\");\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n }", "static C2395k m11986e() {\n return new C2395k(\"Protocol message contained an invalid tag (zero).\");\n }", "public void mo1534c() {\n C2201w.m8371a((int) C0965R.string.ota_send_fail, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "void mo7352a(C1655s sVar, AdError adError);", "@Override\n public String getMessage() {\n String chuoi=\"\";\n if (maCD.length()!=5)\n chuoi=\"MaCD bao gom 5 ki tu\";\n else if (soBaiHat<10)\n chuoi=\"So bai hat phai lon hon 10 bai\";\n return\n chuoi;\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n UnderComp underComp0 = new UnderComp();\n String string0 = EWrapperMsgGenerator.deltaNeutralValidation((-131), underComp0);\n assertEquals(\"id = -131 underComp.conId =0 underComp.delta =0.0 underComp.price =0.0\", string0);\n }", "public int checkForAlert() {\n return 0;\n }", "private static String m20561a(C6709k kVar) {\n if (kVar.mo16134k()) {\n C6712o o = kVar.mo16138o();\n if (o.mo16159q()) {\n return String.valueOf(o.mo15997b());\n }\n if (o.mo16156a()) {\n return Boolean.toString(o.mo16004h());\n }\n if (o.mo16160r()) {\n return o.mo15998c();\n }\n throw new AssertionError();\n } else if (kVar.mo16135l()) {\n return TEVideoRecorder.FACE_BEAUTY_NULL;\n } else {\n throw new AssertionError();\n }\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "boolean hasUnknown12();", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "static C2395k m11987f() {\n return new C2395k(\"Protocol message end-group tag did not match expected tag.\");\n }", "boolean hasJsonAckMsg();", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public OctetString getMsg1019()\n {\n\treturn this.msg1019;\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "private static byte[] getLsfileaeMessage100() throws HeaderPartException, HostMessageFormatException {\r\n Map < String, Object > map = new HashMap < String, Object >();\r\n map.put(Constants.CICS_PROGRAM_NAME_KEY, \"LSFILEAE\");\r\n map.put(Constants.CICS_LENGTH_KEY, \"79\");\r\n map.put(Constants.CICS_DATALEN_KEY, \"6\");\r\n \r\n LegStarMessage legstarMessage = new LegStarMessage();\r\n legstarMessage.setHeaderPart(new LegStarHeaderPart(map, 0));\r\n legstarMessage.addDataPart(new CommareaPart(\r\n HostData.toByteArray(LsfileaeCases.getHostBytesHexRequest100())));\r\n return legstarMessage.toByteArray();\r\n\r\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "@Test\r\n public void test4() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(47,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY); \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 4, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "String mo7388hl() throws RemoteException;", "@Test(timeout = 4000)\n public void test16() throws Throwable {\n Contract contract0 = new Contract();\n String string0 = EWrapperMsgGenerator.contractMsg(contract0);\n assertEquals(\"conid = 0\\nsymbol = null\\nsecType = null\\nexpiry = null\\nstrike = 0.0\\nright = null\\nmultiplier = null\\nexchange = null\\nprimaryExch = null\\ncurrency = null\\nlocalSymbol = null\\n\", string0);\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "public OctetString getMsg1013()\n {\n\treturn this.msg1013;\n }", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "public OctetString getMsg1012()\n {\n\treturn this.msg1012;\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "@Test\r\n public void test13()\r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(21,0,0,5555), 0 , 99, 100);\r\n assertTrue(loan == Consts.HALF_LOAN + Consts.HALF_SUBSIDY);\r\n \t\t\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 13, correct : 4960, got : \"+ loan);\r\n \t}\r\n }", "int getClientMsgNo();", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "void mo23214a(Message message);", "boolean hasUnknown72();", "@Test\r\n public void testInvalidDecPrefixExpressionWithSIUnits() throws IOException {\n checkError(\"--varS\", \"0xA0173\");\r\n }", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }", "@Test\r\n public void test5() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(56,0,0,5555), 0 , 100, 100);\r\n assertTrue(loan == Consts.FULL_SUBSIDY);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 5, correct : 2816, got : \"+ loan);\r\n \t}\r\n }", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasUnknown73();", "@Test\n public void testAircraftPartNoNotApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787\";\n\n // verify on wing engine 777 is applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "public static void m29980i() {\n String str = \"TpnsChannel\";\n try {\n long currentTimeMillis = System.currentTimeMillis();\n if (f23269d == 0) {\n f23269d = currentTimeMillis;\n } else if (currentTimeMillis - f23269d < 30000) {\n return;\n }\n if (C6973b.m29776f() != null) {\n JSONObject jSONObject = new JSONObject();\n jSONObject.put(\"srv_stime\", XGPushServiceV4.f23078a);\n jSONObject.put(\"srv_etime\", System.currentTimeMillis());\n jSONObject.put(\"srv_startTime\", XGPushServiceV4.f23079b);\n if (XGPushServiceV4.f23080c != null) {\n jSONObject.put(\"srv_freason\", XGPushServiceV4.f23080c);\n }\n jSONObject.put(\"hb_suc\", f23267b);\n jSONObject.put(\"hb_failed\", f23268c);\n if (f23273h != null) {\n jSONObject.put(\"hb_freason\", f23273h);\n }\n jSONObject.put(\"con_suc\", f23270e);\n jSONObject.put(\"con_failed\", f23271f);\n if (f23272g != null) {\n jSONObject.put(\"con_freason\", f23272g);\n }\n C7055h.m30172b(C6973b.m29776f(), \"service_state\", jSONObject.toString());\n f23269d = currentTimeMillis;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Service bi state \");\n sb.append(jSONObject.toString());\n C6864a.m29303e(str, sb.toString());\n }\n } catch (Throwable th) {\n C6864a.m29302d(str, \"saveBIReportJson \", th);\n }\n }", "@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidNewHpgn() {\n eckIdServiceUtil.replaceStampseudonym(INVALID_HPGN, validHpgnOld, null);\n }", "@Test\n void shouldGenerateTheFixMessage()\n {\n assertThat(\n new String(asciiFixBody(\"FIX.4.2\", \"35=5^49=SellSide^56=BuySide^34=3^52=20190606-09:25:34.329^58=Logout acknowledgement^\")))\n .isEqualTo(\"8=FIX.4.2\\u00019=84\\u000135=5\\u000149=SellSide\\u000156=BuySide\\u000134=3\\u000152=20190606-09:25:34.329\\u000158=Logout acknowledgement\\u000110=079\\u0001\");\n }", "String mo7390hn() throws RemoteException;", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickPrice((-1403), 2125570549, 4832, 4832);\n assertEquals(\"id=-1403 unknown=4832.0 canAutoExecute\", string0);\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickEFP((-332), 3019, 3019, \" O$eJD37wtu6S%m\", 0.0, (-332), \"y:@Ly}w'&Wy\", (-332), 3019);\n assertEquals(\"id=-332 unknown: basisPoints = 3019.0/ O$eJD37wtu6S%m impliedFuture = 0.0 holdDays = -332 futureExpiry = y:@Ly}w'&Wy dividendImpact = -332.0 dividends to expiry = 3019.0\", string0);\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "@Test\n @Tag(\"bm1000\")\n public void testSCFXM1() {\n CuteNetlibCase.doTest(\"SCFXM1.SIF\", \"18416.75902834894\", null, NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n String string0 = EWrapperMsgGenerator.fundamentalData((-1622103582), \"convertible = \");\n assertEquals(\"id = -1622103582 len = 14\\nconvertible = \", string0);\n }", "public OctetString getMsg1006()\n {\n\treturn this.msg1006;\n }", "private String m50428v() {\n if (TextUtils.isEmpty(this.f30737h0.getText().toString())) {\n return this.f30720S.getString(C10232R.string.payment_error_blank_field);\n }\n return !CardPaymentParams.m53958j(this.f30737h0.getText().toString().trim()) ? this.f30720S.getString(C10232R.string.payment_error_security_code_invalid) : \"\";\n }", "static int type_of_sphl(String passed){\n\t\treturn 1;\n\t}", "public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}", "public interface nndmMessage_Out\n{\n\n /**\n * Status flag to indicate that a message is ready for retreival from message\n * out queue and to be transformed into a disease-specific message\n * format - value is <code> A </code> .\n */\n public static final String READY_FOR_TRANSFORM_STATUS = \"RDY_FOR_TRNSFRM\";\n\n /**\n * Status flag to indicate that a message is in the process of being transformed\n * into a disease-specific message format - value is <code> TRNSFRM_IN_PROG </code> .\n */\n public static final String TRANSFORM_IN_PROGRESS_STATUS = \"TRNSFRM_IN_PROG\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> TRNSFRM_COMP </code> .\n */\n public static final String TRANSFORM_COMPLETE_STATUS = \"TRNSFRM_COMP\";\n\n\n /**\n * Status flag to indicate that an error has occurred while transforming a\n * message into a disease-specific message format, (transformation unsuccessful)\n * - value is <code> TRNSFRM_ERR </code> .\n */\n public static final String TRANSFORM_ERROR_STATUS = \"TRNSFRM_ERR\";\n\n\n /**\n * Status flag to indicate that an error has occurred while <i> transporting </i> a\n * a disease-specific message to the transport out queue, (write to queue failed),\n * or, the ebXML application errored while processing the message.\n * - value is <code> TRNSPRT_ERR </code> .\n */\n public static final String TRANSPORT_ERROR_STATUS = \"TRNSPRT_ERR\";\n\n\n /**\n * Status flag to indicate that a disease-specific message is ready to be processed\n * by <i> PHINMS </i> data interchange application\n * - value is <code> RDY_FOR_PHINMS </code> .\n */\n public static final String READY_FOR_PHINMS_STATUS = \"RDY_FOR_PHINMS\";\n\n\n /**\n * Status flag to indicate that a message has been successfully transformed\n * into a disease-specific message format - value is <code> PHINMS_COMP </code> .\n */\n public static final String PHINMS_COMPLETE_STATUS = \"PHINMS_COMP\";\n\n /**\n * Status flag to indicate that a message has been failed while processing in\n * PHINMS stage - value is <code> PHINMS_ERR </code>\n */\n public static final String PHINMS_ERROR_STATUS = \"PHINMS_ERR\";\n\n\n /**\n * Represents the Disease Message, <i> before </i> disease_specific transformation.\n */\n public static final String MESSAGE_OUT_ATTACHEMNT = \"attachment_txt\";\n\n\n /** This method returns a collection of message id keys with the given status.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return list containing the collection of keys\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public List<MessageKey> listMessages(String status);\n\n\n /** This method retrieves the message record from the message_out database.\n * The SELECT sql is formatted to support specific database implementations\n * (currently MSSQL 2000 and Oracle 8i).\n * Only records with a status_cd of <code> nndmMessage_Out.ACTIVE_STATUS </code> can be retrieved.\n * @param key String that contains the record identifier for the message that failed.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @return Map containing the mapping of column name to its value fetched from the database.\n * @see #ACTIVE_STATUS\n */\n\tpublic Map<String,String> getMessage(Long messageUid, String status);\n\n\n /** This method updates the message record indicated by the key argument as\n * indicated by the second argument.\n * @param key String that contains the record identifier to set status for\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.ACTIVE_STATUS, or\n * nndmMessage_Out.TRANSFORM_IN_PROGRESS_STATUS, etc.\n * @see #ACTIVE_STATUS\n * @see #TRANSFORM_IN_PROGRESS_STATUS\n * @see #TRANSFORM_COMPLETE_STATUS\n * @see #TRANSFORM_ERROR_STATUS\n * @see #READY_FOR_PHINMS_STATUS\n * @see #TRANSPORT_ERROR_STATUS\n * @see #PHINMS_COMPLETE_STATUS\n */\n public void setStatus(Long messageUid, String status);\n\n\n /** This method adds an error log record to the Message_Out database and\n * sets the status appropriately.\n * @param key String that contains the record identifier for the message that failed.\n * @param errorMessage String the contains the short description of the error.\n * @param status String that indicates the status of the message record; use one\n * of the acceptable values of nndmMessage_Out.TRANSFORM_ERROR_STATUS, or\n * nndmMessage_Out.TRANSPORT_ERROR_STATUS.\n */\n public void setError(Long messageUid, String notificationLocalId, String errorMessage, String status);\n\n}", "private final int m21406a(C7619i iVar) {\n if (Intrinsics.areEqual((Object) iVar.mo20545c(), (Object) LinkSubscriptionPartialError.INSTANCE)) {\n return C7904t.paywall_sdk_error_link_subscription_partial_error;\n }\n return C7904t.paywall_sdk_error;\n }", "public void testNewOrderCancelReject_escapesSOH() throws Exception {\r\n Message basicOrder = msgFactory.newBasicOrder();\r\n \t\tMessage reject = msgFactory.newOrderCancelReject(new OrderID(\"35\"), new ClOrdID(\"36\"), new OrigClOrdID(\"37\"),\r\n basicOrder.toString(), new CxlRejReason(CxlRejReason.UNKNOWN_ORDER));\r\n assertTrue(\"reject doesn't contain |:\" +reject.toString(), reject.toString().indexOf(FIXMessageFactory.SOH_REPLACE_CHAR) != -1);\r\n assertNotNull(new Message(reject.toString()));\r\n }", "public void validateRpd13s15()\n {\n // This guideline cannot be automatically tested.\n }", "public String getADD_STRING13_MAND() {\r\n return ADD_STRING13_MAND;\r\n }", "public String getADD_STRING13_MAND() {\r\n return ADD_STRING13_MAND;\r\n }", "@Test\r\n public void test7() \r\n {\r\n \tint loan = -1;\r\n \ttry{\r\n \t\tloan = p.getMonthlyAmount(TestHelper.getSSN(20,0,0,5555),Consts.FULLTIME_MAX_INCOME +1 , 101, 100);\r\n \t assertTrue(loan == Consts.ZERO);\r\n \t}catch(AssertionError err){\r\n \t\tSystem.out.println(\"Test 7, correct : 0, got : \"+ loan);\r\n \t}\r\n \r\n }" ]
[ "0.5955283", "0.58620965", "0.57509834", "0.5717829", "0.56428117", "0.5579113", "0.5572328", "0.54944676", "0.5487572", "0.54720014", "0.5439973", "0.54395586", "0.5426946", "0.5426726", "0.5375653", "0.53705794", "0.52890146", "0.5273237", "0.52514553", "0.52454877", "0.52346265", "0.520912", "0.5185402", "0.5155397", "0.51545566", "0.5151344", "0.51503855", "0.512179", "0.5119034", "0.5112656", "0.51001334", "0.5087369", "0.508283", "0.5041889", "0.5013633", "0.50073063", "0.50067997", "0.4995002", "0.49919736", "0.49879286", "0.4985868", "0.49720064", "0.49697986", "0.49681997", "0.49673107", "0.49641293", "0.49603552", "0.49535683", "0.4945395", "0.49447373", "0.49395406", "0.4935917", "0.49351308", "0.4933257", "0.4916453", "0.4915967", "0.4909536", "0.4905313", "0.49044952", "0.4902661", "0.48965114", "0.4896192", "0.48960054", "0.48824707", "0.48799646", "0.48714435", "0.48683622", "0.48658153", "0.4863316", "0.48608017", "0.48579043", "0.4853106", "0.48528928", "0.4848673", "0.4845521", "0.48428434", "0.4840613", "0.48371437", "0.4836567", "0.48349404", "0.48344302", "0.4826109", "0.481867", "0.48178387", "0.48169318", "0.4814355", "0.48117638", "0.48099345", "0.48064622", "0.480634", "0.48048976", "0.48021615", "0.4799797", "0.47990003", "0.47984177", "0.47962222", "0.47960138", "0.479466", "0.479466", "0.47918192" ]
0.5742603
3
MSH21.1 present, but different from 'PHLabReportAck', MSH16 not present. No error, no alert expected.
@Test public void test15() throws Exception { SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets); ClassLoader classLoader = getClass().getClassLoader(); File message15 = new File(classLoader.getResource(message15FileName).getFile()); String messageString = FileUtils.readFileToString(message15); Report report = validator.check(messageString, "ORU_R01"); Set<String> keys = report.getEntries().keySet(); int errors = 0; int alerts = 0; for (String key : keys) { List<Entry> entries = report.getEntries().get(key); if (entries != null && entries.size() > 0) { System.out.println("*** " + key + " ***"); for (Entry entry : entries) { switch (entry.getClassification()) { case "Error": Util.printEntry(entry); errors++; break; case "Alert": Util.printEntry(entry); alerts++; break; } } } } assertEquals(0, errors); assertEquals(0, alerts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public void m6607X() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"0\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n HashMap hashMap2 = new HashMap();\n hashMap2.put(\"mark_num\", String.valueOf(this.f5418ga));\n C1390G.m6779b(\"A107|1|3|10\", hashMap2);\n HashMap hashMap3 = new HashMap();\n hashMap3.put(\"rec_time\", String.valueOf(this.f5420ha));\n C1390G.m6779b(\"A107|1|3|10\", hashMap3);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test5() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message5 = new File(classLoader.getResource(message5FileName).getFile());\n String messageString = FileUtils.readFileToString(message5);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public void mo1607a() {\r\n if (this.f4603a.f4592h != null) {\r\n Message.obtain(this.f4603a.f4598n, 3).sendToTarget();\r\n }\r\n }", "public void validateRpd11s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s7()\n {\n // This guideline cannot be automatically tested.\n }", "Failuredetector.FailureCheck.Builder addSignallingHeader(Failuredetector.FailureCheck.Builder failureCheckMessage);", "public static void m5831h() {\n if (f4669a != null) {\n f4669a.m12578a(\"Back_web_sucecess_incorrect_num\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"Back web sucecess incorrect num\"));\n }", "public void validateRpd7s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void SLA_Report()\n {\n\t boolean SLApresent =SLAreport.size()>0;\n\t if(SLApresent)\n\t {\n\t\t // System.out.println(\"SLA report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"SLA report is not present\");\n\t }\n }", "protected final void checkExtensionValueSpec119612Vers020101(ITSLObject tsl, ServiceHistoryInstance shi, boolean isCritical) throws TSLMalformedException {\n\n\t\t// Comprobamos primero los Qualifiers.\n\t\tif (qualifiersList.isEmpty()) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL026, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_QUALIFIER }));\n\t\t} else {\n\t\t\tfor (URI qualifierUri: qualifiersList) {\n\t\t\t\tString qualifierUriString = qualifierUri.toString();\n\t\t\t\tboolean isValid = qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHSSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOSSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATUSASINCERT) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCWITHQSCD);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCNOQSCD) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDSTATUSASINCERT);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCQSCDMANAGEDONBEHALF) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORLEGALPERSON);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESIG) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORESEAL);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCFORWSA) || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_NOTQUALIFIED);\n\t\t\t\tisValid = isValid || qualifierUriString.equals(ITSLCommonURIs.TSL_SERVINFEXT_QUALEXT_QUALIFIER_QCSTATEMENT);\n\t\t\t\tif (!isValid) {\n\t\t\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL036, new Object[ ] { qualifierUriString }));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Comprobamos el CriteriaList.\n\t\tif (criteriaList == null) {\n\t\t\tthrow new TSLMalformedException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL024, new Object[ ] { ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATIONS_QUALIFICATION, ITSLElementsAndAttributes.ELEMENT_EXTENSION_QUALIFICATION_CRITERIALIST }));\n\t\t} else {\n\t\t\tcriteriaList.checkExtensionValueSpec119612Vers020101(tsl, shi, isCritical);\n\t\t}\n\n\t}", "public void timesheet_report()\n {\n\t boolean timesheetreppresent =timesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\"Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void mpanNameErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify the functionality of Supply field and its appropriate error messages\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"SAPSMRGasUserforsingleMeter\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Electricity\")\n\t.ValidatempanErrormsg(smrProfile);\t\t\t\n}", "public int checkForAlert() {\n return 0;\n }", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "public void validateRpd15s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s11()\n {\n // This guideline cannot be automatically tested.\n }", "private boolean doMASCCheckFor(Mounted masc, Vector<Report> vDesc, HashMap<Integer, CriticalSlot> vCriticals) {\n if (masc != null) {\n boolean bFailure = false;\n int nRoll = Compute.d6(2);\n\n usedMASC = true;\n Report r = new Report(2365);\n r.subject = getId();\n r.addDesc(this);\n r.add(masc.getName());\n vDesc.addElement(r);\n r = new Report(2370);\n r.subject = getId();\n r.indent();\n r.add(getMASCTarget());\n r.add(nRoll);\n\n if (nRoll < getMASCTarget()) {\n // uh oh\n bFailure = true;\n r.choose(false);\n vDesc.addElement(r);\n\n if (((MiscType) (masc.getType())).hasSubType(MiscType.S_SUPERCHARGER)) {\n if (masc.getType().hasFlag(MiscType.F_MASC)) {\n masc.setHit(true);\n masc.setMode(\"Off\");\n }\n // do the damage - engine crits\n int hits = 0;\n int roll = Compute.d6(2);\n r = new Report(6310);\n r.subject = getId();\n r.add(roll);\n r.newlines = 0;\n vDesc.addElement(r);\n if (roll <= 7) {\n // no effect\n r = new Report(6005);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 8) && (roll <= 9)) {\n hits = 1;\n r = new Report(6315);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if ((roll >= 10) && (roll <= 11)) {\n hits = 2;\n r = new Report(6320);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n } else if (roll == 12) {\n hits = 3;\n r = new Report(6325);\n r.subject = getId();\n r.newlines = 0;\n vDesc.addElement(r);\n }\n for (int i = 0; (i < 12) && (hits > 0); i++) {\n CriticalSlot cs = getCritical(LOC_CT, i);\n if ((cs.getType() == CriticalSlot.TYPE_SYSTEM) && (cs.getIndex() == SYSTEM_ENGINE)) {\n vCriticals.put(new Integer(LOC_CT), cs);\n hits--;\n }\n }\n } else {\n // do the damage.\n // random crit on each leg, but MASC is not destroyed\n for (int loc = 0; loc < locations(); loc++) {\n if (locationIsLeg(loc) && (getHittableCriticals(loc) > 0)) {\n CriticalSlot slot = null;\n do {\n int slotIndex = Compute.randomInt(getNumberOfCriticals(loc));\n slot = getCritical(loc, slotIndex);\n } while ((slot == null) || !slot.isHittable());\n vCriticals.put(new Integer(loc), slot);\n }\n }\n }\n // failed a PSR, check for stalling\n doCheckEngineStallRoll(vDesc);\n } else {\n r.choose(true);\n vDesc.addElement(r);\n }\n return bFailure;\n }\n return false;\n }", "private void isSuccessful(String message) throws AdtMessageRejectedException, AdtMessageParseException {\n\n\t\tAdtMessage adtMessage = new AdtMessage(message);\n\t\tString ackCode = adtMessage.getACKCode();\n\t\tif (!ackCode.equals(HL7_ACK_ACCEPTED)) {\n\t\t String errorMessage = \"Application returned code: '\" + ackCode + \"'\";\n\t\t logger.severe(errorMessage);\n\t\t\tthrow new AdtMessageRejectedException(message);\n\t\t}\n\t}", "public void testParsing2() throws Exception {\n String data = \"8=FIX.4.2\\0019=76\\001\";\n data += \"35=6\\001\";\n data += \"23=IDENTIFIER\\001\";\n data += \"28=N\\001\";\n data += \"55=MSFT\\001\";\n data += \"54=1\\001\";\n data += \"711=2\\001\";\n data += \"311=DELL\\001\";\n data += \"318=USD\\001\";\n data += \"311=IBM\\001\";\n data += \"318=CAD\\001\";\n data += \"10=037\\001\";\n Message message = new Message(data, DataDictionaryTest.getDictionary());\n \n assertHeaderField(message, \"FIX.4.2\", BeginString.FIELD);\n assertHeaderField(message, \"76\", BodyLength.FIELD);\n assertHeaderField(message, MsgType.INDICATION_OF_INTEREST, MsgType.FIELD);\n assertBodyField(message, \"IDENTIFIER\", IOIid.FIELD);\n assertTrailerField(message, \"037\", CheckSum.FIELD);\n IndicationOfInterest.NoUnderlyings valueMessageType = new IndicationOfInterest.NoUnderlyings();\n message.getGroup(1, valueMessageType);\n assertEquals(\"wrong value\", \"DELL\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"USD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n message.getGroup(2, valueMessageType);\n assertEquals(\"wrong value\", \"IBM\", valueMessageType.getString(UnderlyingSymbol.FIELD));\n assertEquals(\"wrong value\", \"CAD\", valueMessageType.getString(UnderlyingCurrency.FIELD));\n }", "private void verifySpecimensPresent(int aaa07Count, int controlCount, int baq00051Count)\r\n {\n assertTextPresent(\"AAA07\", aaa07Count * 2);\r\n assertTextPresent(\"AssayTestControl\", controlCount * 2);\r\n assertTextPresent(\"BAQ00051\", baq00051Count * 2);\r\n }", "protected void checkTransmissionRequirements()\n {\n if (isOutOfBandAlert())\n { // Out-of-band (OOB) transmission requirements\n if (this.alert_text == null && this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-3\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB alert requires alert text or a details source ID\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH)\n {\n if (this.details_OOB_source_ID == 0)\n { // [SCTE 18] 6-5\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert requires a details source ID\"));\n }\n }\n else if (this.alert_text != null && this.audio_OOB_source_ID == 0)\n { // [SCTE 18] 6-7\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: OOB maximum priority alert with alert text requires an audio source ID\"));\n }\n }\n }\n }\n else\n { // In-band (IB) transmission requirements\n if (this.alert_text == null && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-2\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB alert requires alert text or a details channel\"));\n }\n }\n else if (this.alert_priority > EASMessage.ALERT_PRIORITY_HIGH && this.details_major_channel_number == 0\n && this.details_minor_channel_number == 0)\n { // [SCTE 18] 6-4\n if (log.isInfoEnabled())\n {\n log.info(formatLogMessage(\"SCTE-18: IB maximum priority alert requires a details channel\"));\n }\n }\n }\n }", "private void m6603T() {\n RecordService.C1445b bVar;\n if (!isFinishing() && !this.f5427l && (bVar = this.f5401U) != null) {\n bVar.mo6340a(true);\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"from\", \"1\");\n C1390G.m6779b(\"A107|7|2|7\", hashMap);\n } catch (Exception unused) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"vcode error\");\n }\n }\n }", "public void validateRpd8s22()\n {\n // Duplicate of 8s14\n }", "public void validateRpd22s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s6()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasUnknown71();", "public void validateRpd11s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd7s6()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasJsonAckMsg();", "public void my_timesheet_report()\n {\n\t boolean timesheetreppresent =mytimesheetrep.size()>0;\n\t if(timesheetreppresent)\n\t {\n\t\t // System.out.println(\" My Timesheet report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Timesheet report is not present\");\n\t }\n }", "private void m50411m() {\n m50398f(false);\n mo38886a(this.f30720S.getString(C10232R.string.app_name), this.f30720S.getString(C10232R.string.msg_alert_something_went_wrong));\n }", "public void validateRpd13s12()\n {\n // This guideline cannot be automatically tested.\n }", "private final void m713h() {\n if (this.f533r.f615e != 1) {\n m690a(4);\n }\n m699a(false, false, true, false, true);\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "@Test\n public void testAircraftPartNoApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem = 787\";\n\n // verify on wing engine 777 is not applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify on wing engine 787 is applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify off wing engine is not applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void readingGasErrorMsgValidation(){\t\t\t \n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verify functionality of Gas reading dials and its appropriate error messages for non SAP-ISU customer\");\n\tSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\tnew SubmitMeterReadAction()\n\t.openSMRpage(\"Gas\")\n\t.validateGasreadingFiledErrormsg(smrProfile);\t\t\t\n}", "public void m36045a() {\n this.f29981a.showReportDialog();\n }", "@Test\n public void testClaimXrefHicNbr() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setXrefHicNbr,\n RdaFissClaim::getXrefHicNbr,\n RdaFissClaim.Fields.xrefHicNbr,\n 12);\n }", "public void m6608Y() {\n try {\n HashMap hashMap = new HashMap();\n hashMap.put(\"is_rename\", \"1\");\n C1390G.m6779b(\"A107|1|3|10\", hashMap);\n } catch (Exception e) {\n C0938a.m5004b(\"SR/SoundRecorder\", \"A107|1|3|10Vcode error:\" + e);\n }\n }", "boolean hasUnknown13();", "public boolean processRequirementSummary() throws NbaBaseException {\n\t\tboolean success = false;\n\t\tNbaVpmsAdaptor vpmsProxy = null; //SPR3362\n\t\ttry {\n\t\t\tNbaOinkDataAccess oinkData = new NbaOinkDataAccess(txLifeReqResult); //ACN009\n\t\t\toinkData.setAcdbSource(new NbaAcdb(), nbaTxLife);\n\t\t\toinkData.setLobSource(work.getNbaLob());\n\t\t\tif(getLogger().isDebugEnabled()) { //SPR3290\n\t\t\t getLogger().logDebug(\"########### Testing Requirment Summary ###########\");\n\t\t\t getLogger().logDebug(\"########### PartyId: \" + partyID);\n\t\t\t}//SPR3290\n\t\t\tvpmsProxy = new NbaVpmsAdaptor(oinkData, NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR3362\n\t\t\tvpmsProxy.setVpmsEntryPoint(NbaVpmsAdaptor.EP_GET_CALCXMLOBJECTS);\n\t\t\tMap deOink = new HashMap();\n\t\t\t//\t\t\t######## DEOINK\n\t\t\tdeOink.put(NbaVpmsConstants.A_PROCESS_ID, NbaUtils.getBusinessProcessId(getUser())); //SPR2639\n\t\t\tdeOinkContractFieldsForRequirement(deOink);\n\t\t\tdeOinkXMLResultFields(deOink);\n deOinkSubstanceUsage(oinkData, deOink, partyID); //AXAL3.7.07\n\t\t\tdeOinkLabTestResults(deOink);\n\t\t\tObject[] args = getKeys();\n\t\t\tNbaOinkRequest oinkRequest = new NbaOinkRequest();\n\t\t\toinkRequest.setRequirementIdFilter(reqId);\n\t\t\toinkRequest.setArgs(args);\n\t\t\tvpmsProxy.setANbaOinkRequest(oinkRequest);\n\t\t\tvpmsProxy.setSkipAttributesMap(deOink);\n\t\t\tVpmsComputeResult vcr = vpmsProxy.getResults();\n\t\t\tNbaVpmsResultsData vpmsResultsData = new NbaVpmsResultsData(vcr);\n\t\t\tArrayList results = vpmsResultsData.getResultsData();\n\t\t\tresults = vpmsResultsData.getResultsData();\n\t\t\t//Resulting string will be the zeroth element.\n\t\t\tif (results == null) {\n\t\t\t\t//SPR3362 code deleted\n\t\t\t\tthrow new NbaVpmsException(NbaVpmsException.VPMS_NO_RESULTS + NbaVpmsAdaptor.ACREQUIREMENTSUMMARY); //SPR2652\n\t\t\t} //SPR2652\n\t\t\tvpmsResult = (String) results.get(0);\n\t\t\tNbaVpmsModelResult vpmsOutput = new NbaVpmsModelResult(vpmsResult);\n\t\t\tVpmsModelResult vpmModelResult = vpmsOutput.getVpmsModelResult();\n\t\t\tupdateDefaultValues(vpmModelResult.getDefaultValues());\n\t\t\tupdateSummaryValues(vpmModelResult.getSummaryValues());\n\t\t\tsuccess = true;\n\t\t\t// SPR2652 Code Deleted\n\t\t\t//SPR3362 code deleted\n\t\t} catch (RemoteException re) {\n\t\t\tthrow new NbaBaseException(\"Remote Exception occured in processRequirementSummary\", re);\n\t\t// SPR2652 Code Deleted\n\t\t//begin SPR3362\n\t\t} finally {\n\t\t if(vpmsProxy != null){\n\t\t try {\n vpmsProxy.remove();\n } catch (RemoteException e) {\n getLogger().logError(NbaBaseException.VPMS_REMOVAL_FAILED);\n }\n\t\t }\n\t\t//end SPR3362\n\t\t}\n\t\treturn success;\n\t}", "public void validateRpd7s2()\n {\n // This guideline cannot be automatically tested.\n }", "@Test\n public void testAircraftPartNoNotApplicable787() throws Exception {\n\n String lTaskApplSqlLdesc = \"rootpart.part_no_oem <> 787\";\n\n // verify on wing engine 777 is applicable\n int lResult = execute( ON_WING_ENGINE_777, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n\n // verify on wing engine 787 is not applicable\n lResult = execute( ON_WING_ENGINE_787, lTaskApplSqlLdesc );\n assertEquals( 0, lResult );\n\n // verify off wing engine is applicable\n lResult = execute( OFF_WING_ENGINE, lTaskApplSqlLdesc );\n assertEquals( 1, lResult );\n }", "@Test\n public void testErrorDetectingOnCorrectMessage() {\n final int[] msgWithError = {0,0,1,0, 1,0,1,1, 1,0,0,0, 1,1,1,0};\n final int expectedErrorIndex = ResponseCode.NO_ERRORS.code;\n\n // When executing error detection\n final int errorIndex = HammingAlgorithm.calculateErrorIndex(msgWithError);\n\n // Then check if errorIndex is as expected\n assertThat(errorIndex).isEqualTo(expectedErrorIndex);\n }", "private final boolean checkHeader(int paramInt) {\n/* 406 */ if (paramInt != 1416784229) {\n/* 407 */ return false;\n/* */ }\n/* */ \n/* 410 */ if ((this.m_options_ & 0xF) != 5 || (this.m_options_ >> 4 & 0xF) != 2)\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 415 */ return false;\n/* */ }\n/* 417 */ return true;\n/* */ }", "@Test\n\tpublic void lateHires()\n\t{\t\t\n\t\tassertTrue(controller.getReport().getNoOfLateHires() == 1);\n\t}", "public void validateRpd13s8()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd11s1()\n {\n // This guideline cannot be automatically tested.\n }", "public void validateRpd13s16()\n {\n // This guideline cannot be automatically tested.\n }", "public OctetString getMsg1017()\n {\n\treturn this.msg1017;\n }", "public void validateRpd13s15()\n {\n // This guideline cannot be automatically tested.\n }", "void mo1507n();", "public void mo1533b() {\n C2201w.m8371a((int) C0965R.string.ota_send_success, 1);\n this.f3965a.f4003i.mo1526d();\n }", "@Test\n public void test_06_hgvs_upstream_negative_strand() {\n Log.debug(\"Test\");\n List<VcfEntry> list = snpEffect(\"testHg38Chr1\", path(\"hgvs_upstream_negative_strand_06.vcf\"), null);\n checkHgvscForTr(list, \"NM_016176.3\");\n }", "public void validateRpd13s13()\n {\n // This guideline cannot be automatically tested.\n }", "private void m6671z() {\n f5380b = false;\n RecordService.C1445b bVar = this.f5401U;\n if (bVar != null) {\n bVar.mo6335a();\n }\n }", "boolean hasS7();", "@Override\n\tpublic String check() throws RemoteException {\n\t\tString msg = \"\";\n\t\tfor (int i = 0; i < chathistory.size(); i++) {\n\t\t\tmsg += chathistory.get(i).getMessage();\n\t\t}\n\t\treturn msg;\n\t}", "@Test\n public void issue4707() throws IOException {\n Collection<FileAnnotation> warnings = new GccParser().parse(openFile(\"issue4707.txt\"));\n\n assertEquals(WRONG_NUMBER_OF_WARNINGS_DETECTED, 22, warnings.size());\n Iterator<FileAnnotation> iterator = warnings.iterator();\n checkWarning(iterator.next(),\n 1128,\n \"NULL used in arithmetic\",\n \"/Users/rthomson/hudson/jobs/Bryce7-MacWarnings/workspace/bryce7/src/Bryce/Plugins/3DSExport/3DSExport.cpp\",\n TYPE, GCC_WARNING, Priority.NORMAL);\n }", "public void validateRpd13s17()\n {\n // This guideline cannot be automatically tested.\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "public void setADD_STRING7_MAND(String ADD_STRING7_MAND) {\r\n this.ADD_STRING7_MAND = ADD_STRING7_MAND == null ? null : ADD_STRING7_MAND.trim();\r\n }", "private final SystemMessage m43300h(ApiMessage apiMessage) {\n String id = apiMessage.getId();\n if (id == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String matchId = apiMessage.getMatchId();\n if (matchId == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String to = apiMessage.getTo();\n if (to == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String from = apiMessage.getFrom();\n if (from == null) {\n throw new IllegalStateException(\"Required value was null.\".toString());\n }\n String message = apiMessage.getMessage();\n if (message != null) {\n return new SystemMessage(null, id, matchId, to, from, message, m43292a(apiMessage.getSentDate()), false, false, DeliveryStatus.SUCCESS, 1, null);\n }\n throw new IllegalStateException(\"Required value was null.\".toString());\n }", "public void validateRpd8s13()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean reportMsg(byte[] msgBuffer ) throws IOException;", "String mo7388hl() throws RemoteException;", "public final void mo19836a() {\n C7547h hVar = this.f15660a;\n C7544a aVar = new C7544a();\n aVar.mo20466a(C7904t.paywall_sdk_error_temp_access);\n aVar.mo20475d(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederror\", null, 2, null));\n aVar.mo20485i(C3573a.m12037b(this.f15662c, \"ns_sdk-errors_tempaccessgrantederrortitle\", null, 2, null));\n aVar.mo20480g(Integer.valueOf(C7906v.btn_dismiss));\n hVar.mo20491b(aVar.mo20465a());\n }", "private final int m21406a(C7619i iVar) {\n if (Intrinsics.areEqual((Object) iVar.mo20545c(), (Object) LinkSubscriptionPartialError.INSTANCE)) {\n return C7904t.paywall_sdk_error_link_subscription_partial_error;\n }\n return C7904t.paywall_sdk_error;\n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "public void showReportAbuseSuccess() {\n try {\n AlertDialog.Builder builder = new AlertDialog.Builder(this.mContext);\n builder.setTitle(this.mContext.getResources().getString(R.string.consult_report_abuse_thanks));\n builder.setMessage(this.mContext.getResources().getString(R.string.consult_comment_report_abuse_success));\n builder.setPositiveButton(this.mContext.getResources().getString(R.string.alert_dialog_confirmation_ok_button_text), new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n }\n });\n builder.show();\n } catch (Exception unused) {\n Trace.w(TAG, \"Failed to show disclaimer for consult photo editing\");\n }\n }", "@Override\n\t\tpublic boolean checkReportIfExist(ArrayList<Object> msg) {\n\t\t\tString parkName = (String) msg.get(2);\n\t\t\tint month = ((Date) msg.get(1)).getMonth() + 1;\n\t\t\tif (hashMapDB.get(parkName).get(month) == null)\n\t\t\t\treturn false;\n\t\t\treturn true;\n\t\t}", "public assetDetailsPage click_YesofAlert_msg() throws InterruptedException, IOException {\r\n\t\tWebElement alrtmsg = driver.findElementByName(\"You are about to lose your changes.Do you want to continue ?\");\r\n\r\n\t\tif (IsElementVisibleStatus(alrtmsg)) {\r\n\t\t\tWebElement alrtmsg_YesBtn = driver.findElementByName(\"Yes\");\r\n\t\t\tclickOn(alrtmsg_YesBtn);\r\n\t\t\tThread.sleep(1000);\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No Alert message displayed\");\r\n\t\t\treturn new assetDetailsPage();\r\n\t\t}\r\n\t}", "private void m57235e() {\n if (this.f41223d != null) {\n this.f41223d.sendEmptyMessage(1);\n }\n }", "protected int analyzeAck(Action action) {\n int rc = 0;\n byte ack = action.getBuffer()[0];\n byte reason = action.getBuffer()[1];\n\n if ( ack == Frame.DAT_NAK ) rc = reason;\n\n return rc;\n }", "@SubL(source = \"cycl/kb-hl-supports.lisp\", position = 33298) \n public static final SubLObject create_sample_invalid_kb_hl_support() {\n return make_kb_hl_support(UNPROVIDED);\n }", "public String processMessage() throws ICANException {\n String aSegment;\n HL7Group aGroup;\n HL7Message aInMess = new HL7Message(mHL7Message);\n HL7Segment aInMSHSegment = new HL7Segment(aInMess.getSegment(\"MSH\"));\n HL7Segment aOutMSHSegment = processMSHToUFD();\n if (mEnvironment.indexOf(\"TEST\") >= 0) {\n String aSendingApp = aOutMSHSegment.get(HL7_23.MSH_3_sending_application);\n if (aSendingApp.indexOf(\".TEST\") >= 0) {\n aOutMSHSegment.set(HL7_23.MSH_3_sending_application, aSendingApp.substring(0, aSendingApp.length() - 5));\n }\n }\n HL7Message aOutMess = new HL7Message(aOutMSHSegment.getSegment());\n\n if(aInMess.isEvent(\"A01, A02, A03, A08, A11, A12, A13, A21, A22, A28, A31\")) {\n aOutMess.append(processEVNToUFD());\n aOutMess.append(processPIDToUFD());\n aOutMess.append(processNK1s_ToUFD());\n aOutMess.append(processPV1ToUFD());\n aOutMess.append(processPV2ToUFD());\n aOutMess.append(processOBXs_ToUFD());\n aOutMess.append(processAL1s_ToUFD());\n aOutMess.append(processDG1s_ToUFD());\n aOutMess.append(processDRGToUFD());\n aOutMess.append(processPR1s_ToUFD());\n aOutMess.append(processGT1s_ToUFD());\n aOutMess.append(processInsuranceToUFD());\n aOutMess.append(processCSC_ZsegmentsToUFD());\n\n } else if (aInMess.isEvent(\"A17\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processA17GroupToUFD(1));\n aOutMess.append(processA17GroupToUFD(2));\n\n } else if (aInMess.isEvent(\"A34\")) {\n aOutMess.append(processEVNToUFD().getSegment());\n aOutMess.append(processPIDToUFD().getSegment());\n aOutMess.append(processMRGToUFD().getSegment());\n }\n if (aOutMess.getMessage().length() > 0) {\n aOutMess.append(setupZBX(\"MESSAGE\", \"SOURCE_ID\", aInMSHSegment.get(HL7_23.MSH_10_message_control_ID)));\n }\n return aOutMess.getMessage();\n }", "public void validateRpd2s7()\n {\n // This guideline cannot be automatically tested.\n }", "public void handleSMSAlert()\n\t{\n\t\t\n\t\tWebDriverWait wait=new WebDriverWait(driver, 60);\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tif(checker.getText().contains(\"verification could not be completed\"))\n\t\t\t\tAssert.fail(\"Phone Verification failed\");\n\t\t\t\n\t\t\tLog.info(\"== Handling SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twaitOnProgressBarId(60);\n\t\t}\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t\n\t\tif(!Generic.getAttribute(checker, \"resourceId\").contains(\"message\"))\n\t\t\treturn; // No Alert found\n\t\telse\n\t\t{\n\t\t\tLog.info(\"== Handling second SMS Alert ==\");\n\t\t\tokButton.click();\n\t\t\t\n\t\t\twait.until(ExpectedConditions.visibilityOf(checker));\n\t\t}\n\t\t\t\t\n\t\t\n\t\t\n\t}", "public void validateRpd13s9()\n {\n // This guideline cannot be automatically tested.\n }", "public boolean Verify_NonIpoConfirmation() {\n\t\n\tboolean flag = false;\n\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.THANKYOU_LABEL).isDisplayed();\n\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"DISPLAYED\");\n\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.ORDERRECEIVED_LABEL).isDisplayed();\n\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"DISPLAYED\");\n\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.WHATNEXT_SECTION).isDisplayed();\n\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"DISPLAYED\");\n\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.UPONDELIVERY_SECTION).isDisplayed();\n\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"DISPLAYED\");\n\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.STOREDETAILS_CONFIRMATIONSECTION).isDisplayed();\n\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"DISPLAYED\");\n\t\t\t\t\t\tflag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.MYSTORE_SECTION).isDisplayed();\n\t\t\t\t\t\tif(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"DISPLAYED\");\n\t\t\t\t\t\t flag=CommonVariables.CommonDriver.get().findElement(OrderConfirmationScreen_OR.GOTOHOMEPAGE_BUTTON).isDisplayed();\n\t\t\t\t\t\t if(flag){extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");\n\t\t\t\t\t\t\t}else{extentLogs.pass(\"VerifyNonIPOConfirmationScreen_GOTOHOMEPAGE_BUTTON\", \"DISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_MYSTORE_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_STOREDETAILS_CONFIRMATIONSECTION\", \"NOTDISPLAYED\");}\n\t\t \t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_UPONDELIVERY_SECTION\", \"NOTDISPLAYED\");}\n\t\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_WHATNEXT_SECTION\", \"NOTDISPLAYED\");}\n\t\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ORDERRECEIVED_LABEL\", \"NOTDISPLAYED\");}\n\t}else{extentLogs.fail(\"VerifyNonIPOConfirmationScreen_ThankYou\", \"NOTDISPLAYED\");}\n\t\nreturn flag;\n\t}", "public String report() throws Exception{\r\n\t\tForm16MisReportModel model = new Form16MisReportModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\tif(bulkForm16.getEmpId().equals(\"\")){\r\n\t\t\tString str=model.generateUrlList(request, response,bulkForm16);\r\n\t\t\tif(!str.equals(\"1\"))\r\n\t\t\t\taddActionMessage(str);\r\n\t\t\treturn SUCCESS;\r\n\t\t} //end of if\r\n\t\telse{\r\n\t\t\tmodel.generateReport(request, response, bulkForm16);\r\n\t\t\tmodel.terminate();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Test\n public void testClaimProcNewHicInd() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setProcNewHicIndEnum,\n RdaFissClaim::getProcNewHicInd,\n FissProcessNewHealthInsuranceClaimNumberIndicator.PROCESS_NEW_HIC_INDICATOR_Y,\n \"Y\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setProcNewHicIndUnrecognized,\n RdaFissClaim::getProcNewHicInd,\n RdaFissClaim.Fields.procNewHicInd,\n 1);\n }", "final /* synthetic */ void m36052a(String str, String str2, ReportCause reportCause, @Nullable String str3, Response response) {\n this.f29981a.showReportSuccessful();\n m36040a(null, str, str2, null, reportCause, str3, ReportingSource.PROFILE);\n }", "public void deviceAndPhonVerificationErrMsg()\n\t{\n\t\tLog.info(\"======== Device Verification Error Message ========\");\n\n\t\ttry {\n\t\t\tsoftAssert.assertTrue(verifyPhoneErrMsg.getText().contains(\"failed\"));\n\t\t\tsoftAssert.assertAll();\n\t\t} catch (Exception e){} \n\t\t\n\t\tLog.info(\"======== Clicking on Verification failed OK button ========\");\n\t\tokButton.click();\n\t}", "@Override\r\n\tpublic void alarm() {\n\t\tSystem.out.println(\"H1型号是这样鸣笛的.....\");\r\n\t}" ]
[ "0.5947164", "0.58747685", "0.5755639", "0.5721783", "0.56545997", "0.5643998", "0.5490188", "0.54895216", "0.5489191", "0.5455424", "0.5453558", "0.5436306", "0.54210204", "0.5420528", "0.5408527", "0.5387252", "0.523633", "0.52335364", "0.5200824", "0.5164473", "0.5127857", "0.5117606", "0.5115183", "0.51116127", "0.50914645", "0.5067701", "0.50599986", "0.50526506", "0.5049463", "0.50456506", "0.50357485", "0.50265026", "0.5023014", "0.50204676", "0.5016457", "0.5015083", "0.50044584", "0.4994337", "0.49871284", "0.49848166", "0.49718052", "0.49678248", "0.49620414", "0.49618194", "0.49567187", "0.4950757", "0.49400404", "0.49384254", "0.4936592", "0.49347475", "0.49306715", "0.49151504", "0.4914571", "0.49144796", "0.49104485", "0.4903207", "0.48921564", "0.48826396", "0.4878741", "0.48705173", "0.48678556", "0.48678336", "0.48676974", "0.48636183", "0.48605615", "0.48537168", "0.48407385", "0.4832049", "0.4829525", "0.4826772", "0.48258862", "0.4818347", "0.48143038", "0.48103452", "0.48089045", "0.48089045", "0.48045725", "0.47940427", "0.47921595", "0.4787579", "0.47848088", "0.47805837", "0.4774446", "0.47675502", "0.47646937", "0.47637075", "0.47536457", "0.47492513", "0.47468606", "0.4744231", "0.47441402", "0.4740815", "0.4739025", "0.47374052", "0.47372258", "0.47343984", "0.47324425", "0.47301766", "0.47234213", "0.47194874" ]
0.565584
4
This method will make a copy of the environment and not a copy of the creatures in the environment
public Environment(Environment e){ this.creatureList = new ArrayList<Creature>(); sandboxMap = new int[e.sandboxMap.length][e.sandboxMap[0].length]; for (int i = 0; i < sandboxMap.length; i++){ for (int j = 0; j < sandboxMap[i].length; j++){ sandboxMap[i][j] = e.sandboxMap[i][j]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }", "private void randomizeEnvironment() {\n }", "public void create(Environment environment);", "@Override\n\tpublic Automaton clone() {\n\t\tAutomaton a;\n\t\t// Try to create a new object.\n\t\ttry {\n\t\t\ta = getClass().newInstance();\n\t\t} catch (final Throwable e) {\n\t\t\t// Well golly, we're sure screwed now!\n\t\t\tlogger.error(\"Warning: clone of automaton failed: {}\", e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\ta.setEnvironmentFrame(getEnvironmentFrame());\n\n\t\t// Copy over the states.\n\t\tfinal HashMap<State, State> map = new HashMap<>(); // Old states to new\n\t\t// states.\n\t\tstates.forEach(state -> {\n\t\t\tfinal State newState = new State(state.getID(), new Point(state.getPoint()), a);\n\t\t\tnewState.setLabel(state.getLabel());\n\t\t\tnewState.setName(state.getName());\n\t\t\tmap.put(state, newState);\n\t\t\ta.addState(newState);\n\t\t\tif (this instanceof MooreMachine) {\n\t\t\t\t((MooreMachine) a).setOutput(newState, ((MooreMachine) this).getOutput(state));\n\t\t\t}\n\t\t});\n\n\t\tfinalStates.forEach(state -> {\n\t\t\ta.addFinalState(map.get(state));\n\t\t});\n\n\t\ta.setInitialState(map.get(getInitialState()));\n\n\t\t// Copy over the transitions.\n\n\t\tstates.forEach(state -> {\n\t\t\tfinal State from = map.get(state);\n\t\t\tgetTransitionsFromState(state).forEach(transition -> {\n\t\t\t\tfinal State to = map.get(transition.getToState());\n\t\t\t\tSystem.err.println(\"Transition name: \" + transition.toString());\n\t\t\t\tfinal Transition toBeAdded = transition.clone();\n\t\t\t\ttoBeAdded.setFromState(from);\n\t\t\t\ttoBeAdded.setToState(to);\n\t\t\t\tSystem.err.println(\"toBeAdded is null: \" + (toBeAdded == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.from is null: \" + (toBeAdded.getFromState() == null));\n\t\t\t\tSystem.err.println(\"toBeAdded.to is null: \" + (toBeAdded.getToState() == null));\n\t\t\t\ta.addTransition(toBeAdded);\n\t\t\t});\n\t\t});\n\n\t\tfinal List<Note> notes = getNotes();\n\t\tfinal List<Note> copyNotes = a.getNotes();\n\t\tcheckArgument(notes.size() == copyNotes.size());\n\n\t\tIntStream.range(0, notes.size()).forEach(i -> {\n\t\t\ta.addNote(new Note(notes.get(i).getAutoPoint(), notes.get(i).getText()));\n\t\t\tcopyNotes.get(i).setView(notes.get(i).getView());\n\t\t});\n\t\t// Should be done now!\n\t\treturn a;\n\t}", "Environment createEnvironment();", "Environment createEnvironment();", "@Test(timeout = 4000)\n public void test047() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244858), (HomeTexture) null, (-2146244858), (HomeTexture) null, (-2146244858), (-2146244858));\n homeEnvironment0.setCeillingLightColor((-2146244858));\n homeEnvironment0.clone();\n assertEquals((-2146244858), homeEnvironment0.getCeillingLightColor());\n }", "@Override\n public AbstractRelic makeCopy() {\n return new Compendium();\n }", "public void Duplicate()\n {\n\n tacc2 = tacc.clone();\n px2 = px.clone();\n py2 = py.clone();\n pz2 = pz.clone();\n\n tgyro2 = tgyro.clone();\n\n accx2 = accx.clone();\n accy2 = accy.clone();\n accz2 = accz.clone();\n\n lng2 = lng.clone();\n lat2 = lat.clone();\n }", "@Override\n\tpublic AbstractRelic makeCopy() {\n\t\treturn new NamelessWarRelicA();\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-367), (HomeTexture) null, (-367), (HomeTexture) null, (-367), (-367));\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n \n homeEnvironment0.setCeillingLightColor(0);\n homeEnvironment0.clone();\n assertEquals(0, homeEnvironment0.getCeillingLightColor());\n }", "private void cloneProjectAux(Company cloneCompany, Project cloneProj, Project originalProj) {\n\tString key = ProjectAux.constructKey(originalProj);\n\tProjectAux originalAux = this.projectAuxValueRepo.get(key);\n\tProjectAux cloneAux = originalAux.clone();\n\tcloneAux.setCompany(cloneCompany);\n\tcloneAux.setProject(cloneProj);\n\tthis.projectAuxValueRepo.set(cloneAux);\n }", "public void reproduce() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < Utils.between(_nChildren,1,8); i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "@Before\n public void setupEnvironment() {\n TestEnvironment testEnvironment;\n switch (mode) {\n case CLUSTER:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().disableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case CLUSTER_OBJECT_REUSE:\n // This only works because of the quirks we built in the TestEnvironment.\n // We should refactor this in the future!!!\n testEnvironment = MINI_CLUSTER_RESOURCE.getTestEnvironment();\n testEnvironment.getConfig().enableObjectReuse();\n testEnvironment.setAsContext();\n break;\n case COLLECTION:\n new CollectionTestEnvironment().setAsContext();\n break;\n }\n }", "@Test(timeout = 4000)\n public void test17() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setCeillingLightColor(0);\n homeEnvironment0.setAllLevelsVisible(true);\n homeEnvironment0.setPhotoQuality(0);\n homeEnvironment0.getSkyColor();\n homeEnvironment0.getSubpartSizeUnderLight();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n homeEnvironment1.setCeillingLightColor(0);\n homeEnvironment1.setSkyColor(618);\n HomeEnvironment.Property[] homeEnvironment_PropertyArray0 = HomeEnvironment.Property.values();\n assertEquals(20, homeEnvironment_PropertyArray0.length);\n }", "protected Factorization copy(){\n Factorization newFactor = new Factorization(this.mdc);\n //shallow copy\n newFactor.setRecipes(recipes);\n newFactor.setIngredients(ingredients);\n newFactor.setUserMap(userMap);\n newFactor.setUserMapReversed(userMap_r);\n newFactor.setRecipeMap(recipeMap);\n newFactor.setRecipeMapReversed(recipeMap_r);\n newFactor.setIngredientMap(ingredientMap);\n newFactor.setIngredientMapReversed(ingredientMap_r);\n \n //deep copy\n List<User> userCopy = new ArrayList<User>();\n for(User curr: this.users){\n userCopy.add(new User(curr.getId()));\n }\n newFactor.setUsers(userCopy);\n newFactor.setDataset(dataset.copy());\n newFactor.updateInitialSpace();\n return newFactor;\n }", "public void copy() {\n\n\t}", "private void selfClone() {\n stroke = stroke.clone();\n }", "private static void initCopyContext (SessionState state)\n\t{\n\t\tstate.setAttribute (STATE_COPIED_IDS, new Vector ());\n\n\t\tstate.setAttribute (STATE_COPY_FLAG, Boolean.FALSE.toString());\n\n\t}", "public void setup()\n {\n // we use a separate ArrayList to keep track of each animal. \n // our room is 50 x 50.\n creatures = new ArrayList<Creature>();\n for (int i = 0; i < 55; i++) {\n if (i < 5) {\n creatures.add(new Fox((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1)); \n } else {\n creatures.add(new Tux((int)(Math.random()*48)+1, 1, (int)(Math.random()*48)+1));\n }\n }\n \n env.setRoom(new Room());\n \n // Add all the animals into to the environment for display\n for (Creature c : creatures) {\n env.addObject(c);\n }\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(-63);\n \n // Turn off the default controls\n env.setDefaultControl(false);\n env.setShowController(false);\n \n }", "public abstract SoftwareLight copy();", "@Test(timeout = 4000)\n public void test043() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(29, (HomeTexture) null, 29, (HomeTexture) null, 29, 29);\n homeEnvironment0.setSubpartSizeUnderLight(29);\n homeEnvironment0.clone();\n assertEquals(29.0F, homeEnvironment0.getSubpartSizeUnderLight(), 0.01F);\n }", "@Override\n public AbstractRelic makeCopy() {\n return new SpiritualRecovery();\n }", "public Game copy();", "public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}", "protected void copy(){\n\t\tthis.model.copy(this.color.getBackground());\n\t}", "File prepareEnvironment();", "protected Enemy copy()\r\n\t{\r\n\t\treturn new DwarfEnemy();\r\n\t}", "public final void create(ScriptContext context) throws RuntimeException {\n this.context = context;\n if (this.getClass().isAnnotationPresent(ScriptManifest.class)) {\n this.manifest = this.getClass().getAnnotation(ScriptManifest.class);\n } else {\n throw new RuntimeException(\"No ScriptManifest defined!\");\n }\n if (!canUse()) {\n throw new RuntimeException(\"Cannot use this script\");\n }\n this.game = context.game;\n this.bank = context.bank;\n this.camera = context.camera;\n this.inventory = context.inventory;\n this.keyboard = context.keyboard;\n this.menu = context.menu;\n this.mouse = context.mouse;\n this.navigation = context.navigation;\n this.npcs = context.npcs;\n this.objects = context.objects;\n this.players = context.players;\n this.widgets = context.widgets;\n this.skills = context.skills;\n this.settings = context.settings;\n this.groundItems = context.groundItems;\n this.localPlayer = context.players.getLocalPlayer();\n this.equipment = context.equipment;\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(1762, (HomeTexture) null, 614, (HomeTexture) null, 1762, (-1245.36F));\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n \n homeEnvironment0.setPhotoHeight(0);\n homeEnvironment0.clone();\n assertEquals(0, homeEnvironment0.getPhotoHeight());\n }", "Prototype makeCopy();", "public Game() { \n // Create the new environment. Must be done in the same\n // method as the game loop\n env = new Env();\n \n // Sets up the camera\n env.setCameraXYZ(25, 50, 55);\n env.setCameraPitch(pitch);\n\n // Turn off the default controls\n env.setDefaultControl(false);\n\n // Make the room 50 x 50.\n env.setRoom(new Room());\n creatures = new ArrayList<Creature>();\n }", "private final State copy( State state)\n {\n State copy = new State();\n copy.index = counter++;\n copy.stackOps = Arrays.copyOf( state.stackOps, state.stackOps.length);\n copy.gotos = Arrays.copyOf( state.gotos, state.gotos.length);\n itemSetMap.put( copy, itemSetMap.get( state));\n return copy;\n }", "public EnvironmentUtilities(Environment environment, double gamma) {\n this.environment = environment;\n this.gamma = gamma;\n int noOfRows = environment.getRows();\n int noOfCols = environment.getColumns();\n environmentUtilities = new ActionUtility[noOfRows][noOfCols];\n for(int i = 0; i < noOfRows; i++){\n for(int j = 0; j <noOfCols; j++) {\n environmentUtilities[i][j] = new ActionUtility(null, 0.00);\n }\n }\n }", "public TurtleState copy() {\n\t\treturn new TurtleState(position.copy(), direction.copy(), color, shift);\n\t}", "public State createState(Environment environmentIn, State oldState)\n\t{\n\t\treturn new MarioState(environmentIn, oldState);\n\t}", "public void setNewenvironment(boolean newenv) {\r\n newEnvironment = newenv;\r\n }", "public static EvalEnv convObs(Environment observation)\n {\n \n EvalEnv result = new EvalEnv();\n return result;\n }", "private void setupEnvironment(Execute exe) {\r\n String[] environment = env.getVariables();\r\n if (environment != null) {\r\n for (int i = 0; i < environment.length; i++) {\r\n log(\"Setting environment variable: \" + environment[i], Project.MSG_VERBOSE);\r\n }\r\n }\r\n exe.setNewenvironment(newEnvironment);\r\n exe.setEnvironment(environment);\r\n }", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment(2892, (HomeTexture) null, 2892, (HomeTexture) null, 2892, 2892);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n \n homeEnvironment0.setPhotoWidth(0);\n homeEnvironment0.clone();\n assertEquals(0, homeEnvironment0.getPhotoWidth());\n }", "public DescriptiveFramework clone();", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244786), (HomeTexture) null, (-2146244786), (HomeTexture) null, (-2146244786), (-2146244786));\n homeEnvironment0.setSubpartSizeUnderLight((-2146244786));\n homeEnvironment0.clone();\n assertEquals((-2.14624474E9F), homeEnvironment0.getSubpartSizeUnderLight(), 0.01F);\n }", "public GameEnvironment() {\r\n this.collidObj = new ArrayList<Collidable>();\r\n }", "public synchronized void setEnvironment(TestEnvironment environment) {\n if (!isMutable()) {\n throw new IllegalStateException(\n \"This TestResult is no longer mutable!\");\n }\n for (TestEnvironment.Element elem : environment.elementsUsed()) {\n // this is stunningly inefficient and should be fixed\n env = PropertyArray.put(env, elem.getKey(), elem.getValue());\n }\n }", "public static void main(String[] args) throws CloneNotSupportedException\n {\n ArrayList<String> companies = new ArrayList<String>();\n companies.add(\"Baidu\");\n companies.add(\"Tencent\");\n companies.add(\"Ali\");\n WorkExprience workExprience = new WorkExprience(companies);\n String nameString = new String(\"Tom\");\n String genderString = new String(\"male\");\n Resume resume = new Resume(nameString, 23, genderString, workExprience);\n System.out.println(\"Source Resume\");\n resume.printResum();\n \n ArrayList<String> companies1 = new ArrayList<String>();\n companies1.add(\"Google\");\n companies1.add(\"Microsoft\");\n companies1.add(\"Oracle\");\n Resume copyResume = (Resume)resume.clone();\n String nameString1 = new String(\"Jerry\");\n String genderString1 = new String(\"Fmale\");\n copyResume.setName(nameString1);\n copyResume.setAge(20);\n copyResume.setGender(genderString1);\n copyResume.getWorkExprience().setCompanyArrayList(companies1);\n System.out.println();\n System.out.println(\"Source Resume\");\n resume.printResum();\n System.out.println();\n System.out.println(\"Copy Resume\");\n copyResume.printResum();\n }", "static void setCopying(){isCopying=true;}", "public WorldState clone ()\n\t{\n\t\tWorldState clone = new WorldState();\n\t\tclone.copy(this);\n\t\treturn clone;\n\t}", "public static void main(String[] args) {\n\t\tCloneFactory factory = new CloneFactory();\n\t\t\n\t\tSheep billy = new Sheep();\n\t\t\n\t\tSheep clonedSheep = (Sheep) factory.getClone(billy);\n\t\t\n\t\tDog rufus = new Dog();\n\t\t\n\t\tDog clonedDog = (Dog) factory.getClone(rufus);\n\t\t\n\t\tSystem.out.println(clonedSheep + \"\\n\" + clonedDog);\n\t}", "public void reInitialize() {\n\n\t\tthis.myT = buildFromScratch();\n\n\t}", "@Override \n public Door clone()\n {\n try\n {\n Door copy = (Door)super.clone();\n \n //a copy of the location class\n copy.room = room.clone(); \n \n return copy;\n }\n catch(CloneNotSupportedException e)\n {\n throw new InternalError();\n }\n }", "private static Store liftGlobals(ScriptNode script, Trace trace, Environment env, Store store) {\n\tSet<String> globals = GlobalVisitor.getGlobals(script);\n\tint i = -1000;\n\tfor (String global : globals) {\n\t Address address = trace.makeAddr(i, \"\");\n\t // Create a dummy variable declaration. This will not exist in the\n\t // output, because the value and variable initialization exists\n\t // outside the file.\n\t Name dummyVariable = new Name();\n\t env.strongUpdateNoCopy(global, Variable.inject(global, address, Change.bottom(),\n\t\t Dependencies.injectVariable(dummyVariable)));\n\t store = store.alloc(address,\n\t\t BValue.top(Change.u(), Dependencies.injectValue(dummyVariable)), dummyVariable);\n\t i--;\n\t}\n\n\treturn store;\n\n }", "private void changeContext(){\n MainWorkflow.observeContexts(generateRandom(24,0));\n }", "public Rule fresh (boolean asNewObject)\r\n\t{\r\n\t\tMap<String,String> newNames = new HashMap<String, String> ();\r\n\t\treturn fresh (newNames, asNewObject);\r\n\t}", "public Mapping clone(IRSession session){\n \tMapping mapping = new Mapping(session);\n \tmapping.entities = entities;\n \tmapping.multiple = multiple;\n \tmapping.requests = requests;\n \tmapping.entityinfo = entityinfo;\n \tmapping.entitystack = entitystack;\n \tmapping.setattributes = setattributes;\n \tmapping.attribute2listPairs = attribute2listPairs;\n \tmapping.dataObjects = dataObjects;\n \tmapping.initialize();\n \treturn mapping;\n }", "public MovableObject lightClone()\n\t\t{\n\t\t\tfinal MovableObject clone = new MovableObject();\n\t\t\tclone.assCount = this.assCount;\n\t\t\tclone.associatable = this.associatable;\n\t\t\tclone.bound = this.bound;\n\t\t\tclone.coords = new int[this.coords.length];\n\t\t\tfor(int i=0; i < this.coords.length; i++)\n\t\t\t\tclone.coords[i] = this.coords[i];\n\t\t\tclone.highlighted = this.highlighted;\n\t\t\tclone.hotSpotLabel = this.hotSpotLabel;\n\t\t\tclone.keyCode = this.keyCode;\n\t\t\tclone.label = this.label;\n\t\t\tclone.maxAssociations = this.maxAssociations;\n\t\t\tif(shape.equals(\"rect\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Rectangle(coords[0]-3,coords[1]-3,coords[2]+6,coords[3]+6);\n\t\t\t}\n\t\t\tif(shape.equals(\"circle\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[2]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"ellipse\"))\n\t\t\t{\n\t\t\t\tclone.obj = new Ellipse2D.Double((coords[0]-coords[2])-4,(coords[1]-coords[2])-4,(coords[2]+2)*2,(coords[3]+2)*2);\n\t\t\t}\n\t\t\tif(shape.equals(\"poly\"))\n\t\t\t{\n\t\t\t\tfinal int xArr[] = new int[coords.length/2];\n\t\t\t\tfinal int yArr[] = new int[coords.length/2];\n\t\t\t\tint xCount = 0;\n\t\t\t\tint yCount = 0;\n\t\t\t\tfor(int i=0; i < coords.length; i++)\n\t\t\t\t{\n\t\t\t\t\tif((i%2) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\txArr[xCount] = coords[i];\n\t\t\t\t\t\txCount++;\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tyArr[yCount] = coords[i];\n\t\t\t\t\t\tyCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//TODO calculate the centre of mass\n\n\t\t\t\tclone.obj = new Polygon(xArr,yArr,xArr.length);\n\t\t\t}\n\t\t\tclone.pos = new Point(this.pos.x,this.pos.y);\n\t\t\tclone.shape = this.shape;\n\t\t\tclone.startPos = this.startPos;\n\t\t\tclone.value = this.value;\n\n\t\t\treturn clone;\n\t\t}", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment((-2146244879), (HomeTexture) null, (-2146244879), (HomeTexture) null, (-2146244879), (-2146244879));\n homeEnvironment0.setPhotoWidth((-2146244879));\n homeEnvironment0.clone();\n assertEquals((-2146244879), homeEnvironment0.getPhotoWidth());\n }", "Object clone();", "Object clone();", "public interface RealEnvironment extends Environment {\n\n}", "private static void demoIndependanceOfStorage() {\n\t\t//a clone of a one-dimensional array has independent storage\n\t\tint[] numbers = {1,1,1,1};\n\t\tint[] numbersClone = (int[])numbers.clone();\n\t\t//set 0th element to 0, and compare\n\t\tnumbersClone[0] = 0;\n\t\tlog(\"Altered clone has NOT affected original:\");\n\t\tlog(\"numbersClone[0]: \" + numbersClone[0]);\n\t\tlog(\"numbers[0]: \" + numbers[0]);\n\n\t\t//the clone of a multi-dimensional array does *not* have\n\t\t//independant storage\n\t\tint[][] matrix = { {1,1}, {1,1} };\n\t\tint[][] matrixClone = (int[][])matrix.clone();\n\t\t//set 0-0th element to 0, and compare\n\t\tmatrixClone[0][0] = 0;\n\t\tlog(\"Altered clone has affected original:\");\n\t\tlog(\"matrixClone element 0-0:\" + matrixClone[0][0]);\n\t\tlog(\"matrix element 0-0: \" + matrix[0][0]);\n\n\t\t//the clone of an array of objects as well is only shallow\n\t\tDate[] dates = {new Date()};\n\t\tlog(\"Original date: \" + dates[0]);\n\t\tDate[] datesClone = (Date[])dates.clone();\n\t\tdatesClone[0].setTime(0);\n\t\tlog(\"Altered clone has affected original:\");\n\t\tlog(\"datesClone[0]:\" + datesClone[0]);\n\t\tlog(\"dates[0]: \" + dates[0]);\n\t}", "public static EvalEnv genExampleEnv2()\n {\n EvalEnv result = new EvalEnv();\n result.createVariable(Boolean.class, true);\n result.createVariable(Boolean.class, true);\n for (int x = 0; x < Environment.HalfObsWidth * 2; x++)\n {\n for (int y = 0; y < Environment.HalfObsHeight * 2; y++)\n {\n result.createVariable(Integer.class, 0);\n }\n }\n\n for (int i = 0; i < 5; i++)\n {\n result.createVariable(Integer.class, -1);\n result.createVariable(Float.class, -100.0);\n result.createVariable(Float.class, 10.0);\n }\n return result;\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n HomeEnvironment homeEnvironment1 = homeEnvironment0.clone();\n homeEnvironment0.setSubpartSizeUnderLight(0.0F);\n homeEnvironment0.setPhotoQuality(1575);\n HomeEnvironment.DrawingMode homeEnvironment_DrawingMode0 = HomeEnvironment.DrawingMode.FILL;\n homeEnvironment0.setDrawingMode(homeEnvironment_DrawingMode0);\n homeEnvironment1.setSubpartSizeUnderLight(1988.6958F);\n homeEnvironment1.setGroundColor((-3580));\n homeEnvironment1.setGroundColor(1575);\n homeEnvironment1.setVideoWidth(1575);\n homeEnvironment1.getVideoCameraPath();\n HomeEnvironment homeEnvironment2 = homeEnvironment1.clone();\n homeEnvironment2.setVideoWidth(1575);\n assertEquals(1575, homeEnvironment1.getGroundColor());\n assertEquals(1988.6958F, homeEnvironment1.getSubpartSizeUnderLight(), 0.01F);\n }", "public void recreateFromExistingWorld(WorldInfo original) {\n this.worldName = original.getWorldName();\n this.worldSeed = Long.toString(original.getSeed());\n WorldType worldtype = original.getGenerator() == WorldType.CUSTOMIZED ? WorldType.DEFAULT : original.getGenerator();\n this.selectedIndex = worldtype.getId();\n this.chunkProviderSettingsJson = original.getGeneratorOptions();\n this.generateStructuresEnabled = original.isMapFeaturesEnabled();\n this.allowCheats = original.areCommandsAllowed();\n if (original.isHardcore()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.HARDCORE;\n } else if (original.getGameType().isSurvivalOrAdventure()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.SURVIVAL;\n } else if (original.getGameType().isCreative()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.CREATIVE;\n }\n\n }", "public static void main(String[] args) throws CloneNotSupportedException {\n\t\tHouse house1 = new House(1,140.50);\r\n\t\tHouse house2 = (House) house1.clone();\r\n\t\tSystem.out.println(\" house1 id: \"+house1.getId()+\" area: \"+house1.getArea()+\" whenBuilt: \"+house1.getWhenBuilt());\r\n\t\t\r\n\t\tSystem.out.println(\" house2 id: \"+house2.getId()+\" area: \"+house2.getArea()+\" whenBuilt: \"+house2.getWhenBuilt());\r\n\t\t\r\n\t}", "public Object clone() {\n return new RelevantObjectsCommand(name, \n relevantStateVariables, \n relevantObjects,\n relevancyRelationship);\n }", "@Override\n public Translate copy() {\n Translate copy = (Translate) SystemFunction.makeFunction(getFunctionName().getLocalPart(), getRetainedStaticContext(), getArity());\n copy.staticMap = staticMap;\n return copy;\n }", "protected void pushScope() {\n Scope newScope = new Scope(currentScope);\n currentScope = newScope;\n }", "@Override\n\tpublic void takeEnvSnapshot(long envId) {\n\t}", "public EngineClass clone()\n {\n EngineClass cloneEngineClass = new EngineClass( this );\n return cloneEngineClass;\n }", "public static TrackableEnvironment createEnvironment() {\n return null;\n }", "public void reproduceVirus() {\n\t\tOrganism newOrg;\n\t\t\n\t\tfor (int i=0; i < 1; i++) {\n\t\t\tnewOrg = new Organism(_world);\n\t\t\tif (newOrg.inherit(this, i==0)) {\n\t\t\t\t// It can be created\n\t\t\t\t_nTotalChildren++;\n\t\t\t\t_world.addOrganism(newOrg,this);\n\t\t\t\t_infectedGeneticCode = null;\n\t\t\t}\n\t\t\t_timeToReproduce = 20;\n\t\t}\n\t}", "void restoreBefore() {\r\n\t\t\tsurface.basemap.clear();\r\n\t\t\tsurface.basemap.putAll(basemapBefore);\r\n\t\t\tsurface.buildingmap.clear();\r\n\t\t\tsurface.buildingmap.putAll(buildingmapBefore);\r\n\t\t\tsurface.features.clear();\r\n\t\t\tsurface.features.addAll(surfaceBefore);\r\n\t\t\tsurface.buildings.clear();\r\n\t\t\tsurface.buildings.addAll(buildingsBefore);\r\n\t\t}", "public Function clone();", "public GameEnvironment() {\r\n this.collidables = new ArrayList<Collidable>();\r\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "private World copyWorld(boolean useCloning) throws CloneNotSupportedException {\n\t \n\t if (useCloning == false) {\n\t \t\tif ( mWorld instanceof ArrayWorld) { // if mWorld (current) is an ArrayWorld\n\t \t\t\tWorld copy;\n\t \t\t\tcopy = new ArrayWorld((ArrayWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n\t \t\telse if ( mWorld instanceof PackedWorld) {\n\t \t\t\tWorld copy = new PackedWorld((PackedWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n \t \t}\n\t else {\n\t\t World copy = (World) mWorld.clone();\n\t\t \treturn copy;\n\t }\n\t \n\t return null;\n\t}", "public State copy() {\n State that = new State(this.registers.length);\n for (int i=0; i<this.registers.length; ++i) {\n Object a = this.registers[i];\n if (a == null) continue;\n if (!(a instanceof Set))\n that.registers[i] = a;\n else\n that.registers[i] = NodeSet.FACTORY.makeSet((Set)a);\n }\n if(TRACE_REGISTERS) System.out.println(\"Copying state \" + Arrays.asList(that.registers));\n return that;\n }", "public void initializeObliqueLaunch(){\r\n world = new Environment();\r\n cannon = new Thrower();\r\n ball = new Projectile();\r\n this.setInitialValues();\r\n }", "public void copy (WorldState other)\n\t{\n\t\tresetProperties();\n\t\t//Iterate through other state and clone it's properties into this states properties\n\t\tCollection<WorldStateProperty> otherProperties = other.properties.values();\n\t\tfor (WorldStateProperty property : otherProperties)\n\t\t{\n\t\t\tproperties.put(property.key, property.clone());\n\t\t}\n\t}", "public void clearEnvironment()\r\n\t{\r\n\t\tEnvironment.e = null;\r\n\t}", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "public Factory(BaseProcessingEnvImpl env) {\n _env = env;\n }", "public abstract Player freshCopy();", "private ScriptableObject makeChildScope(String name, Scriptable scope) {\r\n // This code is based on sample code from Rhino's website:\r\n // http://www.mozilla.org/rhino/scopes.html\r\n \r\n // I changed it to use a ScriptableObject instead of Context.newObject()\r\n ScriptableObject child = new NamedScriptableObject(name);\r\n \r\n // Set the prototype to the scope (so we have access to all its methods \r\n // and members). \r\n child.setPrototype(scope);\r\n \r\n // We want \"threadScope\" to be a new top-level scope, so set its parent \r\n // scope to null. This means that any variables created by assignments\r\n // will be properties of \"threadScope\".\r\n child.setParentScope(null);\r\n \r\n return child;\r\n }", "public Feature copy() {\n\t\tFeature ret = new AbbeelFeature();\n\t\treturn ret;\n\t}", "public void createNewCube() {\n CUBE = new Cube();\n }", "@Test\n public void testReuseforkstrue() throws Exception {\n String testName = \"reuseforkstrue\";\n EkstaziPaths.removeEkstaziDirectories(getClass(), testName);\n executeCleanTestStep(testName, 0, 1);\n }", "void cloneTo(NamedStorage storage);", "public abstract State clone();", "void reset() throws EnvironmentException;", "@Override\n public MiniMover64RNG copy() {\n return new MiniMover64RNG(state);\n }", "public void copy(Skills skills) {\r\n for (int i = 0; i < 24; i++) {\r\n this.staticLevels[i] = skills.staticLevels[i];\r\n this.dynamicLevels[i] = skills.dynamicLevels[i];\r\n this.experience[i] = skills.experience[i];\r\n }\r\n prayerPoints = skills.prayerPoints;\r\n lifepoints = skills.lifepoints;\r\n lifepointsIncrease = skills.lifepointsIncrease;\r\n experienceGained = skills.experienceGained;\r\n }", "protected TestEnvironment createTestEnvironment(TestParameters tParam, PrintWriter log) {\n XInterface oObj = null;\n XIndexAccess NumStyleI = null;\n\n XText oText = xTextDoc.getText();\n XTextCursor oCursor = oText.createTextCursor();\n\n try {\n for (int i=0; i<5; i++) {\n oText.insertString(oCursor, \"The quick brown fox jumps \"+\n \"over the lazy Dog\", false);\n oText.insertControlCharacter(oCursor,\n ControlCharacter.PARAGRAPH_BREAK, false);\n }\n } catch ( com.sun.star.lang.IllegalArgumentException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n }\n\n XStyleFamiliesSupplier oStyleFamiliesSupplier = (XStyleFamiliesSupplier)\n UnoRuntime.queryInterface(XStyleFamiliesSupplier.class, xTextDoc);\n\n try {\n XNameAccess oStyleFamilies = oStyleFamiliesSupplier.getStyleFamilies();\n XNameContainer NumStyles = (XNameContainer) AnyConverter.toObject(\n new Type(XNameContainer.class),\n oStyleFamilies.getByName(\"NumberingStyles\"));\n NumStyleI = (XIndexAccess)\n UnoRuntime.queryInterface(XIndexAccess.class,NumStyles);\n } catch ( com.sun.star.lang.WrappedTargetException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n } catch ( com.sun.star.container.NoSuchElementException e ) {\n log.println(\"Error, no such style family...\");\n e.printStackTrace(log);\n } catch ( com.sun.star.lang.IllegalArgumentException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n }\n \n Object instance1 = null;\n\n try {\n oObj = (XInterface) AnyConverter.toObject(\n new Type(XInterface.class),NumStyleI.getByIndex(0));\n XPropertySet props = (XPropertySet)\n UnoRuntime.queryInterface(XPropertySet.class, oObj);\n oObj = (XInterface) AnyConverter.toObject(\n new Type(XInterface.class),props.getPropertyValue(\"NumberingRules\"));\n XIndexAccess nRules = (XIndexAccess) UnoRuntime.queryInterface(XIndexAccess.class, props.getPropertyValue(\"NumberingRules\"));\n instance1 = nRules.getByIndex(0);\n } catch ( com.sun.star.lang.WrappedTargetException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n } catch ( com.sun.star.lang.IndexOutOfBoundsException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n } catch ( com.sun.star.beans.UnknownPropertyException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n } catch ( com.sun.star.lang.IllegalArgumentException e ) {\n log.println(\"Error, exception occurred...\");\n e.printStackTrace(log);\n } \n \n TestEnvironment tEnv = new TestEnvironment( oObj );\n \n tEnv.addObjRelation(\"INSTANCE1\", instance1);\n return tEnv;\n }", "@Override\n public DuelistRNG copy() {\n return new DuelistRNG(stateA, stateB);\n }", "@Override\n protected void reproduce() {\n new AnimalCell(super.planet);\n super.reproductionThreshold = 0;\n }", "private void buildScope(EObject original, ChangeSet local, ChangeSet remote) {\n scope = ScopeFactory.eINSTANCE.createDSEMergeScope();\n scope.setRemote(remote);\n scope.setLocal(local);\n scope.setOrigin(EMFHelper.clone(original));\n scope.setCemetery(ScopeFactory.eINSTANCE.createCemetery());\n }", "@Override\n\tpublic void setEnvironment(Environment environment) {\n\t\tSystem.out.println(\"call setEnvironment()...\");\n\t\tenv = environment;\n\t}", "public Animal deepCopy() {\n return new Eagle(this);\n }", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "@Override\n public Environment getEnvironment(XYCoord coord)\n {\n return master.getEnvironment(coord);\n }" ]
[ "0.62736577", "0.61426365", "0.59756565", "0.57616735", "0.56631196", "0.56631196", "0.56335837", "0.5588786", "0.554314", "0.552496", "0.5519837", "0.541511", "0.5384807", "0.535702", "0.53533536", "0.5332816", "0.52818954", "0.52789146", "0.5273526", "0.52642274", "0.5250007", "0.52319", "0.522866", "0.5209582", "0.52054113", "0.51939696", "0.51931185", "0.5149459", "0.5145429", "0.51427907", "0.5138256", "0.51235366", "0.51189107", "0.5118381", "0.51175225", "0.51154876", "0.51132697", "0.51049525", "0.5102012", "0.50934744", "0.5088168", "0.5076696", "0.5058719", "0.5050027", "0.50329286", "0.50293714", "0.5024287", "0.5015608", "0.50135535", "0.5011876", "0.5010707", "0.49961466", "0.496745", "0.49575117", "0.49532175", "0.49460852", "0.49449992", "0.49449992", "0.49443933", "0.49403143", "0.4940025", "0.49388054", "0.49371192", "0.4933221", "0.49321514", "0.49268097", "0.49104348", "0.48963407", "0.48958158", "0.48937818", "0.48903686", "0.488741", "0.48820424", "0.48810792", "0.48801062", "0.48775488", "0.48765394", "0.48749375", "0.4850828", "0.4848839", "0.48468247", "0.48308292", "0.48273262", "0.48234344", "0.4819143", "0.4811664", "0.48081386", "0.4802804", "0.48019025", "0.47921345", "0.4791582", "0.47895265", "0.47870627", "0.47756255", "0.47732562", "0.47659698", "0.47657424", "0.47583523", "0.47500008", "0.4749601" ]
0.6518455
0
Does the main work provided by this plugin.
public void execute() throws MojoExecutionException { if (projectVersion == null) { throw new MojoExecutionException("projectVersion cannot be null."); } String squirrelsqlVersion = projectVersion; String timestampPattern = "yyyyMMdd_kkmm"; if (!projectVersion.toLowerCase().endsWith("-snapshot")) { SimpleDateFormat sdf = new SimpleDateFormat(timestampPattern); try { String date = sdf.format(new Date()); squirrelsqlVersion = "Snapshot-" + date; } catch (IllegalStateException e) { log.error("Could not convert date format pattern " + timestampPattern); throw e; } } Properties props = project.getProperties(); props.put(VERSION_PROPERTY_KEY, squirrelsqlVersion); System.setProperty(VERSION_PROPERTY_KEY, squirrelsqlVersion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void internalRun() {\n work();\n }", "public void run() {\r\n\t\t// overwrite in a subclass.\r\n\t}", "@Override\n\tprotected void postRun() {\n\n\t}", "public static void setup()\n\t{\n\t\tregisterEvent(calico.plugins.events.clients.ClientConnect.class);\n\t\tregisterEvent(calico.plugins.events.clients.ClientDisconnect.class);\n\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapCreate.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapDelete.class);\n\t\tregisterEvent(calico.plugins.events.scraps.ScrapReload.class);\n\t\t\n\t\t\n\t\t//System.out.println(\"LOAD PLUGINS: \"+COptions.server.plugins);\n\t\t\n\t\tlogger.debug(\"Loading plugins\");\n\t\t\n\t\ttry\n\t\t{\n\t\t\tPluginFinder pluginFinder = new PluginFinder();\n\t\t\tpluginFinder.search(\"plugins/\");\n\t\t\tList<Class<?>> pluginCollection = pluginFinder.getPluginCollection();\n\t\t\tfor (Class<?> plugin: pluginCollection)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Loading \" + plugin.getName());\n\t\t\t\tregisterPlugin(plugin);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tString[] pluginsToLoad = COptions.server.plugins.split(\",\");\n\t\t\n//\t\tif(pluginsToLoad.length>0)\n//\t\t{\n//\t\t\tfor(int i=0;i<pluginsToLoad.length;i++)\n//\t\t\t{\n//\t\t\t\ttry\n//\t\t\t\t{\n//\t\t\t\t\tClass<?> pluginClass = Class.forName(pluginsToLoad[i].trim());\n//\t\t\t\t\tregisterPlugin(pluginClass);\n//\t\t\t\t}\n//\t\t\t\tcatch(Exception e)\n//\t\t\t\t{\n//\t\t\t\t\tlogger.error(\"Could not load plugin \"+pluginsToLoad[i].trim());\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\t\n\t\n\t}", "public void work() {\n\t}", "public void work() {\n\t}", "protected void run() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void work() {\n\t\t// TODO Auto-generated method stub\n\t\tSystem.out.println(\"We work in TestYantra software solution\");\n\t\t\n\t}", "public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }", "public void run(){ \n \t//sets up the GUI and performs operations based on ActionListeners\n \tpackageGUI();\n \toperate();\n }", "public interface FJPluginInterface\r\n{\r\n\t/**\r\n\t * When the plugin is loaded, the pluin's implementation of this method\r\n\t * will be invoked. If nothing needs to be done on startup in a plugin,\r\n\t * keep the method empty. For instance you might do all the work in the\r\n\t * constructor, or you could wait for user input, which will make this\r\n\t * method unnecessary.\r\n\t */\r\n\tpublic void start();\r\n\t\r\n\t/**\r\n\t * Invoked when a plugin is unloaded and another plugin is loaded or when\r\n\t * Flask Jaws is terminated. Useful for shutting down sockets and readers\r\n\t * when you exit your plugin. If nothing needs to be done upon exit or no\r\n\t * cleaning needs to be done, this method may be left empty.\r\n\t * <p>\r\n\t * If a plugin supports networking of any kind, it should call\r\n\t * {@link se.mansehr.flaskjaws.pluginclasses.FJNetwork#close()} in this method.\r\n\t */\r\n\tpublic void stop();\r\n\t\r\n\t/**\r\n\t * Whenever there's a plugin loaded and you select a menu item from the\r\n\t * menu bar, this method will be called. It should pause the plugin\r\n\t * implementing this method. If no pausing is neccessary, it can be\r\n\t * implemented as an emtpy method.\r\n\t */\r\n\tpublic void pause();\r\n\t\r\n\t/**\r\n\t * Has the opposite function as {@link #pause()}, it resumes the plugin\r\n\t * once the actions invoked by selecting a menu item is done.\r\n\t */\r\n\tpublic void resume();\r\n}", "public final void pluginMain()\n { /* MenuActivated */\n /* if this plugin is checked, then point normalization\n * pointer to us.\n */\n if (this.getState())\n {\n setActiveNormalization(this);\n //getMAEStub().setNormalizationStateFromPlugin(this.getPluginName());\n \n /* do normalization and refresh */\n getMAEStub().recalcNorms(this.getPluginName(), this.getState());\n }\n }", "public void run() {\n\t\tsetupReadline();\n\n\t\tif (Options.cmdFilename != null) {\n\t\t\tcmdOpen(Options.cmdFilename);\n\t\t} else {\n\t\t\tLog.verbose(\"Enter `help' for a list of available commands.\");\n\t\t\t\n\t\t\tif (Options.doPLUGIN) {\n\t\t\t\tLog.verbose(\"Enter `plugins' for a list of available plugin commands.\");\n\t\t\t}\n\t\t}\n\n while (!fFinished) {\n Thread.yield();\n Log.resetOutputFlag();\n\n String line = \"\";\n\n // get current readline (may be e.g. console or file)\n fReadline = fReadlineStack.getCurrentReadline();\n try {\n if (fMultiLineMode) {\n while (true) {\n // use special prompt to emphasize multi-line input\n String oneLine = fReadline.readline(CONTINUE_PROMPT);\n // end of input or a single dot terminates the input\n // loop\n if (oneLine == null || oneLine.equals(\".\"))\n break;\n line += oneLine + Options.LINE_SEPARATOR;\n }\n fMultiLineMode = false;\n } else {\n line = fReadline.readline(PROMPT);\n }\n } catch (IOException ex) {\n Log.error(\"Cannot read line: \" + ex.getMessage());\n }\n if (line != null) {\n \tif (!fReadline.doEcho())\n \t\tUSEWriter.getInstance().protocol(line);\n \t\n processLineSafely(line);\n } else {\n fFinished = fReadlineStack.popCurrentReadline();\n setFileClosed();\n \n if (fFinished && Options.quiet)\n processLineSafely(\"check\");\n }\n }\n cmdExit();\n }", "protected void pluginInitialize() {}", "public void working()\n {\n \n \n }", "@Override\n\tpublic void postRun() {\n\t}", "public MakePlugin() {\n super(\n new ExerciseBuilder(),\n new StudentFileAwareSubmissionProcessor(),\n new StudentFileAwareZipper(),\n new StudentFileAwareUnzipper());\n this.makeUtils = new MakeUtils();\n }", "protected void setup() {\r\n }", "public void setup() {\n }", "protected void additionalProcessing() {\n\t}", "void PostRun() {\n }", "public void setup()\n {\n }", "protected void doWork() throws Exception {\n\t\tSet<PluginInfo> plis = PluginManager.getInstance()\n\t\t\t\t.getPluginsFor(Defaults.MC_METAINFORMATION_PROVIDER);\n\n\t\tsetProgress(0, \"Searching ...\");\n\t\t\n\t\tint step = 10000 / plis.size();\t\t\n\t\t\n\t\tfor (PluginInfo pli : plis) {\n\n\t\t\t// check if task has being canceled\n\t\t\tif(getTaskState() == TaskStateEvent.TASK_CANCELLING) {\n\t\t\t\tdoCancel();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t// instantiate it\n\t\t\tAbstractPlugin abstractPlugin = pli.getInstance();\n\n\t\t\t// check if this is a real AnnotationProvider\n\t\t\tif (abstractPlugin instanceof AbstractAnnotationProvider) {\n\t\t\t\tAbstractAnnotationProvider abstractProvider = (AbstractAnnotationProvider) abstractPlugin;\n\t\n\t\t\t\tsetProgress(getProgress(), abstractProvider.getName());\n\t\t\t\t\n\t\t\t\t// try to initialize it\n\t\t\t\tif (!abstractProvider.getStatus())\n\t\t\t\t\tabstractProvider.initProvider();\n\n\t\t\t\t\n\t\t\t\t// if it worked, add it to the working AnnotationProviders\n\t\t\t\t// and add IdSettings\n\t\t\t\tif (abstractProvider.getStatus())\n\t\t\t\t\tannotationManager.addProvider(abstractProvider);\n\t\t\t\telse\n\t\t\t\t\t// write a short error log\n\t\t\t\t\twriteLog(abstractProvider.getName()\n\t\t\t\t\t\t\t+ \" initialization failed!\\n\");\n\t\t\t\n\t\t\t\t\tif(abstractProvider.getErrorLog().size() > 0) {\n\t\t\t\t\t\tfor(String errorMessage : abstractProvider.getErrorLog()) {\n\t\t\t\t\t\twriteLog(abstractProvider.getName()\n\t\t\t\t\t\t\t\t+ \" -> \" + errorMessage + \"!\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tsetProgress(getProgress() + step, abstractProvider.getName());\n\t\t\t}\n\t\t}\n\t\tsetProgress(10000);\n\t}", "public void setup() {\r\n\r\n\t}", "@Override\n public void setup() {\n }", "@Override\n public void setup() {\n }", "@Override\n\tpublic void myWork() {\n\t\t\n\t}", "@Override\n protected void pluginInitialize() {\n // init();\n }", "@Override\n protected void setup() {\n }", "@Override\n public void setup() {\n\n }", "public void startPlugin() {\n\t\t// add a new ResourceChangeListener\n\t\tCheops.getInstance().addResourceChangeListener();\n\t}", "private void process() {\n final PluginsDialog dialog = new PluginsDialog();\n dialog.show();\n }", "protected abstract void preRun();", "void PrepareRun() {\n }", "@Override\r\n\tprotected final void setup() {\r\n \tsuper.setup();\r\n\r\n \tdoSetup();\r\n }", "public void execute() {\n if(isModified() && worker==null) {\n try {\n worker = new AnalyzeToolWorker();\n } catch (IOException ex) {\n setExecuting(false);\n ErrorDialog.displayIOExceptionDialog(toolName+\" Error\", \"Tool initialization failed.\", ex);\n return;\n }\n worker.start();\n }\n }", "public static void run() {\n }", "@Override\n public void runCracker() {\n }", "protected void execute() {\n\t\t\n\t}", "private DungeonBotsMain() {\n\t\t// Does nothing.\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "public void run() {/* THE CODE HERE IS A THE @OVERRIDE FOR START() METHOD */\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "public void execute() throws MojoExecutionException {\n CodeGeneratorLoggerFactory.setLogger(getLog());\n\n // iff baseFolder is null or empty, reset it to the default value\n baseFolder = StringUtils.defaultIfEmpty(baseFolder, \"GUIData\");\n\n // create the helper with our config\n CodeGeneratorHelper helper = new CodeGeneratorHelper(toCodeGeneratorConfig());\n\n if (CodeGeneratorLoggerFactory.getLogger().isDebugEnabled()) {\n helper.displayProjectInformation();\n }\n\n // register all custom element classes\n helper.registerCustomElements();\n\n // create the generated page details file\n helper.createSeLionPageDetailsFile();\n\n // process the files.\n helper.processFiles();\n }", "protected abstract void setup();", "private Main() {\n\n super();\n }", "public static void run(){}", "public void processing();", "private PluginsInternal() {}", "public void run() {\n\t\t\r\n\t}", "public void run() {\n\t\t\r\n\t}", "public abstract boolean execute(PlugInContext context) throws Exception;", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tabstract public void run();", "public void run() {\n\t\tnew UsageCheckAdapter(EventSourceID.CD_PLUGIN_UNINSTALL);\n\t\t\n\t\tInstallationView view = CodeGeneratorActivator.getDefault().getInstallationView();\n\t\tview.uninstallPlugin();\n\t}", "@Override\n\tpublic void onRun(PlatformPlayer player) {\n\t\t\n\t}", "@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n // Initialize\n imports = new HashSet<>();\n lines = new ArrayList<>();\n\n // Read and merge source files\n final File folder = new File(\"src\");\n recurseOverFolder(folder);\n\n // Output to file\n outputFile();\n }", "public void run() {\n\t initialise();\n\t // request play from player until finished\n\t playPlayersHand();\n\t // resolve the dealers hand according to the rules\n\t playDealersHand();\n\t \n\t showOutcome();\n\t }", "public void execute() {\n _plugin.openNavigator();\n }", "@Override\n\tpublic void doJob() {\n\t\tSystem.out.println(\"Studying\");\n\t}", "public void run() {\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionStart();\n\n /**\n * create an archetype for the new application\n */\n executeArchetypeCommand();\n\n /**\n * Provide some delay to allow thread to create the archetype\n */\n splash = new SplashScreen();\n\n for (int i = 0; i < 7; i++) {\n updateStatus(i);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n\n hideSplashScreen();\n splash = null;\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionEnd();\n }", "private void start() {\n \t\tisFinished = false;\n \t\trunning = true;\n \t\tpluginHandler.startAll();\n \t\tThread engine = new Thread(this, \"engine\");\n \t\tengine.start();\n \t\tissueHandler.checkAllIssues();\n \t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public void run()\n\t\t{\n\t\t}", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "@Override\n public void executeByPluginType(PluginType pluginType) {\n pluginFactory\n .getPlugin(pluginType)\n .otherOutput();\n }", "protected abstract void onPluginEnable();", "public void run() {\n\t\trichiediProdotti();\n\t}", "public void run() {\n\t\t\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "@Override\n\tvoid startWork() {\n\t\t\n\t}", "public void run() {\n\t\t}", "public void run() {\n\t\t}", "public void run() {\n\t\t}", "private void entryAction() {\n\t}", "public void run() {\n\n }", "@Override\n\tpublic void run()\n\t{\n\t\tswitch (ubiToolType)\n\t\t{\n\t\tcase PUNKT:\n\t\t\tdoPoint();\n\t\t\tbreak;\n\t\tcase KREIS:\n\t\t\tdoCircle();\n\t\t\tbreak;\n\t\tcase LINIE:\n\t\t\tdoLine();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void run() {\n List<File> files = getContents(TOP_LEVEL + \" and \" + NOT_TRASHED + \" and \" + FOLDER + \" and \" + NOT_SPREADSHEET);\n \n prune(targetDir, files);\n processLanguages(files);\n }", "public void run() {\n runOneColumn( tmeta1_ );\n runSomeColumns( tmeta2_ );\n runJustMeta( tmeta3_ );\n }", "protected void execute() {\n\n\t}", "public void run() throws TException, IOException\n {\n System.out.println(\"API version: \"+extension.apiVersion());\n\n // Send a message to the SP log\n extension.info(\"Hello Smart Pendant, I'm MyExtension\");\n\n\n // read YML text from the file\n String yml = new String(Files.readAllBytes(Paths.get(\"MyUtility.yml\")), StandardCharsets.UTF_8);\n // and register it with the pendant\n var errors = pendant.registerYML(yml);\n\n // Register it as a Utility window\n pendant.registerUtilityWindow(\"myutil\",true,\"MyUtility\",\n \"YML Util\", \"YML Util\",\n UtilityWindowWidth.FullWidth, UtilityWindowHeight.HalfHeight,\n UtilityWindowExpansion.expandableNone);\n\n // run 'forever' (or until API service shutsdown) \n extension.run(() -> false);\n }", "@Override\r\n\tprotected void processExecute() {\n\r\n\t}", "public void run() {\n\n\t}", "public void run() {\n\n\t}", "public interface PluginBase {\n void init();\n void run();\n}", "public static void run() {\n try {\n //recreating tables added to update csv data without application restart\n new SqlUtility().setConnection().dropAllTables().createPersonTable().createRecipientTable();\n new CsvPersonParser().run();\n new CsvReсipientParser().run();\n\n List<Person> list;\n list = new SqlUtility().setConnection().grubData();\n String result = \"\";\n result = ListToMessage.converter(list);\n if(!\"\".equals(result)) {\n NotificationSender.sender(result, email, pass, addressList);\n }\n } catch (ClassNotFoundException e){e.printStackTrace();}\n catch (SQLException ee){ee.printStackTrace();}\n catch (ParseException eee) {eee.printStackTrace();}\n\n }", "@Override\n public void preRun() {\n super.preRun();\n }", "@Override\n public void apply(Project project) {\n if (!project.getPlugins().hasPlugin(\"li-pegasus2\")) {\n project.getPlugins().apply(PegasusPlugin.class);\n }\n\n // Mimic the pegasus plugin behavior. It crawls through source sets.\n final JavaPluginConvention javaPluginConvention = project.getConvention().getPlugin(JavaPluginConvention.class);\n\n javaPluginConvention.getSourceSets().all(sourceSet -> {\n setupTasks(project, sourceSet);\n });\n }", "protected void execute() {\n \tTmSsAutonomous.getInstance().showAlgInfo();\n \tshowPreferenceSettings(); //P.println(\"[Preferences info TBD]\");\n }", "public void intialRun() {\n }", "public void run() {\n\t // Create the ouput directories\n\t interfDir = new File(outDirName+\"/\"+modelName);\n\t interfDir.mkdirs();\n\t implDir = new File(outDirName+\"/\"+modelName);\n\t implDir.mkdirs();\n\t // Create the parseAll visitor interface\n\t createParseAllVisitorInterface(interfDir);\n\t // Create the parseAll visitor implementation\n\t createParseAllVisitorImplementation(implDir);\n\t // Create the evaluateAll visitor interface\n\t createEvaluateAllVisitorInterface(interfDir);\n\t // Create the evaluateAll visitor implementation\n\t createEvaluateAllVisitorImplementation(implDir);\n\t}", "public void run(){\n\t}", "public void run() {\n super.executeStep();\n }", "public interface Plugin {\n void doUsefil();\n}", "protected abstract void work();", "abstract void setup();" ]
[ "0.6197215", "0.612493", "0.610911", "0.6072115", "0.6054889", "0.6054889", "0.6037613", "0.60367626", "0.6033538", "0.6018043", "0.60163593", "0.60044044", "0.6004092", "0.6003603", "0.5993083", "0.5985791", "0.5955702", "0.59390473", "0.59337413", "0.59277177", "0.59100956", "0.5908512", "0.58661306", "0.58607453", "0.58529776", "0.58529776", "0.5846296", "0.58321303", "0.5819903", "0.58096397", "0.5786077", "0.5785741", "0.57615805", "0.5754776", "0.5735104", "0.57107407", "0.57085985", "0.5708251", "0.5699731", "0.56987065", "0.5697561", "0.5697561", "0.5697561", "0.5689868", "0.56772363", "0.5671917", "0.5649669", "0.56481004", "0.56429607", "0.5638402", "0.5636428", "0.5630654", "0.5630654", "0.56263584", "0.5617035", "0.5617035", "0.5616863", "0.56142783", "0.5609484", "0.56080514", "0.55972594", "0.5592", "0.5585736", "0.55833316", "0.55829746", "0.5582476", "0.5581626", "0.5578432", "0.55783045", "0.55774575", "0.5575107", "0.5573437", "0.5565806", "0.55589145", "0.5556978", "0.5556978", "0.5553841", "0.5553841", "0.5553841", "0.55526733", "0.55481315", "0.5543764", "0.5541939", "0.55388695", "0.5537843", "0.5536131", "0.55356914", "0.5535586", "0.5535586", "0.55352354", "0.55350703", "0.55333096", "0.5525744", "0.5525", "0.55246896", "0.5523175", "0.55135334", "0.5512737", "0.5505785", "0.55040896", "0.54951864" ]
0.0
-1
/ In: A Card array representing winnings from either player Out: An integer containing the score calculated from the winnings.
static int calculateScore(Card[] winnings) { int score = 0; for (Card card : winnings) if (card != null) score++; else break; return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayPlayerWinnings()\n {\n for(int card = 0; card < playerCardsWon; card++)\n {\n System.out.println(playerWinnings[card].toString());\n }\n }", "public int trickWinner(){\n Card.NUMBER one = player1Play.getValue();\n Card.NUMBER two = player2Play.getValue();\n Card.NUMBER three = player3Play.getValue();\n Card.NUMBER four = player4Play.getValue();\n Card.SUIT oneSuit = player1Play.getSuit();\n Card.SUIT twoSuit = player2Play.getSuit();\n Card.SUIT threeSuit = player3Play.getSuit();\n Card.SUIT fourSuit = player4Play.getSuit();\n int[] value = new int[4];\n value[0] = Card.getValsVal(one, oneSuit, currentTrumpSuit);\n value[1] = Card.getValsVal(two, twoSuit, currentTrumpSuit);\n value[2] = Card.getValsVal(three, threeSuit, currentTrumpSuit);\n value[3] = Card.getValsVal(four, fourSuit, currentTrumpSuit);\n if(player1Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[0] += 10;\n }\n if(player2Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[1] += 10;\n }\n if(player3Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[2] += 10;\n }\n if(player4Play.getSuit() == firstPlayedSuit && firstPlayedSuit != currentTrumpSuit && value[0] != 7){\n value[3] += 10;\n }\n if(player1Play.getSuit() == currentTrumpSuit || value[0] == 7){\n value[0] += 20;\n }\n if(player2Play.getSuit() == currentTrumpSuit || value[1] == 7){\n value[1] += 20;\n }\n if(player3Play.getSuit() == currentTrumpSuit || value[2] == 7){\n value[2] += 20;\n }\n if(player4Play.getSuit() == currentTrumpSuit || value[3] == 7){\n value[3] += 20;\n }\n int winner = 0;\n int winVal = 0;\n for(int i = 0; i < 4; i++){\n if(value[i] > winVal){\n winVal = value[i];\n winner = i;\n }\n }\n return winner;\n }", "public void playRound(){\n int roundScoreOne = 0;\n int roundScoreTwo = 0 ;\n this.handOne.drawNewHandFrom(gameDeck);\n this.handTwo.drawNewHandFrom(gameDeck);\n roundScoreOne = this.scoreHand(handOne, handTwo);\n roundScoreTwo = this.scoreHand(handTwo, handOne);\n\n System.out.println(\"Your hand: \");\n System.out.println(handOne.toString());\n System.out.println(\"Score: \" + roundScoreOne + \"\\n\");\n\n System.out.println(\"Opponent's hand: \");\n System.out.println(handTwo.toString());\n System.out.println(\"Score: \" + roundScoreTwo + \"\\n\");\n\n if (roundScoreOne > roundScoreTwo) {\n int updateAmount = roundScoreOne - roundScoreTwo;\n this.playerScore += updateAmount;\n System.out.println(\"You score \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n } else if (roundScoreTwo > roundScoreOne) {\n int updateAmount = roundScoreTwo - roundScoreOne;\n this.oppoScore += updateAmount;\n System.out.println(\"Opponent scores \" + updateAmount + \" points !\");\n System.out.println(\"You: \" + playerScore);\n System.out.println(\"Opponent: \" + oppoScore);\n }\n }", "public int[] calculateScore(Player[] players){\n players = board.getPlayers();\n int[] scores = new int[board.getPlayerCount()];\n for(int i = 0; i < players.length; i++){\n scores[i] = players[i].getMoney() + players[i].getCredits() + (players[i].getRank() * 5);\n }\n return scores;\n }", "public void compare(){\n\t\tboolean gameOver = false;\n\t\tfor (int j = 0; j < player.size(); j++){\n\t\t\t/**\n\t\t\t * gameover screen\n\t\t\t */\n\t\t\tif (player.get(j) != input.get(j)){\n\t\t\t\tif (score <= 3){JOptionPane.showMessageDialog(pane, \"Game Over!\\n\" + \"You got the rank \"\n\t\t\t\t\t\t+ \"of a Joker with a score of \" + score + '.');}\n\t\t\t\telse if (score > 3 && score <= 10){JOptionPane.showMessageDialog(pane, \"Game Over!\\n\" +\n\t\t\t\t\"You got the ranking of a Knight with a score of \" + score + '.');}\n\t\t\t\telse if (score > 10 && score <=20){JOptionPane.showMessageDialog(pane, \"Game Over!\\n\" +\n\t\t\t\t\"You got the ranking of a King with a score of \" + score + '.');}\n\t\t\t\telse if (score >20){JOptionPane.showMessageDialog(pane, \"Game Over!\\n\" +\n\t\t\t\t\"You got the ranking of a Master with a score of \" + score + '.');}\n\t\t\t\tgameOver = true;\n\t\t\t\tif (score > highScore){\n\t\t\t\t\thighScore = score;\n\t\t\t\t\tscoreBoard.setHighScore(highScore);\n\t\t\t\t}\n\t\t\t\tplayer.clear();\n\t\t\t\tinput.clear();\n\t\t\t\tlist();\n\t\t\t\t++totalGames;\n\t\t\t\tfindGames();\n\t\t\t\tfindAvg();\n\t\t\t\tscore = 0;\n\t\t\t\tscoreBoard.setScore(score);\n\t\t\t}\n\t\t}\n\t\t/**\n\t\t * starts new round after a successful round\n\t\t */\n\t\tif (player.size() == input.size() && !gameOver){\n\t\t\tplayer.clear();\n\t\t\tscore++;\n\t\t\tscoreBoard.setScore(score);\n\t\t\tstartGame();\n\t\t\t}\n\t}", "private void calcWinner(){\n //local class for finding ties\n class ScoreSorter implements Comparator<Player> {\n public int compare(Player p1, Player p2) {\n return p2.calcFinalScore() - p1.calcFinalScore();\n }\n }\n\n List<Player> winners = new ArrayList<Player>();\n int winningScore;\n\n // convert queue of players into List<Player> for determining winner(s)\n while (players.size() > 0) {\n winners.add(players.remove());\n } \n\n // scoreSorter's compare() should sort in descending order by calcFinalScore()\n // Arrays.sort(winnersPre, new scoreSorter()); // only works w/ normal arrays :(\n Collections.sort(winners, new ScoreSorter());\n\n // remove any players that don't have the winning score\n winningScore = winners.get(0).calcFinalScore();\n for (int i = winners.size()-1; i > 0; i--) { // remove non-ties starting from end, excluding 0\n if (winners.get(i).calcFinalScore() < winningScore) {\n winners.remove(i);\n }\n }\n\n // Announce winners\n boolean hideCalculatingWinnerPopUp = false;\n String winnersString = \"\";\n if (winners.size() > 1) {\n winnersString = \"There's a tie with \" + winners.get(0).calcFinalScore() + \" points. The following players tied: \";\n for (Player p : winners) {\n winnersString += p.getName() + \" \";\n }\n view.showPopUp(hideCalculatingWinnerPopUp, winnersString);\n } else {\n view.showPopUp(hideCalculatingWinnerPopUp, winners.get(0).getName() + \" wins with a score of \" + winners.get(0).calcFinalScore() + \" points! Clicking `ok` will end and close the game.\");\n }\n }", "public static void Cashout(int handWin, int splitWin, Player[] players){\n\t\tdouble totalMoney = 0;\n\t\t\n\t\tfor (int i = 0; i < players.length; i++){\n\t\t\tif (players[i].gethandWin() == 1){\n\t\t\t\ttotalMoney -= players[i].getWager();\n\t\t\t}\n\t\t\t\n\t\t\tif (players[i].gethandWin() == 0){\n\t\t\t\ttotalMoney += players[i].getWager();\n\t\t\t}\n\t\t\t\n\t\t\tif (players[i].getsplitWin() == 1){\n\t\t\t\ttotalMoney -= players[i].getSplitWager();\n\t\t\t}\n\t\t\t\n\t\t\tif (players[i].getsplitWin() == 0){\n\t\t\t\ttotalMoney += players[i].getSplitWager();\n\t\t\t}\n\t\t}\n\t}", "public List<Player> playMatch(List<Player> arrayListPlayers) {\n\n //instantiate Lists for winners / losers\n List<Player> winners = new ArrayList<>();\n List<Player> losers = new ArrayList<>();\n\n //Pairing up - each Player with the next Player, iterator runs for every 2\n for (int i = 0; i < arrayListPlayers.size(); i += 2) {\n\n System.out.println(arrayListPlayers.get(i).printName() + \" (\" + arrayListPlayers.get(i).score + \") vs \"\n + arrayListPlayers.get((i + 1) % arrayListPlayers.size()).printName() + \" (\" + arrayListPlayers.get(i + 1).score + \")\");\n\n //Extra layer of random scoring, so calculateScore is run with each round\n //Without this, players get an initial score that stay with them through the tournament\n arrayListPlayers.get(i).calculateScore();\n\n //Use score to decipher winner, if (i) score is greater than (i +1) score then add (i) to winners List\n if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n //And if (i) score is less than (i + 1) score add (i + 1) to winners List\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i + 1));\n\n\n //extra if statement to handle draws, if score is equal add player [0] to winners List, could randomise this?\n } else if\n (arrayListPlayers.get(i).score == arrayListPlayers.get(i + 1).score) {\n winners.add(arrayListPlayers.get(i));\n }\n\n /**\n * Additional if statements for adding Player objects to new List 'losers'\n */\n //Create List of losers (not output)\n if (arrayListPlayers.get(i).score < arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i));\n losers.add(arrayListPlayers.get(i));\n\n } else if (arrayListPlayers.get(i).score > arrayListPlayers.get(i + 1).score) {\n winners.remove(arrayListPlayers.get(i + 1));\n losers.add(arrayListPlayers.get(i + 1));\n }\n }\n\n /**\n * This section of the playRound method outputs the list of winners for each round\n * A sleep function was added in attempt to slow down the output\n */\n\n System.out.println(\"\\n-x-x-x-x-x-x-x W I N N E R S x-x-x-x-x-x-x-\\n\");\n //Loop through winners and attach names\n try {\n sleep(10);\n for (int i = 0; i < winners.size(); i++) {\n //SysOut to console the winners\n System.out.println(winners.get(i).printName() + \" won with \" + winners.get(i).score + \" points\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //Execution completed return winners List<>\n return winners;\n\n }", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "private static double calWinRate5Cards(Card[] cards, int playerNum) {\n\t\tint winTimes = 0;\n\t\tPlayer[] oppsPlayers = new Player[playerNum - 1]; \n\t\tPlayer mePlayer = new Player();\n\t\tfor(int i = 0; i<50; i++){\n\t\t\t//生成playerNum-1个人,每个人2+3=5张\t\t\n\t\t\t\n\t\t}\n\t\treturn 0.6;\n\t}", "private int determineWinning(GamePlayerInterface player, GamePlayerInterface dealer)\n {\n \n int playerValue = player.getTotalCardsValue();\n int dealerValue = dealer.getTotalCardsValue();\n int result = 0;\n \n if(dealerValue > playerValue)\n {\n \t view.print(\"Dealer Wins\");\n \t view.printLine();\n \t result = 1;\n }\n \n else if(dealerValue < playerValue)\n {\n \t view.print(\"Player Wins\");\n \t view.printLine();\n \t result = 2;\n }\n \n else{\n \t view.print(\"Match Draw!\");\n \t view.printLine();\n }\n \n return result;\n }", "public int winningPlayerScore(LinkedList<Integer> player1Cards, LinkedList<Integer> player2Cards){\n while (!player1Cards.isEmpty() && !player2Cards.isEmpty()){\n int player1Move = player1Cards.poll();\n int player2Move = player2Cards.poll();\n if (player1Move > player2Move){\n player1Cards.add(player1Move);\n player1Cards.add(player2Move);\n }\n else {\n player2Cards.add(player2Move);\n player2Cards.add(player1Move);\n }\n }\n if (player1Cards.isEmpty())\n return countWinnerScore(player2Cards);\n else\n return countWinnerScore(player1Cards);\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n /*\n * Write your code here.\n */\n List<Integer> ranks = new ArrayList<>();\n int i=0;\n while(i<scores.length-1) {\n ranks.add(scores[i]);\n int j=i+1;\n while(j<scores.length && scores[i]==scores[j]) {\n j+=1;\n }\n i=j;\n }\n ranks.add(scores[scores.length-1]);\n int[] aliceRank = new int[alice.length];\n for (int j=0; j< alice.length; j++) {\n int index = Collections.binarySearch(ranks, alice[j],Comparator.reverseOrder());\n aliceRank[j] = index > 0 ? index + 1 : index == 0 ? 1 : Math.abs(index);\n }\n return aliceRank;\n }", "public int winningPlayerScore(LinkedList<Integer> player1Cards, LinkedList<Integer> player2Cards){\n if (recursiveCombat(player1Cards, player2Cards) == 1)\n return countWinnerScore(player1Cards);\n else\n return countWinnerScore(player2Cards);\n }", "public void win() {\n if (turn == 1) {\n p1.incrementLegs();\n if (p1.getLegs() == 5) {\n p1.incrementSets();\n p1.setLegs(0);\n p2.setSets(0);\n\n }\n if (p1LastScore > p1.getHighout()) {\n p1.setHighout(p1LastScore);\n\n }\n\n if (p1.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p1.getHighout();\n }\n } else if (turn == 2) {\n p2.incrementLegs();\n if (p2.getLegs() == 5) {\n p2.incrementSets();\n p2.setLegs(0);\n p1.setSets(0);\n\n }\n if (p2LastScore > p2.getHighout()) {\n p2.setHighout(p2LastScore);\n }\n\n if (p2.getHighout() > OVERALL_HIGH_OUT) {\n OVERALL_HIGH_OUT = p2.getHighout();\n }\n\n\n\n }\n changeFirstTurn();\n win = true;\n\n\n\n }", "public int winner() {\n if(humanPlayerHits == 17) {\n return 1;\n }\n if(computerPlayerHits == 17){\n return 2;\n }\n return 0;\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n \tal = new ArrayList<Integer>();\n \tint len = scores.length;\n \tranks = new int[len];\n \tal.add(scores[0]);\n \tranks[0]=1;\n \tfor(int i=1;i<len;++i)\n \t{\n \t\tal.add(scores[i]);\n \t\tif(scores[i]==scores[i-1])\n \t\t\tranks[i]=ranks[i-1];\n \t\telse\n \t\t\tranks[i]=ranks[i-1]+1;\n \t}\n \tint len2=alice.length;\n \tint[] ranksArr= new int[len2];\n \tfor(int i=0;i<len2;++i)\n \t{\n \t\tint binarySearch = Collections.binarySearch(al,alice[i],Collections.reverseOrder());\n \t\tif(binarySearch>=0)\n \t\t\tranksArr[i]=ranks[binarySearch];\n \t\telse\n \t\t{\n \t\t\tbinarySearch+=1;\n \t\tbinarySearch=-binarySearch;\n \t\t\tif(binarySearch==len)\n \t\t\t{\n \t\t\t\tbinarySearch-=1;\n \t\t\t\tranksArr[i]=ranks[binarySearch]+1;\n \t\t\t}\n \t\t\telse\n \t\t\t\tranksArr[i]=ranks[binarySearch];\n \t\t\t\n \t\t}\n \t\t\t\n \t}\n \treturn ranksArr;\n }", "public int[] getOtherPlayerScore(int[] details, int round) throws RemoteException {\n if (details[1] == 1) {\n return sd.getGames().get(details[0]).getRound(round).\n getPlayerScore(0);\n }\n return sd.getGames().get(details[0]).getRound(round).\n getPlayerScore(1);\n }", "public int checkForWinner() {\n\n // Check horizontal wins\n for (int i = 0; i <= 6; i += 3)\t{\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+1] == HUMAN_PLAYER &&\n mBoard[i+2]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+1]== COMPUTER_PLAYER &&\n mBoard[i+2] == COMPUTER_PLAYER)\n return 3;\n }\n\n // Check vertical wins\n for (int i = 0; i <= 2; i++) {\n if (mBoard[i] == HUMAN_PLAYER &&\n mBoard[i+3] == HUMAN_PLAYER &&\n mBoard[i+6]== HUMAN_PLAYER)\n return 2;\n if (mBoard[i] == COMPUTER_PLAYER &&\n mBoard[i+3] == COMPUTER_PLAYER &&\n mBoard[i+6]== COMPUTER_PLAYER)\n return 3;\n }\n\n // Check for diagonal wins\n if ((mBoard[0] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[8] == HUMAN_PLAYER) ||\n (mBoard[2] == HUMAN_PLAYER &&\n mBoard[4] == HUMAN_PLAYER &&\n mBoard[6] == HUMAN_PLAYER))\n return 2;\n if ((mBoard[0] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[8] == COMPUTER_PLAYER) ||\n (mBoard[2] == COMPUTER_PLAYER &&\n mBoard[4] == COMPUTER_PLAYER &&\n mBoard[6] == COMPUTER_PLAYER))\n return 3;\n\n // Check for tie\n for (int i = 0; i < BOARD_SIZE; i++) {\n // If we find a number, then no one has won yet\n if (mBoard[i] != HUMAN_PLAYER && mBoard[i] != COMPUTER_PLAYER)\n return 0;\n }\n\n // If we make it through the previous loop, all places are taken, so it's a tie\n return 1;\n }", "public int evaluateWinner() {\n int winner = -1; //-1 house, 0 tie, 1 player\n boolean playerBlackjack = false;\n\n //Player got winnable score\n if (playerScore <= 21) {\n\n //Dealer got a winnable score\n if (dealerScore <= 21) {\n\n //Dealer got blackjack\n if (dealerScore == 21) {\n //Player also got blackjack, tie\n if (playerScore == 21) {\n winner = 0;\n }\n //Player did not have blackjack, loses\n else {\n winner = -1;\n }\n }\n //Player got blackjack, but dealer did not\n else if (playerScore == 21) {\n playerBlackjack = true;\n winner = 1;\n }\n //Tie\n else if (dealerScore == playerScore) {\n winner = 0;\n }\n //Player scored higher than dealer, but did not get blackjack\n else if (playerScore > dealerScore) {\n winner = 1;\n }\n }\n //Dealer went over 21\n else {\n //If player got blackjack\n if (playerScore == 21) {\n playerBlackjack = true;\n }\n\n winner = 1;\n }\n }\n\n //House won\n if (winner == -1) {\n if (playerCash <= 0)\n restartGame();\n else\n return winner;\n }\n //Tie\n else if (winner == 0) {\n playerCash += playerBet;\n return winner;\n }\n //Player won\n else {\n if (playerBlackjack) {\n //Player won, give back original bet AND blackjack earnings\n playerCash += (playerBet + (playerBet * 1.5));\n } else {\n //Player won, give back bet AND earnings\n playerCash += (playerBet + playerBet);\n }\n\n return winner;\n }\n\n return winner;\n }", "static int[] climbingLeaderboard(int[] scores, int[] alice) {\n\t\tint[] ranks = new int[scores.length];\n\t\tint[] aliceRanks = new int[alice.length];\n\n\t\tint endIndex = -1;\n\t\tint currentElement = Integer.MIN_VALUE;\n\n\t\tfor (int i = 0; i < ranks.length; i++) {\n\t\t\tif (currentElement != scores[i]) {\n\t\t\t\tranks[++endIndex] = scores[i];\n\t\t\t\tcurrentElement = scores[i];\n\t\t\t}\n\t\t}\n\n\t\tint aliceEndIndex = -1;\n\t\tfor (int i = 0; i < aliceRanks.length; i++) {\n\t\t\tint currScore = alice[i];\n\t\t\t\n\t\t\tint globalRankApprox = binarySearch(ranks, alice[i], 0, endIndex);\n\t\t\t\n\t\t\tif (currScore >= ranks[globalRankApprox]) {\n\t\t\t\taliceRanks[++aliceEndIndex] = globalRankApprox+1;\n\t\t\t}else{\n\t\t\t\taliceRanks[++aliceEndIndex] = globalRankApprox+1+1;\n\t\t\t}\n\t\t}\n\n\t\treturn aliceRanks;\n\t}", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public int whoWin(){\r\n int winner = -1;\r\n \r\n int highest = 0;\r\n \r\n for(Player player : discWorld.getPlayer_HASH().values()){\r\n if(getPlayerPoints(player) > highest){\r\n highest = getPlayerPoints(player);\r\n winner = player.getID();\r\n }\r\n \r\n }\r\n \r\n return winner;\r\n }", "public int[] computeHandPositions(int[] cardIdxsToDeal, int playerIdx, Round round) {\r\n\t\t\tif (this.decisionType == DecisionType.SCANNER) {\r\n\t\t\t\tif (round.getPrintToSystemOut()) {\r\n\t\t\t\t\tSystem.out.println(\" Play cards, one number per card dealt. 0 = top hand, 1 = middle hand, 2 = bottom hand, 3 = discard card. Example: 1 2 2\");\r\n\t\t\t\t}\r\n\t\t\t\tassert(this.scanner != null);\r\n\t\t\t\tint[] handPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\tint handPositionsIdx = 0;\r\n\t\t\t\twhile (handPositionsIdx < cardIdxsToDeal.length && this.scanner.hasNextInt()) {\r\n\t\t\t\t\tint handPositionToPlay = this.scanner.nextInt();\r\n\t\t\t\t\tif (handPositionToPlay == TOP) {\r\n\t\t\t\t\t\thandPositions[handPositionsIdx] = handPositionToPlay;\r\n\t\t\t\t\t\thandPositionsIdx++;\r\n\t\t\t\t\t} else if (handPositionToPlay == MIDDLE) {\r\n\t\t\t\t\t\thandPositions[handPositionsIdx] = handPositionToPlay;\r\n\t\t\t\t\t\thandPositionsIdx++;\r\n\t\t\t\t\t} else if (handPositionToPlay == BOTTOM) {\r\n\t\t\t\t\t\thandPositions[handPositionsIdx] = handPositionToPlay;\r\n\t\t\t\t\t\thandPositionsIdx++;\r\n\t\t\t\t\t} else if (handPositionToPlay == DISCARD) {\r\n\t\t\t\t\t\thandPositions[handPositionsIdx] = DISCARD;\r\n\t\t\t\t\t\thandPositionsIdx++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (round.getPrintToSystemOut()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" You can only choose between hand positions 0, 1, or 2, or discard with 3! You picked \\\"\" + handPositionToPlay + \"\\\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn handPositions;\r\n\t\t\t} else if (this.decisionType == DecisionType.RANDOM) {\r\n\t\t\t\tint[] handPositions = getRandomHandPositions(cardIdxsToDeal, playerIdx, round);\r\n\t\t\t\tif (round.getPrintToSystemOut() && round.getDebugPrintToSystemOut()) {\r\n\t\t\t\t\tSystem.out.println(\" Player \" + this.id + \" (\" + this.decisionType.toString() + \") hand positions: \" + Arrays.toString(handPositions));\r\n\t\t\t\t}\r\n\t\t\t\treturn handPositions;\r\n\t\t\t} else if (this.decisionType == DecisionType.MONTE_CARLO_10000) {\r\n\t\t\t\tint numSamples = this.decisionType.getNumMonteCarloSamples();\r\n\t\t\t\tMap<Integer, Double> handPositionsHash2TotalHandPositionsScore = new HashMap<Integer, Double>();\r\n\t\t\t\tMap<Integer, Integer> handPositionsHash2Count = new HashMap<Integer, Integer>();\r\n\t\t\t\t\r\n\t\t\t\tint[] currHandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\twhile (nextPossibleHandPosition(currHandPositions, playerIdx, round)) {\r\n\t\t\t\t\tif (!isLegalHandPosition(currHandPositions, playerIdx, round, false)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (int i = 0; i < numSamples; i++) {\r\n\t\t\t\t\t\tint numPlayers = round.getPlayers().length;\r\n\t\t\t\t\t\tPlayer[] randomPlayers = new Player[numPlayers];\r\n\t\t\t\t\t\tfor (int j = 0; j < numPlayers; j++) {\r\n\t\t\t\t\t\t\tPlayer player = round.getPlayers()[j];\r\n\t\t\t\t\t\t\tPlayer clonedPlayer = new Player(player.getId(), DecisionType.RANDOM, 0, player.isInFantasyLand());\r\n\t\t\t\t\t\t\trandomPlayers[j] = clonedPlayer;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tRound clonedRound = new Round(round, randomPlayers, false, false, true);\r\n\r\n\t\t\t\t\t\t// Finish the current hand\r\n\t\t\t\t\t\tclonedRound.playCardsForPlayer(currHandPositions, cardIdxsToDeal, playerIdx);\r\n\t\t\t\t\t\tif (clonedRound.getNumTurn() == 0) {\r\n\t\t\t\t\t\t\tclonedRound.startRound(playerIdx + 1);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tclonedRound.nextTurn(playerIdx + 1);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Finish the rest of the round\r\n\t\t\t\t\t\twhile (!clonedRound.isFinished()) {\r\n\t\t\t\t\t\t\tclonedRound.nextTurn();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tclonedRound.endRound();\r\n\r\n\t\t\t\t\t\tInteger minScore = null;\r\n\t\t\t\t\t\tfor (Player player : randomPlayers) {\r\n\t\t\t\t\t\t\tif (minScore == null || player.getScore() < minScore) {\r\n\t\t\t\t\t\t\t\tminScore = player.getScore();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tassert(minScore != null);\r\n\t\t\t\t\t\tint totalScoreNormalized = 0;\r\n\t\t\t\t\t\tfor (Player player : randomPlayers) {\r\n\t\t\t\t\t\t\ttotalScoreNormalized += (player.getScore() - minScore);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdouble handPositionsScore;\r\n\t\t\t\t\t\tif (totalScoreNormalized == 0) {\r\n\t\t\t\t\t\t\thandPositionsScore = 0;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\thandPositionsScore = (randomPlayers[playerIdx].getScore() - minScore) / ((double)totalScoreNormalized);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tint handPositionsHash = 0;\r\n\t\t\t\t\t\tfor (int j = 0; j < currHandPositions.length; j++) {\r\n\t\t\t\t\t\t\thandPositionsHash = 10 * handPositionsHash + currHandPositions[j];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tDouble oldScore = handPositionsHash2TotalHandPositionsScore.get(handPositionsHash);\r\n\t\t\t\t\t\tif (oldScore == null) {\r\n\t\t\t\t\t\t\toldScore = 0d;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\thandPositionsHash2TotalHandPositionsScore.put(handPositionsHash, oldScore + handPositionsScore);\r\n\r\n\t\t\t\t\t\tInteger oldCount = handPositionsHash2Count.get(handPositionsHash);\r\n\t\t\t\t\t\tif (oldCount == null) {\r\n\t\t\t\t\t\t\toldCount = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\thandPositionsHash2Count.put(handPositionsHash, oldCount + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tassert(handPositionsHash2TotalHandPositionsScore.size() > 0);\r\n\t\t\t\tint[] bestHandPositions = null;\r\n\t\t\t\tDouble bestScore = null;\r\n\t\t\t\tint bestHandPositionsCount = -1;\r\n\t\t\t\tfor (Map.Entry<Integer, Double> entry : handPositionsHash2TotalHandPositionsScore.entrySet()) {\r\n\t\t\t\t\tInteger handPositionsHash = entry.getKey();\r\n\t\t\t\t\tdouble totalScore = entry.getValue();\r\n\t\t\t\t\tint count = handPositionsHash2Count.get(handPositionsHash);\r\n\t\t\t\t\tdouble score = totalScore / count;\r\n\t\t\t\t\t\r\n\t\t\t\t\tint[] handPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\tfor (int i = handPositions.length - 1; i >= 0; i --) { // reverse the hash\r\n\t\t\t\t\t\thandPositions[i] = handPositionsHash % 10;\r\n\t\t\t\t\t\thandPositionsHash /= 10;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tassert(handPositionsHash == 0);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (bestScore == null || score > bestScore) {\r\n\t\t\t\t\t\tbestScore = score;\r\n\t\t\t\t\t\tbestHandPositions = handPositions;\r\n\t\t\t\t\t\tbestHandPositionsCount = count;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tassert(bestHandPositions != null);\r\n\r\n\t\t\t\tif (round.getPrintToSystemOut() && round.getDebugPrintToSystemOut()) {\r\n\t\t\t\t\tSystem.out.println(\" Player \" + this.id + \" (\" + this.decisionType.toString() + \") hand positions: \" + Arrays.toString(bestHandPositions) + \" (bestScore=\" + bestScore + \", count=\" + bestHandPositionsCount + \")\");\r\n\t\t\t\t}\r\n\t\t\t\treturn bestHandPositions;\r\n\t\t\t} else if (this.decisionType == DecisionType.HEURISTIC_MONTE_CARLO_10000) {\r\n\t\t\t\tint numSamples = this.decisionType.getNumMonteCarloSamples();\r\n\t\t\t\tif (round.getNumTurn() == 0) { // Use heuristics on the first turn. monte carlo itself doesnt do very well even with 100,000 samples, and its very slow\r\n\t\t\t\t\tint[] handPositions = null;\r\n\t\t\t\t\tint[][] dealtCards = new int[cardIdxsToDeal.length][];\r\n\t\t\t\t\tfor (int i = 0; i < cardIdxsToDeal.length; i++) {\r\n\t\t\t\t\t\tdealtCards[i] = round.getFullDeck()[cardIdxsToDeal[i]];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (round.getPlayers()[playerIdx].isInFantasyLand()) {\r\n\t\t\t\t\t\tint[] bestHandPositions = null;\r\n\t\t\t\t\t\tInteger bestHandPositionsScore = null;\r\n\t\t\t\t\t\tint[] currHandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\tcurrHandPositions[currHandPositions.length - 1] = -1; // going to increment in the while check loop, so dont skip the first hand positions\r\n\t\t\t\t\t\twhile (nextPossibleHandPosition(currHandPositions, playerIdx, round)) {\r\n\t\t\t\t\t\t\tif (!isLegalHandPosition(currHandPositions, playerIdx, round, false)) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tHand topHand = new Hand();\r\n\t\t\t\t\t\t\tHand middleHand = new Hand();\r\n\t\t\t\t\t\t\tHand bottomHand = new Hand();\r\n\t\t\t\t\t\t\tfor (int i = 0; i < currHandPositions.length; i++) {\r\n\t\t\t\t\t\t\t\tint handPositionToPlay = currHandPositions[i];\r\n\t\t\t\t\t\t\t\tif (handPositionToPlay == TOP) {\r\n\t\t\t\t\t\t\t\t\ttopHand.addCard(dealtCards[i]);\r\n\t\t\t\t\t\t\t\t} else if (handPositionToPlay == MIDDLE) {\r\n\t\t\t\t\t\t\t\t\tmiddleHand.addCard(dealtCards[i]);\r\n\t\t\t\t\t\t\t\t} else if (handPositionToPlay == BOTTOM) {\r\n\t\t\t\t\t\t\t\t\tbottomHand.addCard(dealtCards[i]);\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t} else if (handPositionToPlay == DISCARD) {\r\n\t\t\t\t\t\t\t\t\t// Don't add it to any hand\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (round.getPrintToSystemOut()) {\r\n\t\t\t\t\t\t\t\t\t\tLOGGER.log(Level.WARNING, \"Unknown hand position to play \\\"\" + handPositionToPlay + \"\\\". Don't know what to do -- skipping loop and hoping nothing breaks.\");\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tint totalBonusScore;\r\n\t\t\t\t\t\t\tif (isFouled(topHand, middleHand, bottomHand)) {\r\n\t\t\t\t\t\t\t\ttotalBonusScore = -1; // a non-fouled bonus score of 0 should take priority over a fouled hand\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ttotalBonusScore = getBonusScore(topHand, TOP) + getBonusScore(middleHand, MIDDLE) + getBonusScore(bottomHand, BOTTOM);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (bestHandPositionsScore == null || totalBonusScore > bestHandPositionsScore) {\r\n\t\t\t\t\t\t\t\tbestHandPositions = new int[currHandPositions.length];\r\n\t\t\t\t\t\t\t\tSystem.arraycopy(currHandPositions, 0, bestHandPositions, 0, currHandPositions.length);\r\n\t\t\t\t\t\t\t\tbestHandPositionsScore = totalBonusScore;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\thandPositions = bestHandPositions;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tassert(dealtCards.length <= 5);\r\n\t\t\t\t\t\tint[] suit2Count = new int[4];\r\n\t\t\t\t\t\tfor (int[] card : dealtCards) {\r\n\t\t\t\t\t\t\tsuit2Count[card[Poker.SUIT]]++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tInteger suitOfMaxSameSuitCards = null;\r\n\t\t\t\t\t\tInteger maxSameSuitCards = null;\r\n\t\t\t\t\t\tfor (int i = 0; i < suit2Count.length; i++) {\r\n\t\t\t\t\t\t\tint count = suit2Count[i];\r\n\t\t\t\t\t\t\tif (maxSameSuitCards == null || count > maxSameSuitCards) {\r\n\t\t\t\t\t\t\t\tmaxSameSuitCards = count;\r\n\t\t\t\t\t\t\t\tsuitOfMaxSameSuitCards = i;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tassert(suitOfMaxSameSuitCards != null && maxSameSuitCards != null);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tHand hand = new Hand();\r\n\t\t\t\t\t\tfor (int[] card : dealtCards) {\r\n\t\t\t\t\t\t\thand.addCard(card);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tInteger maxConsecutiveCardLength = null;\r\n\t\t\t\t\t\tInteger startingIdxOfMaxConsecutiveCardLength = null;\r\n\t\t\t\t\t\tInteger currConsecutiveCardLength = null;\r\n\t\t\t\t\t\tInteger currStartingIdxOfConsecutiveCards = null;\r\n\t\t\t\t\t\tfor (int i = 0; i < hand.getNumCards() - 1; i++) {\r\n\t\t\t\t\t\t\tif (hand.getCardValue(i) - hand.getCardValue(i + 1) == 1) {\r\n\t\t\t\t\t\t\t\tif (currConsecutiveCardLength == null) {\r\n\t\t\t\t\t\t\t\t\tcurrConsecutiveCardLength = 1;\r\n\t\t\t\t\t\t\t\t\tcurrStartingIdxOfConsecutiveCards = i;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tcurrConsecutiveCardLength++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tif (currConsecutiveCardLength != null) {\r\n\t\t\t\t\t\t\t\t\tif (maxConsecutiveCardLength == null ||\r\n\t\t\t\t\t\t\t\t\t\t\tcurrConsecutiveCardLength > maxConsecutiveCardLength) {\r\n\t\t\t\t\t\t\t\t\t\tmaxConsecutiveCardLength = currConsecutiveCardLength;\r\n\t\t\t\t\t\t\t\t\t\tstartingIdxOfMaxConsecutiveCardLength = currStartingIdxOfConsecutiveCards;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcurrConsecutiveCardLength = null;\r\n\t\t\t\t\t\t\t\t\tcurrStartingIdxOfConsecutiveCards = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (currConsecutiveCardLength != null) {\r\n\t\t\t\t\t\t\tif (maxConsecutiveCardLength == null ||\r\n\t\t\t\t\t\t\t\t\tcurrConsecutiveCardLength > maxConsecutiveCardLength) {\r\n\t\t\t\t\t\t\t\tmaxConsecutiveCardLength = currConsecutiveCardLength;\r\n\t\t\t\t\t\t\t\tstartingIdxOfMaxConsecutiveCardLength = currStartingIdxOfConsecutiveCards;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcurrConsecutiveCardLength = null;\r\n\t\t\t\t\t\t\tcurrStartingIdxOfConsecutiveCards = null;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmaxConsecutiveCardLength = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (hand.getComboType() == ComboType.ROYAL_FLUSH ||\r\n\t\t\t\t\t\t\t\thand.getComboType() == ComboType.STRAIGHT_FLUSH) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < handPositions.length; i++) {\r\n\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (hand.getComboType() == ComboType.FOUR_OF_A_KIND) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\tif (value == hand.getComboCardValue(0)) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (value < WEAK_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM; // weak cards at the bottom\r\n\t\t\t\t\t\t\t\t\t} else if (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (hand.getComboType() == ComboType.FULL_HOUSE ||\r\n\t\t\t\t\t\t\t\thand.getComboType() == ComboType.FLUSH ||\r\n\t\t\t\t\t\t\t\thand.getComboType() == ComboType.STRAIGHT) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < handPositions.length; i++) {\r\n\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (hand.getComboType() == ComboType.TWO_PAIRS) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\tif (value == hand.getComboCardValue(0) ||\r\n\t\t\t\t\t\t\t\t\t\tvalue == hand.getComboCardValue(hand.getNumComboCards() - 1)) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (hand.getComboType() == ComboType.THREE_OF_A_KIND) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\tif (value == hand.getComboCardValue(0)) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (maxSameSuitCards == 4) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint suit = dealtCards[i][Poker.SUIT];\r\n\t\t\t\t\t\t\t\tif (suit == suitOfMaxSameSuitCards) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (maxConsecutiveCardLength == 4) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tif (i >= startingIdxOfMaxConsecutiveCardLength &&\r\n\t\t\t\t\t\t\t\t\t\ti < startingIdxOfMaxConsecutiveCardLength + maxConsecutiveCardLength) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (maxSameSuitCards == 3) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint suit = dealtCards[i][Poker.SUIT];\r\n\t\t\t\t\t\t\t\tif (suit == suitOfMaxSameSuitCards) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (maxConsecutiveCardLength == 3) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tif (i >= startingIdxOfMaxConsecutiveCardLength &&\r\n\t\t\t\t\t\t\t\t\t\ti < startingIdxOfMaxConsecutiveCardLength + maxConsecutiveCardLength) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (hand.getComboType() == ComboType.PAIR) {\r\n\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\tint numBottomCards = 0;\r\n\t\t\t\t\t\t\tint numTopCards = 0;\r\n\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\tif (value == hand.getComboCardValue(0)) {\r\n\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t\tnumBottomCards++;\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tif (value < WEAK_VALUE && numBottomCards < 3) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t\t\tnumBottomCards++;\r\n\t\t\t\t\t\t\t\t\t} else if (value < MEDIUM_VALUE && numTopCards < 2) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t\tnumTopCards++;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tint numSuitsOfTwo = 0;\r\n\t\t\t\t\t\t\tfor (int count : suit2Count) {\r\n\t\t\t\t\t\t\t\tif (count >= 2) {\r\n\t\t\t\t\t\t\t\t\tnumSuitsOfTwo++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (numSuitsOfTwo == 1) {\r\n\t\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\t\tint numTopCards = 0;\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\t\tint suit = dealtCards[i][Poker.SUIT];\r\n\t\t\t\t\t\t\t\t\tif (suit == suitOfMaxSameSuitCards) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tint value = dealtCards[i][Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\t\tif (value < MEDIUM_VALUE && numTopCards < 2) {\r\n\t\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP; // medium cards at the top, don't want it to be too strong for higher chance of fouling\r\n\t\t\t\t\t\t\t\t\t\t\tnumTopCards++;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else if (numSuitsOfTwo == 2) {\r\n\t\t\t\t\t\t\t\tInteger highestSuitedCardValue = null;\r\n\t\t\t\t\t\t\t\tInteger suitOfHighestSuitedCardValue = null;\r\n\t\t\t\t\t\t\t\tfor (int[] card: dealtCards) {\r\n\t\t\t\t\t\t\t\t\tint suit = card[Poker.SUIT];\r\n\t\t\t\t\t\t\t\t\tif (suit2Count[suit] == 2) {\r\n\t\t\t\t\t\t\t\t\t\tint value = card[Poker.VALUE];\r\n\t\t\t\t\t\t\t\t\t\tif (highestSuitedCardValue == null || value > highestSuitedCardValue) {\r\n\t\t\t\t\t\t\t\t\t\t\thighestSuitedCardValue = value;\r\n\t\t\t\t\t\t\t\t\t\t\tsuitOfHighestSuitedCardValue = suit;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tassert(highestSuitedCardValue != null);\r\n\t\t\t\t\t\t\t\tassert(suitOfHighestSuitedCardValue != null);\r\n\t\t\t\t\t\t\t\tInteger suitOfLowerSuitedCardValue = null;\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < suit2Count.length; i++) {\r\n\t\t\t\t\t\t\t\t\tif (i == suitOfHighestSuitedCardValue) {\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif (suit2Count[i] == 2) {\r\n\t\t\t\t\t\t\t\t\t\tsuitOfLowerSuitedCardValue = i;\r\n\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\thandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\t\t\tfor (int i = 0; i < dealtCards.length; i++) {\r\n\t\t\t\t\t\t\t\t\tint suit = dealtCards[i][Poker.SUIT];\r\n\t\t\t\t\t\t\t\t\tif (suit == suitOfHighestSuitedCardValue) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = BOTTOM;\r\n\t\t\t\t\t\t\t\t\t} else if (suit == suitOfLowerSuitedCardValue) {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = MIDDLE;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandPositions[i] = TOP;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(handPositions != null);\r\n\t\t\t\t\tif (round.getPrintToSystemOut() && round.getDebugPrintToSystemOut()) {\r\n\t\t\t\t\t\tSystem.out.println(\" Player \" + this.id + \" (\" + this.decisionType.toString() + \") hand positions: \" + Arrays.toString(handPositions) + \" (HEURISTIC)\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn handPositions;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tMap<Integer, Double> handPositionsHash2TotalHandPositionsScore = new HashMap<Integer, Double>();\r\n\t\t\t\t\tMap<Integer, Integer> handPositionsHash2Count = new HashMap<Integer, Integer>();\r\n\r\n\t\t\t\t\tint[] currHandPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\tcurrHandPositions[currHandPositions.length - 1] = -1; // going to increment in the while check loop, so dont skip the first hand positions\r\n\t\t\t\t\twhile (nextPossibleHandPosition(currHandPositions, playerIdx, round)) {\r\n\t\t\t\t\t\tif (!isLegalHandPosition(currHandPositions, playerIdx, round, false)) {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < numSamples; i++) {\r\n\t\t\t\t\t\t\tint numPlayers = round.getPlayers().length;\r\n\t\t\t\t\t\t\tPlayer[] randomPlayers = new Player[numPlayers];\r\n\t\t\t\t\t\t\tfor (int j = 0; j < numPlayers; j++) {\r\n\t\t\t\t\t\t\t\tPlayer player = round.getPlayers()[j];\r\n\t\t\t\t\t\t\t\tPlayer clonedPlayer = new Player(player.getId(), DecisionType.RANDOM, 0, player.isInFantasyLand());\r\n\t\t\t\t\t\t\t\trandomPlayers[j] = clonedPlayer;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tRound clonedRound = new Round(round, randomPlayers, false, false, true);\r\n\r\n\t\t\t\t\t\t\t// Finish the current hand\r\n\t\t\t\t\t\t\tclonedRound.playCardsForPlayer(currHandPositions, cardIdxsToDeal, playerIdx);\r\n\t\t\t\t\t\t\tif (clonedRound.getNumTurn() == 0) {\r\n\t\t\t\t\t\t\t\tclonedRound.startRound(playerIdx + 1);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tclonedRound.nextTurn(playerIdx + 1);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t// Finish the rest of the round\r\n\t\t\t\t\t\t\twhile (!clonedRound.isFinished()) {\r\n\t\t\t\t\t\t\t\tclonedRound.nextTurn();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tclonedRound.endRound();\r\n\r\n\t\t\t\t\t\t\tInteger minScore = null;\r\n\t\t\t\t\t\t\tfor (Player player : randomPlayers) {\r\n\t\t\t\t\t\t\t\tif (minScore == null || player.getScore() < minScore) {\r\n\t\t\t\t\t\t\t\t\tminScore = player.getScore();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tassert(minScore != null);\r\n\t\t\t\t\t\t\tint totalScoreNormalized = 0;\r\n\t\t\t\t\t\t\tfor (Player player : randomPlayers) {\r\n\t\t\t\t\t\t\t\ttotalScoreNormalized += (player.getScore() - minScore);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tdouble handPositionsScore;\r\n\t\t\t\t\t\t\tif (totalScoreNormalized == 0) {\r\n\t\t\t\t\t\t\t\thandPositionsScore = 0;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\thandPositionsScore = (randomPlayers[playerIdx].getScore() - minScore) / ((double)totalScoreNormalized);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tint handPositionsHash = 0;\r\n\t\t\t\t\t\t\tfor (int j = 0; j < currHandPositions.length; j++) {\r\n\t\t\t\t\t\t\t\thandPositionsHash = 10 * handPositionsHash + currHandPositions[j];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tDouble oldScore = handPositionsHash2TotalHandPositionsScore.get(handPositionsHash);\r\n\t\t\t\t\t\t\tif (oldScore == null) {\r\n\t\t\t\t\t\t\t\toldScore = 0d;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thandPositionsHash2TotalHandPositionsScore.put(handPositionsHash, oldScore + handPositionsScore);\r\n\r\n\t\t\t\t\t\t\tInteger oldCount = handPositionsHash2Count.get(handPositionsHash);\r\n\t\t\t\t\t\t\tif (oldCount == null) {\r\n\t\t\t\t\t\t\t\toldCount = 0;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thandPositionsHash2Count.put(handPositionsHash, oldCount + 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tassert(handPositionsHash2TotalHandPositionsScore.size() > 0);\r\n\t\t\t\t\tint[] bestHandPositions = null;\r\n\t\t\t\t\tDouble bestScore = null;\r\n\t\t\t\t\tint bestHandPositionsCount = -1;\r\n\t\t\t\t\tfor (Map.Entry<Integer, Double> entry : handPositionsHash2TotalHandPositionsScore.entrySet()) {\r\n\t\t\t\t\t\tInteger handPositionsHash = entry.getKey();\r\n\t\t\t\t\t\tdouble totalScore = entry.getValue();\r\n\t\t\t\t\t\tint count = handPositionsHash2Count.get(handPositionsHash);\r\n\t\t\t\t\t\tdouble score = totalScore / count;\r\n\r\n\t\t\t\t\t\tint[] handPositions = new int[cardIdxsToDeal.length];\r\n\t\t\t\t\t\tfor (int i = handPositions.length - 1; i >= 0; i --) { // reverse the hash\r\n\t\t\t\t\t\t\thandPositions[i] = handPositionsHash % 10;\r\n\t\t\t\t\t\t\thandPositionsHash /= 10;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tassert(handPositionsHash == 0);\r\n\r\n\t\t\t\t\t\tif (bestScore == null || score > bestScore) {\r\n\t\t\t\t\t\t\tbestScore = score;\r\n\t\t\t\t\t\t\tbestHandPositions = handPositions;\r\n\t\t\t\t\t\t\tbestHandPositionsCount = count;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tassert(bestHandPositions != null);\r\n\t\t\t\t\tif (round.getPrintToSystemOut() && round.getDebugPrintToSystemOut()) {\r\n\t\t\t\t\t\tSystem.out.println(\" Player \" + this.id + \" (\" + this.decisionType.toString() + \") hand positions: \" + Arrays.toString(bestHandPositions) + \" (bestScore=\" + bestScore + \", count=\" + bestHandPositionsCount + \")\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn bestHandPositions;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t} \r\n\t\t}", "public Result determineOutcome() {\n for (int row = 0; row < TicTacToeModel.BOARD_DIMENSION; row++) {\n if (rowScore[row] == TicTacToeModel.BOARD_DIMENSION){\n return Result.WIN;\n } else if (rowScore[row] == -TicTacToeModel.BOARD_DIMENSION) {\n return Result.LOSE;\n }\n }\n\n for (int col = 0; col < TicTacToeModel.BOARD_DIMENSION; col++) {\n if (colScore[col] == TicTacToeModel.BOARD_DIMENSION){\n return Result.WIN;\n } else if (colScore[col] == -TicTacToeModel.BOARD_DIMENSION) {\n return Result.LOSE;\n }\n }\n\n if (leftDiagScore == TicTacToeModel.BOARD_DIMENSION) return Result.WIN;\n if (rightDiagScore == TicTacToeModel.BOARD_DIMENSION) return Result.WIN;\n if (leftDiagScore == -TicTacToeModel.BOARD_DIMENSION) return Result.LOSE;\n if (rightDiagScore == -TicTacToeModel.BOARD_DIMENSION) return Result.LOSE;\n\n if (freeSpace == 0) return Result.DRAW;\n\n return Result.INCOMPLETE;\n }", "public void displayComputerWinnings()\n {\n for(int card = 0; card < computerCardsWon; card++)\n {\n System.out.println(compWinnings[card].toString());\n }\n }", "private String calculateScore(DiceModel Player1, DiceModel Player2) {\n\t\tint p1d1 = Player1.getDie1();\n\t\tint p1d2 = Player1.getDie2();\n\t\tint p1d3 = Player1.getDie3();\n\t\t\n\t\tint p2d1 = Player2.getDie1();\n\t\tint p2d2 = Player2.getDie2();\n\t\tint p2d3 = Player2.getDie3();\n\t\t\n\t\tint p1P = Player1.getPoints();\n\t\tint p2P = Player2.getPoints();\n\t\n\t\t// impParts stands for the 'important parts' used when calculating pairs (the pair)\n\t\tint impPartsP1;\n\t\tint impPartsP2;\n\t\t\n\t\t// for when the sum is needed\n\t\tint sumP1 = (p1d1 + p1d2 + p1d3);\n\t\tint sumP2 = (p2d1 + p2d2 + p2d3);\n\t\t\n\t\t// ranks are the first step in determining who won\n\t\tint rankP1 = getRank(Player1);\n\t\tint rankP2 = getRank(Player2);\n\n\t\t// now that ranks have been gotten, calculate winner\n\t\t// if P1 had higher rank, he wins. the end.\n\t\tif (rankP1 > rankP2) {\n\t\t\twinner = \"Player1\";\n\t\t} else if (rankP2 > rankP1) { // if player2 has higher rank\n\t\t\twinner = \"Player2\";\n\t\t} else if (rankP1 == rankP2) { // if ranks are same\n\t\t\tif (rankP1 == 4) {\t\t\t// if player 1 rolled 421\n\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else {\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t}\n\t\t\t\twinner = \"Player1\";\n\t\t\t} else if (rankP1 == 3) { // if they are triples;\n\t\t\t\tif (sumP1 >= sumP2) { // highest wins\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (sumP2 > sumP1) {\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else {\n\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (rankP1 == 2) { // if they are doubles\n\t\t\t\tif (p1d1 == p1d2) {\n\t\t\t\t\timpPartsP1 = p1d1; // set the important part to the pair\n\t\t\t\t} else {\n\t\t\t\t\timpPartsP1 = p1d3;\n\t\t\t\t}\n\t\t\t\tif (p2d1 == p2d2) { // do it for player 2 also\n\t\t\t\t\timpPartsP2 = p2d1;\n\t\t\t\t} else {\n\t\t\t\t\timpPartsP2 = p2d3;\n\t\t\t\t}\n\t\t\t\tif (impPartsP1 > impPartsP2) { //if player1 pair is better\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (impPartsP2 > impPartsP1) { // or p2's > p1's\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else if (impPartsP1 == impPartsP2) { // if same pair\n\t\t\t\t\tif (sumP1 >= sumP2) {\t\t\t\t// add them up\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t} else if (sumP2 > sumP1) {\n\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tif (sumP1 >= sumP2) { // if no pairs or better, take sums\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (sumP2 > sumP1){\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else {\n\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} \t\n\t\t\n\t\tif (winner.equals(\"Player1\")) {\n\t\t\tplayer1.setPoints(p1P + 1);\n\t\t} else {\n\t\t\tplayer2.setPoints(p2P + 1);\n\t\t}\n\t\treturn winner;\n\t}", "public static void playerpoints(String board[][]){\n\t\tint player1pointcount=0, player2pointcount=0;\n\t\tfor(int x=1;x<=boardwidth;x++){\n\t\t\tfor(int i=1;i<=boardlength;i++){\n\t\t\t\tif(board[x][i]==\"x\"){\n\t\t\t\t\tplayer1pointcount++;\n\t\t\t\t}\n\t\t\t\tif(board[x][i]==\"o\"){\n\t\t\t\t\tplayer2pointcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplayer1score=player1pointcount;\n\t\tplayer2score=player2pointcount;\n\t}", "private int calculateScore(){\n int score = 0;\n for(Card card : hand){\n score += card.getScore();\n }\n return score;\n }", "public void playGame(){\n for(int i = 0; i<2; i++) {\n userCards.add(dealCards());\n computerCards.add(dealCards());\n }\n while(!isGameOver) {\n userScore = calculateScore(userCards);\n computerScore = calculateScore(computerCards);\n\n System.out.println(\"your cards: \" + userCards + \", current score: \" + userScore);\n System.out.println(\"Computer's first card: \" + computerCards.get(0));\n\n if (userScore == 0 || computerScore == 0 || userScore > 21) {\n isGameOver = true;\n }else{\n System.out.print(\"Type 'y' to get another card, type 'n' to pass: \");\n userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n userCards.add(dealCards());\n } else{\n isGameOver = true;\n }\n }\n }\n\n //computer turn if user opts to not draw another card\n while(computerScore !=0 && computerScore <17){\n computerCards.add(dealCards());\n computerScore = calculateScore(computerCards);\n }\n\n System.out.println(\"Your final hand: \"+ userCards+\", final score: \"+ userScore);\n System.out.println(\"Computer's final hand: \"+computerCards+\", final score: \"+computerScore);\n System.out.println(compareScore(userScore, computerScore));\n\n Scanner scanUserInput = new Scanner(System.in);\n System.out.print(\"Do you want to play a game of Blackjack? Type 'y' or 'n': \");\n String userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n new BlackJack().playGame();\n }\n }", "public String countScore() {\n String str =\"\";\n System.out.println(\"Game has ended\");\n int playerOneCount = 0;\n int playerTwoCount = 0;\n System.out.println(\"this is size of computer board\" + player2.playerTwoDomino.size());\n System.out.println(\"this is size of boneyard \" + allElements.size());\n System.out.println(\"this is size of human board \" + human1.playerOneDomino.size());\n System.out.println(\"this is size of game board \" + gameBoard.size());\n for (int i = 0; i < human1.playerOneDomino.size(); i++) {\n playerOneCount = playerOneCount + human1.playerOneDomino.get(i).getX() + human1.playerOneDomino.get(i).getX();\n }\n for (int j = 0; j < player2.playerTwoDomino.size(); j++) {\n playerTwoCount = playerTwoCount + player2.playerTwoDomino.get(j).getX() + player2.playerTwoDomino.get(j).getY();\n }\n\n if (playerOneCount < playerTwoCount) {\n str = \"Winner is Human by \" + (playerTwoCount - playerOneCount) + \" points\";\n\n\n } else {\n str = \"Winner is Computer by \" + (playerOneCount - playerTwoCount) + \" points\";\n\n }\n\n return str;\n }", "public int hit() {\n //Add the new card to the players deck\n playerStack.add(cards[talonStack]);\n\n //Increment the score based on the new card\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n\n //Increment the counter for the un-played deck\n talonStack++;\n\n //If the player gets a score above 21, the game is over\n if (playerScore > 21) {\n dealerTurn();\n\n\n if (playerCash <= 0) {\n restartGame();\n return -1;\n } else {\n return -1;\n }\n }\n //If the player hit blackjack, the dealer takes the turn.\n else if (playerScore == 21) {\n dealerTurn();\n\n //Tie\n if (dealerScore == 21) {\n playerCash += playerBet;\n return 0;\n }\n //Win\n else {\n playerCash += (playerBet * 2);\n return 1;\n }\n }\n\n return 2;\n }", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "private int countWinnerScore(LinkedList<Integer> cards){\n int size = cards.size();\n return IntStream.range(0, size)\n .map(i -> cards.get(i) * (size - i))\n .sum();\n }", "public static void main(String[] args) {\r\n \r\n //Check the input of cards should be multiple of 5 and more than 0\r\n if (args.length % 5 == 0 && args.length > 0) {\r\n \r\n int player = args.length / N; //count the player based on input\r\n int playerNo; //store the number of player for print\r\n int countCard = args.length; //count the number of card \r\n\r\n Suit[] CardSuit = new Suit[countCard]; //store the suit of cards\r\n Rank[] CardRank = new Rank[countCard]; //store the rank of cards\r\n Card[] card = new Card[countCard]; //store all cards\r\n Card[] cardinhand = new Card[N]; //store cards in one hand\r\n PokerHand[] hand = new PokerHand[player]; //store all players' hands\r\n \r\n //Deal with print of players draw\r\n int[] drawPlayer = new int[player]; //store draw players number \r\n /*set default value in the array as bigger than the number of player, \r\n so that will be sorted to the last if not updated*/\r\n Arrays.fill(drawPlayer, player + 1); \r\n int countDraw = 0; //count the number of draw players\r\n \r\n //Get the input: rank of the card\r\n for (int i = 0; i < countCard; i++) {\r\n switch (args[i].charAt(0)) {\r\n case ('2'):\r\n CardRank[i] = Rank.TWO;\r\n break;\r\n case ('3'):\r\n CardRank[i] = Rank.THREE;\r\n break;\r\n case ('4'):\r\n CardRank[i] = Rank.FOUR;\r\n break;\r\n case ('5'):\r\n CardRank[i] = Rank.FIVE;\r\n break;\r\n case ('6'):\r\n CardRank[i] = Rank.SIX;\r\n break;\r\n case ('7'):\r\n CardRank[i] = Rank.SEVEN;\r\n break;\r\n case ('8'):\r\n CardRank[i] = Rank.EIGHT;\r\n break;\r\n case ('9'):\r\n CardRank[i] = Rank.NINE;\r\n break;\r\n case ('T'):\r\n case ('t'):\r\n CardRank[i] = Rank.TEN;\r\n break;\r\n case ('J'):\r\n case ('j'):\r\n CardRank[i] = Rank.JACK;\r\n break;\r\n case ('Q'):\r\n case ('q'):\r\n CardRank[i] = Rank.QUEEN;\r\n break;\r\n case ('K'):\r\n case ('k'):\r\n CardRank[i] = Rank.KING;\r\n break;\r\n case ('A'):\r\n case ('a'):\r\n CardRank[i] = Rank.ACE;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Get the input: suit of the card\r\n switch (args[i].charAt(1)) {\r\n case ('C'):\r\n case ('c'):\r\n CardSuit[i] = Suit.Clubs;\r\n break;\r\n case ('D'):\r\n case ('d'):\r\n CardSuit[i] = Suit.Diamonds;\r\n break;\r\n case ('H'):\r\n case ('h'):\r\n CardSuit[i] = Suit.Hearts;\r\n break;\r\n case ('S'):\r\n case ('s'):\r\n CardSuit[i] = Suit.Spades;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Set all cards in the array\r\n card[i] = new Card(CardRank[i], CardSuit[i]);\r\n }\r\n\r\n //Use all cards to set cards for each player\r\n for (int i = 0; i < player; i++) {\r\n for (int j = 0; j < N; j++) {\r\n cardinhand[j] = card[i * 5 + j];\r\n }\r\n playerNo = i + 1;\r\n //Set cards and player number of each hand\r\n hand[i] = new PokerHand(cardinhand, playerNo);\r\n System.out.print(\"Player \" + playerNo + \": \");\r\n //Find the classification of each hand and print\r\n switch (hand[i].FindClass()) {\r\n case Straight_flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight flush\");\r\n break;\r\n case Four_of_a_kind:\r\n System.out.println\r\n (\"Four \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Full_house:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s full of \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case Flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high flush\");\r\n break;\r\n case Straight:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight\");\r\n break;\r\n case Three_of_a_kind:\r\n System.out.println\r\n (\"Three \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Two_pair:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s over \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case One_pair:\r\n System.out.println\r\n (\"Pair of \" + hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case High_cards:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high\");\r\n break;\r\n }\r\n }\r\n\r\n Arrays.sort(hand);//sort the comparable object hand\r\n\r\n // Find the player number that draw with the highest hand player\r\n for (int i = player - 2; i >= 0; i--) {\r\n if (hand[player - 1].compareTo(hand[i]) == 0) {\r\n drawPlayer[countDraw] = hand[i].getPlayerNo();\r\n countDraw++; // count the number of draw players\r\n }\r\n }\r\n\r\n Arrays.sort(drawPlayer); // ascending sort the player number \r\n //print result after compare and sort\r\n if (player > 1) {\r\n if (countDraw > 1)\r\n\r\n {\r\n System.out.print(\"Players \");\r\n for (int i = 0; i < countDraw - 1; i++) {\r\n System.out.print(drawPlayer[i] + \", \");\r\n }\r\n System.out.println(\r\n hand[player - 2].getPlayerNo() + \" and \" + \r\n hand[player - 1].getPlayerNo() + \" draw.\");\r\n } else if (countDraw == 1)\r\n System.out.println\r\n (\"Players \" + hand[player - 2].getPlayerNo() + \r\n \" and \"+ hand[player - 1].getPlayerNo() + \" draw.\");\r\n else\r\n System.out.println\r\n (\"Player \" + hand[player - 1].getPlayerNo() + \" wins.\");\r\n }\r\n } else\r\n System.out.println\r\n (\"Error: wrong number of arguments; must be a multiple of 5\");\r\n System.exit(args.length);\r\n }", "@Override\n\tprotected int calculateScore() {\n\t\treturn Math.abs(playerScore[0] - playerScore[1]);\n\t}", "public void gameOver() {\n\t\tgameResult = new GameResult(writer);\n\n\t\tString winnersName = \"\";\n\t\tString resultList = \"\";\n\n\t\tGamePlayer[] tempList = new GamePlayer[playerList.size()];\n\t\tfor (int i = 0; i < tempList.length; i++) {\n\t\t\ttempList[i] = playerList.get(i);\n\t\t}\n\n\t\tArrays.sort(tempList); // Sort the players according to the scores\n\n\t\tint max = tempList[tempList.length - 1].getPlayerScore();\n\t\tint position = 0;\n\n\t\tfor (int i = tempList.length - 1; i >= 0; i--) {\n\t\t\tif (max == tempList[i].getPlayerScore()) {\n\t\t\t\twinnersName += tempList[i].getPlayerName() + \"\\t\";\n\t\t\t}\n\t\t\tresultList += \"No.\" + (++position) + \"\\t\" + tempList[i].getPlayerName() + \"\\t\"\n\t\t\t\t\t+ tempList[i].getPlayerScore() + \"\\n\";\n\t\t}\n\t\tgameResult.initialize(winnersName, resultList, roomNumber, gameRoom);\n\t\tframe.dispose();\n\t}", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public int evaluateLineforOpp(IBoard board,int[][] array, char playerSymbol){\n int score = 1;\n\n for (int j = 0; j < array.length; j++) {\n\n int[] ver = array[j];\n\n char place = board.getTileSymbol(ver[0],ver[1]);\n\n if (place == playerSymbol){\n score *= 0;\n }else if(place == '.'){\n score *= 1;\n }else {\n score *= 10;\n }\n\n }\n return score;\n }", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public int getOpponentScore(){\n return this.oppoScore;\n }", "public void deal(){\n\t\tInteger topRank;\n\t\tInteger btmRank;\n\t\tDouble[] currPercent = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};\n\t\tlastRaise = -1;\n\t\tcurrBet = 3.0;\n\t\tfor (int i = 0; i<tablePlayers.length*2+5; i++) {\n\t\t\tif (i<tablePlayers.length) {\n\t\t\t\ttablePlayers[i].setCard1(deck[i]); \n\t\t\t}\n\t\t\telse if (i<tablePlayers.length*2) {\n\t\t\t\ttablePlayers[i%tablePlayers.length].setCard2(deck[i]); \n\t\t\t}\n\t\t\telse {\n\t\t\t\ttableCards[i-tablePlayers.length*2].setRank(deck[i].getRank());\n\t\t\t\ttableCards[i-tablePlayers.length*2].setSuit(deck[i].getSuit());\n\t\t\t}\n\t\t}\n\t\t//determine each hand's winning percentage and go through first round of betting\n\t\tfor (int j = 0; j < tablePlayers.length; j++) {\n\t\t\tint i = (button + 3 + j) % 10;\n\t\t\t//if (j==0) System.out.println(\"button = \" + button + \"; first = \" + i);\n\t\t\tif (tablePlayers[i].getCard1().getRank() == 1 || tablePlayers[i].getCard2().getRank() == 1) {\n\t\t\t\ttopRank = 14;\n\t\t\t\tbtmRank = Math.max(tablePlayers[i].getCard1().getRank(), tablePlayers[i].getCard2().getRank());\n\t\t\t\tif (btmRank == 1) {\n\t\t\t\t\tbtmRank = 14;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (tablePlayers[i].getCard1().getRank() <= tablePlayers[i].getCard2().getRank()) {\n\t\t\t\t\ttopRank = tablePlayers[i].getCard2().getRank();\n\t\t\t\t\tbtmRank = tablePlayers[i].getCard1().getRank();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttopRank = tablePlayers[i].getCard1().getRank();\n\t\t\t\t\tbtmRank = tablePlayers[i].getCard2().getRank();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (topRank == btmRank) { //pocket pair\n\t\t\t\tif (topRank == 14) {\n\t\t\t\t\tcurrPercent[i] = winPercent[168];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcurrPercent[i] = winPercent[154 + topRank];\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tint index = -1;\n\t\t\t\tfor (int k = 1; k < topRank-2; k++) {\n\t\t\t\t\tindex += k;\n\t\t\t\t}\n\t\t\t\tindex += btmRank-1;\n\t\t\t\tindex *= 2;\n\t\t\t\tif (tablePlayers[i].getCard1().getSuit() == tablePlayers[i].getCard2().getSuit()) {\n\t\t\t\t\tindex++;\n\t\t\t\t}\n\t\t\t\tcurrPercent[i] = winPercent[index];\n\t\t\t}\n\t\t\t\n\t\t\t//place first round of pre-flop bets\n\t\t\tif (currPercent[i] > 0.20) { \n\t\t\t\tbetOrRaise(i,12.,3.);\n\t\t\t}\t\t\t\n\t\t\telse if ((currPercent[i] > 0.166 && currBet <= 3.0) ) { \n\t\t\t\tbetOrRaise(i,6.,3.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallBBOdds[i] && currBet <= 3.0) {\n\t\t\t\tcallBetOrCheck(i,3.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallARaiseOdds[i] && currBet <= 6.0) {\n\t\t\t\tcallBetOrCheck(i,6.);\n\t\t\t}\n\t\t\telse if (currPercent[i] > preFlopCallMultiRaiseOdds[i] && currBet > 6.0) {\n\t\t\t\tcallBetOrCheck(i,12.);\n\t\t\t}\n\t\t\telse if (i == ((button + 1) % 10)) {\n\t\t\t\ttablePlayers[i].placeBet(1.0);\n\t\t\t\tpot += 1.0;\n\t\t\t\ttablePlayers[i].foldHand();\n\t\t\t}\n\t\t\telse if (i == ((button + 2) % 10)) {\n\t\t\t\ttablePlayers[i].placeBet(3.0);\n\t\t\t\tpot += 3.0;\n\t\t\t\tif (currBet > 3.0) {\n\t\t\t\t\tif (currPercent[i] > preFlopCallBBOdds[i] && currBet <= 6.0) {\n\t\t\t\t\t\tcallBetOrCheck(i,6.);\n\t\t\t\t\t}\n\t\t\t\t\telse tablePlayers[i].foldHand();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (tablePlayers[i].getBet() < currBet) {\n\t\t\t\ttablePlayers[i].foldHand();\n\t\t\t}\n\t\t}\n\t\tif (lastRaise > -1) {\n\t\t\traiseCount++;\n\t\t}\n\t\t// call raises and allow for re-raises to cap\n\t\twhile (lastRaise > -1) {\n\t\t\tlastRaise = -1;\n\t\t\tfor (int j = 0; j < tablePlayers.length; j++) {\n\t\t\t\tint i = (button + 3 + j) % 10;\n\t\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\t\tif (currPercent[i] > 0.20) {\n\t\t\t\t\t\tbetOrRaise(i,12.,3.);\n\t\t\t\t\t}\n\t\t\t\t\tif (tablePlayers[i].getBet() >= currBet) {\n\t\t\t\t\t\tcontinue; //check\n\t\t\t\t\t}\n\t\t\t\t\telse if (tablePlayers[i].getBet() == currBet - 3.0 && currPercent[i] > preFlopCallBBOdds[i]) {\n\t\t\t\t\t\t//call one raise if player would have called BB\n\t\t\t\t\t\tcallBetOrCheck(i, currBet);\n\t\t\t\t\t}\n\t\t\t\t\telse if (tablePlayers[i].getBet() < currBet - 3.0 && currPercent[i] > preFlopCallMultiRaiseOdds[i]) {\n\t\t\t\t\t\t//call the multiRaise if would have called multiple raises on first action\n\t\t\t\t\t\tcallBetOrCheck(i,12.);\n\t\t\t\t\t}\n\t\t\t\t\telse tablePlayers[i].foldHand();\n\t\t\t\t}\n\t\t\t}\n//\t\t\tprintTableStatus();\n\t\t}\n//\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n//\t\t\tif (!tablePlayers[9].hasFolded()) flopsPlayed++;\n//\t\t}\n\t\t//Bet the flop\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t\tflopPlayers++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) flopsSeen++;\n\t\tplayersLeft = 0;\n\t\tbetFlop();\n\t\t//Bet the turn\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t\tturnPlayers++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) turnsSeen++;\n\t\tplayersLeft = 0;\n\t\tbetTurn();\n\t\t\n\t\t//Bet the river\n\t\tresetPlayerBets();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\triverPlayers++;\n\t\t\t\tplayersLeft++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) riversSeen++;\n\t\tplayersLeft = 0;\n\t\tbetRiver();\n\t\tfor (int i = 0; i < tablePlayers.length; i++) {\n\t\t\tif (!tablePlayers[i].hasFolded()) {\n\t\t\t\tplayersLeft++;\n\t\t\t}\n\t\t}\n\t\tif (playersLeft > 1) showdowns++;\n\t\tplayersLeft = 0;\n\t\t\n\t}", "public CardGame(int players, int myID) {\r\n s = new Scanner(System.in);\r\n this.players = players;\r\n this.cardPerPlayer = 52 / players;\r\n this.playerCard = new int[players][4][cardPerPlayer + 2];\r\n this.myID = myID;\r\n for (int i = 0; i < playerCard.length; i++) {\r\n for (int j = 0; j < playerCard[0].length; j++) {\r\n for (int j2 = 2; j2 < playerCard[0][0].length; j2++) {\r\n playerCard[i][j][j2] = 1;\r\n }\r\n }\r\n }\r\n\r\n }", "public int evaluate(int[][] gameBoard) {\n for (int r = 0; r < 3; r++) {\n if (gameBoard[r][0] == gameBoard[r][1] && gameBoard[r][1] == gameBoard[r][2]) {\n if (gameBoard[r][0] == ai)\n return +10;\n else if (gameBoard[r][0] == human)\n return -10;\n }\n }\n // Checking for Columns for victory.\n for (int c = 0; c < 3; c++) {\n if (gameBoard[0][c] == gameBoard[1][c] && gameBoard[1][c] == gameBoard[2][c]) {\n //gameLogic.getWinType();\n if (gameBoard[0][c] == ai)\n return +10;\n else if (gameBoard[0][c] == human)\n return -10;\n }\n }\n // Checking for Diagonals for victory.\n if (gameBoard[0][0] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][2]) {\n if (gameBoard[0][0] == ai)\n return +10;\n else if (gameBoard[0][0] == human)\n return -10;\n }\n if (gameBoard[0][2] == gameBoard[1][1] && gameBoard[1][1] == gameBoard[2][0]) {\n if (gameBoard[0][2] == ai)\n return +10;\n else if (gameBoard[0][2] == human)\n return -10;\n }\n // Else if none of them have won then return 0\n return 0;\n }", "private void moveTheCardsTotheWinner(int winPlayer,Player tempPlayer)\n {\n for(int i=0;i<tempPlayer.getLastIndex();i++)\n if(winPlayer == 1)\n FirstPlayer.addCardToBegining(tempPlayer.removeTheCard());\n else if (winPlayer == 2) \n SecondPlayer.addCardToBegining(tempPlayer.removeTheCard()); \n }", "public void gameOver() {\r\n\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Game is over. Calculating points\");\r\n\t\tstatus = \"over\";\r\n\t\ttry {\r\n\t\t\tupdateBoard();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tupdateEvents(false);\r\n\t\tEmbedBuilder embed = new EmbedBuilder();\r\n\t\tembed.setTitle(\"Game Results\");\r\n\t\tMap<Integer, Integer> scores = new HashMap<Integer, Integer>();\r\n\t\t\r\n\t\tfor (int i = 0; i < players.size(); i++) {\r\n\t\t\tscores.put(i,players.get(i).calculatePoints());\r\n\t\t\t// Utils.getName(players.get(i).getPlayerID(),guild)\r\n\t\t}\r\n\t\t\r\n\t\tList<Entry<Integer, Integer>> sortedList = sortScores(scores);\r\n\t\t\r\n\t\t// If tied, add highest artifact values\r\n\t\tif ((playerCount > 1) && (sortedList.get(0).getValue().equals(sortedList.get(1).getValue()))) {\r\n\t\t\tSystem.out.println(\"[DEBUG LOG/Game.java] Scores were tied\");\r\n\t\t\tint highestScore = sortedList.get(0).getValue();\r\n\t\t\tfor (Map.Entry<Integer, Integer> entry : sortedList) {\r\n\t\t\t\t// Only add artifacts to highest scores\r\n\t\t\t\tif (entry.getValue().equals(highestScore)) {\r\n\t\t\t\t\tscores.put(entry.getKey(),entry.getValue()+players.get(entry.getKey()).getHighestArtifactValue());\r\n\t\t\t\t\tplayers.get(entry.getKey()).setAddedArtifactValue(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Sort with added artifact values\r\n\t\tsortedList = sortScores(scores);\r\n\t\t\r\n\t\t// Assigns 1st, 2nd, 3rd\r\n\t\tfor (int i = 0; i < sortedList.size(); i++) {\r\n\t\t\tMap.Entry<Integer, Integer> entry = sortedList.get(i);\r\n\t\t\t// If tie, include artifact\r\n\t\t\tString name = Utils.getName(players.get(entry.getKey()).getPlayerID(),guild);\r\n\t\t\tif (players.get(entry.getKey()).getAddedArtifactValue()) {\r\n\t\t\t\tint artifactValue = players.get(entry.getKey()).getHighestArtifactValue();\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+(entry.getValue()-artifactValue)+\" (\"+artifactValue+\")``\",true);\r\n\t\t\t} else {\r\n\t\t\t\tembed.addField(Utils.endGamePlaces[i],\"**\"+name+\"** - ``\"+entry.getValue()+\"``\",true);\r\n\t\t\t}\r\n\t\t}\r\n\t\tembed.setFooter(\"Credit to Renegade Game Studios\", null);\r\n\t\tgameChannel.sendMessage(embed.build()).queueAfter(dragonAttackingDelay+3000,TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\tGlobalVars.remove(this);\r\n\t}", "public int whoWins(int winnersNum){\n if(winnersNum > 1){\n //decide who wins based on the score\n int first = -1;\n for(int i = 0; i < 4; i++){\n if(dinos[i].getHasWon()){\n if(first != -1){\n if(dinos[i].getScore() > dinos[first].getScore()){\n first = i;\n }\n }\n else{\n first = i;\n }\n }\n }\n return first;\n }\n else if (winnersNum == 1) {\n for(int i = 0; i < 4; i++){\n if(dinos[i].getHasWon()){\n return i;\n }\n }\n }\n return -1;\n }", "public void winAccountant()\r\n {\r\n switch (Win)\r\n {case 1: //A tie with scissors\r\n ties++; uSci++; cSci++;\r\n break;\r\n case 2: //A tie with paper\r\n ties++; uPap++; cPap++;\r\n break;\r\n case 3: //A tie with rock\r\n ties++; uRock++; cRock++;\r\n break;\r\n case 4: //A win for user with Scissors\r\n uWins++; uSci++; uSciW++;\r\n cPap++;\r\n break;\r\n case 5: //A win for user with Paper\r\n uWins++; uPap++; uPapW++;\r\n cRock++;\r\n break;\r\n case 6: //A win for user with Rock\r\n uWins++; uRock++; uRockW++;\r\n cSci++;\r\n break;\r\n case 7: //A win for Comp with Scissors\r\n cWins++; cSci++; cSciW++;\r\n uPap++;\r\n break;\r\n case 8: //A win for Comp with Paper\r\n cWins++; cPap++; cPapW++;\r\n uRock++;\r\n break;\r\n case 9: //A win for Comp with Rock\r\n cWins++; cRock++; cRockW++;\r\n uSci++;\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Win Value - WinCalc.winAccountant 207\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;}\r\n \r\n // Update the last three wins\r\n winThree=winTwo;\r\n winTwo=winOne;\r\n winOne=Win;\r\n \r\n }", "int score(OfcHandMatrix matrix);", "private int playerTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Ask the player to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"You drew a \" + drawn.getName());\n Ui.pause();\n\n // Shows current cards and drawn cards\n Ui.cls();\n Ui.println(getHeader());\n Ui.println();\n Ui.print(\"Cards:\");\n // Draw every card\n for (int i = 0; i < drawnCards.size(); i++) {\n Ui.print(\" \" + drawnCards.get(i));\n if (i + 1 < drawnCards.size()) {\n Ui.print(\",\");\n }\n }\n // Value of cards\n Ui.println(\"Value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"Unfortunately you got more than 21 points, resulting in a total of 0 points!\");\n Ui.pause();\n break;\n } else {\n Ui.println(\"Would you like to draw another card?\");\n Ui.println(\"1) Take another card\");\n Ui.println(\"2) Stop taking cards\");\n }\n\n // Input\n boolean quitInput = false;\n while (!quitInput) {\n int menuChoice = Ui.getValidInt();\n\n switch (menuChoice) {\n case 1:\n quitInput = true;\n break;\n case 2:\n exit = true;\n quitInput = true;\n break;\n default:\n break;\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }", "public static int checkForWinner(ArrayList<Integer> brd) {\n int Slot1 = brd.get(0); // get is a method of ArrayList\n int Slot2 = brd.get(1);\n int Slot3 = brd.get(2);\n int Slot4 = brd.get(3);\n int Slot5 = brd.get(4);\n int Slot6 = brd.get(5);\n int Slot7 = brd.get(6);\n int Slot8 = brd.get(7);\n int Slot9 = brd.get(8);\n\n // row check\n if (Slot1 == Slot2 && Slot1 == Slot3) {\n return Slot1; // return the player who won\n }\n if (Slot4 == Slot5 && Slot4 == Slot6) {\n return Slot4; // return the player who won\n }\n if (Slot7 == Slot8 && Slot7 == Slot9) {\n return Slot7; // return the player who won\n }\n // column check\n if (Slot1 == Slot4 && Slot1 == Slot7) {\n return Slot1; // return the player who won\n }\n if (Slot2 == Slot5 && Slot2 == Slot8) {\n return Slot2; // return the player who won\n }\n if (Slot3 == Slot6 && Slot3 == Slot9) {\n return Slot3; // return the player who won\n }\n\n // cross check\n if (Slot1 == Slot5 && Slot1 == Slot9) {\n return Slot1; // return the player who won\n }\n if (Slot3 == Slot5 && Slot3 == Slot7) {\n return Slot3; // return the player who won\n }\n\n // check for tie\n for (int i = 0; i < brd.size(); i++) {\n if (brd.get(i) == 0) {\n return 0; // game isnt over yet\n }\n }\n return 3; // tie\n }", "public void declareWinner(int playerNum) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(playerNum);\r\n if ((player.getHand().addCards() > this.getHand().addCards()) && player.getHand().addCards() < 22 && this.getHand().addCards() < 22) {\r\n winBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you won!\");\r\n } else if (this.getHand().addCards() == 21) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else if (player.getHand().addCards() > 21) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else if (player.getHand().addCards() <= 21 && this.getHand().addCards() > 21) {\r\n winBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you won!\");\r\n } else if ((player.getHand().addCards() > this.getHand().addCards()) && player.getHand().addCards() < 22 && this.getHand().addCards() < 22) {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n } else {\r\n loseBet(playerNum);\r\n System.out.print(player.getPlayerID() + \", you lost!\");\r\n }\r\n }", "private long opponent_winning_position() {\r\n return compute_winning_position(bitboard ^ mask, mask);\r\n }", "private int gameState() {\n\t\t\n\t\tint gameNotOver = 0;\n\t\tint gameOverWinnerX = 1;\n\t\tint gameOverWinnerO = 2;\n\t\tint gameOverTie = 3;\n\t\t\n\t\t\n\t\t\n\t\t//Win Vertically \n\t\t// 0 3 6 , 1 4 7 , 2 5 8\n\t\t\t\t\n\t\t//Win Horizontally\n\t\t//0 1 2 , 3 4 5 , 6 7 8 \n\t\t\t\t\n\t\t//Win Diagonally\n\t\t// 0 4 8 , 2 4 6\n\t\t\t\t\n\t\t//Assuming it's an equal grid\n\t\t\t\t\n\t\tMark winningMark = null;\n\t\t\t\t\n\t\tboolean hasFoundWinner = false;\n\t\t\t\t\n\t\tint row = 0;\n\t\tint column = 0;\n\t\t\t\t\n\t\t//Horizontal Winner Test\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\tcolumn ++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcolumn = 0;\n\t\t\trow++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t// Vertical Winner Test\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\n\t\twhile (!hasFoundWinner && column < COLUMN_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[ROW_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\trow = 0;\n\t\t\tcolumn++;\t\n\t\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Winner Test \"\\\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = 0;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn++;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\t//Diagonal Test \"/\"\n\t\t\t\t\n\t\trow = 0;\n\t\tcolumn = COLUMN_COUNT - 1;\n\t\t\t\t\n\t\twhile (!hasFoundWinner && row < ROW_COUNT) {\n\t\t\t\t\t\n\t\t\tMark[] markArray = new Mark[COLUMN_COUNT];\n\t\t\t\t\t\n\t\t\tint index = 0;\n\t\t\t\t\t\n\t\t\twhile (row < ROW_COUNT) {\n\t\t\t\t\t\t\n\t\t\t\tmarkArray[index] = getMark(row, column);\n\t\t\t\trow++;\n\t\t\t\tcolumn--;\n\t\t\t\tindex++;\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif (allElementsEqual(markArray)) {\n\t\t\t\thasFoundWinner = true;\n\t\t\t\twinningMark = markArray[0];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\t\t\n\t\t}\n\t\t\n\t\tif (hasFoundWinner) {\n\t\t\tif (winningMark == Mark.X) {\n\t\t\t\treturn gameOverWinnerX;\n\t\t\t}\n\t\t\tif (winningMark == Mark.O) {\n\t\t\t\treturn gameOverWinnerO;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// If there are no moves left, and there is no winner, game ends inn a tie \n\t\t\n\t\tboolean foundNoMove = false;\n\t\tfor (int i = 0; i < movesArray.length; i++) {\n\t\t\tif (movesArray[i] == NO_MOVE) {\n\t\t\t\tfoundNoMove = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!foundNoMove && !hasFoundWinner) {\n\t\t\treturn gameOverTie;\n\t\t}\n\t\t\n\t\t// If there is no winner and there are still moves left, game is not over\n\t\t\n\t\treturn gameNotOver;\n\t\t\n\t}", "private boolean winner() {\n\t\t\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P1_WINNER){\n\t\t\t//player 1 winner\n\t\t\twinner = P1_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == P2_WINNER){\n\t\t\t//player 2 winner\n\t\t\twinner = P2_WINNER;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == CAT){\n\t\t\t//cat winner player_1 goes first\n\t\t\twinner = CAT;\n\t\t}else if(gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT] + \n\t\t\t\t gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT] +\n\t\t\t\t gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT] == (CAT + 3)){\n\t\t\t//cat winner player_2 goes first\n\t\t\twinner = CAT;\n\t\t} \n\t\t\n\t\tif(winner > 0){\n\t\t\treturn true;//there is a winner\n\t\t}else{\n\t\t\treturn false;//still no winner yet\n\t\t}\t\n\t}", "private boolean player2Wins() {\n\n boolean p2inTriangle = false;\n int target[] = new int[]{0, 1, 2, 3, 9, 10, 11, 18, 19, 27};\n for (int i : target) {\n if (board[i] == 0)\n return false;\n if (board[i] == 2)\n p2inTriangle = true;\n }\n\n return p2inTriangle;\n }", "public static int[][] playerDiscs(int[][] board, int player) {\r\n\t\t\t\r\n\t\tint SumP = 0;\r\n\t\t//how many solduers do the red player have\r\n\t\tif (player==1){\r\n\t\t\tfor (int line=0;line<8;line=line+1){\r\n\t\t\t\tfor (int column=0;column<8;column=column+1){\r\n\t\t\t\t\tif (board[line][column]>0){SumP=SumP+1;}\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t//how many solduers do the blue player have\r\n\t\tif (player==-1){\r\n\t\t\tfor (int line=0;line<8;line=line+1){\r\n\t\t\t\tfor (int column=0;column<8;column=column+1){\r\n\t\t\t\t\tif (board[line][column]<0){SumP=SumP+1;}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//printing the arry whith the solduers\r\n\t\tint[][] positions = new int [SumP][2];\r\n\t\t\tfor (int line=0,i=0;line<8;line=line+1){\r\n\t\t\t\tfor (int column=0;column<8;column=column+1){\r\n\t\t\t\t\tif (player==1){\r\n\t\t\t\t\t\tif (player<=board[line][column]){\r\n\t\t\t\t\t\t\tpositions [i][0] = line;\r\n\t\t\t\t\t\t\tpositions [i][1] = column;\r\n\t\t\t\t\t\t\ti=i+1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (player==-1){\r\n\t\t\t\t\t\tif (player>=board[line][column]){\r\n\t\t\t\t\t\t\tpositions [i][0] = line;\r\n\t\t\t\t\t\t\tpositions [i][1] = column;\t\r\n\t\t\t\t\t\t\ti=i+1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\treturn positions;\r\n\t}", "public int getScore(Card[] deal) {\r\n\t\t\r\n\t\t// Create a new ArrayList for the final hand\r\n\t\tArrayList<Card> finalHand = new ArrayList<Card>();\r\n\t\tfinalHand.addAll(this.cards);\r\n\t\tfinalHand.addAll(Arrays.asList(deal));\r\n\t\t// Sort the final hand\r\n\t\tCard.sortByFace(finalHand.toArray());\r\n\t\t\r\n\t\tint lastIndex = finalHand.size()-1;\r\n\t\tif (isStraight(finalHand)) {\r\n\t\t\tif (isFlush(finalHand)) {\r\n\t\t\t\tif (finalHand.get(0).getFace() == 10) {\r\n\t\t\t\t\treturn ROYAL_FLUSH + finalHand.get(0).getSuit();\r\n\t\t\t\t}\r\n\t\t\t\t// Adds score to STRAIGHT_FLUSH based on suit (14 is the highest face value))\r\n\t\t\t\treturn STRAIGHT_FLUSH + (finalHand.get(lastIndex).getSuit() *14);\r\n\t\t\t}\r\n\t\t\t// Adds score to STRAIGHT base on face value of highest card\r\n\t\t\treturn STRAIGHT + finalHand.get(lastIndex).getFace();// *finalHand.get(lastIndex).getSuit());\r\n\t\t}\r\n\r\n\t\tint count = 0;\r\n\t\t// fourOfaKind logic...\r\n\t\tMap<Integer, Integer> values = new HashMap<Integer, Integer>();\r\n\t\tint prev = 0;\r\n\t\tfor (Card card: finalHand) {\r\n\t\t\tif (values.get(card.getFace()) == null ||\r\n\t\t\t\t\tvalues.get(card.getFace()) != prev) {\r\n\t\t\t\tvalues.put(card.getFace(), 1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tint add = values.get(card.getFace());\r\n\t\t\t\tvalues.replace(card.getFace(), add+1);\r\n\t\t\t}\r\n\t\t\tprev = values.get(card.getFace());\r\n\t\t}\r\n\t\tSystem.out.println(values);\r\n//\t\tint highest = 0;\r\n//\t\tfor (Integer card : values.values()) {\r\n//\t\t\tif (card)\r\n//\t\t}\r\n\t\treturn count;\r\n\t}", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "private static int[] climbingLeaderboard(int[] scores, int[] alice) {\n\n int[] result = new int[alice.length];\n for (int x = 0; x < alice.length; x++) {\n result[x] = insert(Arrays.stream(scores).distinct().toArray(), alice[x]);\n }\n return result;\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void round(Player playerWhoseTurn, ArrayList<Player> players) {\n\n view.print(\"\");\n view.print(\"--Player \" + playerWhoseTurn.getPlayerId() + \"--\");\n view.print(\"\");\n\n // displaying decisive player's card\n view.printCard(playerWhoseTurn.showTopCard());\n view.print(\"\\n\\n\");\n\n // creating list of cards currently in game (table)\n ArrayList<Card> cardsOnTable = new ArrayList<Card>();\n\n // All players lay their cards on table\n for (Player player : players) {\n cardsOnTable.add(player.layCardOnTable());\n }\n\n // Actual round\n\n // Asking player for decision which feature to fight with\n int playerDecision;\n\n while (true) {\n\n // decisive player decides which feature to fight with\n playerDecision = view.decideWhichFeature();\n\n // possible decisions\n int[] possibleChoices = {1, 2, 3, 4};\n\n // check if player choose existing option\n if (!checkIfValueInArray(possibleChoices, playerDecision)) {\n view.print(\"No such choice! Try again!\");\n } else {\n break;\n }\n }\n\n // Dealer checks who won (there might be exequo winners!)\n ArrayList<Integer> winnersIds = dealer.getWinner(cardsOnTable, playerDecision);\n\n // if there are no exequo winners, so there is only one winner:\n if (winnersIds.size() == 1) {\n\n // display message who won\n view.print(\"\\nPlayer \" + winnersIds.get(0) + \" won the round!\");\n\n //add cards from cardsOnTable to winner's hand\n for (Card card : cardsOnTable) {\n for (Player player : players) {\n if (player.getPlayerId() == winnersIds.get(0)) {\n player.addCard(card);\n }\n }\n }\n // clear cardsOnTable\n cardsOnTable.clear();\n\n //add cards from tempCardStack (if ther are any) to winner's hand\n for (Card card : tempCardStack) {\n for (Player player : players) {\n if (player.getPlayerId() == winnersIds.get(0)) {\n player.addCard(card);\n }\n }\n }\n // clear tempCardStack\n tempCardStack.clear();\n }\n\n // when there are exequo winners:\n else if (winnersIds.size() > 1) {\n\n // Nobody gets the cards, instead cards go to temporary stack untill someone wins them\n // in the next round\n for (Card card : cardsOnTable) {\n tempCardStack.add(card);\n }\n // display who won (for example \"Players 1, 2, 3 exequo won the round\")\n view.printExequoWinners(winnersIds);\n }\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\twhile(input.hasNext()) {\n\t\t\tString player1 = input.nextLine();\n\t\t\tString player2 = input.nextLine();\n\t\t\tString com = input.nextLine();\n\t\t\tint check = input.nextInt();\n\t\t\tint[][] one = new int[3][3];\n\t\t\tint[][] two = new int[3][3];\n\t\t\tString[] split1 = player1.split(\" \");\n\t\t\tString[] split2 = player2.split(\" \");\n\t\t\tString[] split3 = com.split(\" \");\n\t\t\tint total = 0;\n\t\t\tint countA = 0;\n\t\t\tint countB = 0;\n\t\t\tfor(int i = 0; i < split3.length; i++) {\n\t\t\t\ttotal += Integer.parseInt(split3[i]);\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[i][j] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tcount += one[i][j];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[i][j] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tcount += two[i][j];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[j][i] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tcount += one[j][i];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[j][i] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tcount += two[j][i];\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\tone[i][j] = Integer.parseInt(split1[3*i+j]);\n\t\t\t\t\tif(j == 2) {\n\t\t\t\t\t\tcount += one[i][i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountA++;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tfor(int i = 0; i < 3; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < 3; j++) {\n\t\t\t\t\ttwo[i][j] = Integer.parseInt(split2[3*i+j]);\n\t\t\t\t\tif(j == 2) {\n\t\t\t\t\t\tcount += two[i][i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(count == total) {\n\t\t\t\t\tcountB++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(countA == countB) {\n\t\t\t\tSystem.out.println(\"Draw\");\n\t\t\t}\n\t\t\tif(countA > countB) {\n\t\t\t\tSystem.out.println(\"Player1 wins\");\n\t\t\t}\n\t\t\tif(countA < countB) {\n\t\t\t\tSystem.out.println(\"Player2 wins\");\n\t\t\t}\n\t\t\tinput.nextLine();\n\t\t\tif(check == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t}", "private void win(int winner)\n {\n switch (winner) {\n case PLAYER_1_FLAG:\n player1.gameOver(RESULT_WIN);\n player2.gameOver(RESULT_LOSS);\n winSend.close();\n break;\n case PLAYER_2_FLAG:\n player1.gameOver(RESULT_LOSS);\n player2.gameOver(RESULT_WIN);\n \n winSend.close();\n break;\n }\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n int[][] board = {{4,4,4},{4,4,4},{4,4,4}};\n int player = 1;\n while (whoWin(board) == -1) {\n displayBoard(board);\n System.out.printf(\"Enter a row (0, 1, or 2) for player %c: \", (player == 0) ? 'O' : 'X');\n int row = input.nextInt();\n System.out.printf(\"Enter a column (0, 1, or 2) for player %c: \", (player == 0) ? 'O' : 'X');\n int column = input.nextInt();\n board[row][column] = player;\n player = (player + 1) % 2;\n }\n displayBoard(board);\n player = whoWin(board);\n if (player == 1) {\n System.out.println(\"X player won\");\n }\n else if (player == 0) {\n System.out.println(\"O player won\");\n }\n else {\n System.out.println(\"It is a draw\");\n }\n }", "public Bot startGame(){\n\t\t\n\t\ttable.addObserver(this); //to keep scores.\n\t\ttable.addObserver(players.get(0)); //observer pattern to notify players via events.\n\t\ttable.addObserver(players.get(1));\n\t\ttable.addObserver(players.get(2));\n\t\ttable.addObserver(players.get(3));\n\t\t\n\t\ttable.putInitialCards(deck.getFourCards());\n\t\t\n\t\twhile(!deck.isEmpty()){\n\t\t\t//deal cards\n\t\t\tfor(Bot bot : players){\n\t\t\t\tbot.setHand(deck.getFourCards());\n\t\t\t}\n\t\t\t\n\t\t\t//start playing\n\t\t\tfor(int i = 0 ; i < 4 ; i++){\n\t\t\t\tfor(Bot bot : players){\n\t\t\t\t\tcurrentPlayer = bot;\n\t\t\t\t\tCard cardToThrow = currentPlayer.throwACard();\n//\t\t\t\t\tSystem.out.println(\"Bot \"+ currentPlayer.toString() + \" threw \" + cardToThrow.toString());\n\t\t\t\t\ttable.putOnPile(cardToThrow);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//award last pile winner\n\t\tplayers.get(lastWinnerId).addPoints(Table.calculatePoints(table.getCardsOnPile()));\n\t\tplayers.get(lastWinnerId).addWonCards(table.getCardsOnPile().size());\n//\t\tSystem.out.println(\"Last pile goes to [\"+players.get(lastWinnerId).toString()+\"]\");\n\t\ttable.clearPile();\n\t\t\n\t\t\n\t\t//award most card winner\n\t\tCollections.sort(players, new CompareByWonCardSize()); // sort players by most cards won.\n\t\tplayers.get(3).addPoints(3); // last one has most cards.\n//\t\tSystem.out.println(\"The bot [\"+players.get(3).toString()+\"] won the most cards so it gets bonus 3 points!\");\n\t\t\t\t\n//\t\tSystem.out.println(\"### SCORES ###\");\n\t\tCollections.sort(players, new CompareByPoints()); // sort by points\n\t\t\n\t\tBot winner = players.get(3);\n//\t\tSystem.out.println(\"WINNER IS: \"+ winner);\n\t\t\n\t\treturn winner;\n\t}", "public void winGame() {\r\n if (data.gameState == 3) \r\n data.winner = 1;\r\n else if (data.gameState == 4) \r\n data.winner = 2;\r\n data.victoryFlag = true;\r\n data.gameState = 5;\r\n }", "public Winner whoWins(){\r\n\r\n /* transfer the matrix to an array */\r\n Sign[] flatBoard = flattenBoard();\r\n\r\n /* check if someone has won */\r\n if (CompPlayer.compWon(flatBoard))\r\n return Winner.COMPUTER;\r\n else if (CompPlayer.playerWon(flatBoard))\r\n return Winner.PLAYER;\r\n else\r\n return Winner.NON;\r\n }", "public void testScoreboardCaseFour () throws Exception {\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\"\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 4 tests when all runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n \n// Team 1 -- 123 <-- Team 1 is winning again\n// Team 2 -- 130\n \n// String [] rankData = {\n// \"1,team1,1,123\",\n// \"2,team2,1,130\"\n// };\n \n scoreboardTest (2, runsData, rankData);\n }", "public int getWins() {\n return wins;\n }", "public void winBet(int playerNum) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(playerNum);\r\n player.getChips().addAll(player.getChipsBet());\r\n Collections.sort(player.getChips());\r\n }", "public void testScoreboardCaseTwo () throws Exception{\n \n // RunID TeamID Prob Time Result\n \n String [] runsData = {\n \"1,1,A,1,No\", // 20\n \"2,1,A,3,Yes\", // 3 (Minute points for 1st Yes count)\n \"3,1,A,5,No\", // 20 (a No on a solved problem)\n \"4,1,A,7,Yes\", // zero (only \"No's\" count)\n \"5,1,A,9,No\", // 20 (another No on the solved problem)\n \n \"6,1,B,11,No\", // zero (problem has not been solved)\n \"7,1,B,13,No\", // zero (problem has not been solved)\n \n \"8,2,A,30,Yes\", // 30 (Minute points for 1st Yes)\n \n \"9,2,B,35,No\", // zero -- not solved\n \"10,2,B,40,No\", // zero -- not solved\n \"11,2,B,45,No\", // zero -- not solved\n \"12,2,B,50,No\", // zero -- not solved\n \"13,2,B,55,No\", // zero -- not solved\n };\n \n\n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,1,23\",\n \"2,team2,1,30\",\n };\n \n // TODO when SA supports count all runs, replace rankData\n \n /**\n * Case 2 tests when all no runs are counted, the current SA\n * does not support this scoring method. The commented\n * rankData is the proper results\n */\n\n// Team 2 -- 30 <-- Team 2 is now winning with a lower score \n// Team 1 -- 63 (same database; different scoring method)\n \n// String [] rankData = {\n// \"1,team2,1,30\",\n// \"2,team1,1,63\",\n// };\n \n \n scoreboardTest (2, runsData, rankData);\n \n }", "public int winner() {\n if (player1Wins())\n return 1;\n if (player2Wins())\n return 2;\n return -1; // No one has won\n }", "private static int findWinner(ArrayList<ArrayList<Card>> hands,\n ArrayList<Card> tableCardsFinal) {\n FiveCardHand bestHand = null;\n int bestHandIndex = -1;\n for (int i = 0; i < hands.size(); i++) {\n ArrayList<Card> hand = hands.get(i);\n ArrayList<Card> handOfSeven = (ArrayList<Card>) hand.clone();\n handOfSeven.addAll(tableCardsFinal);\n FiveCardHand best = findBestHand(handOfSeven);\n\n if (bestHand == null) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) > 0) {\n bestHand = best;\n bestHandIndex = i;\n } else if (best.compareTo(bestHand) == 0) { // handle ties by returning hands.size()\n bestHandIndex = hands.size();\n }\n }\n\n return bestHandIndex;\n }", "public void ss(){\n for (int c=0; c < league.length;c++) {\r\n for (int t=c+1;t<league.length;t++) {\r\n score = league[c].scoregenerator();\r\n secondscore = league[t].scoregenerator();\r\n league[c].pointsfor(score);\r\n league[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n league[c].wins();\r\n league[t].losses();\r\n }\r\n else if (score == secondscore){\r\n league[c].ties();\r\n league[t].ties();\r\n }\r\n else {\r\n league[t].wins();\r\n league[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFC.length;c++) {\r\n for (int t=c+1;t<AFC.length;t++) {\r\n score = AFC[c].scoregenerator();\r\n secondscore = AFC[t].scoregenerator();\r\n AFC[c].pointsfor(score);\r\n AFC[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFC[c].wins();\r\n AFC[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFC[c].ties();\r\n AFC[t].ties();\r\n }\r\n else {\r\n AFC[t].wins();\r\n AFC[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFC.length;c++) {\r\n for (int t=c+1;t<NFC.length;t++) {\r\n score = NFC[c].scoregenerator();\r\n secondscore = NFC[t].scoregenerator();\r\n NFC[c].pointsfor(score);\r\n NFC[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFC[c].wins();\r\n NFC[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFC[c].ties();\r\n NFC[t].ties();\r\n }\r\n else {\r\n NFC[t].wins();\r\n NFC[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0;c<AFCeast.length;c++) {\r\n for (int t=c+1;t<AFCeast.length;t++) {\r\n score = AFCeast[c].scoregenerator();\r\n secondscore = AFCeast[t].scoregenerator();\r\n AFCeast[c].pointsfor(score);\r\n AFCeast[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCeast[c].wins();\r\n AFCeast[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCeast[c].ties();\r\n AFCeast[t].ties();\r\n }\r\n else {\r\n AFCeast[t].wins();\r\n AFCeast[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCnorth.length;c++) {\r\n for (int t=c+1;t<AFCnorth.length;t++) {\r\n score = AFCnorth[c].scoregenerator();\r\n secondscore = AFCnorth[t].scoregenerator();\r\n AFCnorth[c].pointsfor(score);\r\n AFCnorth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCnorth[c].wins();\r\n AFCnorth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCnorth[c].ties();\r\n AFCnorth[t].ties();\r\n }\r\n else {\r\n AFCnorth[t].wins();\r\n AFCnorth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCsouth.length;c++) {\r\n for (int t=c+1;t<AFCsouth.length;t++) {\r\n score = AFCsouth[c].scoregenerator();\r\n secondscore = AFCsouth[t].scoregenerator();\r\n AFCsouth[c].pointsfor(score);\r\n AFCsouth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCsouth[c].wins();\r\n AFCsouth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCsouth[c].ties();\r\n AFCsouth[t].ties();\r\n }\r\n else {\r\n AFCsouth[t].wins();\r\n AFCsouth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < AFCwest.length;c++) {\r\n for (int t=c+1;t<AFCwest.length;t++) {\r\n score = AFCwest[c].scoregenerator();\r\n secondscore = AFCwest[t].scoregenerator();\r\n AFCwest[c].pointsfor(score);\r\n AFCwest[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n AFCwest[c].wins();\r\n AFCwest[t].losses();\r\n }\r\n else if (score == secondscore){\r\n AFCwest[c].ties();\r\n AFCwest[t].ties();\r\n }\r\n else {\r\n AFCwest[t].wins();\r\n AFCwest[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCeast.length;c++) {\r\n for (int t=c+1;t<NFCeast.length;t++) {\r\n score = NFCeast[c].scoregenerator();\r\n secondscore = NFCeast[t].scoregenerator();\r\n NFCeast[c].pointsfor(score);\r\n NFCeast[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCeast[c].wins();\r\n NFCeast[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCeast[c].ties();\r\n NFCeast[t].ties();\r\n }\r\n else {\r\n NFCeast[t].wins();\r\n NFCeast[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCnorth.length;c++) {\r\n for (int t=c+1;t<NFCnorth.length;t++) {\r\n score = NFCnorth[c].scoregenerator();\r\n secondscore = NFCnorth[t].scoregenerator();\r\n NFCnorth[c].pointsfor(score);\r\n NFCnorth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCnorth[c].wins();\r\n NFCnorth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCnorth[c].ties();\r\n NFCnorth[t].ties();\r\n }\r\n else {\r\n NFCnorth[t].wins();\r\n NFCnorth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCsouth.length;c++) {\r\n for (int t=c+1;t<NFCsouth.length;t++) {\r\n score = NFCsouth[c].scoregenerator();\r\n secondscore = NFCsouth[t].scoregenerator();\r\n NFCsouth[c].pointsfor(score);\r\n NFCsouth[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCsouth[c].wins();\r\n NFCsouth[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCsouth[c].ties();\r\n NFCsouth[t].ties();\r\n }\r\n else {\r\n NFCsouth[t].wins();\r\n NFCsouth[c].losses();\r\n }\r\n } \r\n }\r\n for (int c=0; c < NFCwest.length;c++) {\r\n for (int t=c+1;t<NFCwest.length;t++) {\r\n score = NFCwest[c].scoregenerator();\r\n secondscore = NFCwest[t].scoregenerator();\r\n NFCwest[c].pointsfor(score);\r\n NFCwest[t].pointsfor(secondscore);\r\n\r\n if (score > secondscore){\r\n NFCwest[c].wins();\r\n NFCwest[t].losses();\r\n }\r\n else if (score == secondscore){\r\n NFCwest[c].ties();\r\n NFCwest[t].ties();\r\n }\r\n else {\r\n NFCwest[t].wins();\r\n NFCwest[c].losses();\r\n }\r\n } \r\n }\r\n\r\n for (int c=0;c<league.length;c++){\r\n System.out.println(league[c]);\r\n }\r\n System.out.println(\"...\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(\"\\n\" + \"Now let the playoffs begin!\" + \"\\n\");\r\n\r\n for (int y=0;y<4;y++){ // These next groups of code are sorting each division, and each conference based on wins\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCeast[a].displaywins() > AFCeast[p].displaywins()){\r\n Temp = AFCeast[p];\r\n AFCeast[p] = AFCeast[a];\r\n AFCeast[a] = Temp;\r\n }\r\n else if (AFCeast[a].displaywins() == AFCeast[p].displaywins() && AFCeast[a].displaypf() > AFCeast[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n // System.out.println(AFCeast[0]);\r\n\r\n afcplayoff[0] = AFCeast[0];\r\n // System.out.println(afcplayoff[0]);\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCnorth[a].displaywins() > AFCnorth[p].displaywins()){\r\n Temp = AFCnorth[p];\r\n AFCnorth[p] = AFCnorth[a];\r\n AFCnorth[a] = Temp;\r\n }\r\n else if (AFCnorth[a].displaywins() == AFCnorth[p].displaywins() && AFCnorth[a].displaypf() > AFCnorth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[1] = AFCnorth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCsouth[a].displaywins() > AFCsouth[p].displaywins()){\r\n Temp = AFCsouth[p];\r\n AFCsouth[p] = AFCsouth[a];\r\n AFCsouth[a] = Temp;\r\n }\r\n else if (AFCsouth[a].displaywins() == AFCsouth[p].displaywins() && AFCsouth[a].displaypf() > AFCsouth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[2] = AFCsouth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (AFCwest[a].displaywins() > AFCwest[p].displaywins()){\r\n Temp = AFCwest[p];\r\n AFCwest[p] = AFCwest[a];\r\n AFCwest[a] = Temp;\r\n }\r\n else if (AFCwest[a].displaywins() == AFCwest[p].displaywins() && AFCwest[a].displaypf() > AFCwest[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n afcplayoff[3] = AFCwest[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCeast[a].displaywins() > NFCeast[p].displaywins()){\r\n Temp = NFCeast[p];\r\n NFCeast[p] = NFCeast[a];\r\n NFCeast[a] = Temp;\r\n }\r\n else if (NFCeast[a].displaywins() == NFCeast[p].displaywins() && NFCeast[a].displaypf() > NFCeast[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[0] = NFCeast[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCnorth[a].displaywins() > NFCnorth[p].displaywins()){\r\n Temp = NFCnorth[p];\r\n NFCnorth[p] = NFCnorth[a];\r\n NFCnorth[a] = Temp;\r\n }\r\n else if (NFCnorth[a].displaywins() == NFCnorth[p].displaywins() && NFCnorth[a].displaypf() > NFCnorth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[1] = NFCnorth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCsouth[a].displaywins() > NFCsouth[p].displaywins()){\r\n Temp = NFCsouth[p];\r\n NFCsouth[p] = NFCsouth[a];\r\n NFCsouth[a] = Temp;\r\n }\r\n else if (NFCsouth[a].displaywins() == NFCsouth[p].displaywins() && NFCsouth[a].displaypf() > NFCsouth[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[2] = NFCsouth[0];\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (NFCwest[a].displaywins() > NFCwest[p].displaywins()){\r\n Temp = NFCwest[p];\r\n NFCwest[p] = NFCwest[a];\r\n NFCwest[a] = Temp;\r\n }\r\n else if (NFCwest[a].displaywins() == NFCwest[p].displaywins() && NFCwest[a].displaypf() > NFCwest[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n nfcplayoff[3] = NFCwest[0];\r\n for (int y=0;y<16;y++){\r\n for (int p=0;p<15;p++) {\r\n int a = p+1;\r\n if (AFC[a].displaywins() > AFC[p].displaywins()){\r\n Temp = AFC[p];\r\n AFC[p] = AFC[a];\r\n AFC[a] = Temp;\r\n }\r\n else if (AFC[a].displaywins() == AFC[p].displaywins() && AFC[a].displaypf() > AFC[p].displaypf()){\r\n Temp = AFC[p];\r\n AFC[p] = AFC[a];\r\n AFC[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int y=0;y<16;y++){\r\n for (int p=0;p<15;p++) {\r\n int a = p+1;\r\n if (NFC[a].displaywins() > NFC[p].displaywins()){\r\n Temp = NFC[p];\r\n NFC[p] = NFC[a];\r\n NFC[a] = Temp;\r\n }\r\n else if (NFC[a].displaywins() == NFC[p].displaywins() && NFC[a].displaypf() > NFC[p].displaypf()){\r\n Temp = NFC[p];\r\n NFC[p] = NFC[a];\r\n NFC[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n\r\n int maxw=0;\r\n\r\n for (int x=0;x<AFC.length;x++){\r\n\r\n if ((AFC[x].displaywins() > maxw) && \r\n (AFC[x].getName() != afcplayoff[0].getName()) && \r\n (AFC[x].getName() != afcplayoff[1].getName()) && \r\n (AFC[x].getName() != afcplayoff[2].getName()) && \r\n (AFC[x].getName() != afcplayoff[3].getName()) && \r\n (AFC[x].getName() != afcplayoff[4].getName()) && \r\n (AFC[x].getName() != afcplayoff[5].getName())){\r\n maxw = AFC[x].displaywins();\r\n afcplayoff[4] = AFC[x]; \r\n }\r\n\r\n }\r\n\r\n maxw=0;\r\n for (int x=0;x<AFC.length;x++){\r\n\r\n if (AFC[x].displaywins() > maxw && \r\n AFC[x].getName() != afcplayoff[0].getName() && \r\n AFC[x].getName() != afcplayoff[1].getName() && \r\n AFC[x].getName() != afcplayoff[2].getName() && \r\n AFC[x].getName() != afcplayoff[3].getName() && \r\n AFC[x].getName() != afcplayoff[4].getName() && \r\n AFC[x].getName() != afcplayoff[5].getName()){\r\n maxw = AFC[x].displaywins();\r\n afcplayoff[5] = AFC[x]; \r\n }\r\n }\r\n\r\n maxw=0;\r\n for (int x=0;x<NFC.length;x++){\r\n if (NFC[x].displaywins() > maxw && \r\n NFC[x].getName() != nfcplayoff[0].getName() && \r\n NFC[x].getName() != nfcplayoff[1].getName() && \r\n NFC[x].getName() != nfcplayoff[2].getName() && \r\n NFC[x].getName() != nfcplayoff[3].getName() && \r\n NFC[x].getName() != nfcplayoff[4].getName() && \r\n NFC[x].getName() != nfcplayoff[5].getName()){\r\n maxw = NFC[x].displaywins();\r\n nfcplayoff[4] = NFC[x]; \r\n }\r\n }\r\n maxw=0;\r\n for (int x=0;x<NFC.length;x++){\r\n\r\n if (NFC[x].displaywins() > maxw && \r\n NFC[x].getName() != nfcplayoff[0].getName() && \r\n NFC[x].getName() != nfcplayoff[1].getName() && \r\n NFC[x].getName() != nfcplayoff[2].getName() && \r\n NFC[x].getName() != nfcplayoff[3].getName() && \r\n NFC[x].getName() != nfcplayoff[4].getName() && \r\n NFC[x].getName() != nfcplayoff[5].getName()){\r\n maxw = NFC[x].displaywins();\r\n nfcplayoff[5] = NFC[x]; \r\n }\r\n }\r\n\r\n for (int y=0;y<4;y++){\r\n for (int p=0;p<3;p++) {\r\n int a = p+1;\r\n if (afcplayoff[a].displaywins() > afcplayoff[p].displaywins()){\r\n Temp = afcplayoff[p];\r\n afcplayoff[p] = afcplayoff[a];\r\n afcplayoff[a] = Temp;\r\n }\r\n else if (afcplayoff[a].displaywins() == afcplayoff[p].displaywins() && afcplayoff[a].displaypf() > afcplayoff[p].displaypf()){\r\n Temp = afcplayoff[p];\r\n afcplayoff[p] = afcplayoff[a];\r\n afcplayoff[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int c=0;c<afcplayoff.length;c++){ // Testing to see if users team made the playoffs.\r\n if(YourTeam.getName().equals(afcplayoff[c].getName()))\r\n afcplayofft = true;\r\n }\r\n\r\n for (int y=0;y<4;y++){\r\n for (int r=0;r<3;r++) {\r\n int c = r+1;\r\n if (nfcplayoff[c].displaywins() > nfcplayoff[r].displaywins()){\r\n Temp = nfcplayoff[r];\r\n nfcplayoff[r] = nfcplayoff[c];\r\n nfcplayoff[c] = Temp;\r\n }\r\n else if (nfcplayoff[c].displaywins() == nfcplayoff[r].displaywins() && nfcplayoff[c].displaypf() > nfcplayoff[r].displaypf()){\r\n Temp = nfcplayoff[r];\r\n nfcplayoff[r] = nfcplayoff[c];\r\n nfcplayoff[c] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int c=0;c<nfcplayoff.length;c++){\r\n if(YourTeam.getName().equals(nfcplayoff[c].getName()))\r\n nfcplayofft = true;\r\n }\r\n // This shows how the playoffs will look like to the user\r\n System.out.println(\"...\" + \"\\n\" + \"Based on the regular season, here is what the first round of playoffs will look like:\" + \"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(afcplayoff[0].getName() + \" got a bye in the first round of the playoffs for placing first in the afc.\");\r\n System.out.println(afcplayoff[1].getName() + \" also got a bye in the first round of the playoffs for placing second in the afc.\" + \"\\n\");\r\n System.out.println(nfcplayoff[0].getName() + \" got a bye in the first round of the playoffs for placing first in the nfc.\");\r\n System.out.println(nfcplayoff[1].getName() + \" also got a bye in the first round of the playoffs for placing second in the nfc.\" + \"\\n\");\r\n\r\n System.out.println(afcplayoff[2].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves on to play the \" + afcplayoff[0].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcplayoff[5].getName() + \"\\n\");\r\n\r\n System.out.println(afcplayoff[3].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ afcplayoff[1].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcplayoff[4].getName() + \"\\n\");\r\n\r\n System.out.println(nfcplayoff[2].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ nfcplayoff[0].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcplayoff[5].getName() + \"\\n\");\r\n\r\n System.out.println(nfcplayoff[3].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) Winner moves onto play the \"+ nfcplayoff[1].getName());\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcplayoff[4].getName() + \"\\n\");\r\n\r\n System.out.println(\"...\"+ \"\\n\");\r\n\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n\r\n {}\r\n }", "void win() {\n String name = score.getName();\n if (Time.getSecondsPassed() < 1) {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / 1);\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + 1 + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n } else {\n calculateMissionScore();\n setHighscoreName(name);\n int totalSum = score.getCurrentScore() + (10000 / Time.getSecondsPassed());\n System.out.println(\"You have won the game!\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game!\");\n System.out.println(\"Your score is: \" + totalSum);\n System.out.println(\"your score has been added to highscore\");\n data.addHighscore(score.getName(), totalSum);\n System.out.println(\"\");\n System.out.println(\"Current highscore list is: \");\n System.out.println(data.printHighscore());\n }\n }", "private int twoInNeg (final GameStateModule game, int player) {\n int count = 0;\n if(game.getHeight() == 4){ //if height is 4, no iterations needed\n //counting bottom up\n for(int i = 0; i < 3; i++) { //since rows is always of width 5\n for(int j = 3; j > 1; j--) {\n if ((game.getAt(i, j) == player) && (game.getAt(i + 1, j - 1) == player) && (game.getAt(i + 2, j - 2) == 0))\n count++;\n }\n }\n //counting top bottom\n for(int i = 4; i > 1; i--) {\n for(int j = 0; j < 2; j++) {\n if ((game.getAt(i, j) == player) && (game.getAt(i - 1, j + 1) == player) && (game.getAt(i - 2, j + 2) == 0))\n count++;\n }\n }\n }\n else { //if height is 5, iterations needed\n for(int i = 0; i < 4; i++) {\n for (int j = 4; j > 1; j--) {\n if ((game.getAt(i, j) == player) && (game.getAt(i + 1, j - 1) == player) && (game.getAt(i + 2, j - 2) == 0))\n count++;\n }\n }\n for(int i = 5; i > 1; i--) {\n for (int j = 0; j < 3; j++) {\n if ((game.getAt(i, j) == player) && (game.getAt(i - 1, j + 1) == player) && (game.getAt(i - 2, j + 2) == 0))\n count++;\n }\n }\n }\n return count;\n }", "public void calculateScores()\r\n {\r\n for(int i = 0; i < gameBoard.getBoardRows(); i++)\r\n for(int j = 0; j < gameBoard.getBoardCols(); j++)\r\n {\r\n if(gameBoard.tilePlayer(i,j) == 0)\r\n currentRedScore = currentRedScore + gameBoard.tileScore(i,j);\r\n if(gameBoard.tilePlayer(i,j) == 1)\r\n currentBlueScore = currentBlueScore + gameBoard.tileScore(i,j);\r\n }\r\n }", "public List<Integer> askPlayerCardsToUse();", "public int winningPlayerIndex(int[][] board, Move lastMove) {\n int m = board.length;\n int n = board[0].length;\n\n\n int player = lastMove.playerIndex;\n int curRow = lastMove.row;\n int curCol = lastMove.col;\n\n\n int start = Math.max(0, curCol - 3);\n for (int i = start; i + 3 < n; i++) {\n if (board[curRow][i] == player && board[curRow][i + 1] == player\n && board[curRow][i + 2] == player && board[curRow][i + 3] == player) {\n return player;\n }\n }\n\n int startRow = Math.max(0, curRow - 3);\n for (int i = start; i + 3 < m; i++) {\n if (board[i][curCol] == player && board[i + 1][curCol] == player\n && board[i + 2][curCol] == player && board[i + 3][curCol] == player) {\n return player;\n }\n }\n\n int count = 0;\n int x = curRow;\n int y = curCol;\n while (x >= 0 && y >= 0) {\n if (board[x][y] == player) {\n count++;\n x--;\n y--;\n if (count >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n x = curRow + 1;\n y = curCol + 1;\n while (x < m && y < n) {\n if (board[x][y] == player) {\n count++;\n x++;\n y++;\n if (count >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n int count1 = 0;\n int x1 = curRow;\n int y1 = curCol;\n while (x1 < m && y1 >= 0) {\n if (board[x1][y1] == player) {\n count1++;\n x1++;\n y1--;\n if (count1 >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n x1 = curRow - 1;\n y1 = curCol + 1;\n while (x1 >= 0 && y1 < n) {\n if (board[x1][y1] == player) {\n count1++;\n x1--;\n y1++;\n if (count1 >= 4) {\n return player;\n }\n } else {\n break;\n }\n }\n\n\n\n// //horizontal\n// for (int i = 0; i < m; i++) {\n// for (int j = 0; j + 3 < n; j++) {\n// if (board[i][j] == player && board[i][j + 1] == player && board[i][j + 2] == player && board[i][j + 3] == player) {\n// return player;\n// }\n// }\n// }\n\n// //vertical\n// for (int i = 0; i + 3 < m; i++) {\n// for (int j = 0; j < n; j++) {\n// if (board[i][j] == player && board[i + 1][j] == player && board[i + 2][j] == player && board[i + 3][j] == player) {\n// return player;\n// }\n// }\n// }\n\n// //diagonal from upper left to lower right\n// for (int i = 3; i < m; i++) {\n// for (int j = 3; j < n; j++) {\n// if (board[i][j] == player && board[i - 1][j - 1] == player && board[i - 2][j - 2] == player && board[i - 3][j - 3] == player) {\n// return player;\n// }\n// }\n// }\n\n// //diagnoal from lower left to upper right\n// for (int i = 3; i < m; i++) {\n// for (int j = 0; j + 3 < n; j++) {\n// if (board[i][j] == player && board[i - 1][j + 1] == player && board[i - 2][j + 2] == player && board[i - 3][j + 3] == player) {\n// return player;\n// }\n// }\n// }\n\n return -1;\n }", "public int wins(String team) {\n return 0;\n }", "public int checkWin(){\n //check for horizontal and vertical wins\n for(int i=0; i<3; i++){\n if(gameBoard[i][0].equals(\"O\") && gameBoard[i][1].equals(\"O\") && gameBoard[i][2].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[i][0].equals(\"X\") && gameBoard[i][1].equals(\"X\") && gameBoard[i][2].equals(\"X\")){\n return 2;\n }\n else if(gameBoard[0][i].equals(\"O\") && gameBoard[1][i].equals(\"O\") && gameBoard[2][i].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][i].equals(\"X\") && gameBoard[1][i].equals(\"X\") && gameBoard[2][i].equals(\"X\")){\n return 2;\n }\n }\n //check for both diagonal cases\n if(gameBoard[0][0].equals(\"O\") && gameBoard[1][1].equals(\"O\") && gameBoard[2][2].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][2].equals(\"O\") && gameBoard[1][1].equals(\"O\") && gameBoard[2][0].equals(\"O\")){\n return 1;\n }\n else if(gameBoard[0][0].equals(\"X\") && gameBoard[1][1].equals(\"X\") && gameBoard[2][2].equals(\"X\")){\n return 2;\n }\n else if(gameBoard[0][2].equals(\"X\") && gameBoard[1][1].equals(\"X\") && gameBoard[2][0].equals(\"X\")){\n return 2;\n }\n return 0;\n }", "private int checkWinner(int[] arr) {\n for (int i = 0; i <= 6; i += 3) {\n int sum = arr[i] + arr[i + 1] + arr[i + 2];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n }\n\n // Check verticals\n for (int i = 0; i < 3; i++) {\n int sum = arr[i] + arr[i + 3] + arr[i + 6];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n }\n\n // Check diagonals\n int sum = arr[0] + arr[4] + arr[8];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n\n sum = arr[2] + arr[4] + arr[6];\n if (sum == 3) {\n return 1;\n } else if (sum == -3) {\n return 2;\n }\n\n return 0;\n }", "static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }", "public int checkForWin() \r\n {\r\n \twinner = null;\r\n \tint winrole = -1;\r\n \tif(isBoardFull()){\r\n \t\tint white = 0;\r\n \t\tint black = 0;\r\n\t\t\tfor(int i = 0; i < boardsize; ++i){\r\n\t\t\t\tfor(int j = 0; j<boardsize; ++j){\r\n\t\t\t\t\tif(board[i][j] == 0){\r\n\t\t\t\t\t\twhite++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(board[i][j] == 1){\r\n\t\t\t\t\t\tblack++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(white > black){\r\n\t\t\t\twinrole = 0;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\t\r\n\t\t\telse if(black > white){\r\n\t\t\t\twinrole = 1;\r\n\t\t\t\twinner = agent[winrole];\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\twinrole=2;\r\n\t\t\t}\r\n\t\t\treturn winrole;\r\n \t}\r\n \treturn -1;\r\n }", "public static void checkWinner() {\n for (int i = 0; i < 3; i++) {\r\n if (winner) {\r\n break;\r\n }\r\n for (int j = 0; j < 3; j++) {\r\n // Check each row\r\n if (output[i][0] == output[i][1] && output[i][0] == output[i][2]) {\r\n if (output[i][0] != ' ') {\r\n System.out.println(output[i][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n break;\r\n }\r\n // Check each column\r\n else if (output[0][j] == output[1][j] && output[0][j] == output[2][j]) {\r\n if (output[0][j] != ' ') {\r\n System.out.println(output[0][j] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n // Check Diagonals\r\n if (output[0][0] == output[1][1] && output[0][0] == output[2][2]) {\r\n if (output[0][0] != ' ') {\r\n System.out.println(output[0][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n\r\n } else if (output[2][0] == output[1][1] && output[2][0] == output[0][2]) {\r\n if (output[2][0] != ' ') {\r\n System.out.println(output[2][0] + \" wins!\");\r\n System.exit(0);\r\n winner = true;\r\n }\r\n\r\n } else if (winner = false) {\r\n System.out.println(\"Draw\");\r\n System.exit(0);\r\n }\r\n }", "public int getWinner() {return winner();}", "public int getWins() {\n return wins;\n }", "private int twoInPos(final GameStateModule game, int player) {\n int count = 0;\n if(game.getHeight() == 4){ //if height is 4, no iterations needed\n //counting bottom up\n for(int i = 0; i < 3; i++) { //since rows is always of width 5\n for(int j = 0; j < 2; j++) {\n if ((game.getAt(i, j) == player) && (game.getAt(i + 1, j + 1) == player) && (game.getAt(i + 2, j + 2) == 0))\n count++;\n }\n }\n //counting top bottom\n for(int i = 4; i > 1; i--) {\n for(int j = 3; j > 1; j--) {\n if ((game.getAt(i, j) == player) && (game.getAt(i - 1, j - 1) == player) && (game.getAt(i - 2, j - 2) == 0))\n count++;\n }\n }\n }\n else { //if height is 5, iterations needed\n for(int i = 0; i < 4; i++) {\n for (int j = 0; j < 3; j++) {\n if ((game.getAt(i, j) == player) && (game.getAt(i + 1, j + 1) == player) && (game.getAt(i + 2, j + 2) == 0))\n count++;\n }\n }\n for(int i = 5; i > 1; i--) {\n for (int j = 4; j > 1; j--) {\n if ((game.getAt(i, j) == player) && (game.getAt(i - 1, j - 1) == player) && (game.getAt(i - 2, j - 2) == 0))\n count++;\n }\n }\n }\n return count;\n }", "private void scoreloss() {\n \tif (playerturn%2==0) {\n \tscoreplayer1 = scoreplayer1-1;}\n if(playerturn%2==1) {\n \tscoreplayer2 = scoreplayer2-1;\n }\n }", "default int[] runAll(String playerAChoice, String playerBChoice) throws IOException{\n\t\tfinal int[] result = new int[2];\n\t\tresult[0] = getNumber(true, playerAChoice);\n\t\tresult[1] = getNumber(false, playerBChoice);\n\t\treturn result;\n\t}", "public static int determineWin(int cpuChoice, int playerChoice) {\n //check for a draw\n if(cpuChoice == playerChoice) {\n return 0;\n }\n //check for cpu win\n if(cpuChoice == rock) {\n if(playerChoice == scissors) return 1;\n }\n if(cpuChoice == paper) {\n if(playerChoice == rock) return 1;\n }\n if(cpuChoice == scissors) {\n if(playerChoice == paper) return 1;\n }\n //if not a draw or cpu win, player wins\n return 2;\n }", "public GameState won() {\n if ( (board[0][0] != TileState.BLANK) && (board[0][0] == board[0][1]) && (board[0][0] == board[0][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[1][0] != TileState.BLANK) && (board[1][0] == board[1][1]) && (board[1][0] == board[1][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[2][0] != TileState.BLANK) && (board[2][0] == board[2][1]) && (board[2][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][1]) && (board[0][0] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ( (board[0][2] != TileState.BLANK) && (board[0][2] == board[1][1]) && (board[0][2] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][0] != TileState.BLANK) && (board[0][0] == board[1][0]) && (board[0][0] == board[2][0])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][1] != TileState.BLANK) && (board[0][1] == board[1][1]) && (board[0][1] == board[2][1])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if ((board[0][2] != TileState.BLANK) && (board[0][2] == board[1][2]) && (board[0][2] == board[2][2])) {\n if (playerOneTurn)\n return GameState.PLAYER_TWO;\n else\n return GameState.PLAYER_ONE;\n } else if (movesPlayed == 9)\n return GameState.DRAW;\n return GameState.IN_PROGRESS;\n }", "public void checkScore() {\n\n whatIsTurnScore();\n\n if (turn == 1) {\n\n if ((p1.getScore() - turnScore < 0) || (p1.getScore() - turnScore == 1)) {\n newScore.setText(null);\n\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p1.getScore() - turnScore > 1) {\n if ((turnScore > 99) && (turnScore < 140)) {\n p1.setHundres(p1.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p1.setOneforties(p1.getOneforties() + 1);\n } else if (turnScore == 180) {\n p1.setOneeighties(p1.getOneeighties() + 1);\n }\n calculateScore();\n\n\n displayScore();\n } else if (p1.getScore() - turnScore == 0) {\n p1.setScore(0);\n }\n }\n\n if (turn == 2) {\n if ((p2.getScore() - turnScore < 0) || (p2.getScore() - turnScore == 1)) {\n newScore.setText(null);\n teamBCheckout.setText(checkOut(p2.getScore()));\n displayScore();\n\n\n Toast.makeText(this, \"Bust\", Toast.LENGTH_SHORT).show();\n } else if (p2.getScore() - turnScore > 1) {\n\n if ((turnScore > 99) && (turnScore < 140)) {\n p2.setHundres(p2.getHundres() + 1);\n } else if ((turnScore > 139) && (turnScore < 180)) {\n p2.setOneforties(p2.getOneforties() + 1);\n } else if (turnScore == 180) {\n p2.setOneeighties(p2.getOneeighties() + 1);\n }\n calculateScore();\n\n displayScore();\n\n } else if (p2.getScore() - turnScore == 0) {\n p2.setScore(0);\n }\n\n }\n\n\n }", "private boolean winningBoard(char[][] board){\n for(int i = 0; i < boardHeight; i++ ){\n for(int j = 0; j < boardWidth; j++) {\n\n //if white was made it to the other side\n if(board[i][j] == 'P' && i == 0){\n return true;\n }\n\n //if black has made it to the other side\n if(board[i][j] == 'p' && i == boardHeight -1){\n return true;\n }\n }\n }\n //no winners\n return false;\n }", "int getWins() {return _wins;}", "private static Hand getResults() {\n System.out.println(hands.size());\n Optional<Hand> winner;\n winner = hands.stream()\n .reduce((hand1, hand2)\n -> hand1.compareTo(hand2) == 1 ? hand1 : hand2);\n Hand winningHand = null;\n if (winner.isPresent()) {\n winningHand = winner.get();\n }\n return winningHand;\n\n }", "public int winner(){\n getValidMoves();\n if(check(1)!=0) return 1;\n else if(check(-1)!=0) return -1;\n else if(validX.size()==0) return 2;\n else return 0;\n }", "public int[] getYourScore(int[] details, int round) throws RemoteException {\n return sd.getGames().get(details[0]).getRound(round).\n getPlayerScore(details[1]);\n }" ]
[ "0.6462858", "0.64117765", "0.61951417", "0.6172232", "0.6166382", "0.6143474", "0.6137308", "0.61175525", "0.6107694", "0.60899746", "0.6064572", "0.60437274", "0.6034763", "0.6023471", "0.5987517", "0.5974352", "0.59734625", "0.59468454", "0.5946048", "0.59399337", "0.5925044", "0.59169686", "0.59002316", "0.58868706", "0.5878998", "0.5878142", "0.5877791", "0.5873912", "0.58576185", "0.5845846", "0.5842901", "0.58403724", "0.5834124", "0.5834124", "0.58136886", "0.5806321", "0.5783417", "0.5782549", "0.57621235", "0.5732728", "0.5732684", "0.57151145", "0.5709316", "0.5701626", "0.57007587", "0.5691324", "0.56876427", "0.56839615", "0.56816316", "0.56804514", "0.5672415", "0.56717706", "0.56670254", "0.5666932", "0.56659275", "0.5656192", "0.565461", "0.56506413", "0.565022", "0.56466496", "0.5639069", "0.5629161", "0.5628374", "0.56273067", "0.56256753", "0.56210333", "0.56039494", "0.5599467", "0.5598318", "0.559629", "0.5594715", "0.5594219", "0.5592359", "0.5591756", "0.5587581", "0.5571576", "0.55711895", "0.55636054", "0.5555578", "0.5553191", "0.55530244", "0.5548442", "0.5537904", "0.5528735", "0.55252415", "0.55195713", "0.55085486", "0.5506192", "0.5502404", "0.54988945", "0.54975694", "0.5494198", "0.5493039", "0.54869074", "0.54822654", "0.54800403", "0.5477521", "0.5476004", "0.5475225", "0.5468713" ]
0.7184643
0
/ In: [1] The Card array to add the won cards to. [2] An arbitrary number of Card objects representing the won cards. Out: Nothing
static void addToWinnings(Card[] winnings, Card... cards) { //Find the first null position in the winnings array and place //each card in that position. for (int i = 0; i < cards.length; i++) for (int j = 0; j < winnings.length; j++) if (winnings[j] == null) { winnings[j] = new Card(cards[i]); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCard(Card card, GamePlayer GP){\n for(int i=0; i<4; i++){\n if(cardsPlayed[i] == null){\n cardsPlayed[i]=card;\n if(i == 0){\n suit = card.getSuit();\n }\n break;\n }\n }\n }", "public void addToPassing(PlayingCard[] cards){\n\t\tpassing.addAll(Arrays.asList(cards));\n\t}", "public void putCard(Cards cards) {\n playedCards.add(cards);\n }", "public void addWinning1(Card card)\n {\n player1Hand.enqueue(card);\n }", "public void addToCollected(PlayingCard card){\n\t\tcollected.add(card);\t\t\n\t}", "public String addCards(ArrayList<Card> cards){\n if(!check(cards))\n return \"false\";\n for(Card c : cards){\n pile.add(c);\n //tens are special\n if (c.getVal() == 10){\n pile = new ArrayList<Card>();\n return \"goAgain\";\n }\n }\n if(checkForCodek()){\n System.out.println(\"CODEK\");\n pile.clear();\n return \"goAgain\";\n }\n return \"true\";\n }", "public void addCard(int card) {\n cards[numCards] = card;\n numCards++;\n \n if (card == 1) {\n score = score + 11;\n numSoft++;\n }\n else if(card == 11 || card == 12 || card == 13) {\n score = score + 10;\n }\n else {\n score = score + card;\n }\n \n //Decreases any aces from 11 to 1 if the score is above 21\n while(numSoft > 0 && score > 21){\n score = score - 10;\n numSoft--;\n }\n }", "public void addCard(Card card) {\n myCards.add(card);\n cardNumber = myCards.size();// reset the number of cards\n }", "public boolean addCard(Card hit) {\n if (numOfCards == 10) {\r\n System.err.println(\"You already have 5 cards. \"\r\n + \"Cannot add another. \\n\");\r\n }\r\n //actually adding cards\r\n hand[numOfCards] = hit;\r\n numOfCards++;\r\n\r\n return (getHandSum() <= 21);\r\n }", "public void add(Card card){\n if (numCards < deckSize - 1) {\n this.deck[numCards] = card;\n numCards++;\n }else {\n System.out.println(\"Deck is full!\");\n }\n }", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "public void test(){\r\n int nCards = 52;\r\n Card deck[] = new Card[nCards];\r\n //for loop that iterates the size of nCards(52)\r\n for(int i = 0; i<nCards;i++){\r\n //create a new Card object, and set it equal to (i) print out the current card.\r\n deck[i] = new Card(i);\r\n System.out.print(deck[i].toString());\r\n }\r\n }", "public void AddCard(Card card) {\n mCard[mCardCount++] = card;\n SetCardPosition(mCardCount - 1);\n }", "public void setCards(Card[] cards) {\r\n this.cards = cards;\r\n }", "@Override\n\tpublic void addCard(PlayingCard card) {\n\t\t\n\t\t\n\t\tif(card == null)return;\n\t\tif(!(card instanceof SkatCard))return;\n\t\tif(!(card.getSuit().equals(SkatCard.suitHerz)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKaro) \n\t\t\t\t|| card.getSuit().equals(SkatCard.suitPik)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKreuz)))return;\n\t\tif(!(card.getRank() == SkatCard.rank7\n\t\t\t\t|| card.getRank() == SkatCard.rank8\n\t\t\t\t|| card.getRank() == SkatCard.rank9\n\t\t\t\t|| card.getRank() == SkatCard.rank10\n\t\t\t\t|| card.getRank() == SkatCard.rankBube\n\t\t\t\t|| card.getRank() == SkatCard.rankDame\n\t\t\t\t|| card.getRank() == SkatCard.rankKoenig\n\t\t\t\t|| card.getRank() == SkatCard.rankAss))return;\n\t\tif(getCount() >= kartenAnzahl)return;\n\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\tif(card.compareTo(aktuellesDeck[i]) == 0)return;\n\t\t}\n\t\t\n\t\t/*\n\t\t * eigentliches addCard\n\t\t */\n\t\taktuellesDeck[getCount()] = card;\n\t\tcount++;\n\t}", "public void addWinning2(Card card)\n {\n player2Hand.enqueue(card);\n }", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public void addCard(Card card){\r\n\t\tplayerHand.add(card);\r\n\t\tSystem.out.print(\"You draw \");\r\n\t\tSystem.out.println(getCardIndex(playerHand.size()-1));\r\n\t}", "private void dealCards(){\n\t\tfor(int k = 0; k <2;k++){\n\t\t\tfor(int i = 0; i < Players.size();i++){\n\t\t\t\tPlayers.get(i).addCardToHand(gameDeck.dealCard());\n\t\t\t}\n\t\t}\n\t\t\n\t setChanged();\n\t notifyObservers(\"CardsDealed\");\n\t}", "public void dealCards() {\n for(int i=0; i < 5; i++) { \n for(PokerPlayer player : players) {\n player.takeCard(deck.draw());\n }\n }\n }", "static int calculateScore(Card[] winnings) {\n int score = 0;\n for (Card card : winnings)\n if (card != null)\n score++;\n else\n break;\n return score;\n }", "public void giveOutCards() {\n boolean shared = false;\n while (!shared) {\n for (Player player : this.players) {\n if (this.cards.size() == 0) {\n shared = true;\n } else {\n Card card = this.cards.get(0);\n this.cards.remove(0);\n if (!envelope.has(card)) {\n player.addCard(card);\n }\n }\n }\n }\n }", "void add(Set<Card> cards);", "public void addListOfCards(Deck newCards){\r\n for(Card i : newCards.cards){\r\n this.cards.add(i);\r\n }\r\n deckSize += cards.size();\r\n }", "public void addCardsToDiscardPile(List<Card> cards) {\r\n discardPile.addAll(cards); // TODO: this triggers a nullpointerexception ( ava.lang.NullPointerException: Attempt to invoke interface method 'int java.util.Collection.size()' on a null object reference\r\n // at java.util.LinkedList.addAll(LinkedList.java:386)\r\n // at ch.ethz.inf.vs.a4.minker.einz.model.GlobalState.addCardsToDiscardPile(GlobalState.java:158) )\r\n discardPile.subList(Math.max(0, discardPile.size() - maxDiscardPileSize), discardPile.size());\r\n }", "void play() {\n\n ArrayList<Card> cardsInMiddle = new ArrayList<>();\n\n Card[] lastCardsPlayed = new Card[numOfPlayers];\n\n //simulation of each player flipping their next card\n for (int i = 0; i < players.length; i++) {\n lastCardsPlayed[i] = players[i].getNextCard();\n cardsInMiddle.add(lastCardsPlayed[i]);\n\n }\n\n //if there's a tie\n while (tieForCards(lastCardsPlayed)) {\n //check to see if players have enough cards to continue\n //if not, then clear that players hand and game will end\n WarPlayer lessThan3Cards = tryGetPlayerWithLessThanThreeCards();\n if (lessThan3Cards != null) {\n lessThan3Cards.getHand().clear();\n return;\n }\n\n //simulation of flipping 2 extra cards\n for (int i = 0; i < players.length; i++) {\n cardsInMiddle.add(players[i].getNextCard());\n cardsInMiddle.add(players[i].getNextCard());\n\n Card lastCard = players[i].getNextCard();\n cardsInMiddle.add(lastCard);\n lastCardsPlayed[i] = lastCard;\n }\n }\n setLastCardsPlayed(lastCardsPlayed);\n\n //determining who gets all the cards played for the round\n int highestCardIndex = largestCard(lastCardsPlayed);\n players[highestCardIndex].addCards(cardsInMiddle);\n players[highestCardIndex].addPoints(cardsInMiddle.size() / numOfPlayers);\n }", "public void hit() {\n Card c = cards.draw(); //Draws a card\n cardPane.add(c); //Adds card to card panel\n repaint(); //Redraws hand\n revalidate(); //Refreshes hand\n int cardValue = c.getValue(); //Gets value of card\n ArrayList<Integer> newValues = new ArrayList<>(); //Collection of new Integer values\n for (Integer i : values) {\n newValues.add(i + cardValue); //Populates new list with old list + new card value\n }\n values.clear(); //Erases old list\n values.addAll(newValues); //Sets values to newValues\n if (cardValue == 11) { //If card is an ace\n for (Integer i : values) {\n newValues.add(i - 10); //Adds values where ace is value 1\n }\n values.clear();\n values.addAll(newValues);\n }\n updateValue(); //Updates the value of the hand\n }", "void refillCards() {\n if (this.gameDeck.isEmpty() && !this.wonDeck.isEmpty()) {\n this.wonDeck.shufffle();\n Deck temp = this.gameDeck;\n this.gameDeck = this.wonDeck;\n this.wonDeck = temp;\n\n }\n\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "@Test\n public void drawFirst(){\n\n ArrayList<Tile> AI = new ArrayList<Tile>();\n Deck deck = new Deck();\n Hand hand = new Hand();\n\n AI.addAll(deck.getHand());\n\n AI.add(deck.draw());\n\n assertTrue(AI.size() == 15);\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "public void addCard(PlayingCard aCard);", "@Override\n public void moveAllToShoe(ArrayList<Card> cardsToAdd) {\n this.cards.addAll(cardsToAdd);\n }", "public void addCard() {\n for (int i = 0; i < 4; i++) {\n cards.add(new Wild());\n cards.add(new WildDrawFour());\n }\n for (Color color : Color.values())\n cards.add(new NumberCard(color.name(),0));\n for (Color color : Color.values()) {\n for (int i = 0; i < 2; i++) {\n for (int j = 1; j < 10; j++)\n cards.add(new NumberCard(color.name(),j));\n cards.add(new DrawTwo(color.name()));\n cards.add(new Reverse(color.name()));\n cards.add(new Skip(color.name()));\n }\n }\n }", "public void addCard(Card c){\n cards.add(c);\n }", "public void takeACard(Card card){\n hand.add(card);\n }", "public void addToHand(String card) {\n\t\tString[] handtemp = new String[hand.length+1];//increase hand size by one\n\t\tfor (int i = 0; i < hand.length; i++) {//loop through the length of the hand\n\t\t\thandtemp[i] = hand[i];//add all elements to the temp array\n\t\t}\n\t\thandtemp[hand.length] = card;//add the new card to the end of the temp array\n\t\thand = handtemp;//make the hand equal to the temp array\n\t}", "WarGame(Player newPlayer, int numOfPlayers) {\n Deck deckOfCards = new Deck();\n this.numOfPlayers = numOfPlayers;\n\n players = new WarPlayer[numOfPlayers];\n lastCards = new Card[numOfPlayers];\n this.newPlayer = newPlayer;\n\n for (int i = 0; i < players.length; i++) {\n players[i] = new WarPlayer();\n }\n\n //the distribution of cards (in the 3 players case it will be uneven so some cards won't be used\n int cardsPerPlayer = deckOfCards.numOfCards() / numOfPlayers;\n for (WarPlayer player : players) {\n for (int j = 0; j < cardsPerPlayer; j++) {\n Card nextCard = deckOfCards.getNextCard();\n player.receiveCard(nextCard);\n }\n }\n }", "public void addCard(Card card) {\n personHand.add(card);\n }", "public void addCard(Card newcard)\n\t{\n\t\thand[numCards++] = newcard;\n\t\tscore += newcard.getValue();\n\t}", "public Card drawCard() {\n\t// To draw a card, it isn't necessary to change the contents of the array.\n\t// But you do want to make sure that each card can be drawn only once.\n\t// Do you see how to do this? (Hint: it's easiest to draw cards from the\n\t// high end of the array.)\n\t\n\tif (cardsLeft==0)\n\t return null;\n\tcardsLeft--;\n\treturn (this.cards[cardsLeft]);\n \n }", "private static double calWinRate5Cards(Card[] cards, int playerNum) {\n\t\tint winTimes = 0;\n\t\tPlayer[] oppsPlayers = new Player[playerNum - 1]; \n\t\tPlayer mePlayer = new Player();\n\t\tfor(int i = 0; i<50; i++){\n\t\t\t//生成playerNum-1个人,每个人2+3=5张\t\t\n\t\t\t\n\t\t}\n\t\treturn 0.6;\n\t}", "private void addCards() {\r\n\t\tfor (Color color : UNO_COLORS) {\r\n\r\n\t\t\t// Create 76 NumberCards --> doubles except 0s.\r\n\t\t\tfor (int num : UNO_NUMBERS) {\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tUNOcards.add(new NumberCard(color, Integer.toString(num)));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t} while (num != 0 && i < 2);\r\n\t\t\t}\r\n\r\n\t\t\t// Create 24 ActionCards --> everything twice\r\n\t\t\tfor (String type : ActionTypes) {\r\n\t\t\t\tfor (int i = 0; i < 2; i++)\r\n\t\t\t\t\tUNOcards.add(new ActionCard(color, type));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String type : WildTypes) {\r\n\t\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\t\tUNOcards.add(new WildCard(type));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[topCard++] = card;\n return true;\n }", "public void addCardsToDrawPile(List<Card> cards) {\r\n drawPile.addAll(cards);\r\n }", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "private void updateLastCardDiscarded(){\r\n\t\tint x = 0;\r\n\t\twhile(this != game.getPlayer(x++)){} // find the nextPlayer\r\n\t\tx = x % game.getNumberOfPlayers();\r\n\t\tnextPlayer = game.getPlayer(x);\r\n\t\t\r\n\t\tif(latestRound != game.getRoundNumber()){ // if it's a new Round, reset\r\n\t\t\tpickedUpCards = new ArrayList<Card>();\r\n\t\t\tlastCardDiscarded = null;\r\n\t\t\tlatestRound = game.getRoundNumber();\r\n\t\t\t\r\n\t\t\tfor(int y = 0; y < game.getNumberOfPlayers(); y++){ // ?????\r\n\t\t\t\tif(game.getPlayer(y) != this && \r\n\t\t\t\t\t\t(getScore() >= game.getPlayer(y).getScore() || getPhase() > game.getPlayer(y).getPhase())){//????\r\n\t\t\t\t\tsetName(oldName);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tsetName(oldName + \"is#WINNING\"); // ?????\r\n\t\t}else if(lastCardDiscarded != null && Configuration.getTypeRequired(nextPlayer.getPhase(), 0) == Configuration.SET_PHASE){\r\n\t\t\tif(nextPlayer.drewFromDiscard())\r\n\t\t\t\tpickedUpCards.add(lastCardDiscarded); // add the card to picked up card if it was picked up \r\n\t\t}\r\n\t}", "public synchronized void returnCard(PlayingCard discarded) {\n\n if (discarded != null){\n try {\n discardPile[nextDiscardedPlace] = discarded;\n nextDiscardedPlace++;\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Discard pile is full!\");\n }\n }\n }", "private void add( int n ) {\r\n Card card = cards.get( n );\r\n if ( !card.isFaceUp() ) {\r\n card.toggleFace();\r\n push( card );\r\n ++this.moveCount;\r\n }\r\n }", "public static void createCards(List<Cards> cardsList, String[] cardArray, String suitName) {\n\t\t\n\t\tfor(int i=0; i < cardArray.length; i++) {\n\t\t\tcardsList.add(new Cards(suitName,cardArray[i],i));\n\t\t}\n\t\t\n\t}", "public void addToDeck(ArrayList<Card> cards)\r\n\t{\r\n\t\tfor (int i = 0; i < cards.size(); i++)\r\n\t\t{\r\n\t\t\tdeck.add(cards.get(i));\r\n\t\t}\r\n\t}", "public void push(int[] cards) {\n for (int i = 0; i < cards.length; i++) {\n if(cards[i] == 0) break;\n Node insert = new Node();\n insert.card = cards[i];\n insert.next = null;\n tail.next = insert;\n tail = insert;\n }\n }", "@Override\r\n public void war(int playerOne, int playerTwo, int plDeckPosition, \r\n PlayingCard plOne, PlayingCard plTwo){\r\n \r\n //check to see if any player has run out of cards\r\n if(this.checkOnePlayerDecksEmpty(plDeckPosition)){\r\n \r\n // if a player has run out of cards have the player who has cards\r\n // win war and give them the cards\r\n if(!this.checkPlayerPlayingDeck(plDeckPosition, playerTwo)){\r\n this.giveCardToPlayer(plTwo, playerTwo, plDeckPosition+1);\r\n this.giveCardToPlayer(plOne, playerTwo, plDeckPosition+1);\r\n }\r\n else{\r\n this.giveCardToPlayer(plTwo, playerOne, plDeckPosition+1);\r\n this.giveCardToPlayer(plOne, playerOne, plDeckPosition+1);\r\n }\r\n this.currentAction.addActionReturnValue(plOne, plTwo);\r\n }\r\n\r\n else{\r\n \r\n // set a war flag to true, and add it to the action return values\r\n boolean hasWarOccured = true; \r\n this.currentAction.addActionReturnValue(plOne, plTwo, hasWarOccured);\r\n \r\n // initialize variables that will hold the playing cards that will\r\n // be inserted into an array \r\n PlayingCard plOneCard;\r\n PlayingCard plTwoCard;\r\n \r\n // create an array of PlayingCards that will hold the cards\r\n // that will be won by the winner of the war and array of cards to return\r\n // to acction return values\r\n ArrayList<PlayingCard> returnOneCards = new ArrayList<>();\r\n ArrayList<PlayingCard> returnTwoCards = new ArrayList<>();\r\n ArrayList<PlayingCard> plCardToReward = new ArrayList<>();\r\n \r\n // add the cards that triggered the war to the array of cards that\r\n // will be given to the winner of the war\r\n plCardToReward.add(plOne); \r\n plCardToReward.add(plTwo); \r\n \r\n // transfer cards from discard to deck if discard pile has cards\r\n if(!this.checkPlayerPlayingDeck(plDeckPosition+1, \r\n playerOne)){\r\n this.transferFromDiscard(plDeckPosition, playerOne);\r\n }\r\n if(!this.checkPlayerPlayingDeck(plDeckPosition+1, \r\n playerTwo)){\r\n this.transferFromDiscard(plDeckPosition, playerTwo);\r\n } \r\n \r\n // initialize length of war\r\n int lengthOfWar = 4;\r\n // add cards used in war into the arraylist of cards to be returned\r\n // to winner, and to the action return values\r\n for(int i = 0; i < lengthOfWar; i++){\r\n plOneCard = (PlayingCard)this.getPlayerCard(playerOne,\r\n plDeckPosition);\r\n plTwoCard = (PlayingCard)this.getPlayerCard(playerTwo,\r\n plDeckPosition);\r\n returnOneCards.add(plOneCard);\r\n returnTwoCards.add(plTwoCard);\r\n plCardToReward.add(plOneCard);\r\n plCardToReward.add(plTwoCard);\r\n if(this.checkOnePlayerDecksEmpty(plDeckPosition)){\r\n this.currentAction.addActionReturnValue(returnOneCards, \r\n returnTwoCards);\r\n break;\r\n }\r\n if(i == lengthOfWar - 1){\r\n if(!(this.comparePlayingCards(returnOneCards.get(\r\n returnOneCards.size() - 1),\r\n returnTwoCards.get(returnTwoCards.size() - 1)) \r\n instanceof Card)){\r\n this.currentAction.addActionReturnValue(returnOneCards,\r\n returnTwoCards, hasWarOccured);\r\n returnOneCards = new ArrayList<>();\r\n returnTwoCards = new ArrayList<>();\r\n lengthOfWar += 4;\r\n }\r\n else{\r\n this.currentAction.addActionReturnValue(returnOneCards,\r\n returnTwoCards);\r\n }\r\n }\r\n } \r\n\r\n // Compare the two player cards\r\n PlayingCard higherCard = this.comparePlayingCards(returnOneCards.get(\r\n returnOneCards.size() -1),\r\n returnTwoCards.get(returnTwoCards.size() -1));\r\n \r\n // See who owned that card and distribute cards accordingly or initialize\r\n if (higherCard == returnOneCards.get(returnOneCards.size() -1)) {\r\n for(PlayingCard p : plCardToReward){\r\n this.giveCardToPlayer(p, playerOne, plDeckPosition+1); \r\n }\r\n }\r\n else if (higherCard == returnTwoCards.get(returnTwoCards.size() -1)) {\r\n for(PlayingCard p : plCardToReward){\r\n this.giveCardToPlayer(p, playerTwo, plDeckPosition+1); \r\n }\r\n }\r\n else{\r\n if(!this.checkPlayerPlayingDeck(plDeckPosition, playerTwo)){\r\n for(PlayingCard p : plCardToReward){\r\n this.giveCardToPlayer(p, playerTwo, plDeckPosition+1);\r\n }\r\n }\r\n else{\r\n for(PlayingCard p : plCardToReward){\r\n this.giveCardToPlayer(p, playerOne, plDeckPosition+1); \r\n }\r\n }\r\n }\r\n }\r\n }", "public void addCard(Card c)\n {\n hand.add(c);\n }", "public void Hit(Card card) {\r\n\t\tthis.cards++;\r\n\t\tthis.Hand.add(card);\r\n\t\tif (card.cardValue() == 11) {\r\n\t\t\tthis.aceCounter++;\r\n\t\t}\r\n\t}", "public synchronized void collectCard(Card card){\n try{\r\n List<Player> pList = Arrays.asList(players);\r\n \r\n Iterator<Player> pIter = pList.iterator();\r\n while(pIter.hasNext()){\r\n //for(Player player: players){\r\n Player player = pIter.next();\r\n \r\n \r\n if(player == null){\r\n continue;\r\n }\r\n System.out.println(\"Collect\");\r\n \r\n if(player.removeCard(card)){\r\n player.getRemoved().clear();\r\n \r\n getCardsPlayed().add(card);\r\n getCardsInPlay().remove(card);\r\n }\r\n }\r\n }catch(Exception ex){\r\n System.out.println(\"Collect ex: \" + ex);\r\n }\r\n \r\n }", "public Shoe(Card.Suit suit, int numCards)\n \n { \n cardAry = new Card[numCards];\n\n int numSuits = numCards / 13;\n\n for(int deckIdx = 0; deckIdx<= numSuits; deckIdx++)\n {\n int cardsInSuit;\n if(deckIdx == numSuits)\n cardsInSuit = numCards % 13;\n else\n cardsInSuit = 13;\n for(int rankIdx = 1; rankIdx<=cardsInSuit; rankIdx++)\n {\n cardAry[deckIdx*13 + rankIdx-1] = new Card(suit, rankIdx);\n }\n }\n\n this.numDecks = 0;\n this.numCards = numCards;\n }", "public void createNewCardPuzzle(){\n if (playerCardList != null) removePrevCardList();\n pairMatchedCount = 0;\n playerCardList = new PlayerCardList();\n int tempCardNo = 0;\n for (int row = 0; row < 4; row++) {\n for (int col = 0; col < 5; col++) {\n PlayerCard playerCard = playerCardList.getPlayerCardByNo(tempCardNo);\n setCardFlipEventHandler(playerCard);\n playerCardPuzzle.add(playerCard, col, row);\n tempCardNo++;\n }\n }\n }", "public void addACard() {\n Card card = new Card();\n int index = 0;\n doubleCapacity(orderByTitle);\n doubleCapacity(orderByAuthor);\n doubleCapacity(orderBySubject);\n \n \n System.out.println(\"Title of book is : \");\n card.titleOfBook = input.next();\n orderByTitle[index] = card.titleOfBook;\n System.out.println(\"Author of book is : \");\n card.autherOfBook = input.next();\n orderByAuthor[index] = card.autherOfBook;\n System.out.println(\"Subject Of Book is : \");\n card.subjectOfBook = input.next();\n orderBySubject[index] = card.subjectOfBook;\n cards.add(card) ; \n System.out.println(card);\n System.out.println();\n }", "private void transferCards(Player player) {\r\n\t\twhile(warPile.size() > 0) {\r\n\t\t\tplayer.addToWinningsPile(warPile.remove(0));\r\n\t\t}\r\n\t}", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "public ERSBoard(int numPlayers)\n {\n board = new ArrayList<Card>();\n slapOrder = new ArrayList<Integer>();\n players = new ArrayList<Player>();\n starters = new ArrayList<Deck>();\n deck = new Deck(RANKS, SUITS);\n deck.shuffle();\n for (int x = 0; x < numPlayers; x++) {\n starters.add(new Deck());\n }\n int divisions = 52/numPlayers;\n int leftovers = 52 % numPlayers;\n int place = 0;\n for (int x = 0; x < starters.size(); x++) {\n for (int y = place; y < place + divisions; y++) {\n starters.get(x).addCard(deck.deal());\n }\n }\n for (int x = 0; x < numPlayers; x++) {\n players.add(new Player(starters.get(x),x+1));\n }\n \n\n }", "public CardGame(int players, int myID) {\r\n s = new Scanner(System.in);\r\n this.players = players;\r\n this.cardPerPlayer = 52 / players;\r\n this.playerCard = new int[players][4][cardPerPlayer + 2];\r\n this.myID = myID;\r\n for (int i = 0; i < playerCard.length; i++) {\r\n for (int j = 0; j < playerCard[0].length; j++) {\r\n for (int j2 = 2; j2 < playerCard[0][0].length; j2++) {\r\n playerCard[i][j][j2] = 1;\r\n }\r\n }\r\n }\r\n\r\n }", "public static Shot addShotToScorecard(Scorecard scorecard, int frameNumber, Shot shot) {\n if (frameNumber != 10 && (frameNumber == 0 ||\n scorecard.getFrames().get(frameNumber - 1) == null ||\n scorecard.getFrames().get(frameNumber - 1).getShots().get(0).getPins() == 10)) {\n\n List<Shot> shots = Lists.newArrayList(shot);\n Frame frame = new Frame();\n frame.setShots(shots);\n frame.setScorecard(scorecard);\n frame.setFrameNumber(frameNumber + 1);\n shot.setFrame(frame);\n\n // Set next frame on previous to the newly created frame\n if (frameNumber > 0) {\n List<Frame> frames = scorecard.getFrames();\n frames.get(frames.size() - 1).setNextFrame(frame);\n }\n\n } else {\n\n Frame currentFrame = scorecard.getFrames().get(frameNumber - 1);\n\n if (frameNumber < 10 && currentFrame.getShots().get(0).getPins() + shot.getPins() > 10) {\n throw new RuntimeException(\"Pins cannot exceed 10 for a given frame\");\n }\n\n if ((frameNumber == 10 && currentFrame.getShots().get(0).getPins() + shot.getPins() < 10) ||\n (frameNumber == 10 && currentFrame.getShots().size() == 3)) {\n throw new RuntimeException(\"Game is complete, cannot add more frames\");\n }\n\n currentFrame.getShots().add(shot);\n shot.setFrame(currentFrame);\n }\n\n return shot;\n\n }", "public void push(Card newCard)\n\t{\n\t\tcard.add(newCard);\n\t}", "@Test\n void testWinnerOfTrickNotFollowingSuit() {\n Dealer testDealer = new Dealer();\n testDealer.initDealer();\n\n Bot botA = testDealer.getBotA();\n Bot botB = testDealer.getBotB();\n Bot botC = testDealer.getBotC();\n\n ArrayList<Card> botAHand, botBHand, botCHand = new ArrayList <Card>();\n\n // botAHand = new ArrayList <Card>();\n botAHand = new ArrayList <Card>();\n botBHand = new ArrayList <Card>();\n botCHand = new ArrayList <Card>();\n\n Card thrownCard = new Card(Suit.CLUBS,Rank.FOUR,true);\n \n Card cardA1 = new Card(Suit.CLUBS,Rank.ACE,true);\n\n Card cardB1 = new Card(Suit.DIAMONDS,Rank.ACE,true);\n\n Card cardC1 = new Card(Suit.SPADES,Rank.ACE,true);\n\n botAHand.add(cardA1);\n botBHand.add(cardB1);\n botCHand.add(cardC1);\n \n // botA.fillHandCards(botAHand);\n botA.fillHandCards(botAHand);\n botB.fillHandCards(botBHand);\n botC.fillHandCards(botCHand);\n\n testDealer.addToPlayedCards(thrownCard);\n \n Card cardToPlay = botA.playCard(thrownCard, 1);\n testDealer.addToPlayedCards(cardToPlay);\n Card largestPlayedCard = testDealer.getLargestCardFromTrick();\n\n cardToPlay = botB.playCard(largestPlayedCard, 2);\n testDealer.addToPlayedCards(cardToPlay);\n largestPlayedCard = testDealer.getLargestCardFromTrick();\n\n cardToPlay = botC.playCard(largestPlayedCard, 3);\n testDealer.addToPlayedCards(cardToPlay);\n\n // List<Card> allPlayedCards = testDealer.getPlayedCardsForTrick();\n assertEquals(\"botA\", testDealer.getWinnerOfTrick(testDealer.getPlayedCardsForTrick()));\n }", "public Pile(){\n //initializes the Card array\n pile = new Card[6];\n for(int i = 0; i < 6; i++){\n pile[i] = new Card(0,0); //loads empty cards.\n }\n\n pilePlace = 0;\n\n }", "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }", "public void addCard(Card c)\n {\n cards.add(c);\n }", "private void moveTheCardsTotheWinner(int winPlayer,Player tempPlayer)\n {\n for(int i=0;i<tempPlayer.getLastIndex();i++)\n if(winPlayer == 1)\n FirstPlayer.addCardToBegining(tempPlayer.removeTheCard());\n else if (winPlayer == 2) \n SecondPlayer.addCardToBegining(tempPlayer.removeTheCard()); \n }", "public void setRegularCardsByWins(int wins, int cards) {\n statistics.getCardsByWins().put(wins, cards);\n }", "public void collectWinnings() {\n\t\tif (hand.checkBlackjack()) {\n\t\t\tdouble win = bet * 1.5;\n\t\t\ttotalMoney += (win + bet);\n\t\t} else {\n\t\t\ttotalMoney += (bet + bet);\n\t\t}\n\t}", "public void addCard(Card card){\n\t\tthis.pile.add(0, card);\n\t}", "public PileOfCards(int numCards) {\n descriptors = CardFactory.getDescriptorKeySet();\n pile = new ArrayList<Card>(numCards);\n for(int i = 0; i < numCards; i++)\n pile.add(CardFactory.drawCard());\n }", "public boolean addTopCard( Card c)\r\n {\r\n if ( valid < cards.length)\r\n {\r\n cards[valid] = c; // should this be cloned?\r\n valid++;\r\n return true;\r\n }\r\n return false;\r\n }", "public void dealCards () {\t\n\n\t\tint numOfPlayers = players.size();\n\t\tint count = 0;\n\t\tCard[] cards = deck.getDeck();\n\t\tfor (int i=0; i<cards.length; i++) {\n\t\t\t\t// Go through all the cards, for each player deal 1 card at a time\n\t\t\t\t(players.get(count % numOfPlayers).getCards()).add(cards[i]); \n\t\t\t\tcount++;\n\t\t}\n\t}", "public Tile[] assignCards(Tile[] giveCards, Stack<?> playerCard) {\n\t\tfor(int numCardsPerPlayer = 1; numCardsPerPlayer <= 3; numCardsPerPlayer++) {\n\t\t\ttry {\n\t\t\t\tif (!playerCard.isEmpty()) {\n\t\t\t\t\tgiveCards[numCardsPerPlayer-1] = (Tile) playerCard.pop();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLog.d(\"Code777\",\"ERROR inside assignCards\");\n\t\t\t}\n\t\t}\n\t\treturn giveCards;\n\t}", "private void transferCards(Player roundWinner, ArrayList<Card> currentTopCards) {\n // if there is a winner, the winner becomes the active player and takes round\n // cards\n if (roundWinner != null) {\n // set winner of round to be activePlayer for next round\n activePlayer = roundWinner;\n // take the pile of round cards\n roundWinner.takeAllCards(currentTopCards);\n // take communal cards if communal pile is not empty\n if (!deck.isEmpty()) {\n roundWinner.takeAllCards(deck);\n }\n }\n // if there is a draw, add round cards to the communal pile\n else {\n while (!currentTopCards.isEmpty()) {\n Card card = currentTopCards.get(0);\n deck.add(card);\n currentTopCards.remove(0);\n }\n }\n }", "public void addToHand(ArrayList<PlayingCard> cardsToAdd)\n\t{\n\t\tcurrentHand.addAll(cardsToAdd);\n\t}", "public void fakeCards(){\n this.drawPile = new ArrayList<>();\n drawPile.add(new RemoveActionCard(\"Fernsprechgerät\", (float) 0.5, 4, new SpecialActions(0,0,1) ));\n drawPile.add(new MovingCard(\"Millionärin\", 4, 5, 4, 99, new COLOR[]{COLOR.SAND}));\n drawPile.add(new RemoveMoveSellCard(\"Propellerflugzeug\", 4, 4, 4, 99, new COLOR[]{COLOR.SAND, COLOR.RIVER, COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new MovingCard(\"Ureinwohner\", (float) 0.5, 5, 99, 1, new COLOR[]{COLOR.BASECAMP, COLOR.RUBBLE, COLOR.JUNGLE, COLOR.SAND, COLOR.RIVER,COLOR.ENDFIELDJUNGLE,COLOR.ENDFIELDRIVER}));\n drawPile.add(new ActionCard(\"Wissenschaftlerin\", (float) 0.5, 4, new SpecialActions(1,1,0)));\n drawPile.add(new MovingCard(\"Pionier\", (float) 0.5, 5, 5, 99, new COLOR[]{COLOR.JUNGLE,COLOR.ENDFIELDJUNGLE}));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n drawPile.add(new ActionCard(\"Kartograph\", (float) 0.5, 4, new SpecialActions(2,0,0)));\n Collections.shuffle(drawPile);\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0] = iMinValue;\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tcard = mCard[i];\n \t\tiValue = card.GetSuit()*13 + card.GetValue();\n \t\tiCount = 0;\n \t\t// See where the card value comes in the pecking order\n \t\twhile (iValue > iOrder[iCount]){\n \t\t\tiCount++;\n \t\t}\n \t\t// It goes here, so move everything else along one\n \t\tfor (int j = mCardCount-1; j > iCount; j--)\n \t\t\tiOrder[j] = iOrder[j-1];\n \t\tiOrder[iCount] = iValue;\n \t}\n \t\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tfor (int j = 0; j < mCardCount; j++){\n \t\tcard = mCard[j];\n \t\tiValue = card.GetSuit()*13 + card.GetValue(); \t\t\t\n \t\t\tif (iValue == iOrder[i]){\n \t\t\t\torderedCards[i] = mCard[j];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tmCard[i] = orderedCards[i];\n \t} \t\n }\n }", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public void add(Card card) {\n this.cards.add(card);\n }", "public Card drawFromCommunityChest()\n {\n Random draw = new Random();\n \n //if the chance cards are exhausted, re-fill the cards\n if(m_communityChest.size() == 0)\n {\n m_communityChest = m_drawnCommChest;\n m_drawnCommChest.clear();\n }\n \n //draw a random card and add it to the list of the cards drawn\n int drawFrom = draw.nextInt(m_chance.size() - 1) + 1;\n Card card = m_communityChest.remove(drawFrom);\n m_drawnCommChest.add(card);\n\n return card;\n }", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public void addCard(Cards card, boolean canUse) {\n \t\tif (canUse) {\n \t\t\tcards[card.ordinal()] += 1;\n \t\t\tusedCard = false;\n \t\t} else {\n \t\t\tnewCards.add(card);\n \t\t}\n \t}", "public Hand(Card[] hand) {\r\n\t\tthis.cards = new ArrayList<Card>(Arrays.asList(hand));\r\n\t}", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public void drawFromBag(int n) {\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\tif (this.bag.size() == 0) {\r\n\t\t\t\tif (this.discard.size() == 0) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.bag = discard;\r\n\t\t\t\t\tthis.discard = new ArrayList<Card>();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (lockedCards.size() > 0) {\r\n\t\t\t\tthis.hand.add(this.lockedCards.remove(0));\r\n\t\t\t} else {\r\n\t\t\t\tint nextCard = (int) (Math.random() * this.bag.size());\r\n\t\t\t\tthis.hand.add(this.bag.remove(nextCard));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void reFillCard() {\n ArrayList<Cards> refill = new ArrayList<Cards>();\n for (Cards card : playedCards) {\n refill.add(card);\n }\n setDeckCards(new Deck(refill));\n playedCards.clear();\n playedCards.add(refill.get(refill.size()-1));\n }", "public void addToHand(PlayingCard card){\n\t\thand.add(card);\n\t}", "public void playGame(){\n for(int i = 0; i<2; i++) {\n userCards.add(dealCards());\n computerCards.add(dealCards());\n }\n while(!isGameOver) {\n userScore = calculateScore(userCards);\n computerScore = calculateScore(computerCards);\n\n System.out.println(\"your cards: \" + userCards + \", current score: \" + userScore);\n System.out.println(\"Computer's first card: \" + computerCards.get(0));\n\n if (userScore == 0 || computerScore == 0 || userScore > 21) {\n isGameOver = true;\n }else{\n System.out.print(\"Type 'y' to get another card, type 'n' to pass: \");\n userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n userCards.add(dealCards());\n } else{\n isGameOver = true;\n }\n }\n }\n\n //computer turn if user opts to not draw another card\n while(computerScore !=0 && computerScore <17){\n computerCards.add(dealCards());\n computerScore = calculateScore(computerCards);\n }\n\n System.out.println(\"Your final hand: \"+ userCards+\", final score: \"+ userScore);\n System.out.println(\"Computer's final hand: \"+computerCards+\", final score: \"+computerScore);\n System.out.println(compareScore(userScore, computerScore));\n\n Scanner scanUserInput = new Scanner(System.in);\n System.out.print(\"Do you want to play a game of Blackjack? Type 'y' or 'n': \");\n String userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n new BlackJack().playGame();\n }\n }", "@Test\n\tpublic void bakersDozenCorrectlyAddingTest(){\n\t\tBakersDozen obj = new BakersDozen();\n\t\t// Creates a queen of hearts card object\n\t\tCard obj1 = new Card(12, 2);\n\t\t// Creates a ace of spades card object\n\t\tCard obj2 = new Card(1, 3);\n\t\t// Creates a 2 of spades card object\n\t\tCard obj3 = new Card(2, 3);\n\t\t// Creates a 3 of hearts card object\n\t\tCard obj4 = new Card(3, 2);\n\t\t// Creates a 4 of spades card object\n\t\tCard obj5 = new Card(4, 3);\n\t\t// Creates a 3 of spades card object\n\t\tCard obj6 = new Card(3, 3);\n\t\t// Assert it's illegal to add a queen of hearts because the pile is empty \n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj1));\n\t\t// Assert it's legal to add an ace of spades\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj2));\n\t\t// Assert it's legal to add a value one more than homecell's top card\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj3));\n\t\t// Assert it's illegal to add card without the identical suit \n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj4));\n\t\t/* Assert it's illegal to add card with identical suit, \n\t\t * but not a value one more than the homecell's top card\n\t\t */\n\t\tassertFalse(obj.getHomeCellPile(1).addCard(obj5));\n\t\t/* Assert it's legal to add card with identical suit\n\t\t * and a value one more than the homecell's top card \n\t\t */\n\t\tassertTrue(obj.getHomeCellPile(1).addCard(obj6));\n\t}", "public int getNumDevCards() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < cards.length; i++)\n \t\t\tcount += cards[i];\n \n \t\treturn count + newCards.size();\n \t}" ]
[ "0.6687374", "0.6335549", "0.62825334", "0.62699974", "0.61374", "0.6080177", "0.6020294", "0.6008968", "0.59937924", "0.5969053", "0.5966191", "0.5898055", "0.58941305", "0.5882039", "0.5839654", "0.58384454", "0.5838033", "0.58259493", "0.5818611", "0.5806106", "0.5778634", "0.576737", "0.5750524", "0.5728364", "0.57160324", "0.5701794", "0.5660137", "0.56518745", "0.5638997", "0.56326014", "0.5629945", "0.562436", "0.5621619", "0.5620351", "0.558794", "0.558292", "0.5574016", "0.55617017", "0.5557885", "0.5554943", "0.55539316", "0.554902", "0.5547224", "0.553986", "0.55380106", "0.55333185", "0.55238247", "0.552367", "0.55168843", "0.551274", "0.5511279", "0.5507818", "0.5503662", "0.5500766", "0.5497658", "0.5490812", "0.54854405", "0.54840356", "0.5481469", "0.54692024", "0.54642725", "0.54594266", "0.5449202", "0.54491675", "0.5448687", "0.5441569", "0.5441067", "0.5439519", "0.543516", "0.5433363", "0.54269046", "0.5422768", "0.54215956", "0.5420298", "0.54169434", "0.5412281", "0.5407198", "0.54037935", "0.5403492", "0.54019463", "0.5401327", "0.53942746", "0.5393612", "0.5391677", "0.5388909", "0.53878874", "0.5379351", "0.53770524", "0.5372942", "0.53708977", "0.5362115", "0.5356595", "0.53564745", "0.5356171", "0.5352866", "0.53508395", "0.5346616", "0.534549", "0.5344205", "0.5332967" ]
0.7316227
0
/ In: A Card object representing the card that the human player picked Out: An integer representing the position in the computer's hand of the card it chooses to play. This function makes this game very hard to win. The computer knows which card the human chooses to play. It chooses which card to play based on this.
static int getComputerCard(Card playerCard) { //The computer will iterate through different possible cards it might choose to play. //This represents a chosen card at any given time. Card possibleCard = null; //The position in the computer's hand where the possibleCard is stored. int cardPosition = 0; //True if the computer has a card of higher value than the player's. boolean hasHigherCard = false; //Iterate through the computer's hand, trying to find a card higher than the player's for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) { if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) { //The computer has a higher card. if (possibleCard != null) { //If this card is lower than the possible card, but can still beat the player, then replace possible card. if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) { possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); cardPosition = i; } } else { //If the computer has not yet chosen a possible card, choose this one. possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); hasHigherCard = true; cardPosition = i; } } } if (!hasHigherCard) { //If the computer does not have a card that can beat the player, then feed the lowest card //that the computer has to the player. for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) { if (possibleCard != null) { if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) { possibleCard = new Card(highCardGame.getHand(0).inspectCard(i)); cardPosition = i; } } else { possibleCard = highCardGame.getHand(0).inspectCard(i); cardPosition = i; } } } return cardPosition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }", "private PlayingCard chooseCard(HeartsGraphics g){\t\t\n\t\tHearts.setCurrentPlayer(this);\n\t\t\n\t\tif(number != PLAYER_ONE){\n\t\t\t// A.I. code\n\t\t\tint index;\n\t\t\t\n\t\t\tRandom r = new Random();\n\t\t\tindex = r.nextInt(hand.size());\t\t\t\n\t\t\t\n\t\t\treturn hand.get(index);\t\t\t\n\t\t} else {\n\t\t\treturn getCard(g);\n\t\t}\t\t\n\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card takeTurn() {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the player has it in their hand, then play it\n ArrayList<Card> cards = hand.getCards();\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(new Card(inputSuit, inputRank))) {\n return hand.draw(input);\n }\n }\n System.out.println(\"Invalid card. Try again\");\n }\n }", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public Card chooseCard(Hand h, Trick t);", "@Override\n void pickCard() {\n\n boolean suitFound = false; // true if player has the suit\n Card cardToBeat; // strongest card on pile\n Card pickedCard = null; // card to throw\n ArrayList<Card> cardsToChooseFrom = new ArrayList<Card>();\n char trump = pitchTable.getTrump();\n\n // find the strongest card on pile\n cardToBeat = pitchTable.getCardToBeat();\n\n // if pile is empty\n if (cardToBeat == null){\n // pick the strongest non trump card\n for (Card card : hand)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n\n // if non trump card not found (means all cards are trump)\n // then pick the strongest card\n if (pickedCard == null)\n for (Card card : hand)\n if ((pickedCard == null) || (pickedCard.rank < card.rank))\n pickedCard = card;\n }\n else { // means leading suit is set already\n // check if player has suit\n for (Card card : hand) {\n if (card.suit == pitchTable.getLeadingSuit())\n suitFound = true;\n }\n\n // if player does not have suit he can play any card\n if (!suitFound)\n cardsToChooseFrom = hand;\n else // if player has suit then cardsToChooseFrom = allowed cards\n for (Card card : hand)\n if ((card.suit == pitchTable.getLeadingSuit()) ||\n card.suit == pitchTable.getTrump())\n cardsToChooseFrom.add(card);\n }\n\n // try to take the trick with the lowest winning card\n // if no winning card then throw the lowest you have\n\n // (trying to take the trick)\n // if card not picked yet\n // then find the lowest card that has the suit and is higher than cardToBeat\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((cardToBeat.suit == card.suit) && (cardToBeat.rank < card.rank))\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to take the trick)\n // if card not picked yet and cardToBeat is not trump\n // then find the lowest trump\n if ((pickedCard == null) && (cardToBeat.suit != trump))\n for (Card card : cardsToChooseFrom)\n if (card.suit == trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means player cannot take the trick)\n // then throw the lowest non trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if (card.suit != trump)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n // (trying to throw the lowest)\n // if still no card picked (means all allowed cards are trump)\n // then throw the lowest trump\n if (pickedCard == null)\n for (Card card : cardsToChooseFrom)\n if ((pickedCard == null) || (pickedCard.rank > card.rank))\n pickedCard = card;\n\n if (pickedCard == null)\n System.out.println(\"Error: picked card still null\");\n\n pitchTable.putOnPile(pickedCard);\n hand.remove(pickedCard);\n\n }", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "@Override\n public Card chooseCardtoPlay() {\n assert(card1 != null && card2 != null);\n if (card1.value == Card.PRINCESS) return playCard2();\n if (card2.value == Card.PRINCESS) return playCard1();\n return rand.nextBoolean() ? playCard1() : playCard2();\n }", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "public void playCard(int player, int card) {\n }", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "@Override\n public PlayingCard chooseCard() throws InterruptedException {\n\n boolean validInput = false;\n int max = hand.getSize();\n String inputStr;\n int inputInt = 0; // not ideal; but compiler is happier\n Scanner sc = new Scanner(System.in);\n\n while (!validInput) {\n this.hand.showCards();\n System.out.println(\"Choose a card from the above\");\n\n inputStr = Game.cleanStringInput(sc.nextLine());\n\n // only supports 0 ~ 9\n if (inputStr.matches(\"\\\\d\")) {\n\n if (inputStr.matches(\"0\")) {\n surrender(sc);\n inputStr = \"1\"; // to throw away last card\n }\n\n // - 1 is to allow usage of 1 - 9 for card selection instead\n // of 0 - 8...this converts card \"1\" into index 0.\n inputInt = (Integer.parseInt(inputStr)) - 1;\n\n // must be LESS than max...if size = 1, then \"max index\" == 0\n if (inputInt < max && inputInt >= 0) {\n validInput = true;\n } else {\n System.out.println(\"OOPS! Enter between 1 and \"\n + (max) + \"!\"); // \"between 1 and 1\" is acceptable\n Thread.sleep(1000);\n\n } // end check for acceptable index\n } else {\n System.out.println(\"OOPS! Enter a single digit ONLY!\");\n Thread.sleep(1000);\n } // end check for digit entered\n } // end \"while-loop\" check for valid input\n\n // if we're here, we can safely return the selected card\n return (PlayingCard) hand.removeCard(inputInt);\n }", "private int playerTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Ask the player to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"You drew a \" + drawn.getName());\n Ui.pause();\n\n // Shows current cards and drawn cards\n Ui.cls();\n Ui.println(getHeader());\n Ui.println();\n Ui.print(\"Cards:\");\n // Draw every card\n for (int i = 0; i < drawnCards.size(); i++) {\n Ui.print(\" \" + drawnCards.get(i));\n if (i + 1 < drawnCards.size()) {\n Ui.print(\",\");\n }\n }\n // Value of cards\n Ui.println(\"Value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"Unfortunately you got more than 21 points, resulting in a total of 0 points!\");\n Ui.pause();\n break;\n } else {\n Ui.println(\"Would you like to draw another card?\");\n Ui.println(\"1) Take another card\");\n Ui.println(\"2) Stop taking cards\");\n }\n\n // Input\n boolean quitInput = false;\n while (!quitInput) {\n int menuChoice = Ui.getValidInt();\n\n switch (menuChoice) {\n case 1:\n quitInput = true;\n break;\n case 2:\n exit = true;\n quitInput = true;\n break;\n default:\n break;\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }", "private static void playGame() {\n CardDeck deck = new CardDeck();\n int dealer, player, hitOrStand = 1, score = 0;\n System.out.println(\"Goal: Beat the dealer without going over 21\");\n Scanner input = new Scanner(System.in);\n\n // Generate the dealer's card\n dealer = generateRandomNumber(16, 21); \n System.out.println(\"The Dealer scored: \" + dealer);\n System.out.println(\"\");\n \n\n // Keep playing while the player hasn't won or lost yet\n while (hitOrStand == 1 && score < 21 && score < dealer) {\n // Generate player's card\n player = generateRandomNumber(1, 10); \n System.out.println(\"Your card is worth \" + player);\n\n // Displays the picture of player's card\n String card = deck.drawCard(player);\n System.out.println(card);\n\n // Add player's card value to their score\n score = score + player;\n\n // Displays score and asks wether user wants to hit or stand\n if (score <= 21 && score < dealer) {\n System.out.println(\"Your score is \" + score);\n System.out.print(\"Another card? Hit=1 stand=0: \");\n hitOrStand = input.nextInt();\n System.out.println(\"\");\n }\n }\n \n // Display player won\n if (score > dealer && score <= 21 ) {\n System.out.println(\"You win!\");\n System.out.println(\"Your score is \" + score);\n System.out.println(\"The dealer score was \" + dealer);\n System.out.println(\"You were closer to 21 by \" + (score - dealer));\n\n // Display when player ties with dealer\n } else if (score == dealer) {\n System.out.println(\"Your score is \" + score);\n System.out.println(\"\");\n System.out.println(\"You tied!\");\n\n // Display if player lost\n } else if (score > 21) {\n System.out.println(\"Your score is \" + score);\n System.out.println(\"\");\n System.out.println(\"You lose!\");\n int over = score - 21;\n System.out.println(\"You were over 21 by \" + over);\n\n // Display if player lost\n } else {\n int difference;\n difference = dealer - score;\n System.out.println(\"Your score is \" + score);\n System.out.println(\"You lose!\");\n System.out.println(\"The dealer was closer to 21 than you by \" + difference);\n } \n }", "public Player switchPlayer(){\n Player player = getGame().getCurrentPlayer();\n\n List<Card> cards = new ArrayList<>();\n\n for(Card card: getGame().getCards()){\n if(card.rule.isValid(getGame().getDices())){\n cards.add(card);\n }\n }\n\n //get the best card\n if(!cards.isEmpty()){\n Card card = takeTheBestCard(cards);\n\n //add it to the player\n player.getCardsWon().add(card);\n getGame().getCards().remove(card);\n\n System.out.println(player.getName() + \" won \" + card.getExplaination());\n getGame().addAction(new Action(player.getName() + \" won \" + card.getExplaination()));\n }\n\n if(getGame().getCards().isEmpty()){\n game.setStatus(Game.GameStatus.COMPLETED);\n getGame().addAction(new Action(bestPlayer().getName() + \" WON THE GAME!!!\"));\n }\n //turn\n getGame().setCountOfTrialForPlayer(0);\n\n game.setIndexOfCurrentPlayer(game.getIndexOfCurrentPlayer()+1);\n\n if(game.getIndexOfCurrentPlayer() == getGame().getPlayers().size()){\n game.setIndexOfCurrentPlayer(0);\n }\n\n game.setCountOfTrialForPlayer(0);\n game.setDices(new ArrayList<>());\n\n return getGame().getCurrentPlayer();\n }", "public Card getWinningCard() {\n return winningCard;\n }", "public void dealCardsToPile()\n {\n // Set the first initial computer card to display\n computerCard = highCardGame.getCardFromDeck();\n\n // Sets the first initial player card\n playerCard = highCardGame.getCardFromDeck();\n }", "@Override\n protected void receiveInfo(GameInfo info) {\n if (!(info instanceof PalaceGameState)) {\n return;\n }\n PalaceGameState state = new PalaceGameState((PalaceGameState) info);\n PalaceSelectCardAction selectCardAction;\n if (state.getTurn() != this.playerNum) {\n return;\n } else {\n sleep(1000); // make the computer \"think\"\n boolean isBigger = false;// variable to check if they have a valid card\n\n //determines if the cards are valid\n if (!(state.getP2Hand().isEmpty()) && !state.getPlayPilePalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() > state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) {\n isBigger = true;\n }\n }\n }\n\n //takes pile if they have no hand cards to play\n if (isBigger == false && !(state.getP2Hand().isEmpty())) {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n\n //begins searching for a card to select\n PalaceCard cardToSelect = null;\n\n // check in the case when the play pile and their hand are both not empty\n if (!(state.getPlayPilePalaceCards().isEmpty()) && (!(state.getP2Hand().isEmpty()))) {\n\n // while they haven't selected a card or the card they selected is less than the top card\n // another card is selected at random from their hand\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n (state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank()) &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >=0)) {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n // selects a card when they are playing from their top cards\n } else if (state.getP2Hand().isEmpty() && (!(state.getP2TopPalaceCards().isEmpty()))) {\n\n //pick any random card if the play pile is empty\n if (state.getPlayPilePalaceCards().isEmpty()) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.getP2TopPalaceCards().size()));\n }\n\n //play pile is not empty so find a valid card\n else {\n\n //checks to see if there is a valid card\n for (int i = 0; i < state.getP2TopPalaceCards().size(); i++) {\n if (state.getP2TopPalaceCards().get(i).getRank() >\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).getRank() >= 0) {\n isBigger = true;\n }\n }\n\n //finds a random valid card because there is one that is valid\n if (isBigger) {\n while (cardToSelect == null ||\n (cardToSelect.getRank() <\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() &&\n state.getPlayPilePalaceCards().\n get(state.getPlayPilePalaceCards().size() - 1).\n getRank() >= 0)) {\n cardToSelect =\n state.getP2TopPalaceCards().\n get((int) (Math.random() * state.\n getP2TopPalaceCards().size()));\n }\n }\n\n //no card to be played so take the pile\n else {\n PalaceTakePileAction take = new PalaceTakePileAction(this);\n Log.d(\"compPlayer\", \"took the pile\");\n this.game.sendAction(take);\n }\n }\n }\n\n //they only have bottom cards left, all are valid to be played so pick a random one\n else if (state.getP2TopPalaceCards().isEmpty()&&state.getP2Hand().isEmpty()) {\n cardToSelect =\n state.getP2BottomPalaceCards().\n get((int) (Math.random() * state.getP2BottomPalaceCards().size()));\n }\n\n //the play pile is empty and they only have hand cards, pick one at random\n else {\n cardToSelect =\n state.getP2Hand().get((int) (Math.random() * state.getP2Hand().size()));\n }\n\n //create and send the select card action with the selected card\n selectCardAction = new PalaceSelectCardAction(this, cardToSelect,\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n\n //rerun selectCardAction if there are multiple of the same card\n if (!state.getP2Hand().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2Hand().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2Hand().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n else if (state.getP2Hand().isEmpty() && !state.getP2TopPalaceCards().isEmpty()) {\n for (int i = 0; i < state.getP2Hand().size(); i++) {\n if (state.getP2Hand().get(i).getRank() == cardToSelect.getRank() &&\n !cardToSelect.equals(state.getP2TopPalaceCards().get(i))) {\n selectCardAction = new PalaceSelectCardAction(this, state.getP2TopPalaceCards().get(i),\n state.getSelectedPalaceCards());\n this.game.sendAction(selectCardAction);\n }\n }\n }\n\n //creates and sends the playCardAction\n PalacePlayCardAction playCardAction = new PalacePlayCardAction(this);\n this.game.sendAction(playCardAction);\n }\n\n\n }", "public void chooseCard(String[][] cardsInfo) {\r\n \r\n // Why do we need two cards?!?!\r\n //System.out.println(\"Card is \" + cardsInfo[0][0]);\r\n //System.out.println(\"Card 2 is \" + cardsInfo[1][0]);\r\n\r\n System.out.println(\"\");\r\n if (getMinScore() > 0) {\r\n printScore(\"Your score so far is\");\r\n }\r\n\r\n System.out.println(\" Dealer offers a card.\");\r\n\t\tSystem.out.print(\" Twist or Stick? (T/S) \");\r\n\r\n int choice = 0;\r\n String[] chosenCard = cardsInfo[choice];\r\n\r\n switch (Character.toLowerCase(Keyboard.readChar())) {\r\n\r\n case 'q':\r\n case 'e':\r\n \r\n // This will ask the user if they want to quit.\r\n\t\t\t\tendGameSwitch = true;\r\n break;\r\n\t\t\t\r\n\t\t\tcase 't':\r\n\r\n // Adds to score, and offers another card.\r\n twist(chosenCard);\r\n System.out.println(\" Card was \" + chosenCard[0]);\r\n break;\r\n\r\n default:\r\n\r\n // Dosen't do much, but allows cards to be compared.\r\n \t\t\tstick();\r\n if (getMinScore() > 0) {\r\n printScore(\"Sticking with score of\");\r\n }\r\n break;\r\n }\r\n\t}", "private int drawCards(){\n int input = JOptionPane.showConfirmDialog(null, FirstPlayer.showHand() + SecondPlayer.showHand() +\n \"Would you like to continue the game?\\n\", \"Draw another card?\", \n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n return input;\n }", "private void selectCard() {\n\t\tDeck from = isInMainDeck() ? mainDeck : c.getDeck();\n\t\tDeck to = isInMainDeck() ? c.getDeck() : mainDeck;\n\t\t\n\t\tselectedCard = from.getCurrent();\n\t\tif (selectedCard == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (!to.isFull(animators.size())) {\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_CHOOSE_CARD);\n\t\t\tVector3f p = from.getPosFor(selectedCard);\n\t\t\tfrom.removeCurrent();\n\t\t\tanimators.add(new Animator(selectedCard, p, isInMainDeck(), to, to.getLastPos()));\n\t\t} else {\n\t\t\tselectedCard = null;\n\t\t\tSoundPlayer.playSound(SoundMap.MENU_ERROR);\n\t\t}\n\t\tif (from.isEmpty()) {\n\t\t\tcirclePressed();\n\t\t}\n\t}", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "public void playBlackjack() {\n\t\tString choice;\n\t\t\n\t\tSystem.out.println(\"Welcome to Blackjack! \\n\");\n\t\tSystem.out.println(\"Dealing hands \\n\");\n\t\tdeck.shuffle();\n\t\tplayer.setHand(deck.drawHand());\n\t\tdealer.setHand(deck.drawHand());\n\t\t\n\t\t\n\t\tif(checkForBlackjack(player) && checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Both player's have blackjack! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(player)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Player has blackjack! You win! \\n\");\n\t\t}\n\t\telse if(checkForBlackjack(dealer)) {\n\t\t\tSystem.out.println(showHands());\n\t\t\tSystem.out.println(\"Dealer has blackjack! Dealer wins! \\n\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(showInitinalHand());\n\t\t\twhile(player.getHandVal() < 21) {\n\t\t\t\tSystem.out.println(\"Player's turn. Pick to hit or stand \\n\");\n\t\t\t\tchoice = scanner.nextLine().toUpperCase();\n\t\t\t\tif(choice.equals(\"STAND\") || choice.equals(\"S\")) {\n\t\t\t\t\tSystem.out.println(\"Player stands \\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(choice.equals(\"HIT\")|| choice.equals(\"H\")) {\n\t\t\t\t\tSystem.out.println(\"Player hits \\n\");\n\t\t\t\t\tplayer.addCard(deck.drawCard());\n\t\t\t\t\tSystem.out.println(showInitinalHand());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Invalid input \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(dealer.getHandVal() < 17) {\n\t\t\t\tSystem.out.println(\"Dealer hits \\n\");\n\t\t\t\tdealer.addCard(deck.drawCard());\n\t\t\t\tSystem.out.println(showHands());\n\t\t\t}\n\t\t\tSystem.out.println(showHands());\n\t\t}\n\t\tcheckWinner();\n\t\tif(result.equals(\"TIE\")) {\n\t\t\tSystem.out.println(\"The result is a tie! \\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"The winner is the \" + result + \"!\\n\");\n\t\t}\n\t}", "public int playHand(Hand hand){\r\n\r\n if( this.getRank() > hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"Black wins!\");\r\n return 1;\r\n }\r\n\r\n else if(this.getRank() < hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"White wins!\");\r\n return -1;\r\n }\r\n else{\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n\r\n if(this.getHighCard() > hand.getHighCard()){\r\n System.out.println(\"Black Wins!\");\r\n return 1;\r\n }\r\n else if(hand.getHighCard() > this.getHighCard()){\r\n System.out.println(\"white Wins!\");\r\n }\r\n System.out.print(\"Tie!\");\r\n return 0;\r\n }\r\n\r\n }", "Card playCard(int playerIndex, int cardIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1 ||\n cardIndex < 0 || cardIndex > numCardsPerHand - 1)\n {\n //Creates a card that does not work\n return new Card('M', Card.Suit.spades); \n }\n\n // return the card played\n return hand[playerIndex].playCard(cardIndex);\n\n }", "public static int face(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) % 13 + 1;\n }", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }", "public boolean validMove(int playerID, Card selectedCard){\n // turn == playerID\n if(gameStage == 3){\n if(numPlays == 0){\n if(playerID == 0){\n player1Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player1Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player2Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player3Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player4Play.getSuit();\n }\n numPlays++;\n turn = 0;\n return true;\n }\n }\n else if(numPlays < 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n turn = 0;\n return true;\n }\n }\n // if three cards have been played this is the last card\n else if(numPlays == 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n }\n }\n return false;\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public void updateComputerCard()\n {\n this.computerCard = highCardGame.getHand(0).inspectCard(computerCardCounter);\n }", "public Card getClickedCardFromHand(int X, int Y){\n // Cek kartu apa yang di klik dari tangan player saat itu\n // Return null kalo gak ada kartu yang di klik\n // Caranya loop untuk setiap kartu di hand kalo Sprite.OverlapPoint\n for (Card kartu : this.currentPlayer.getPlayerHands()){\n if (kartu.getSprite().isPointOverlap(X, Y)){\n return kartu;\n }\n }\n return null;\n }", "private void decide(Player player, Card choiceCard) {\n player.removeCard(choiceCard);\n //Wild Draw\n if (choiceCard instanceof WildDrawCard) {\n //set wildDraw color\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildDrawCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n //set wildDraw penalty\n char ch = 0;\n if(canChooseWildDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseWildDrawPenalty();\n }\n else {\n ((WildDrawCard) choiceCard).changeState(state);\n for (int i = 0; i < ((WildDrawCard) choiceCard).getForcedCards()*state.getWildDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doWildDrawPenalty();\n }\n }\n\n //Wild\n else if (choiceCard instanceof WildCard) {\n while (true) {\n char color = controls.get(state.getTurn()).chooseColor();\n if (color == 'R' || color == 'G' || color == 'Y' || color == 'B') {\n ((WildCard) choiceCard).setConfig(color);\n break;\n }\n System.out.println(\"Invalid color input.\");\n }\n }\n\n //Reverse\n if (choiceCard instanceof ReverseCard) {\n ((ReverseCard) choiceCard).changeState(state);\n }\n\n //Skip\n if (choiceCard instanceof SkipCard) {\n ((SkipCard) choiceCard).changeState(state);\n }\n\n //Draw2\n if (choiceCard instanceof Draw2Card) {\n char ch = 0;\n if(canChooseDrawCardPenalty(players.get(state.getNextTurn()))) {\n while (true) {\n ch = controls.get(state.getNextTurn()).yesOrNo();\n if (ch == 'Y' || ch == 'N'){\n break;\n }\n System.out.println(\"Invalid input.\");\n }\n }\n if (ch == 'N') {\n state.increaseDrawPenalty();\n }\n else {\n ((Draw2Card) choiceCard).changeState(state);\n for (int i = 0; i < ((Draw2Card) choiceCard).getForcedCards()*state.getDrawPenalty(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.doDrawPenalty();\n }\n }\n changeCurrentCard(choiceCard);\n }", "public void playGame(){\n for(int i = 0; i<2; i++) {\n userCards.add(dealCards());\n computerCards.add(dealCards());\n }\n while(!isGameOver) {\n userScore = calculateScore(userCards);\n computerScore = calculateScore(computerCards);\n\n System.out.println(\"your cards: \" + userCards + \", current score: \" + userScore);\n System.out.println(\"Computer's first card: \" + computerCards.get(0));\n\n if (userScore == 0 || computerScore == 0 || userScore > 21) {\n isGameOver = true;\n }else{\n System.out.print(\"Type 'y' to get another card, type 'n' to pass: \");\n userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n userCards.add(dealCards());\n } else{\n isGameOver = true;\n }\n }\n }\n\n //computer turn if user opts to not draw another card\n while(computerScore !=0 && computerScore <17){\n computerCards.add(dealCards());\n computerScore = calculateScore(computerCards);\n }\n\n System.out.println(\"Your final hand: \"+ userCards+\", final score: \"+ userScore);\n System.out.println(\"Computer's final hand: \"+computerCards+\", final score: \"+computerScore);\n System.out.println(compareScore(userScore, computerScore));\n\n Scanner scanUserInput = new Scanner(System.in);\n System.out.print(\"Do you want to play a game of Blackjack? Type 'y' or 'n': \");\n String userInput = scanUserInput.nextLine();\n if(userInput.equalsIgnoreCase(\"y\")){\n new BlackJack().playGame();\n }\n }", "private void setHighCard(int highCard) {\r\n this.highCard = highCard;\r\n }", "@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }", "public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the first played card is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n }\n higher = true;\n } else {\n if (card instanceof NormCards) { //to check if the played card is a normal card\n if (getLastCard() instanceof NormCards) { //to check whether the last played card is a normal card or a supertrump card\n if (category.equals(\"H\")) {\n Float now = new Float(((NormCards) card).getHardness());\n Float last = new Float(((NormCards) getLastCard()).getHardness());\n compare = now.compareTo(last);\n } else if (category.equals(\"S\")) {\n Float now = new Float(((NormCards) card).getSpecGravity());\n Float last = new Float(((NormCards) getLastCard()).getSpecGravity());\n compare = now.compareTo(last);\n } else if (category.equals(\"C\")) {\n Float now = new Float(((NormCards) card).getCleavageValue());\n Float last = new Float(((NormCards) getLastCard()).getCleavageValue());\n compare = now.compareTo(last);\n } else if (category.equals(\"CA\")) {\n Float now = new Float(((NormCards) card).getCrustalAbunVal());\n Float last = new Float(((NormCards) getLastCard()).getCrustalAbunVal());\n compare = now.compareTo(last);\n } else if (category.equals(\"EV\")) {\n Float now = new Float(((NormCards) card).getEcoValueValue());\n Float last = new Float(((NormCards) getLastCard()).getEcoValueValue());\n compare = now.compareTo(last);\n\n }\n if (compare > 0) {\n higher = true;\n } else {\n System.out.println(\"The selected card does not has higher value!\");\n }\n } else { //or else, the last played card is a supertrump card\n higher = true;\n }\n } else { //or else, the played is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n higher = true;\n }\n }\n return higher;\n }", "private static int play() {\n\n Hand h = new Hand();\n int handValue = 0;\n\n // Deck deck = new Deck(); // Get a new deck of cards, and\n // store a reference to it in\n // the variable, deck.\n\n for (int i=0;i<3;i++) {\n Card c = new Card(3,Card.VICTORY);\n h.addCard(c);\n }\n for (int i=0;i<7;i++) {\n Card c = new Card();\n h.addCard(c);\n }\n\n for (int i=0;i<h.getCardCount();i++) {\n Card c = h.getCard(i);\n System.out.println(c.toString());\n handValue += c.getValue();\n }\n\n return handValue;\n }", "public void ComputerUpdateTopCard(int value){\n topCard = handComputer.get(value);\n }", "public void playerTurn(Game game){\n int cardHandNum;\n boolean nextPlayer = false;\n String recentCardDesc;\n if(game.recentCardPlayed() && !(game.playerGetAnotherTurn(this))){\n if(game.getRecentCard() instanceof Mineral){\n recentCardDesc = \"\\nRecent card = Name: \" + game.getRecentCard().getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) game.getRecentCard()).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) game.getRecentCard()).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) game.getRecentCard()).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) game.getRecentCard()).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) game.getRecentCard()).getCardEconomicValue() + \"\\n\"; // The recent card description of the Mineral card\n }\n else{\n recentCardDesc = \"\\nThe recent player play the \" + ((SuperTrumps) game.getRecentCard()).getCardName() + \" card\" + \"\\n\"; // The recent card description of the Supertrumps card\n }\n }\n else if(game.recentCardPlayed() && game.playerGetAnotherTurn(this)){\n System.out.println(\"You are granted to select the trump mode again\");\n recentCardDesc = \"\\nYou may pick the card again as you made all of other players pass\" + \"\\n\";\n gameStart(game); // Allowing the player that is not passed to pick up another trump category\n }\n else {\n recentCardDesc = \"\\nThere are no recent cards that have been played\" + \"\\n\";\n gameStart(game); // Description when there is no cards that is been played (when it is the start of the game)\n }\n while (!nextPlayer){\n // Used for looping until the person did the action (play the card or pass), which allows the next player to move\n String playerChoice;\n System.out.println(\"Game mode: \" + game.getGameModeMessage() + recentCardDesc + showCardInHand() + getPlayerName() + \", enter the card number you want to play or simply enter PASS to pass\");\n System.out.print(\">>>\");\n Scanner options = new Scanner(System.in);\n playerChoice = options.nextLine();\n if (playerChoice.toUpperCase().equals(\"PASS\")){\n drawPlayerCard(game.getCardDeck().drawnCard());\n nextPlayer = true;\n }\n else{\n try {\n cardHandNum = Integer.parseInt(playerChoice); // Changing the input into int from String\n Card cardPlayed = getPlayerCard(cardHandNum); // Used for trying to get the card played\n boolean continueGame = game.gameCard(cardPlayed, this); // Trying to play the card\n if(game.getGameMode().equals(\"CHOICE\")){ // Decision when a player play a special supertrump card to allow player to freely choose the trump mode\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n gameStart(game);\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n else if (game.getGameMode().equals(\"GRAV/MAG\")) {\n if(lookAtWinCard()) { // Check whether or not the player has the winning card, which is Magnetite\n for (Card cardInHand : playerHand) {\n game.putCardToGame(cardInHand);\n playerHand.remove(cardInHand);\n game.setRecentPlayer(this.getPlayerName());\n }\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n nextPlayer = true;\n }\n else {\n game.setGameMode(\"SPECGRAV\"); // Change the game mode to Specific Gravity\n }\n if(continueGame){\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n else {\n if(continueGame){\n // Used for the normal card play\n game.putCardToGame(cardPlayed);\n playerHand.remove((cardHandNum));\n game.setRecentPlayer(this.getPlayerName());\n nextPlayer = true;\n }\n }\n }\n catch (Throwable e){\n System.out.println(\"Invalid input!\"); // When the user try to enter the input that does not match the card in the hand\n }\n }\n }\n if (playerHand.size() == 0){\n // Occurs when the player has no more card in the hand\n game.setRecentPlayer(game.getPlayers().get((game.getPlayers().indexOf(this)+1)%game.getPlayers().size()).getPlayerName());\n playerLeft(game);\n }\n }", "private void putCurrentCard() {\n int temp = 0;\n while (true) {\n if(!(cards.get(temp) instanceof WildCard) ) {\n currentCard = cards.get(temp);\n cards.remove(temp);\n break;\n }\n temp++;\n }\n if (!(currentCard instanceof NumberCard)) {\n show();\n }\n //Reverse\n if (currentCard instanceof ReverseCard) {\n ((ReverseCard) currentCard).changeState(state);\n }\n //Skip\n if (currentCard instanceof SkipCard) {\n ((SkipCard) currentCard).changeState(state);\n }\n //Draw2\n if (currentCard instanceof Draw2Card) {\n System.out.println(\"The player was fined.\");\n for (int i = 0; i < ((Draw2Card) currentCard).getForcedCards(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.nextTurn();\n }\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "private int GetBestCard(Card[] card) {\n\t int iPos = 0;\n\t int iWeightTemp = 0;\n\t int iWeight[] = new int[8];\n\t for (int i = 0; i < 8; i++){\n\t\t iWeight[i] = -1;\n\t }\n\t // For each selectable card, work out a weight, the highest weight is the one selected.\n\t // The weight is worked out by the distance another of the players cards is from playable ones, with no playable cards in between\n\t Card myCard, nextCard;\n\t for (int i = 0; i < 8; i++){\n\t\t if (card[i] != null){\n\t\t\t // if card value > 7\n\t\t\t if (card[i].GetValue() > 7){\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\n\t\t\t if (card[i].GetValue() < 7){\n\t\t\t\t // do you have cards that are lower than this card\n\t\t\t\t myCard = card[i];\n\t\t\t\t iWeightTemp = 0;\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tiWeight[i] = iWeightTemp;\n\t\t\t \t\t\n\t\t\t }\t\n\t\t\t if (card[i].GetValue() == 7){\n\t\t\t\t // do you have cards that are in this suit\n\t\t\t\t myCard = card[i];\n\t\t\t\t int iWeightTemp1;\n\t\t\t\t iWeightTemp = 0;\n\t\t\t\t iWeightTemp1 = 0;\n\t\t\t\t // do you have cards that are higher than this card\n\t\t\t \tfor (int j = 0; j < mCardCount; j++){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() > myCard.GetValue()){\n\t\t\t \t\t\tif (nextCard.GetValue() - myCard.GetValue() > iWeightTemp)\n\t\t\t \t\t\t\tiWeightTemp = nextCard.GetValue() - myCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \tmyCard = card[i];\n\t\t\t \t// do you have cards that are lower than this card\n\t\t\t \tfor (int j = mCardCount-1; j >=0; j--){\n\t\t\t \t\tnextCard = mCard[j];\n\t\t\t \t\tif (nextCard != null && nextCard.GetSuit() == myCard.GetSuit() && nextCard.GetValue() < myCard.GetValue()){\n\t\t\t \t\t\tif (myCard.GetValue() - nextCard.GetValue() > iWeightTemp1)\n\t\t\t \t\t\t\tiWeightTemp1 = myCard.GetValue() - nextCard.GetValue();\n\t\t\t \t\t\tmyCard = nextCard;\n\t\t\t \t\t}\n\t\t\t \t} \t\n\t\t\t \tiWeight[i] = iWeightTemp + iWeightTemp1;\n\t\t\t \t\t\n\t\t\t }\t\t\t \n\t\t }\n\t\t \t \n\t }\n\t boolean bLoopAceKing = true;\n\t int iMaxTemp = 0;\n\t int iMaxCount = 0;\t\n\t int[] iMaxs;\n\t iMaxs = new int[8];\n\t while (bLoopAceKing){\n\t\t for (int i = 0; i < 8; i++){\n\t\t\t if (iWeight[i] >= iMaxTemp){\n\t\t\t\t if (iWeight[i] == iMaxTemp){\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t\t iMaxTemp = iWeight[i];\n\t\t\t\t\t iMaxs = new int[8];\n\t\t\t\t\t iMaxCount = 0;\n\t\t\t\t\t iMaxs[iMaxCount] = i;\n\t\t\t\t\t iMaxCount++;\n\t\t\t\t }\t\t\t \n\t\t\t }\t \n\t\t }\n\t\t boolean bAceKing = false;\n\t\t // If the top weight is zero, meaning your options don't help you, then play the one that is closest to ace/king\n\t\t if (iMaxTemp == 0 && iMaxCount > 1){\n\t\t\t for (int k = 0; k < iMaxCount; k++){\n\t\t\t\t\t iWeight[iMaxs[k]] = Math.abs(card[iMaxs[k]].GetValue()-7);\n\t\t\t\t\t bAceKing = true;\t\t\t\t \n\t\t\t } \t\t \n\t\t }\n\t\t if (bAceKing){\n\t\t\t bLoopAceKing = true;\n\t\t\t iMaxs = new int[8];\n\t\t\t iMaxTemp = 0;\n\t\t\t iMaxCount = 0;\t\t\t \n\t\t }\n\t\t else \n\t\t\t bLoopAceKing = false;\n\t }\n\t if (iMaxCount == 1)\n\t\t iPos = iMaxs[iMaxCount-1];\n\t else {\n\t\t Random generator = new Random();\n\t\t int randomIndex = generator.nextInt( iMaxCount );\n\t\t iPos = iMaxs[randomIndex];\n\t }\n\t\t \n\t return iPos;\n\t \n }", "public static void main(String[] args) {\r\n \r\n //Check the input of cards should be multiple of 5 and more than 0\r\n if (args.length % 5 == 0 && args.length > 0) {\r\n \r\n int player = args.length / N; //count the player based on input\r\n int playerNo; //store the number of player for print\r\n int countCard = args.length; //count the number of card \r\n\r\n Suit[] CardSuit = new Suit[countCard]; //store the suit of cards\r\n Rank[] CardRank = new Rank[countCard]; //store the rank of cards\r\n Card[] card = new Card[countCard]; //store all cards\r\n Card[] cardinhand = new Card[N]; //store cards in one hand\r\n PokerHand[] hand = new PokerHand[player]; //store all players' hands\r\n \r\n //Deal with print of players draw\r\n int[] drawPlayer = new int[player]; //store draw players number \r\n /*set default value in the array as bigger than the number of player, \r\n so that will be sorted to the last if not updated*/\r\n Arrays.fill(drawPlayer, player + 1); \r\n int countDraw = 0; //count the number of draw players\r\n \r\n //Get the input: rank of the card\r\n for (int i = 0; i < countCard; i++) {\r\n switch (args[i].charAt(0)) {\r\n case ('2'):\r\n CardRank[i] = Rank.TWO;\r\n break;\r\n case ('3'):\r\n CardRank[i] = Rank.THREE;\r\n break;\r\n case ('4'):\r\n CardRank[i] = Rank.FOUR;\r\n break;\r\n case ('5'):\r\n CardRank[i] = Rank.FIVE;\r\n break;\r\n case ('6'):\r\n CardRank[i] = Rank.SIX;\r\n break;\r\n case ('7'):\r\n CardRank[i] = Rank.SEVEN;\r\n break;\r\n case ('8'):\r\n CardRank[i] = Rank.EIGHT;\r\n break;\r\n case ('9'):\r\n CardRank[i] = Rank.NINE;\r\n break;\r\n case ('T'):\r\n case ('t'):\r\n CardRank[i] = Rank.TEN;\r\n break;\r\n case ('J'):\r\n case ('j'):\r\n CardRank[i] = Rank.JACK;\r\n break;\r\n case ('Q'):\r\n case ('q'):\r\n CardRank[i] = Rank.QUEEN;\r\n break;\r\n case ('K'):\r\n case ('k'):\r\n CardRank[i] = Rank.KING;\r\n break;\r\n case ('A'):\r\n case ('a'):\r\n CardRank[i] = Rank.ACE;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Get the input: suit of the card\r\n switch (args[i].charAt(1)) {\r\n case ('C'):\r\n case ('c'):\r\n CardSuit[i] = Suit.Clubs;\r\n break;\r\n case ('D'):\r\n case ('d'):\r\n CardSuit[i] = Suit.Diamonds;\r\n break;\r\n case ('H'):\r\n case ('h'):\r\n CardSuit[i] = Suit.Hearts;\r\n break;\r\n case ('S'):\r\n case ('s'):\r\n CardSuit[i] = Suit.Spades;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Set all cards in the array\r\n card[i] = new Card(CardRank[i], CardSuit[i]);\r\n }\r\n\r\n //Use all cards to set cards for each player\r\n for (int i = 0; i < player; i++) {\r\n for (int j = 0; j < N; j++) {\r\n cardinhand[j] = card[i * 5 + j];\r\n }\r\n playerNo = i + 1;\r\n //Set cards and player number of each hand\r\n hand[i] = new PokerHand(cardinhand, playerNo);\r\n System.out.print(\"Player \" + playerNo + \": \");\r\n //Find the classification of each hand and print\r\n switch (hand[i].FindClass()) {\r\n case Straight_flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight flush\");\r\n break;\r\n case Four_of_a_kind:\r\n System.out.println\r\n (\"Four \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Full_house:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s full of \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case Flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high flush\");\r\n break;\r\n case Straight:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight\");\r\n break;\r\n case Three_of_a_kind:\r\n System.out.println\r\n (\"Three \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Two_pair:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s over \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case One_pair:\r\n System.out.println\r\n (\"Pair of \" + hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case High_cards:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high\");\r\n break;\r\n }\r\n }\r\n\r\n Arrays.sort(hand);//sort the comparable object hand\r\n\r\n // Find the player number that draw with the highest hand player\r\n for (int i = player - 2; i >= 0; i--) {\r\n if (hand[player - 1].compareTo(hand[i]) == 0) {\r\n drawPlayer[countDraw] = hand[i].getPlayerNo();\r\n countDraw++; // count the number of draw players\r\n }\r\n }\r\n\r\n Arrays.sort(drawPlayer); // ascending sort the player number \r\n //print result after compare and sort\r\n if (player > 1) {\r\n if (countDraw > 1)\r\n\r\n {\r\n System.out.print(\"Players \");\r\n for (int i = 0; i < countDraw - 1; i++) {\r\n System.out.print(drawPlayer[i] + \", \");\r\n }\r\n System.out.println(\r\n hand[player - 2].getPlayerNo() + \" and \" + \r\n hand[player - 1].getPlayerNo() + \" draw.\");\r\n } else if (countDraw == 1)\r\n System.out.println\r\n (\"Players \" + hand[player - 2].getPlayerNo() + \r\n \" and \"+ hand[player - 1].getPlayerNo() + \" draw.\");\r\n else\r\n System.out.println\r\n (\"Player \" + hand[player - 1].getPlayerNo() + \" wins.\");\r\n }\r\n } else\r\n System.out.println\r\n (\"Error: wrong number of arguments; must be a multiple of 5\");\r\n System.exit(args.length);\r\n }", "public static int hitOrStand(Player human, Player computer, Deck myDeck) {\n System.out.println(\"The dealer is showing: \" + computer.hand[0].name + \" of \" + computer.hand[0].suit);\n int choice = 0;\n int playerHandSize = 2;\n int computerHandSize = 2;\n boolean fail = false;\n Scanner input = new Scanner(System.in);\n\n while (choice != 2 && !fail) {\n System.out.println(\"You have been dealt: \");\n int i = 0;\n while (human.hand[i] != null) {\n if (i > 0) {\n System.out.print(\", \");\n }\n System.out.print(human.hand[i].name + \" of \" + human.hand[i].suit);\n i++;\n }\n System.out.print(\" Total: \" + human.printTotalValue());\n System.out.println();\n System.out.println(\"Would you like to hit or stand? Press 1 to hit, press 2 to stand: \");\n choice = input.nextInt();\n\n while (choice != 1 && choice != 2) {\n System.out.println(\"Invalid choice, please try again\");\n System.out.println(\"1. Hit\");\n System.out.println(\"2. Stand\");\n choice = input.nextInt();\n }\n\n if (choice == 1) {\n myDeck.hit(human, playerHandSize);\n playerHandSize++;\n fail = LoseConditions.doILose(human, myDeck);\n if (fail) {\n System.out.println(\"Sorry, you went over 21, you lose.\");\n }\n choice = 0;\n }\n }\n\n while (computer.getTotalValue(myDeck) < 17 || computerHandSize < 4) {\n myDeck.hit(computer, computerHandSize);\n computerHandSize++;\n fail = LoseConditions.doILose(computer, myDeck);\n if (fail) {\n System.out.println(\"You win!!\");\n }\n }\n boolean automaticWinHuman = false;\n boolean automaticWinComputer = false;\n automaticWinHuman = WinConditions.automaticWin(human, myDeck);\n automaticWinComputer = WinConditions.automaticWin(human, myDeck);\n\n if(automaticWinHuman && !automaticWinComputer){\n return 1;\n }\n if(automaticWinComputer && !automaticWinHuman){\n return -1;\n }\n\n boolean playerWin = WinConditions.whoWins(human, computer, myDeck);\n if(playerWin) return 1;\n else return -1;\n }", "public Card play7(){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which card ? (it should be 7 )\");\n cardIndex = scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex<=0 || cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(\"7\")))){\n System.out.println(\"! it is not a seven card !\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n\n\n }", "public UnoCard getPlayerCard(String pid, int choice) {\r\n ArrayList<UnoCard> hand = getPlayerHand(pid);\r\n return hand.get(choice);\r\n }", "public static Deck tie(Card cp1, Card cp2){\n //end if not enough cards, player 2 wins\n forbiddenCase = 0;\n if (hand1.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 1 loses\");\n forbiddenCase = 1;\n outcome = 2;\n outcomes();\n return hand2;\n }\n //player 1 wins due to lack of cards\n else if (hand2.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"Not enough cards, Player 2 loses\");\n forbiddenCase = 1;\n outcome = 1;\n outcomes();\n return hand1;\n }//tie\n else if(hand1.cardsLeft() < 4 && hand2.cardsLeft() < 4){\n System.out.println();\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n System.out.println(\"No winner\");\n forbiddenCase = 1;\n outcome = 3;\n outcomes();\n }\n //add 3 cards\n\n\n for(int i = 1; i < 4; i++){\n System.out.println(\"You play card: ??? of ???\");\n\t System.out.println(\"Player two plays card: ??? of ???\");\n\t addUp.add(hand1.deal());\n addUp.add(hand2.deal());\n }\n\n //deal the 4th cards face up\n cp1 = hand1.deal();\n cp2 = hand2.deal();\n System.out.println(\"Player 1 hand: \" + cp1);\n System.out.println(\"Player 2 hand: \" + cp2);\n //add cards to the pile = 2 cards\n addUp.add(cp1);\n addUp.add(cp2);\n\n //if tie, try again\n if(cp1.getRank() == cp2.getRank()){\n tie(cp1,cp2);\n //player 1 win\n }else if(cp1.getRank() > cp2.getRank()){\n System.out.println(\"Player 1 wins\");\n //takes all the cards\n hand1.toBottom(addUp);//technically you win back your own cards then +5\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n return hand1;\n }else//player 2 win\n System.out.println(\"Player 2 wins\");\n hand2.toBottom(addUp);\n System.out.println(\"Player 1 cards: \" + hand1.cardsLeft());\n System.out.println(\"Player 2 cards: \" + hand2.cardsLeft()+\"\\n\");\n return hand2;\n }", "public List<Integer> askPlayerCardsToUse();", "public int getHighCard() {\r\n return highCard;\r\n }", "public void resolveEffect(Card playedCard, int row, int col)\r\n {\r\n char type = playedCard.getEffectType();\r\n char target = playedCard.getEffectTarget();\r\n \r\n //Temp variables for this method\r\n int validTarget;\r\n int[] choice = new int[2];\r\n \r\n switch(type)\r\n {\r\n case 'H': //DISCARD HAND\r\n boolean discard = true; //PLACEHOLDER, ASK USER IF THEY WISH TO DISCARD\r\n if(discard)\r\n {\r\n final int NEW_HAND = 7;\r\n \r\n if(playerTurn == 0)\r\n {\r\n red.discard();\r\n for(int i = 0; i < NEW_HAND; i++)\r\n red.draw();\r\n }\r\n else\r\n {\r\n blue.discard();\r\n for(int i = 0; i < NEW_HAND; i++)\r\n blue.draw();\r\n }\r\n }\r\n break;\r\n case 'D': //DRAW\r\n final int DRAW_THRESHOLD = 4;\r\n if(playerTurn == 0)\r\n {\r\n if(red.getHand().size() >= 4)\r\n {\r\n while(red.getHand().size() < 7)\r\n red.draw();\r\n }\r\n }\r\n else\r\n {\r\n if(blue.getHand().size() >= 4)\r\n {\r\n while(blue.getHand().size() < 7)\r\n blue.draw();\r\n }\r\n }\r\n break;\r\n case '0': //ZERO\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n \r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect());\r\n break;\r\n case '-': //SUBTRACT\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n case '+':\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'A') //ADJACENT\r\n {\r\n ArrayList<Tile> adj = gameBoard.getAdjacent(row, col);\r\n \r\n for(int i = 0; i < adj.size(); i++)\r\n adj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n if(target == 'N')\r\n {\r\n ArrayList<Tile> nonadj = gameBoard.getNonAdjacent(row, col);\r\n\r\n for(int i = 0; i < nonadj.size(); i++)\r\n nonadj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n break;\r\n case '*':\r\n if(target == 'X') //ANY\r\n {\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n \r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != -1)\r\n //REPROMPT FOR CHOICE\r\n \r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'O') //OPPONENT\r\n {\r\n if(playerTurn == 0)\r\n validTarget = 1;\r\n else\r\n validTarget = 0;\r\n\r\n choice[0] = 0; //PLACEHOLDER, ASK USER FOR TARGET\r\n choice[1] = 0;\r\n\r\n while(gameBoard.tilePlayer(choice[0], choice[1]) != validTarget )\r\n //REPROMPT FOR CHOICE\r\n\r\n gameBoard.getTile(choice[0], choice[1]).addEffect(playedCard.getEffect()); \r\n }\r\n if(target == 'A') //ADJACENT\r\n {\r\n ArrayList<Tile> adj = gameBoard.getAdjacent(row, col);\r\n \r\n for(int i = 0; i < adj.size(); i++)\r\n adj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n if(target == 'N')\r\n {\r\n ArrayList<Tile> nonadj = gameBoard.getNonAdjacent(row, col);\r\n\r\n for(int i = 0; i < nonadj.size(); i++)\r\n nonadj.get(i).addEffect(playedCard.getEffect());\r\n }\r\n break;\r\n }\r\n }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) / 13 + 1;\n }", "public void otherPlay(int pos, GameCard card){\n System.out.println(pos);\n int cardColor = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).color.get().ordinal();\n int cardNumber = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).number.get();\n int number = playedCardPile.get(cardColor).number.get();\n if (cardNumber - 1 ==number){\n playedCardPile.set(cardColor, playerCardsList.get(turnCounter % playerCardsList.size()).get(pos));}\n playerCardsList.get(turnCounter % playerCardsList.size()).set(pos, card);\n notifyObservors();\n\n }", "public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public final PlayingCard chooseRoundCard(HeartsGraphics g){\n\t\treturn hand.get(hand.indexOf(chooseCard(g)));\n\t}", "public static void chooseMove(BattleScreen battleScreen) {\n //choose the best damage+self heal/mana ratio card\n //if no cards, then draw\n //if cards but not enough mana for best option then end turn unless another card that kills is available\n Gdx.app.debug(\"BattleAI\", \"Enemy Move!\");\n Ship enemy = battleScreen.getEnemy();\n List<Card> hand = enemy.getHand();\n if (hand.size() > 0) {\n if (enemy.getHealth() > enemy.getMaxHealth() / 2) {\n //more than half health - attack\n hand.sort(new SortByDamageRatio());\n } else {\n //heal\n hand.sort(new SortByHealRatio());\n }\n for (Card card : hand) {\n if (enemy.getMana() >= card.getManaCost()\n && !(enemy.getHealth() + card.getHeal() >= enemy.getMaxHealth())) {\n battleScreen.useCard(enemy, battleScreen.getPlayer().getShip(), card);\n return;\n }\n }\n }\n //no cards or not enough mana\n if (!battleScreen.drawCard(enemy)) {\n battleScreen.endTurn();\n }\n return;\n }", "public static Card Card_Choice(Hero hero) {\n System.out.print(hero.getInventory());\n Scanner console = new Scanner(System.in);\n System.out.println(\"\\nWhich card do you choose?\");\n\n int input = console.nextInt();\n console.nextLine();\n Card card = hero.getCard(input-1);\n hero.setInventory(input);\n\n // console.close();\n return card;\n }", "public void displayUnusedCards(MapBoard board){\n\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"|\\t\\t\\t\\t\\tSelect card to play |\");\n\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"\\n\");\n\t\tint local=0;\n\t\tScanner input=new Scanner(System.in);\n\t\tArrayList<Integer> temp=new ArrayList<>();\n\t\tfor (int i = 0; i < playerCards.size(); i++) {\n\t\t\tif (!(playerCards.get(i).used)) {\n\t\t\t\tSystem.out.println(\"\\tPress \\\"\"+(i)+\"\\\"\");\n\t\t\t\tplayerCards.get(i).showPlayerCardDetails();\n\t\t\t\tSystem.out.println();\n\t\t\t\tlocal++;\n\t\t\t\ttemp.add(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdo{\n\t\t\tint j=input.nextInt();\n\t\t\t\n\t\t\tif(!(temp.contains(j))){\n\t\t\t\tSystem.out.println(\"<<<<<---Wrong choice--->>>>>\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//perform action specific to player card\n\t\t\tplayerCards.get(j).used=true;\n\t\t\tplayerCards.get(j).startPlayerCardActions();\n\t\t\tbreak;\n\t\t}while(true);\n\t\t\n\t\t\n\t\t//discard used cards at the end of each turn\n\t\tdiscardUsedCards();\n\t\tif(Start.temparea.size()>0)\n\t\t{\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tSystem.out.println(\"| <<<< Do you want to perform cityarea card ? >>>> |\");\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tSystem.out.println(\"| 1. YES |\");\n\t\t\tSystem.out.println(\"| 2. No |\");\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\tint value=input.nextInt();\n\t\t\t\tif(value==1)\n\t\t\t\t{\n\t\t\t\t\t//Start.PerformPlayerCard(board, this);\n\t\t\t\t\tStart.CheckCityAreaCard(board, this);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(value==2)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"<<<<<---Wrong Choice.--->>>>\\n\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(true);\n\t\t}\n\t\t\n\t}", "@Test\r\n public void testPlayer_getCautiousStrategyCardCard_higherFirst_drawTwo() {\n player2 = new Player(\"Player Two\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n\r\n // let the cpc be a red nine\r\n // get rid of the wild and wd4 cards so the red draw two is the most attractive option\r\n player2.getHand().discard(wild);\r\n player2.getHand().discard(wildDrawFour);\r\n Card redNine = new Card(Card.RED, Card.NINE, cvm);\r\n assertTrue(player2.getCautiousStrategyCard(redNine, redNine.getColor()).equals(redDrawTwo));\r\n }", "public boolean DecideMove(Crazy8sBoard board){\n boolean haveAnEight = false;\n int locationOf8Card = 0;\n\n String topCard = board.GetTopTrashCard();\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n for(int i = 0; i < board.GetSizeOfComputerHand(); i++){\n\n String card = board.GetComputerCard(i);\n String firstLetter = Character.toString(card.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Play whatever card, get to choose suite\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n\n if(card.contains(\"8\")){\n haveAnEight = true;\n locationOf8Card = i;\n }\n\n else {\n //the cards match in suite, doesn't matter what it is\n if (firstLetter.equals(topFirstLetter)) {\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if (card.contains(temp)) {\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if (card.contains(temp)) {\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if (card.contains(temp)) {\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if (card.contains(temp)) {\n board.ComputerUpdateTopCard(i);\n board.RemoveCardFromComputer(i);\n return true;\n }\n }\n }\n }\n }\n\n //Only play an 8 if all other cards are exhausted\n if(haveAnEight){\n //valid because 8s are wild cards, can place it\n board.ComputerUpdateTopCard(locationOf8Card);\n board.RemoveCardFromComputer(locationOf8Card);\n return true;\n }\n\n //couldn't play any card\n return false;\n }", "public void playMove(int turn)\t{\n\t\tString command;\n\t\tint index = -1;\n\t\tCard dealt;\n\t\tCard drawn;\n\t\tboolean illegal = false;\n\t\tSystem.out.println(\"\\n\" + hand[turn].toString() + \"\\n\");\n\t\tSystem.out.println(\"Choose a number, or 'd' for draw, or 'p' for pass.\");\n\t\tcommand = input.nextLine();\n\t\trecord[turn] = command;\n\t\tif(command.equalsIgnoreCase(\"d\"))\t{\n\t\t\tdrawn = deck1.deal();\n\t\t\tif(drawn!=null)\t{\n\t\t\t\thand[turn].addCard(drawn);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++No cards in deck!\");\n\t\t\t}\n\t\t\tplayMove(turn);\n\t\t}\n\t\telse if(command.equalsIgnoreCase(\"p\"))\t{\n\t\t\tif(deck1.isEmpty() || !hand[turn].playable(top))\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++Cannot pass!+++++\\n\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\telse\t{\n\t\t\tif(isNumber(command))\t{\n\t\t\t\tindex = Integer.parseInt(command);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Invalid Command!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t\tif(index>=0 && index<hand[turn].countCards())\t{\n\t\t\t\tdealt = hand[turn].seekCard(index);\n\t\t\t\tif(top.getValue()!=8)\t{\n\t\t\t\t\tif(top.getSuit().equals(dealt.getSuit()) || \n\t\t\t\t\t\t\ttop.getValue()==dealt.getValue() || \n\t\t\t\t\t\t\tdealt.getValue()==8)\t{\n\t\t\t\t\t\tif(dealt.getValue()==8)\t{\n\t\t\t\t\t\t\tdealt.setSuit(chooseSuit());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\tif(dealt.getValue()==8 || \n\t\t\t\t\t\t\ttop.getChosenSuit().equalsIgnoreCase(dealt.getSuit()))\t{\n\t\t\t\t\t\tillegal = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(illegal)\t{\n\t\t\t\t\tSystem.out.println(\"Illegal Move!\");\n\t\t\t\t\tplayMove(turn);\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\ttop = dealt;\n\t\t\t\t\thand[turn].removeCard(index);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Card does not exist!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "public void addWinning1(Card card)\n {\n player1Hand.enqueue(card);\n }", "public void findBestTwoCardHandName() {\n if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(14, 'x', 14) == true) {//aces, any suit\n bestHandFromCardsNickNameString = \"Pocket Rockets\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'y', 14) == true) {//king, then ace, same suit\n bestHandFromCardsNickNameString = \"Big Slick in a Suit\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"Full Auto\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(8, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"Dead Man's Hand\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(13, 'x', 13) == true) {\n bestHandFromCardsNickNameString = \"Cowboys King Kong\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(9, 'x', 14) == true) {\n bestHandFromCardsNickNameString = \"The Dog\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(12, 'x', 12) == true) {\n bestHandFromCardsNickNameString = \"Ladies\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(3, 'x', 12) == true) {\n bestHandFromCardsNickNameString = \"The Waiter\";\n } else if (handContainsTheseTwoCards_With_AtLeastOneFromPlayerOriginalHand(9, 'x', 9) == true) {\n bestHandFromCardsNickNameString = \"A German Dime\";\n } else if (allCards[0].value == allCards[1].value) {\n bestHandFromCardsNickNameString = \"Pocket Pair\";\n } else if (allCards[0].suit == allCards[1].suit) {\n bestHandFromCardsNickNameString = \"Flush Rush\";\n } else if (allCards[0].value == allCards[1].value + 1 || allCards[0].value + 1 == allCards[1].value || (allCards[0].value == 14 && allCards[1].value == 2) || (allCards[0].value == 2 && allCards[1].value == 14) ) {\n bestHandFromCardsNickNameString = \"Straight Bait\";\n } else if (allCards[0].value == 14 || allCards[1].value == 14) {\n bestHandFromCardsNickNameString = \"A Spike\";\n } else if (allCards[0].value == 13 || allCards[1].value == 13) {\n bestHandFromCardsNickNameString = \"A Dame\";\n } else if (allCards[0].value == 12 || allCards[1].value == 12) {\n bestHandFromCardsNickNameString = \"A Jackal\";\n } else if (allCards[0].value == 11 || allCards[1].value == 11) {\n bestHandFromCardsNickNameString = \"A Fishhook\";\n } else if (allCards[0].value == 10 || allCards[1].value == 10) {\n bestHandFromCardsNickNameString = \"A Sawbuck\";\n } else if (allCards[0].value == 9 || allCards[1].value == 9) {\n bestHandFromCardsNickNameString = \"Nina Ross\";\n } else {\n bestHandFromCardsNickNameString = \"Down on Your Luck\";\n }\n \n System.out.println(\"findBestTwoCardHandName---->>> \" + bestHandFromCardsNickNameString);\n\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public int hit() {\n //Add the new card to the players deck\n playerStack.add(cards[talonStack]);\n\n //Increment the score based on the new card\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n\n //Increment the counter for the un-played deck\n talonStack++;\n\n //If the player gets a score above 21, the game is over\n if (playerScore > 21) {\n dealerTurn();\n\n\n if (playerCash <= 0) {\n restartGame();\n return -1;\n } else {\n return -1;\n }\n }\n //If the player hit blackjack, the dealer takes the turn.\n else if (playerScore == 21) {\n dealerTurn();\n\n //Tie\n if (dealerScore == 21) {\n playerCash += playerBet;\n return 0;\n }\n //Win\n else {\n playerCash += (playerBet * 2);\n return 1;\n }\n }\n\n return 2;\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public static char playRound() {\n\n String playerChoice = playerChoice();\n System.out.println(\"You chose: \" + playerChoice);\n\n Random rand = new Random();\n int compRand = rand.nextInt(3);\n String compChoice = new String();\n\n switch (compRand) {\n case 0:\n compChoice = \"rock\";\n break;\n case 1:\n compChoice = \"paper\";\n break;\n case 2:\n compChoice = \"scissors\";\n break;\n }\n\n char result = 'l';\n String resAnoun = \"Player loses!\";\n\n System.out.println(\"Player choice: \" + playerChoice + \" VS Computer Choice: \" + compChoice);\n\n if (playerChoice.equals(compChoice)) {\n result = 't';\n resAnoun = \"Draw!\";\n } else if (playerChoice.equals(\"rock\")) {\n if (compChoice.equals(\"scissors\")) {\n result = 'w';\n resAnoun = \"Player wins!\";\n }\n } else if (playerChoice.equals(\"paper\")) {\n if (compChoice.equals(\"rock\")) {\n result = 'w';\n resAnoun = \"Player wins!\";\n }\n } else if (playerChoice.equals(\"scissors\")) {\n if (compChoice.equals(\"paper\")) {\n result = 'w';\n resAnoun = \"Player wins!\";\n }\n }\n System.out.println(resAnoun);\n\n return result;\n }", "public Card playCard(int cardIndex)\r\n {\r\n if (numCards == 0) // error\r\n {\r\n // Creates a card that does not work\r\n return new Card('E', Card.Suit.SPADES);\r\n }\r\n // Save the current card\r\n Card card = myCards[cardIndex];\r\n // Decreases numCards.\r\n numCards--;\r\n for (int i = cardIndex; i < numCards; i++)\r\n {\r\n myCards[i] = myCards[i + 1];\r\n }\r\n\r\n myCards[numCards] = null;\r\n\r\n return card;\r\n }", "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public static void showHands(){\n Scanner scan=new Scanner(System.in);//call the Scanner constructor\n int Deck[]=new int[52];//set up the array for deck\n String answer=\"\";\n do{\n //store 0 to 51 into the Deck array\n for(int i=0;i<Deck.length;i++){\n Deck[i] = i; \n }\n \n int Hand[]={-1,-1,-1,-1,-1};//set up and initialize the array for hand\n \n Random r = new Random ();//Decalre a instance of the Random generator\n int k = Deck.length;//declare a variable to show the effective length of the Deck array\n //set up a loop to draw cards from the deck ramdomly\n for(int j=0;j<Hand.length;j++){\n int draw = r.nextInt(k-1);\n Hand[j] = Deck[draw];//store the ramdom pick from Deck into Hand\n //set the random pick in Deck to -1 and swap with the last effective number in Deck\n Deck[draw]=Deck[k-1];\n Deck[k-1]= -1;\n k--;//reduce the effective array size\n }\n \n //set up the strings, which will indicate the result\n String Clubs = \"Clubs: \";\n String Diamonds = \"Diamonds: \";\n String Hearts = \"Hearts: \";\n String Spades = \"Spades: \";\n //set up a loop to determine the kind and value of each card in hand\n for(int j=0;j<Hand.length;j++){\n int kind = Hand[j]/13;//calculate the kind of the card\n int rank = Hand[j]%13;//calculete the rank of the card\n switch (kind){\n case 0:\n switch (rank){\n case 0:\n Clubs += \"A \";\n break;\n case 1:\n Clubs += \"K \";\n break; \n case 2:\n Clubs += \"Q \";\n break; \n case 3:\n Clubs += \"J \";\n break; \n case 4:\n Clubs += \"10 \";\n break; \n case 5:\n Clubs += \"9 \";\n break; \n case 6:\n Clubs += \"8 \";\n break; \n case 7:\n Clubs += \"7 \";\n break; \n case 8:\n Clubs += \"6 \";\n break; \n case 9:\n Clubs += \"5 \";\n break; \n case 10:\n Clubs += \"4 \";\n break; \n case 11:\n Clubs += \"3 \";\n break; \n case 12:\n Clubs += \"2 \";\n break; \n } \n break;\n case 1:\n switch (rank){\n case 0:\n Diamonds += \"A \";\n break;\n case 1:\n Diamonds += \"K \";\n break; \n case 2:\n Diamonds += \"Q \";\n break; \n case 3:\n Diamonds += \"J \";\n break; \n case 4:\n Diamonds += \"10 \";\n break; \n case 5:\n Diamonds += \"9 \";\n break; \n case 6:\n Diamonds += \"8 \";\n break; \n case 7:\n Diamonds += \"7 \";\n break; \n case 8:\n Diamonds += \"6 \";\n break; \n case 9:\n Diamonds += \"5 \";\n break; \n case 10:\n Diamonds += \"4 \";\n break; \n case 11:\n Diamonds += \"3 \";\n break; \n case 12:\n Diamonds += \"2 \";\n break; \n } \n break;\n case 2:\n switch (rank){\n case 0:\n Hearts += \"A \";\n break;\n case 1:\n Hearts += \"K \";\n break; \n case 2:\n Hearts += \"Q \";\n break; \n case 3:\n Hearts += \"J \";\n break; \n case 4:\n Hearts += \"10 \";\n break; \n case 5:\n Hearts += \"9 \";\n break; \n case 6:\n Hearts += \"8 \";\n break; \n case 7:\n Hearts += \"7 \";\n break; \n case 8:\n Hearts += \"6 \";\n break; \n case 9:\n Hearts += \"5 \";\n break; \n case 10:\n Hearts += \"4 \";\n break; \n case 11:\n Hearts += \"3 \";\n break; \n case 12:\n Hearts += \"2 \";\n break; \n } \n break;\n case 3:\n switch (rank){\n case 0:\n Spades += \"A \";\n break;\n case 1:\n Spades += \"K \";\n break; \n case 2:\n Spades += \"Q \";\n break; \n case 3:\n Spades += \"J \";\n break; \n case 4:\n Spades += \"10 \";\n break; \n case 5:\n Spades += \"9 \";\n break; \n case 6:\n Spades += \"8 \";\n break; \n case 7:\n Spades += \"7 \";\n break; \n case 8:\n Spades += \"6 \";\n break; \n case 9:\n Spades += \"5 \";\n break; \n case 10:\n Spades += \"4 \";\n break; \n case 11:\n Spades += \"3 \";\n break; \n case 12:\n Spades += \"2 \";\n break; \n } \n break;\n }\n }\n \n //print out the results\n System.out.println(Clubs);\n System.out.println(Diamonds);\n System.out.println(Hearts);\n System.out.println(Spades);\n //ask user for input\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer=scan.next();\n }while(answer.equals(\"Y\") || answer.equals(\"y\"));\n return;\n }", "public void cards() {\n System.out.print(\"Enter a card: \");\n in.nextLine();\n String cardName = in.nextLine().toUpperCase();\n String cardSuit = cardName.substring(1);\n String cardRank = cardName.substring(0, 1);\n\n switch (cardRank) {\n case \"2\":\n cardRank = \"Two\";\n break;\n case \"3\":\n cardRank = \"Three\";\n break;\n case \"4\":\n cardRank = \"Four\";\n break;\n case \"5\":\n cardRank = \"Five\";\n break;\n case \"6\":\n cardRank = \"Six\";\n break;\n case \"7\":\n cardRank = \"Seven\";\n break;\n case \"8\":\n cardRank = \"Eight\";\n break;\n case \"9\":\n cardRank = \"Nine\";\n break;\n case \"T\":\n cardRank = \"Ten\";\n break;\n case \"J\":\n cardRank = \"Jack\";\n break;\n case \"Q\":\n cardRank = \"Queen\";\n break;\n case \"K\":\n cardRank = \"Kind\";\n break;\n case \"A\":\n cardRank = \"Ace\";\n break;\n default:\n cardRank = \"Invalid\";\n break;\n }\n\n switch (cardSuit) {\n case \"C\":\n cardSuit = \"Clubs\";\n break;\n case \"H\":\n cardSuit = \"Hearts\";\n break;\n case \"D\":\n cardSuit = \"Diamonds\";\n break;\n case \"S\":\n cardSuit = \"Spades\";\n break;\n default:\n cardSuit = \"Invalid\";\n break;\n }\n\n if (cardRank == \"Invalid\") {\n System.out.println(\"\\nThat's not a valid rank.\\n\");\n } else if (cardSuit == \"Invalid\" || cardName.length() != 2) {\n System.out.println(\"\\nThat's not a valid suit.\\n\");\n } else {\n System.out.println(\"\\n\" + cardRank + \" of \" + cardSuit + \".\");\n }\n }", "void playerUsedCard(Card c, boolean discard) {\n\t\t// The creator data is in the 2 first bytes, the other player in the 2\n\t\t// last bytes.\n\t\tplayedCard[0] = (discard ? DISCARDED_CARD : PLAYED_CARD);\n\t\tplayedCard[1] = (byte) c.id;\n\t}", "public void play() {\n\t\tthis.initializeTurn();\n\t\twhile(this.getAction() > 0) {\n\t\t\tint choix = RandomInt.randomInt(1,6, this.rand);\n\t\t\tif(choix == 1) {\n\t\t\t\t//add building, preference of Machine\n\t\t\t\tint max = 0;\n\t\t\t\tint maxi = 0;\n\t\t\t\tboolean find = false;\n\t\t\t\tfor(int i = 0; i < this.getBoard().getFiveBuildingCards().size(); i++) {\n\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i) != null) {\n\t\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i) instanceof Machine) {\n\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t\tfind = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.getBoard().getFiveBuildingCards().get(i).getPoint() > max && !find) {\n\t\t\t\t\t\t\tmax = this.getBoard().getFiveBuildingCards().get(i).getPoint();\n\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.addBuilding(this.getBoard().getFiveBuildingCards().get(maxi));\n\t\t\t\tDesignString.printBorder(\"Ouverture d'un chantier\");\n\t\t\t}\n\t\t\telse if(choix == 2 || choix == 3) {\n\t\t\t\t//add worker, preference of the lowest one\n\t\t\t\tint min = 999;\n\t\t\t\tint mini = 0;\n\t\t\t\tfor(int i = 0; i < this.getBoard().getFiveWorkerCards().size(); i++) {\n\t\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(i) != null) {\n\t\t\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(i).getCost() < min && this.getBoard().getFiveWorkerCards().get(i).getCost() >= this.getCoin()) {\n\t\t\t\t\t\t\tmin = this.getBoard().getFiveWorkerCards().get(i).getCost();\n\t\t\t\t\t\t\tmini = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(this.getBoard().getFiveWorkerCards().get(mini).getCost() >= this.getCoin()) {\n\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tDesignString.printBorder(\"Recrutement d'un ouvrier\");\n\t\t\t\t\tthis.hireWorker(this.getBoard().getFiveWorkerCards().get(mini));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(choix == 4 || choix == 5 || choix == 6) {\n\t\t\t\t//worker to building. Preference to the started building. If it can't play, preference to action to coin\n\t\t\t\tIBuilding building = null;\n\t\t\t\tIWorker worker = null;\n\t\t\t\tif(this.getWorkerCards().size() > 0) {\n\t\t\t\t\tif(this.getStartedBuilding().size() > 0) {\n\t\t\t\t\t\tchoix = RandomInt.randomInt(0,2,this.rand);\n\t\t\t\t\t\tif(choix%2 == 0) {\n\t\t\t\t\t\t\tint max = 0;\n\t\t\t\t\t\t\tint maxi = 0;\n\t\t\t\t\t\t\tfor(int i = 0; i < this.getStartedBuilding().size(); i++) {\n\t\t\t\t\t\t\t\tif(this.getStartedBuilding().get(i) != null) {\n\t\t\t\t\t\t\t\t\tif(this.getStartedBuilding().get(i).getWorkerOn().size() > max) {\n\t\t\t\t\t\t\t\t\t\tmax = this.getStartedBuilding().get(i).getWorkerOn().size();\n\t\t\t\t\t\t\t\t\t\tmaxi = i;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbuilding = this.getStartedBuilding().get(maxi);\n\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\n\t\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t\twhile(building == null) {\n\t\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(this.getBuildingsCards().size() > 0) {\n\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\twhile(building == null) {\n\t\t\t\t\t\t\tbuilding = this.getBuildingsCards().get(RandomInt.randomInt(0,this.getBuildingsCards().size()-1, this.rand));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\twhile(worker != null && worker.getCost() > this.getCoin() && this.getAction() > 0) {\n\t\t\t\t\t\t\tworker = this.getWorkerCards().get(RandomInt.randomInt(0,this.getWorkerCards().size()-1, this.rand));\n\t\t\t\t\t\t\tchoix = RandomInt.randomInt(1,5,this.rand);\n\t\t\t\t\t\t\tif(choix == 1) {\n\t\t\t\t\t\t\t\tDesignString.printBorder(\"Échange action vers écus\");\n\t\t\t\t\t\t\t\tthis.actionToCoins(RandomInt.randomInt(1,this.getAction(), this.rand));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(this.getAction() >= this.getRemoveBuilding(building)) {\n\t\t\t\t\t\t\tDesignString.printBorder(\"Envoi d'un ouvrier sur un chantier\");\n\t\t\t\t\t\t\tthis.workerToBuilding(worker, building);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getCard(List<Integer> hand2, int position) {\n\t\tif (position >= 0 && position < hand2.size()) {\n\t\t\treturn ((Integer) hand2.get(position)).intValue();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public Card playCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Return the card in that position, and\n //move all of the cards after that card\n //back by one position.\n Card card = new Card(this.myCards[k]);\n for (int i = k + 1; i < this.numCards; i++) {\n this.myCards[i - 1] = this.myCards[i];\n this.myCards[i] = null;\n }\n this.numCards--;\n return card;\n }\n }", "public abstract void cardDrawn(int playerIndex);", "public boolean VerifyHumanChoice(int value){\n String card = handHuman.get(value);\n System.out.print(\"CARD IN VERIFY HUMAN\" + card);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Can play any card ontop to determine suite\n topCard = card;\n return true;\n }\n\n if(card.contains(\"8\")){\n //valid because 8s are wild cards, human can place it\n topCard = card;\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if(firstLetter.equals(topFirstLetter)){\n topCard = card;\n return true;\n }\n\n else{\n if(topFirstLetter.equals(\"c\")){\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"h\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"d\")){\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"s\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n }\n\n //You can't play this card\n return false;\n }", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "@Override\n public void play(){\n \n // while neither player is dead\n while (continueGame()) {\n \n // both player and cpu draw a card and display the card\n player.play();\n System.out.printf(\"%s has drawn %s \\n\", player.getPlayerID(), \n player.getCard());\n cpu.play();\n System.out.printf(\"%s has drawn %s \\n\", cpu.getPlayerID(), \n cpu.getCard());\n \n // checks if the player wins the round\n if (winRound(player, cpu)) {\n // adds the cards to the gamedeck then the game deck to the\n // player deck\n winner(player, cpu, gameDeck);\n player.getWinningsPile().addCards(gameDeck.showCards().subList(0\n , gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.printf(\"%s wins round\\n\", player.getPlayerID());\n } else if (winRound(cpu, player)) { // if the cpu wins\n // adds the cards to the gamedeck then the game deck to the\n // cpu deck\n winner(cpu, player, gameDeck);\n cpu.getWinningsPile().addCards(gameDeck.showCards().subList(0, \n gameDeck.getSize()));\n // empties the game deck\n gameDeck.showCards().clear();\n System.out.println(\"CPU wins round\");\n } else {\n // if its a draw, check to see if either the cpu or player is\n // dying, if so, dont add the card to the gameDeck\n if (!(player.isDying())) {\n gameDeck.addCard(player.getCard());\n player.clearCard();\n }\n if (!(cpu.isDying())) {\n gameDeck.addCard(cpu.getCard());\n cpu.clearCard();\n }\n System.out.println(\"DRAW\");\n }\n // shows the current status of the game\n System.out.printf(\"%s's deck: %d winnings: %d \\n\", \n player.getPlayerID(), player.getDeck().getSize(), \n player.getWinningsPile().getSize());\n System.out.printf(\"CPU deck: %d winnings: %d \\n\", \n cpu.getDeck().getSize(), \n cpu.getWinningsPile().getSize());\n System.out.println(\"Press Enter to go to the next round\");\n in.nextLine();\n }\n //display the winner\n declareWinner();\n }", "public void playRound(){\n this.gameState = GameController.createGameState(this.game);\n \n // Verifica se o \n if(this.gameState.isEnded()){\n var winner = this.gameState.getPlayerQttCards() == 0 ? this.game.getComputer() : this.game.getPlayer();\n\n this.gameState.setWinner(winner);\n }\n else{\n \n // Mostrando o vira, as manilhas, a quantidade de cartas dos jogadores e as cartas do jogador\n this.view.displayGame(this.gameState);\n\n var playerCardChose = this.getPlayerCardChose();\n var computerCardChose = Utils.generateRandomNumber(getGameState().getComputerQttCards());\n\n try{\n var playerCard = this.game.getPlayer().playCard(playerCardChose);\n var computerCard = this.game.getComputer().playCard(computerCardChose);\n\n var winnerCard = this.verifyBiggerCard(playerCard, computerCard);\n\n // Verificando qual `Player` ganhou e se um ganhou\n\n var hasPlayerWon = winnerCard.equals(playerCard);\n var hasComputerWon = winnerCard.equals(computerCard);\n\n var turnedCard = this.getGameState().getTurnedCard();\n\n // Aqui caso o player tenha ganhado ele recebe a carta do computador e senão ele perde a carta para o computador\n if(hasPlayerWon){\n this.game.getPlayer().earnCard(computerCard);\n this.game.getComputer().loseCard(computerCard);\n }\n else if(hasComputerWon){\n this.game.getComputer().earnCard(playerCard);\n this.game.getPlayer().loseCard(playerCard);\n }\n \n // Na hora de mostrar o vencedor eu verifico se um player venceu, se sim eu mostro vitória ou derrota para o Player\n // Se não eu mostro empate\n \n if(hasComputerWon || hasPlayerWon){\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard, hasPlayerWon);\n }\n else {\n this.view.displayRoundWinner(turnedCard, playerCard, computerCard);\n }\n\n }\n catch(Exception excp){\n this.view.displayMessageError(excp.getMessage());\n\n this.playRound();\n }\n }\n \n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "private void selectAndPickARow(Card card, Player player) {\n\n int selectedRow = 1;\n\n pickARow(card, firstRow, player);\n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public abstract Card cardPlayed(int playerIndex, Card played, int targetIndex);", "private void yourturn() {\n if (whosturn != 3) {\n whosturn = 3;\n displayTable();\n }\n\n // TODO mega duplication\n int top = 0;\n // testing is player has a card they can play\n if (pile.notEmpty()) {\n boolean canplay = false;\n if (hand.getCard(0) == null) { // if player only has card on the table\n if (hand.isFaceUp()) // if player has faceup card on the table\n {\n for (int n = 0; n < 3; n++) {\n if (hand.getFaceUp(n) != null) {\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (seven\n && pile.get(top).getValue() == 7\n && hand.getFaceUp(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (hand.getFaceUp(n).getValue() == 2\n || hand.getFaceUp(n).getValue() == 10) {\n canplay = true;\n break;\n } else if (nine && hand.getFaceUp(n).getValue() == 9) {\n canplay = true;\n break;\n } else if (!seven || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getFaceUp(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n } else // if player only has facedown cards\n canplay = true;\n } else {\n for (int n = 0; n < hand.length() - 1; n++) {\n if (hand.getCard(n) == null) break;\n if (nine && pile.topValue() == 9) {\n top = 0;\n for (int i = 0; i < 52; i++) {\n if (pile.get(i) == null) {\n canplay = true;\n break;\n }\n if (pile.get(i).getValue() == 9) top++;\n else break;\n }\n }\n if (canplay) break;\n if (hand.getCard(n).getValue() == 2 || hand.getCard(n).getValue() == 10) {\n canplay = true;\n break;\n }\n if (nine && hand.getCard(n).getValue() == 9) {\n canplay = true;\n break;\n }\n if (seven && pile.get(top).getValue() == 7 && hand.getCard(n).getValue() < 7) {\n canplay = true;\n break;\n } else if (seven != true || pile.get(top).getValue() != 7) {\n if (pile.get(top).getValue() <= hand.getCard(n).getValue()) {\n canplay = true;\n break;\n }\n }\n }\n }\n if (canplay) {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n } else { // cant play then must pick up the pile\n sh.addMsg(\n \"The card played was a \"\n + pile.top().getStringValue()\n + \" you had to pick up the pile. BLAOW\");\n pile.moveToHand(hand);\n sendCommand(\"turn:pickup:\");\n nextTurn();\n displayTable();\n }\n } else {\n // sh.addMsg(\"Its Your Turn\");\n sh.setmyTurn(true);\n }\n }", "public interface Strategy {\n public Integer pick_card( List<Card> hand, Suit trump, Suit round );\n}", "private int CasinoTurn() {\n List<Card> drawnCards = new LinkedList<>();\n boolean exit = false;\n\n // Determine to draw more cards\n do {\n // Draw cards\n Card drawn = drawCard();\n drawnCards.add(drawn);\n Ui.cls();\n Ui.println(\"Casino drew a \" + drawn.getName());\n Ui.pause();\n\n // Shows current cards and drawn cards\n Ui.cls();\n Ui.println(getHeader());\n Ui.println();\n Ui.print(\"Casino's cards:\");\n // Draw every card\n for (int i = 0; i < drawnCards.size(); i++) {\n Ui.print(\" \" + drawnCards.get(i));\n if (i + 1 < drawnCards.size()) {\n Ui.print(\",\");\n }\n }\n // Value of cards\n Ui.println(\"Casino's value: \" + highestPossibleValue(drawnCards));\n Ui.println();\n\n // Check for too much points\n if (highestPossibleValue(drawnCards) > 21) {\n Ui.println(\"The casino drew more than a total of 21, resulting in its loss!\");\n Ui.pause();\n break;\n }\n\n // Simple \"AI\" to determine the exit condition\n if (highestPossibleValue(drawnCards) > 17) {\n exit = true;\n Ui.println(\"The casino stopped playing!\");\n\n } else if (highestPossibleValue(drawnCards) > 15) {\n if (Math.random() < 0.5D) {\n exit = true;\n Ui.println(\"The casino stopped playing!\");\n }\n }\n\n } while (!exit);\n\n if (highestPossibleValue(drawnCards) > 21) {\n return 0;\n } else {\n return highestPossibleValue(drawnCards);\n }\n }", "public void addWinning2(Card card)\n {\n player2Hand.enqueue(card);\n }", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }" ]
[ "0.74133784", "0.7336695", "0.72532815", "0.7204127", "0.71322954", "0.7028041", "0.6975031", "0.69401246", "0.6867712", "0.6841518", "0.66775084", "0.6670005", "0.6644365", "0.66268", "0.66077554", "0.65754086", "0.6542449", "0.65315914", "0.6519754", "0.6505161", "0.6491849", "0.6475911", "0.6469444", "0.64417064", "0.64326155", "0.6427951", "0.6415681", "0.63954717", "0.63604826", "0.634758", "0.6337952", "0.631737", "0.63002163", "0.6273845", "0.62695676", "0.6267319", "0.62670267", "0.6253962", "0.6253192", "0.62505746", "0.62484264", "0.6248082", "0.6246094", "0.6223455", "0.62091607", "0.618526", "0.6184112", "0.61824995", "0.6171798", "0.615938", "0.6153047", "0.6151289", "0.6135847", "0.6131789", "0.61312217", "0.6128035", "0.6127049", "0.61184996", "0.6114742", "0.61139846", "0.6109938", "0.61097735", "0.61034817", "0.6100758", "0.6099221", "0.60978913", "0.60933375", "0.608583", "0.60817313", "0.60726535", "0.6072429", "0.6047755", "0.60415417", "0.60365736", "0.6015301", "0.6004189", "0.5999923", "0.59979427", "0.5995816", "0.59954566", "0.5986591", "0.59824425", "0.59808725", "0.59610194", "0.5959849", "0.59597343", "0.5959177", "0.59584653", "0.59560823", "0.59554803", "0.5953275", "0.5953011", "0.59477234", "0.5933002", "0.5932883", "0.59318805", "0.5917192", "0.59170383", "0.59151214", "0.59112483" ]
0.7635844
0
/ In: A Card object Out: An integer representing that card's value
static int getCardPointValue(Card card) { if (card.errorFlag) return -1; String values = new String(Card.validCardValues); return cardPointValues[values.indexOf(card.getValue())]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public int getCardValue()\n {\n return cardValue; \n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\treturn id % 13;\n\t\telse\n\t\t\treturn 13;\n\t}", "public int cardValue(Card card) //translate string into card's numerical value\r\n {\r\n if (card.face.equals(\"Deuce\"))\r\n return 2;\r\n if (card.face.equals(\"Three\"))\r\n return 3;\r\n if (card.face.equals(\"Four\"))\r\n return 4;\r\n if (card.face.equals(\"Five\"))\r\n return 5;\r\n if (card.face.equals(\"Six\"))\r\n return 6;\r\n if (card.face.equals(\"Seven\"))\r\n return 7;\r\n if (card.face.equals(\"Eight\"))\r\n return 8;\r\n if (card.face.equals(\"Nine\"))\r\n return 9;\r\n if (card.face.equals(\"Ten\"))\r\n return 10;\r\n if (card.face.equals(\"Jack\"))\r\n return 11;\r\n if (card.face.equals(\"Queen\"))\r\n return 12;\r\n if (card.face.equals(\"King\"))\r\n return 13;\r\n if (card.face.equals(\"Ace\"))\r\n return 14;\r\n return -2;\r\n }", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public int value(){\r\n\t\t\r\n\t\tthis.sort();\r\n\t\t\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tfor(int i = this.cardCount()-1; i >= 0; i--){\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.ACE) == 0){\r\n\t\t\t\tif(result <= 10 - i)\r\n\t\t\t\t\tresult += 11;\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.JACK) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.QUEEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.KING) == 0 ){\r\n\t\t\t\tresult += 10;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TWO) == 0){\r\n\t\t\t\tresult += 2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.THREE) == 0){\r\n\t\t\t\tresult += 3;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FOUR) == 0){\r\n\t\t\t\tresult += 4;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FIVE) == 0){\r\n\t\t\t\tresult += 5;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SIX) == 0){\r\n\t\t\t\tresult += 6;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SEVEN) == 0){\r\n\t\t\t\tresult += 7;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.EIGHT) == 0){\r\n\t\t\t\tresult += 8;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.NINE) == 0){\r\n\t\t\t\tresult += 9;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "int compareValue(Card c);", "public int highCardVal()\n\t{\n\t\tint value = 0;\n\t\t\n\t\tfor (int i=0; i<MAX_CARDS; i++)\n\t\t\tvalue += hand[i].getValue();\n\t\t\n\t\treturn value;\n\t}", "public int getHandValue() {\n\t\tint value = 0;\n\t\tint aces = 0;\n\t\tfor (Card card : cardHand) {\n\t\t\t// convert suits to 10\n\t\t\tif (card.getValue() > 10) {\n\t\t\t\tvalue += 10;\n\t\t\t} else if (card.getValue() == 1) {\n\t\t\t\taces++;\n\t\t\t} else {\n\t\t\t\tvalue += card.getValue();\n\t\t\t}\n\t\t}\n\t\tvalue += calculateAce(value, aces);\n\n\t\treturn value;\n\t}", "public static int calculateCard(Card c)\n\t{\n\t\tint value=c.getValue();\n\t\tif(value>=10)\n\t\t\treturn 10;\n\t\telse if(value==1)\n\t\t\treturn 11;\n\t\treturn value;\n\t}", "private static int valueAsInt(Card card) {\n String values = new String(Card.validCardValues);\n return values.indexOf(card.getValue());\n }", "public int getCardVal(boolean aceIsOne) {\n\t\tint val = (this.getCardNum()-1)/4 + 2;\n\t\tif(val==14 && aceIsOne)\n\t\t\tval = 1;\n\t\telse if(val > 10 && val < 14)\n\t\t\tval = 10;\n\t\telse if(val == 14)\n\t\t\tval = 11;\n\t\t\n\t\treturn val;\n\t}", "public int handValue() {\n int handValue = 0;\n for (Card card : cards) {\n switch (((BlackjackCard)card).getRank()) {\n case TWO:\n handValue += 2;\n break;\n case THREE:\n handValue += 3;\n break;\n case FOUR:\n handValue += 4;\n break;\n case FIVE:\n handValue += 5;\n break;\n case SIX:\n handValue += 6;\n break;\n case SEVEN:\n handValue += 7;\n break;\n case EIGHT:\n handValue += 8;\n break;\n case NINE:\n handValue += 9;\n break;\n case TEN:\n handValue += 10;\n break;\n case JACK:\n handValue += 10;\n break;\n case QUEEN:\n handValue += 10;\n break;\n case KING:\n handValue += 10;\n break;\n }\n }\n\n for (int i = 0; i < aceCount; i++) {\n if (handValue < 11) {\n handValue += 11;\n } else {\n handValue += 1;\n }\n }\n\n return handValue;\n }", "private static final int getNumericValue(final Card card) throws Exception\r\n {\r\n switch (card.getValue())\r\n {\r\n case Two:\r\n return 2;\r\n \r\n case Three:\r\n return 3;\r\n \r\n case Four:\r\n return 4;\r\n \r\n case Five:\r\n return 5;\r\n \r\n case Six:\r\n return 6;\r\n \r\n case Seven:\r\n return 7;\r\n \r\n case Eight:\r\n return 8;\r\n \r\n case Nine:\r\n return 9;\r\n \r\n case Ten:\r\n return 10;\r\n \r\n case Jack:\r\n return 11;\r\n \r\n case Queen:\r\n return 12;\r\n \r\n case King:\r\n return 13;\r\n \r\n case Ace:\r\n return 14;\r\n \r\n default:\r\n throw new Exception(\"Face value not handled here \" + card.getValue().toString());\r\n }\r\n }", "public int getNumber(){return cardNumber;}", "public int getValue();", "public int getValue();", "public int getHighCard() {\r\n return highCard;\r\n }", "Integer getValue();", "Integer getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "int getValue();", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "public int getHandValue() {\r\n int handValue = 0;\r\n for (Card card : this) {\r\n handValue += card.getCardValue();\r\n }\r\n return handValue;\r\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public int getNumber(){\n return cardNumber;\n }", "public int handValue() {\n\t\tint val = 0;\n\t\tfor(Card card: hand) {\n\t\t\tval += card.getValue();\n\t\t}\n\t\tif(val > 21) {\n\t\t\tif(checkOverflow()) {\n\t\t\t\treturn val - 10;\n\t\t\t}\n\t\t\treturn val;\n\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn val;\n\t}", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\r\n return value;\r\n }", "public int getValue()\r\n {\r\n return value;\r\n }", "public int getValue() \n {\n return value;\n }", "public int getValue() {\r\n return value;\r\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public int getValue()\n {\n return value;\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public int getValue()\n {\n return value;\n }", "public int getValue() {\n return value_;\n }", "public int getValue(){\n return value;\n }", "public int getValue() \n {\n return value;\n }", "public int getValue()\n\t{\n\t\treturn bitHolder.getValue();\n\t}", "public int getValue () {\n return value;\n }", "public int getValue() {\r\n return value;\r\n }", "public int topCardVal(){\n if(pile.size() == 0)\n return 0;\n int val = pile.get(pile.size() - 1).getVal();\n return val;\n }", "public void generateCardValue() {\r\n\t\tswitch (cardNumber) {\r\n\t\tcase 1:\r\n\t\t\tcardValue = \"Ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardValue = \"Two\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tcardValue = \"Three\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardValue = \"Four\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardValue = \"Five\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardValue = \"Six\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardValue = \"Seven\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardValue = \"Eight\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardValue = \"Nine\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardValue = \"Ten\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardValue = \"Jack\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardValue = \"Queen\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardValue = \"King\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public int getValue(){\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue()\n\t{\n\t\treturn value;\n\t}", "public int getValue() {\n return value_;\n }", "public int getValue() {\n return value_;\n }", "public int getValue(){\n return this.value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getHandValue() {\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\tCard card = hand.get(i);\n\t\t\tint value = card.getValue();\n\t\t\tsum = sum + value;\n\t\t}\n\t\treturn sum;\n\t}", "public int getValue() {\n return this.value;\n }", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\n return value;\n }", "public int getValue() {\n return value;\n }", "public int getValue() {\r\n return Value;\r\n }", "public int getValue()\n {\n try\n {\n return (Integer) AlphaComposite.class.getField(name).get(null);\n }\n catch (Exception e)\n {\n return -1;\n }\n }", "public int value() \n {\n return value;\n }", "public Integer getValue();", "public int getValue() {\n return value_;\n }", "public int getValue() {\n return _value;\n }", "public int value() {\n return value;\n }", "public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}", "public int value();", "public int value() {\r\n\t\treturn value;\r\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}", "public int getValue() {\n\t\treturn value;\n\t}" ]
[ "0.7797333", "0.7639451", "0.75987756", "0.75157064", "0.71641886", "0.7119415", "0.7090305", "0.70451254", "0.70416135", "0.7000696", "0.6959939", "0.69179726", "0.6876641", "0.6811983", "0.6801134", "0.67904955", "0.67904955", "0.67695904", "0.6720403", "0.6720403", "0.66996485", "0.66996485", "0.66996485", "0.66996485", "0.66996485", "0.6618117", "0.66108525", "0.6597169", "0.6560352", "0.65564555", "0.65395266", "0.65395266", "0.65395266", "0.65395266", "0.65395266", "0.65395266", "0.6512596", "0.6512384", "0.648854", "0.6486511", "0.6486381", "0.64859265", "0.648306", "0.648189", "0.6479775", "0.64780265", "0.6472281", "0.6468276", "0.64573294", "0.64571303", "0.6455206", "0.64446384", "0.64423275", "0.6421057", "0.6421057", "0.6421057", "0.6417772", "0.6417772", "0.6409452", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6409366", "0.6406081", "0.6404883", "0.6389636", "0.6389636", "0.6389636", "0.6389636", "0.6389636", "0.6389636", "0.6389636", "0.6389636", "0.63815814", "0.63815814", "0.63734126", "0.63489246", "0.6341835", "0.63416076", "0.634063", "0.6340261", "0.63370687", "0.63349783", "0.63320035", "0.6326523", "0.6323813", "0.6323813", "0.6323813", "0.6323813" ]
0.66931444
25
/ In: A card object that the caller wants an image for Out: An Icon containing the image
public static Icon getIcon(Card card) { //Load all of the card icons if they haven't been already. if (!GUICard.iconsLoaded) GUICard.loadCardIcons(); //return the appropriate card icon. return iconCards[valueAsInt(card)][suitAsInt(card)]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "private Image getCardImage(Card card) {\n return getImage(\"playing-cards/\" + card + \".png\");\n }", "public static ImageIcon[] getCardImage(){\n\t\treturn cardImage;\n\t}", "@Override\n\tImageIcon getImage() {\n\t\treturn img;\n\t}", "static public Icon getIcon(Card card)\n {\n loadCardIcons();\n // return iconCards[valueAsInt(card)][suitAsInt(card)];\n return iconCards[suitAsInt(card)][valueAsInt(card)];\n // return iconCards[0][0];\n }", "public ImageIcon displayItem(Player owner){\n\t\treturn image;\n\t}", "String getIcon();", "String getIcon();", "public static ImageIcon getEmptyCardIcon() {\n\t\treturn new ImageIcon(Card.class.getResource(Constants.IMAGES_FOLDER + \"/\" + \"empty_card.png\"));\n\t}", "java.lang.String getIcon();", "java.lang.String getIcon();", "public void setIcon(Image i) {icon = i;}", "public ImageDescriptor getIcon();", "public abstract ImageDescriptor getIcon();", "public ImageIcon getTopCardImage() {\r\n return new ImageIcon(validColor + \"_\" + validValue + \".png\");\r\n }", "public Icon getIcon(Object object);", "@Source(\"create.gif\")\n\tpublic ImageResource createIcon();", "public Icon getIcon();", "Icon createIcon();", "public abstract Drawable getIcon();", "Icon getIcon();", "public Icon icon() {\n\t\treturn new ImageIcon(image());\n\t}", "@Override\n public BufferedImage getCardIcon(String resourceName, int size, CardIconColor cardIconColor) {\n InputStream data = ImageManager.class.getResourceAsStream(PreferencesDialog.getCurrentTheme().getCardIconsResourcePath(resourceName));\n try {\n // no need to resize svg (lib already do it on load)\n return SvgUtils.loadSVG(data, \"card icon = \" + resourceName + \"; \" + cardIconColor.toString(),\n PreferencesDialog.getCurrentTheme().getCardIconsCssFile(cardIconColor),\n PreferencesDialog.getCurrentTheme().getCardIconsCssSettings(cardIconColor),\n size, size, false);\n } catch (Exception e) {\n logger.error(\"Can't load card icon: \" + resourceName + \" , reason: \" + e.getMessage(), e);\n return null;\n }\n }", "public void generateCardImage() {\r\n\t\tString i1 = \"lib/card/\" + cardSuit + \"/\" + cardSuit + \" \"\r\n\t\t\t\t+ cardValue + \".PNG\";\r\n\t\tString i2 = \"lib/card/back2.PNG\";\r\n\t\t\r\n\t\tFile f1 = new File(i1);\r\n\t\tFile f2 = new File(i2);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcardImage = ImageIO.read(f1);\r\n\t\t\tcardBack = ImageIO.read(f2);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(cardValue);\r\n\t\t\tSystem.out.println(cardSuit);\r\n\t\t}\r\n\t}", "public abstract String getIcon(int current_turn);", "public ImageIcon getImage();", "@Source(\"create.gif\")\n\tpublic DataResource createIconResource();", "public Bitmap getIcon() {\n return mBundle.getParcelable(KEY_ICON);\n }", "private void drawCard(String path, Card card, Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon img;\n\t\t\t img = new ImageIcon(ImageIO.read(new File(path+card.toString()+\".png\")));\n\t\t\t Image card1 = img.getImage();\n\t\t\t Image card1New = card1.getScaledInstance(45, 65, java.awt.Image.SCALE_SMOOTH);\n\t\t\t ImageIcon card1Icon = new ImageIcon(card1New);\n\t\t\t card1Icon.paintIcon(this, g, x, y);\n\t }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public String getIcon() {\n return icon;\n }", "public org.netbeans.modules.j2ee.dd.api.common.Icon getIcon(){return null;}", "public abstract ImageIcon getIcon(int size);", "public Icon getIcon() {\n \t\treturn null;\n \t}", "static public Icon getBackCardIcon()\n {\n iconBack = new ImageIcon(\"images/\" + \"BK.gif\");\n return iconBack;\n }", "private View createIcon() {\r\n\t\tImageView img = new ImageView(getContext());\r\n\t\tLayoutParams imglp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\timglp.gravity = Gravity.CENTER_VERTICAL;\r\n\t\timglp.rightMargin = 5;\r\n\t\timg.setLayoutParams(imglp);\r\n\r\n\t\timg.setBackgroundDrawable(getContext().getResources().getDrawable(R.drawable.account));\r\n\t\treturn img;\r\n\t}", "public abstract String typeIcon();", "private Pane getIconPane(GodAsset ga, ReducedGod god){\n ImageView img = new ImageView(ga.cardLocation);\n img.setPreserveRatio(true);\n img.setCache(true);\n img.setFitWidth(200);\n\n img.setOnMouseEntered(e -> {\n ScaleTransition st = new ScaleTransition(Duration.millis(200), img);\n st.setToX(1.1);\n st.setToY(1.1);\n st.play();\n });\n img.setOnMouseExited(e -> {\n ScaleTransition st = new ScaleTransition(Duration.millis(200), img);\n st.setToX(1);\n st.setToY(1);\n st.play();\n });\n\n Label label = new Label();\n\n label.setText(I18n.string(I18nKey.valueOf(ga.godName.toUpperCase()+\"_NAME\")));\n label.getStyleClass().add(\"god-label\");\n fontSize.bind(JavaFXGUI.getPrimaryScene().widthProperty().add(JavaFXGUI.getPrimaryStage().heightProperty()).divide(FONT_SIZE_RATIO));\n label.styleProperty().bind(Bindings.concat(\"-fx-font-size: \", fontSize.asString()));\n\n img.setOnMouseClicked((MouseEvent mouseEvent) -> lateralGodCard.clickGod(god));\n\n VBox iconPane = new VBox(img, label);\n iconPane.setAlignment(Pos.CENTER);\n return iconPane;\n }", "public Icon getIcon() {\n\t\treturn null;\n\t}", "public FSIcon getIcon() {\n return icon;\n }", "public String getIcon() {\n\t\treturn \"icon\";\n\t}", "public byte[] getIcon()\r\n {\r\n return icon;\r\n }", "String getItemImage();", "B itemIcon(ITEM item, Resource icon);", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource(\"imagenes/Icon.jpg\"));\n return retValue;\n }", "@Override\n public Image getFlagImage() {\n Image image = AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_FLAG_PREFIX + id);\n if ( image == null ) {\n image = AwsToolkitCore.getDefault().getImageRegistry().get(AwsToolkitCore.IMAGE_AWS_ICON);\n }\n return image;\n }", "private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }", "@Override\r\n\t\tpublic void requestIcon(String arg0) {\n\t\t\t\r\n\t\t}", "protected Image loadIcon() {\n /*\n * Icon by http://www.artua.com/, retrieved here:\n * http://www.iconarchive.com/show/star-wars-icons-by-artua.html\n */\n return new ImageLoader().loadIcon(\"moon.png\");\n }", "java.lang.String getImage();", "public Icon getIcon()\n {\n return getComponent().getIcon();\n }", "@Override\n\tpublic Image getImage() {\n\t\treturn img;\n\t}", "public String getAccessibleIconDescription();", "private ImageIcon ImageIcon(byte[] pic) {\n throw new UnsupportedOperationException(\"Not Supported Yet.\");\n\n }", "private RoundImage img(String imgAddress) {\n return new RoundImage(\"frontend/src/images/books.png\",\"64px\",\"64px\");\n }", "public Image deckImage() {\n if (this.size() == 0) {\n return getImageFromStream(\"graphics/empty_deck.png\");\n }\n return getImageFromStream(this.topCard().getImageSource());\n }", "public void\r DisplayIcon(CType display_context, int x, int y, int icon_number);", "public ImageIcon getIcon() {\n\t\treturn null;\n\t}", "public ImageIcon getIcon() {\n\t\treturn null;\n\t}", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().\n getImage(ClassLoader.getSystemResource(\"Imagenes/Sisapre001.png\"));\n return retValue;\n }", "@Override\r\n\tpublic int getImage() {\n\t\treturn Parametre.BALLE;\r\n\t}", "public void defaultImageDisplay(){\n ClassLoader cl = this.getClass().getClassLoader();\n ImageIcon icon = new ImageIcon(cl.getResource(\"pictures/NewInventory/defaultPic.png\"));\n // this.finalImage = icon.getImage();\n Image img = icon.getImage().getScaledInstance(entryImage.getWidth(), entryImage.getHeight(), Image.SCALE_SMOOTH);\n entryImage.setIcon(new ImageIcon(img));\n }", "public ImageIcon getFoto(){\r\n return (ImageIcon)beneficiario[5];\r\n }", "@Override\r\n\tpublic Image getGameIcon() {\n\t\treturn null;\r\n\t}", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().\n getImage(ClassLoader.getSystemResource(\"Imagenes/Icono.png\"));\n return retValue;\n}", "public abstract String getIconString();", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().getImage(ClassLoader.getSystemResource(\"images/icon.png\"));\n return retValue;\n }", "public abstract ImageIcon getButtonIcon();", "Texture getIcon();", "@Nullable\n public final Drawable getIcon() {\n return mIcon;\n }", "public void addIcon(Direction dir, Color clr){\r\n\t\t \r\n\t\t Graphics2D g = bufferedImage.createGraphics();\r\n\t\t BufferedImage imgPiece;\r\n\t\t File fileImg = new File(\"src/main/java/data/smallfollower_0.png\");\r\n\t \t try {\r\n\t\t\timgPiece = ImageIO.read(fileImg);\r\n\r\n\t\t\t Graphics2D g1 = imgPiece.createGraphics();\t\r\n\t\t\t for (int x = 0; x < imgPiece.getWidth(); x++) {\r\n\t\t\t\t for (int y = 0; y < imgPiece.getHeight(); y++) {\r\n\t\t\t\t\t int color = imgPiece.getRGB(x,y);\r\n\t\t\t\t\t if(color == -65281){\r\n\t\t\t\t\t\t g1.setColor(clr);\r\n\t\t\t\t\t\t g1.fillRect(x,y,1,1);\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t g.drawImage(imgPiece, getX(dir), getY(dir), 20, 20, null);\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t }", "@Override\n public Image getIconImage() {\n java.net.URL imgURL = MainWindowAlt.class.getResource(\"images/logo.gif\");\n if (imgURL != null) {\n return new ImageIcon(imgURL).getImage();\n } else {\n return null;\n }\n }", "public ImageIcon getHeaderIcon();", "@Override\r\n public ImageIcon getIcon(int size) {\r\n return IconTool.getIcon(ICON_NAME, size);\r\n }", "public String getImg(String icon)\n {\n // New <img>\n XML img = new XML(\"img\",false);\n \n // Check specified icon property\n if (icon == null) \n { \n icon = \"\"; \n }\n \n // Set src attribute\n img.addAttribute(\"src\",icon);\n \n // return <img>\n return img.toString();\n }", "public int getIconImageNumber(){return iconImageNumber;}", "public static Icon getBackCardIcon() {\n //Load all of the icons if they have not been already.\n if (!GUICard.iconsLoaded)\n GUICard.loadCardIcons();\n return GUICard.iconBack;\n }", "private static Component createIconComponent()\n {\n JPanel wrapIconPanel = new TransparentPanel(new BorderLayout());\n\n JLabel iconLabel = new JLabel();\n\n iconLabel.setIcon(DesktopUtilActivator.getResources()\n .getImage(\"service.gui.icons.AUTHORIZATION_ICON\"));\n\n wrapIconPanel.add(iconLabel, BorderLayout.NORTH);\n\n return wrapIconPanel;\n }", "@Override\n public boolean isIcon(){\n return super.isIcon() || speciallyIconified;\n }", "@NotNull\n SVGResource getIcon();", "public ImageIcon getImage()\n {\n return image;\n }", "protected Icon getIcon() {\n return getConnection().getIcon(getIconUri());\n }", "public URL getIcon()\r\n {\r\n\treturn icon;\r\n }", "@Override\n public Image getIconImage() {\n Image retValue = Toolkit.getDefaultToolkit().\n getImage(ClassLoader.getSystemResource(\"Images/mainIcon.png\"));\n\n\n return retValue;\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n icon_ = s;\n }\n return s;\n }\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n icon_ = s;\n }\n return s;\n }\n }", "@Override\n\tpublic Icon getIcon(int width, int height) {\n\t\treturn null; // Use Display Name instead of an icon.\n\t}", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n icon_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getIcon() {\n java.lang.Object ref = icon_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n icon_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic Image getIconImage() {\n\t\tImage retValue = Toolkit.getDefaultToolkit().getImage(\"C:/BuildShop/IMG/Logo64x64.png\");\n\t\treturn retValue;\n\t}", "@Override\n\tpublic Image getImage() {\n\t\treturn image;\n\t}", "public ImageView getImageView() {\n View view = this.mCardImage;\n if (view instanceof ImageView) {\n return (ImageView) view;\n }\n return null;\n }", "public abstract String getIconPath();", "public String getImage() { return image; }", "public ImageIcon getImage(){\n\t\treturn this.image;\n\t}", "public interface XBCXIcon extends XBCBase {\n\n /**\n * Gets parent item.\n *\n * @return the parent item.\n */\n XBCItem getParent();\n\n /**\n * Gets icon mode.\n *\n * @return icon mode\n */\n @Nonnull\n XBCXIconMode getMode();\n\n /**\n * Gets icon file.\n *\n * @return icon file\n */\n @Nonnull\n XBCXFile getIconFile();\n}", "public interface Image {\n void display();\n}" ]
[ "0.7342288", "0.7312227", "0.7186173", "0.6828969", "0.68220353", "0.67514676", "0.67374176", "0.6726198", "0.6726198", "0.668909", "0.6658882", "0.6658882", "0.6650844", "0.66359836", "0.661377", "0.660889", "0.66031843", "0.6590617", "0.65781283", "0.6539564", "0.6497865", "0.6439965", "0.6388433", "0.63783413", "0.63557047", "0.6354479", "0.6329319", "0.630492", "0.62968916", "0.6258511", "0.62247014", "0.62247014", "0.62247014", "0.62247014", "0.61990935", "0.61989504", "0.6171654", "0.61701214", "0.61306554", "0.6091388", "0.607771", "0.60644007", "0.6057009", "0.6020217", "0.6005792", "0.5995319", "0.59923905", "0.59917784", "0.5990742", "0.5977662", "0.5975788", "0.59740436", "0.59632874", "0.5956839", "0.5935409", "0.5932938", "0.59263986", "0.59176934", "0.5908845", "0.5905609", "0.5903899", "0.5903899", "0.5902393", "0.5896057", "0.58956015", "0.589409", "0.58915925", "0.58873224", "0.588643", "0.58836627", "0.58778375", "0.5872293", "0.587069", "0.5869813", "0.5869804", "0.5867431", "0.5860835", "0.58585644", "0.5855113", "0.5854759", "0.58524007", "0.58481187", "0.58373207", "0.58306414", "0.5830084", "0.58285105", "0.5816151", "0.5807249", "0.5807249", "0.5806417", "0.5800309", "0.5800309", "0.57974446", "0.57940537", "0.579199", "0.5786257", "0.5784152", "0.57775", "0.57768893", "0.5768086" ]
0.6397766
22
/ In: Nothing Out: Nothing Loads all of teh card icons from the images directory. If the images directory is not in the right place, then the user is prompted to select a directory where the images can be found.
private static void loadCardIcons() { //If the images folder doesn't exist, if (!(new File(GUICard.iconFolderPath).exists())) { //Prompt the user for a valid image folder. JOptionPane.showMessageDialog(null, "By deafult ../images/ is used to store card icon images, but ../images/ does not exist. Press OK to select the folder where card icon images are stored. Press cancel in the forthcoming dialog window to exit this program."); JFileChooser chooser = new JFileChooser("."); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setMultiSelectionEnabled(false); chooser.showDialog(null, "Select"); File selectedFile = chooser.getSelectedFile(); //Exit the program if a valid image folder is not provided. if (selectedFile == null) System.exit(0); GUICard.iconFolderPath = selectedFile.getPath(); System.out.println(iconFolderPath); } //Load each of the cards into the appropriate position in the iconCards array. for (int i = 0; i < Card.validCardValues.length; i++) for (int j = 0; j < VALID_SUITS.length; j++) { //If a card cannot be loaded, tell the user and exit the application. if (!new File(iconFolderPath + "/" + Card.validCardValues[i] + VALID_SUITS[j] + ".gif").exists()) { JOptionPane.showMessageDialog(null, Card.validCardValues[i] + VALID_SUITS[j] + ".gif could not be found in the icon folder. Program execution will now stop."); System.exit(0); } iconCards[i][j] = new ImageIcon(iconFolderPath + "/" + Card.validCardValues[i] + VALID_SUITS[j] + ".gif"); } //Load the back of the card icon. iconBack = new ImageIcon(iconFolderPath + "/BK.gif"); GUICard.iconsLoaded = true; //Make sure this function is not called again. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void loadCardIcons()\n {\n if(iconsLoaded == false)\n {\n //arrays for suits and ranks\n String[] suits = {\"C\", \"D\", \"H\", \"S\"};\n String[] ranks = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \n \"T\", \"A\", \"J\", \"Q\", \"K\", \"X\"};\n //load iconCards array\n for(int i = 0; i < suits.length; i++)\n {\n for(int k = 0; k < ranks.length; k++)\n {\n iconCards[i][k] = new ImageIcon(\"images/\" + ranks[k] + suits[i] + \".gif\");\n }\n }\n //set iconsLoaded to true\n iconsLoaded = true;\n }\n else //do nothing if icons have already been loaded\n {\n return;\n }\n }", "public void fillDeck() {\n folder = new File(imagesPath);\n listOfImages = folder.listFiles();\n// System.out.println(\"Path: \"+new File(listOfImages[0].getName()).toURI().toString());\n for (int i = 0; i < listOfImages.length; i++) {\n if (listOfImages[i].isFile() && listOfImages[i].getName().startsWith(\"Playing\")) {\n cards.add(new Card());\n cards.get(i).setName(listOfImages[i].getName());\n Image img = new Image(ImgPath + listOfImages[i].getName());\n ImageView view = new ImageView(img);\n view.setFitHeight(100);\n view.setFitWidth(80);\n cards.get(i).setImage(view);\n }\n }\n\n }", "private static void displayImagesDir(){\n System.out.println(IMAGES_DIR);\n }", "private void extractCards() {\n String fileSeparator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"user.dir\");\n path = path + fileSeparator + \"Client\" + fileSeparator + \"src\" + fileSeparator + \"Images\" + fileSeparator;\n System.out.println(path);\n\n for (Picture p : cardlist) {\n BufferedImage image = null;\n try {\n image = javax.imageio.ImageIO.read(new ByteArrayInputStream(p.getStream()));\n File outputfile = new File(path + p.getName());\n ImageIO.write(image, \"png\", outputfile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private void loadImages(){\n try{\n System.out.println(System.getProperty(\"user.dir\"));\n\n t1img = read(new File(\"resources/tank1.png\"));\n t2img = read(new File(\"resources/tank1.png\"));\n backgroundImg = read(new File(\"resources/background.jpg\"));\n wall1 = read(new File(\"resources/Wall1.gif\"));\n wall2 = read(new File(\"resources/Wall2.gif\"));\n heart = resize(read(new File(\"resources/Hearts/basic/heart.png\")), 35,35);\n heart2 = resize(read( new File(\"resources/Hearts/basic/heart.png\")), 25,25);\n bullet1 = read(new File(\"resources/bullet1.png\"));\n bullet2 = read(new File(\"resources/bullet2.png\"));\n\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n }\n }", "public void loadImages() {\n\t\tcowLeft1 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowLeft2 = new ImageIcon(\"images/animal/cow2left.png\");\n\t\tcowLeft3 = new ImageIcon(\"images/animal/cow1left.png\");\n\t\tcowRight1 = new ImageIcon(\"images/animal/cow1right.png\");\n\t\tcowRight2 = new ImageIcon(\"images/animal/cow2right.png\");\n\t\tcowRight3 = new ImageIcon(\"images/animal/cow1right.png\");\n\t}", "public void populateImages() {\n\t\t// Check if the recipe has any images saved on the sd card and get\n\t\t// the bitmap for the imagebutton\n\n\t\tArrayList<Image> images = ImageController.getAllRecipeImages(\n\t\t\t\tcurrentRecipe.getRecipeId(), currentRecipe.location);\n\n\t\tLog.w(\"*****\", \"outside\");\n\t\tLog.w(\"*****\", String.valueOf(currentRecipe.getRecipeId()));\n\t\tLog.w(\"*****\", String.valueOf(currentRecipe.location));\n\t\tImageButton pictureButton = (ImageButton) findViewById(R.id.ibRecipe);\n\n\t\t// Set the image of the imagebutton to the first image in the folder\n\t\tif (images.size() > 0) {\n\t\t\tpictureButton.setImageBitmap(images.get(0).getBitmap());\n\t\t}\n\n\t}", "private void scanForIcons() {\n\t\t\ttry {\n\t\t\t\tFile graphicDir = new File(helpIconBase + File.separator);\n\t\t\t\tlist = filter(graphicDir.listFiles(), \"tip\", \".png\");\n\t\t\t} catch (NullPointerException npe) {\n\t\t\t\tSystem.err.println(npe);\n\t\t\t\tlist = null;\n\t\t\t}\n\t\t}", "public static void loadFruitPic() {\n //images are from the public domain website: https://www.clipartmax.com/\n Toolkit toolkit = Toolkit.getDefaultToolkit();\n Banana.fruitPic = toolkit.getImage(\"Images/banana.png\");\n Banana.fruitSlice = toolkit.getImage(\"Images/bananaSlice.png\");\n }", "public void initializeImages() {\n\n File dir = new File(\"Images\");\n if (!dir.exists()) {\n boolean success = dir.mkdir();\n System.out.println(\"Images directory created!\");\n }\n }", "@Override\n\tpublic void loadImages() {\n\t\tsuper.setImage((new ImageIcon(\"pacpix/QuestionCandy.png\")).getImage());\t\n\t}", "private void loadImages() {\n\t\ttry {\n\t\t\tall_images = new Bitmap[img_files.length];\n\t\t\tfor (int i = 0; i < all_images.length; i++) {\n\t\t\t\tall_images[i] = loadImage(img_files[i] + \".jpg\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tToast.makeText(this, \"Unable to load images\", Toast.LENGTH_LONG)\n\t\t\t\t\t.show();\n\t\t\tfinish();\n\t\t}\n\t}", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "private void fillImagesInDirectory() throws IOException {\n // get the list of all files (including directories) in the directory of interest\n File[] fileArray = directory.listFiles();\n assert fileArray != null;\n for (File file : fileArray) {\n // the file is an image, then add it\n if (isImage(file)) {\n ImageFile imageFile = new ImageFile(file.getAbsolutePath());\n // if the image is already saved, reuse it\n if (centralController.getImageFileController().hasImageFile(imageFile)) {\n imagesInDirectory.add(centralController.getImageFileController().getImageFile(imageFile));\n } else {\n imagesInDirectory.add(imageFile);\n }\n }\n }\n }", "private static void loadImagesInDirectory(String dir){\n\t\tFile file = new File(Files.localize(\"images\\\\\"+dir));\n\t\tassert file.isDirectory();\n\t\n\t\tFile[] files = file.listFiles();\n\t\tfor(File f : files){\n\t\t\tif(isImageFile(f)){\n\t\t\t\tString name = dir+\"\\\\\"+f.getName();\n\t\t\t\tint i = name.lastIndexOf('.');\n\t\t\t\tassert i != -1;\n\t\t\t\tname = name.substring(0, i).replaceAll(\"\\\\\\\\\", \"/\");\n\t\t\t\t//Image image = load(f,true);\n\t\t\t\tImageIcon image;\n\t\t\t\tFile f2 = new File(f.getAbsolutePath()+\".anim\");\n\t\t\t\tif(f2.exists()){\n\t\t\t\t\timage = evaluateAnimFile(dir,f2,load(f,true));\n\t\t\t\t}else{\n\t\t\t\t\timage = new ImageIcon(f.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\tdebug(\"Loaded image \"+name+\" as \"+f.getAbsolutePath());\n\t\t\t\timages.put(name, image);\n\t\t\t}else if(f.isDirectory()){\n\t\t\t\tloadImagesInDirectory(dir+\"\\\\\"+f.getName());\n\t\t\t}\n\t\t}\n\t}", "private Image getCardImage(Card card) {\n return getImage(\"playing-cards/\" + card + \".png\");\n }", "public void loadImages() {\n\t\tpigsty = new ImageIcon(\"images/property/pigsty.png\");\n\t}", "private void initialBuild() {\n hiddenButton = new JToolButton(\"If you see me, we're screwed\", false);\n\n buttonGroup = new ButtonGroup();\n buttonGroup.add(hiddenButton);\n\n // create the loading image\n FileLoader fileLookup = new FileLoader(1);\n Toolkit tk = getToolkit();\n\n // lookup the folder image so it will be in the cache already\n try {\n Object[] iconURL = fileLookup.getFileURL(FOLDER_IMAGE); \n \n //now process the raw data into a buffer\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n byte[] buf = new byte[1024];\n for (int readNum; (readNum = ((InputStream)iconURL[1]).read(buf)) != -1;) {\n bos.write(buf, 0, readNum); \n }\n byte[] bytes = bos.toByteArray(); \n InputStream in = new ByteArrayInputStream(bytes);\n folderImage = javax.imageio.ImageIO.read(in); \n\n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n\n\n // lookup the loading image so it will be in the cache\n try {\n \n Object[] iconURL = fileLookup.getFileURL(LOADER_IMAGE);\n loadingImage = new ImageIcon((java.net.URL)iconURL[0]);\n \n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n \n // lookup the not found image so it will be in the cache\n try {\n Object[] iconURL = fileLookup.getFileURL(NOT_FOUND_IMAGE);\n \n //now process the raw data into a buffer\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n byte[] buf = new byte[1024];\n for (int readNum; (readNum = ((InputStream)iconURL[1]).read(buf)) != -1;) {\n bos.write(buf, 0, readNum); \n }\n byte[] bytes = bos.toByteArray(); \n InputStream in = new ByteArrayInputStream(bytes);\n notFoundImage = javax.imageio.ImageIO.read(in); \n \n } catch (Exception ioe) {\n ioe.printStackTrace();\n }\n\n addToolGroup(rootToolGroup);\n }", "public static void loadImages()\n \t{\n \t\tSystem.out.print(\"Loading images... \");\n \t\t\n \t\tallImages = new TreeMap<ImageEnum, ImageIcon>();\n \t\t\n \t\ttry {\n \t\taddImage(ImageEnum.RAISIN, \"images/parts/raisin.png\");\n \t\taddImage(ImageEnum.NUT, \"images/parts/nut.png\");\n \t\taddImage(ImageEnum.PUFF_CHOCOLATE, \"images/parts/puff_chocolate.png\");\n \t\taddImage(ImageEnum.PUFF_CORN, \"images/parts/puff_corn.png\");\n \t\taddImage(ImageEnum.BANANA, \"images/parts/banana.png\");\n \t\taddImage(ImageEnum.CHEERIO, \"images/parts/cheerio.png\");\n \t\taddImage(ImageEnum.CINNATOAST, \"images/parts/cinnatoast.png\");\n\t\taddImage(ImageEnum.CORNFLAKE, \"images/parts/flake_corn.png\");\n \t\taddImage(ImageEnum.FLAKE_BRAN, \"images/parts/flake_bran.png\");\n \t\taddImage(ImageEnum.GOLDGRAHAM, \"images/parts/goldgraham.png\");\n \t\taddImage(ImageEnum.STRAWBERRY, \"images/parts/strawberry.png\");\n \t\t\n \t\taddImage(ImageEnum.PART_ROBOT_HAND, \"images/robots/part_robot_hand.png\");\n \t\taddImage(ImageEnum.KIT_ROBOT_HAND, \"images/robots/kit_robot_hand.png\");\n \t\taddImage(ImageEnum.ROBOT_ARM_1, \"images/robots/robot_arm_1.png\");\n \t\taddImage(ImageEnum.ROBOT_BASE, \"images/robots/robot_base.png\");\n \t\taddImage(ImageEnum.ROBOT_RAIL, \"images/robots/robot_rail.png\");\n \t\t\n \t\taddImage(ImageEnum.KIT, \"images/kit/empty_kit.png\");\n \t\taddImage(ImageEnum.KIT_TABLE, \"images/kit/kit_table.png\");\n \t\taddImage(ImageEnum.KITPORT, \"images/kit/kitport.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_IN, \"images/kit/kitport_hood_in.png\");\n \t\taddImage(ImageEnum.KITPORT_HOOD_OUT, \"images/kit/kitport_hood_out.png\");\n \t\taddImage(ImageEnum.PALLET, \"images/kit/pallet.png\");\n \t\t\n \t\taddImage(ImageEnum.FEEDER, \"images/lane/feeder.png\");\n \t\taddImage(ImageEnum.LANE, \"images/lane/lane.png\");\n \t\taddImage(ImageEnum.NEST, \"images/lane/nest.png\");\n \t\taddImage(ImageEnum.DIVERTER, \"images/lane/diverter.png\");\n \t\taddImage(ImageEnum.DIVERTER_ARM, \"images/lane/diverter_arm.png\");\n \t\taddImage(ImageEnum.PARTS_BOX, \"images/lane/partsbox.png\");\n \t\t\n \t\taddImage(ImageEnum.CAMERA_FLASH, \"images/misc/camera_flash.png\");\n \t\taddImage(ImageEnum.SHADOW1, \"images/misc/shadow1.png\");\n \t\taddImage(ImageEnum.SHADOW2, \"images/misc/shadow2.png\");\n \t\t\n \t\taddImage(ImageEnum.GANTRY_BASE, \"images/gantry/gantry_base.png\");\n \t\taddImage(ImageEnum.GANTRY_CRANE, \"images/gantry/gantry_crane.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_H, \"images/gantry/gantry_truss_h.png\");\n \t\taddImage(ImageEnum.GANTRY_TRUSS_V, \"images/gantry/gantry_truss_v.png\");\n \t\taddImage(ImageEnum.GANTRY_WHEEL, \"images/gantry/gantry_wheel.png\");\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\tSystem.exit(1);\n \t\t}\n \t\tSystem.out.println(\"Done\");\n \t}", "public static ImageIcon getEmptyCardIcon() {\n\t\treturn new ImageIcon(Card.class.getResource(Constants.IMAGES_FOLDER + \"/\" + \"empty_card.png\"));\n\t}", "public void flipCard() {\n if (jButton.getIcon() == null){//if the icon compares to null;\n switch (cardNumber) {//set the image of corresponding to the cardNumber\n case 1:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_1.jpg\"));\n break;\n case 2:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_2.jpg\"));\n break;\n case 3:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_3.jpg\"));\n break;\n case 4:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_4.jpg\"));\n break;\n case 5:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_5.jpg\"));\n break;\n case 6:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_6.jpg\"));\n break;\n case 7:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_7.jpg\"));\n break;\n case 8:\n jButton.setIcon(new ImageIcon(\"C:\\\\Users\\\\cokar\\\\OneDrive - ROC Drenthe College\\\\Drenthe College Van Schaikweg\\\\IT\\\\Java A3 Final\\\\src\\\\resources\\\\card_8.jpg\"));\n break;\n }\n } else {//if the JButton icon does not compare to null;\n jButton.setIcon(null);//set the text to null;\n }\n\n\n\n }", "public static void loadImages() {\n PonySprite.loadImages(imgKey, \"graphics/ponies/GrannySmith.png\");\n }", "private void createImageFiles() {\n\t\tswitchIconClosed = Icon.createImageIcon(\"/images/events/switchImageClosed.png\");\n\t\tswitchIconOpen = Icon.createImageIcon(\"/images/events/switchImageOpen.png\");\n\t\tswitchIconEmpty = Icon.createImageIcon(\"/images/events/switchImageEmpty.png\");\n\t\tswitchIconOff = Icon.createImageIcon(\"/images/events/switchImageOff.png\");\n\t\tswitchIconOn = Icon.createImageIcon(\"/images/events/switchImageOn.png\");\n\t\tleverIconClean = Icon.createImageIcon(\"/images/events/leverImageClean.png\");\n\t\tleverIconRusty = Icon.createImageIcon(\"/images/events/leverImageRusty.png\");\n\t\tleverIconOn = Icon.createImageIcon(\"/images/events/leverImageOn.png\");\n\t}", "public void findImages() {\n URL imgURL = ImageLoader.class.getResource(\"/BackgroundMenu.jpg\");\n this.backgroundImages.put(MenuP.TITLE, loadImage(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/backgroundGame.png\");\n this.backgroundImages.put(ArenaView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/gameOver.jpg\");\n this.backgroundImages.put(GameOverView.TITLE, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Player.png\");\n this.entityImages.put(ID.PLAYER, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Enemy1.png\");\n this.entityImages.put(ID.BASIC_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/boss.png\");\n this.entityImages.put(ID.BOSS_ENEMY, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/meteorBrown_big1.png\");\n this.entityImages.put(ID.METEOR, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/BlueBullet.png\");\n this.bulletImages.put(new Pair<>(ID.PLAYER_BULLET, ID.PLAYER), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/redBullet.png\");\n this.entityImages.put(ID.ENEMY_BULLET, loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_FireBoost.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Freeze.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL)); \n \n imgURL = ImageLoader.class.getResource(\"/powerup_Health.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.HEALTH), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/powerup_Shield.png\");\n this.powerUpImages.put(new Pair<>(ID.POWER_UP, PowerUpT.SHIELD), loadImage(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/bulletSpeedUp.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FIRE_BOOST), loadEffect(imgURL));\n \n imgURL = ImageLoader.class.getResource(\"/Explosion.png\");\n this.AnimationsEffect.put(new Pair<>(ID.EFFECT, SpecialEffectT.EXPLOSION), loadEffect(imgURL));\n\n imgURL = ImageLoader.class.getResource(\"/freeze.png\");\n this.AnimationsPowerUp.put(new Pair<>(ID.POWER_UP, PowerUpT.FREEZE), loadImage(imgURL));\n }", "public ImageIcon FretImagePrompt() {\r\n\t\t\tImageIcon promptImage = null;\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tImageIcon EfImage = new ImageIcon(\"E1f.jpg\");\r\n\t\t\tImageIcon EfsImage = new ImageIcon(\"E2f#.jpg\");\r\n\t\t\tImageIcon EgImage = new ImageIcon(\"E3g.jpg\");\r\n\t\t\tImageIcon EgsImage = new ImageIcon(\"E4g#.jpg\");\r\n\t\t\tImageIcon EaImage = new ImageIcon(\"E5a.jpg\");\r\n\t\t\tImageIcon EasImage = new ImageIcon(\"E6a#.jpg\");\r\n\t\t\tImageIcon EbImage = new ImageIcon(\"E7b.jpg\");\r\n\t\t\tImageIcon EcImage = new ImageIcon(\"E8c.jpg\");\r\n\t\t\tImageIcon EcsImage = new ImageIcon(\"E9c#.jpg\");\r\n\t\t\tImageIcon EdImage = new ImageIcon(\"E10d.jpg\");\r\n\t\t\tImageIcon EdsImage = new ImageIcon(\"E11d#.jpg\");\r\n\t\t\tImageIcon EeImage = new ImageIcon(\"E12e.jpg\");\r\n\t\t\t\r\n\t\t\tImageIcon AasImage = new ImageIcon(\"A1a#.jpg\");\r\n\t\t\tImageIcon AbImage = new ImageIcon(\"A2b.jpg\");\r\n\t\t\tImageIcon AcImage = new ImageIcon(\"A3c.jpg\");\r\n\t\t\tImageIcon AcsImage = new ImageIcon(\"A4c#.jpg\");\r\n\t\t\tImageIcon AdImage = new ImageIcon(\"A5d.jpg\");\r\n\t\t\tImageIcon AdsImage = new ImageIcon(\"A6d#.jpg\");\r\n\t\t\tImageIcon AeImage = new ImageIcon(\"A7e.jpg\");\r\n\t\t\tImageIcon AfImage = new ImageIcon(\"A8f.jpg\");\r\n\t\t\tImageIcon AfsImage = new ImageIcon(\"A9f#.jpg\");\r\n\t\t\tImageIcon AgImage = new ImageIcon(\"A10g.jpg\");\r\n\t\t\tImageIcon AgsImage = new ImageIcon(\"A11g#.jpg\");\r\n\t\t\tImageIcon AaImage = new ImageIcon(\"A12a#.jpg\");\r\n\t\t\t\r\n\t\t\tImageIcon DdsImage = new ImageIcon(\"D1d#.jpg\");\r\n\t\t\tImageIcon DeImage = new ImageIcon(\"D2e.jpg\");\r\n\t\t\tImageIcon DfImage = new ImageIcon(\"D3f.jpg\");\r\n\t\t\tImageIcon DfsImage = new ImageIcon(\"D4f#.jpg\");\r\n\t\t\tImageIcon DgImage = new ImageIcon(\"D5g.jpg\");\r\n\t\t\tImageIcon DgsImage = new ImageIcon(\"D6g#.jpg\");\r\n\t\t\tImageIcon DaImage = new ImageIcon(\"D7a.jpg\");\r\n\t\t\tImageIcon DasImage = new ImageIcon(\"D8a#.jpg\");\r\n\t\t\tImageIcon DbImage = new ImageIcon(\"D9b.jpg\");\r\n\t\t\tImageIcon DcImage = new ImageIcon(\"D10c.jpg\");\r\n\t\t\tImageIcon DcsImage = new ImageIcon(\"D11c#.jpg\");\r\n\t\t\tImageIcon DdImage = new ImageIcon(\"D12d.jpg\");\r\n\t\t\t\r\n\t\t\tImageIcon GgsImage = new ImageIcon(\"G1g#.jpg\");\r\n\t\t\tImageIcon GaImage = new ImageIcon(\"G2a.jpg\");\r\n\t\t\tImageIcon GasImage = new ImageIcon(\"G3a#.jpg\");\r\n\t\t\tImageIcon GbImage = new ImageIcon(\"G4b.jpg\");\r\n\t\t\tImageIcon GcImage = new ImageIcon(\"G5c.jpg\");\r\n\t\t\tImageIcon GcsImage = new ImageIcon(\"G6c#.jpg\");\r\n\t\t\tImageIcon GdImage = new ImageIcon(\"G7d.jpg\");\r\n\t\t\tImageIcon GdsImage = new ImageIcon(\"G8d#.jpg\");\r\n\t\t\tImageIcon GeImage = new ImageIcon(\"G9e.jpg\");\r\n\t\t\tImageIcon GfImage = new ImageIcon(\"G10f.jpg\");\r\n\t\t\tImageIcon GfsImage = new ImageIcon(\"G11f#.jpg\");\r\n\t\t\tImageIcon GgImage = new ImageIcon(\"G12g.jpg\");\r\n\t\t\t\r\n\t\t\tImageIcon BcImage = new ImageIcon(\"B1c.jpg\");\r\n\t\t\tImageIcon BcsImage = new ImageIcon(\"B2c#.jpg\");\r\n\t\t\tImageIcon BdImage = new ImageIcon(\"B3d.jpg\");\r\n\t\t\tImageIcon BdsImage = new ImageIcon(\"B4d#.jpg\");\r\n\t\t\tImageIcon BeImage = new ImageIcon(\"B5e.jpg\");\r\n\t\t\tImageIcon BfImage = new ImageIcon(\"B6f.jpg\");\r\n\t\t\tImageIcon BfsImage = new ImageIcon(\"B7f#.jpg\");\r\n\t\t\tImageIcon BgImage = new ImageIcon(\"B8g.jpg\");\r\n\t\t\tImageIcon BgsImage = new ImageIcon(\"B9g#.jpg\");\r\n\t\t\tImageIcon BaImage = new ImageIcon(\"B10a.jpg\");\r\n\t\t\tImageIcon BasImage = new ImageIcon(\"B11a#.jpg\");\r\n\t\t\tImageIcon BbImage = new ImageIcon(\"B12b.jpg\");\r\n\t\t\t\r\n\t\t\t//I is used to mean High E (as in High E string)\r\n\t\t\tImageIcon IfImage = new ImageIcon(\"HighE1f.jpg\");\r\n\t\t\tImageIcon IfsImage = new ImageIcon(\"HighE2f#.jpg\");\r\n\t\t\tImageIcon IgImage = new ImageIcon(\"HighE3g.jpg\");\r\n\t\t\tImageIcon IgsImage = new ImageIcon(\"HighE4g#.jpg\");\r\n\t\t\tImageIcon IaImage = new ImageIcon(\"HighE5a.jpg\");\r\n\t\t\tImageIcon IasImage = new ImageIcon(\"HighE6a#.jpg\");\r\n\t\t\tImageIcon IbImage = new ImageIcon(\"HighE7b.jpg\");\r\n\t\t\tImageIcon IcImage = new ImageIcon(\"HighE8c.jpg\");\r\n\t\t\tImageIcon IcsImage = new ImageIcon(\"HighE9c#.jpg\");\r\n\t\t\tImageIcon IdImage = new ImageIcon(\"HighE10d.jpg\");\r\n\t\t\tImageIcon IdsImage = new ImageIcon(\"HighE11d#.jpg\");\r\n\t\t\tImageIcon IeImage = new ImageIcon(\"HighE12e.jpg\");\r\n\t\t\t\r\n\t\t\tImageIcon[] note = {EfImage, EfsImage, EgImage, EgsImage, EaImage, EasImage, EbImage, EcImage, EcsImage, EdImage, EdsImage, EeImage,\r\n\t\t\t\t\t\t\t AasImage, AbImage, AcImage, AcsImage, AdImage, AdsImage, AeImage, AfImage, AfsImage, AgImage, AgsImage, AaImage,\r\n\t\t\t\t\t\t\t DdsImage, DeImage, DfImage, DfsImage, DgImage, DgsImage, DaImage, DasImage, DbImage, DcImage, DcsImage, DdImage,\r\n\t\t\t\t\t\t\t GgsImage, GaImage, GasImage, GbImage, GcImage, GcsImage, GdImage, GdsImage, GeImage, GfImage, GfsImage, GgImage,\r\n\t\t\t\t\t\t\t BcImage, BcsImage, BdImage, BdsImage, BeImage, BfImage, BfsImage, BgImage, BgsImage, BaImage, BasImage, BbImage,\r\n\t\t\t\t\t\t\t IfImage, IfsImage, IgImage, IgsImage, IaImage, IasImage, IbImage, IcImage, IcsImage, IdImage, IdsImage, IeImage};\r\n\t\t\t\r\n\t\t\tint noteIndex = rand.nextInt(note.length);\r\n\t\t\tpromptImage = note[noteIndex];\r\n\t\t\t\r\n\t\t\treturn promptImage;\r\n\t\t\t\r\n\t\t}", "private Images() {\n \n imgView = new ImageIcon(this,\"images/View\");\n\n imgUndo = new ImageIcon(this,\"images/Undo\");\n imgRedo = new ImageIcon(this,\"images/Redo\");\n \n imgCut = new ImageIcon(this,\"images/Cut\");\n imgCopy = new ImageIcon(this,\"images/Copy\");\n imgPaste = new ImageIcon(this,\"images/Paste\");\n \n imgAdd = new ImageIcon(this,\"images/Add\");\n \n imgNew = new ImageIcon(this,\"images/New\");\n imgDel = new ImageIcon(this,\"images/Delete\");\n \n imgShare = new ImageIcon(this,\"images/Share\");\n }", "private void loadImageButtonAction(int buttonPressed)\r\n {\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n FileChooser fileChoose = new FileChooser();\r\n fileChoose.getExtensionFilters().addAll(\r\n //new FileChooser.ExtensionFilter(\"All Images\", \"*.*\"),\r\n new FileChooser.ExtensionFilter(\"JPG\", \"*.jpg\"),\r\n new FileChooser.ExtensionFilter(\"GIF\", \"*.gif\"),\r\n //new FileChooser.ExtensionFilter(\"BMP\", \"*.bmp\"),\r\n new FileChooser.ExtensionFilter(\"PNG\", \"*.png\")\r\n );\r\n //attempt to get saved folder location from prefrences\r\n File lastFolderSelected = PrefrencesHandler.getFolderPath();\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"Saved file path retrieved: {0}\", lastFolderSelected);\r\n\r\n if (lastFolderSelected != null && lastFolderSelected.exists())\r\n {\r\n final File initialDir = new File(lastFolderSelected.getPath());\r\n fileChoose.setInitialDirectory(initialDir);\r\n }\r\n\r\n fileChoose.setTitle(FOLDER_CHOOSER_TITLE);\r\n\r\n //open Dialog\r\n File coinImageFile = fileChoose.showOpenDialog(currentStage);\r\n\r\n if (coinImageFile != null)\r\n {\r\n handleImageLoading(coinImageFile, buttonPressed);\r\n }\r\n }", "private void setIcon(){\r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"images.png\")));\r\n }", "private void loadImages(BufferedImage[] images, String direction) {\n for (int i = 0; i < images.length; i++) {\n String fileName = direction + (i + 1);\n images[i] = GameManager.getResources().getMonsterImages().get(\n fileName);\n }\n\n }", "private void loadImage(String icon, String itemTypeLabel)\n {\n String url = MainActivity.IMAGE_URL + icon + \".png\";\n\n //we will replace this imageview with the correct one during switch\n ImageView ivCurrent = null;\n\n switch (itemTypeLabel)\n {\n case \"head\":\n ivCurrent = ivHead;\n break;\n case \"torso\":\n ivCurrent = ivChest;\n break;\n case \"feet\":\n ivCurrent = ivBoots;\n break;\n case \"hands\":\n ivCurrent = ivGloves;\n break;\n case \"shoulders\":\n ivCurrent = ivShoulders;\n break;\n case \"legs\":\n ivCurrent = ivLegs;\n break;\n case \"bracers\":\n ivCurrent = ivBracers;\n break;\n case \"mainHand\":\n ivCurrent = ivWeaponL;\n break;\n case \"offHand\":\n ivCurrent = ivWeaponR;\n break;\n case \"waist\":\n ivCurrent = ivBelt;\n break;\n case \"rightFinger\":\n ivCurrent = ivRingR;\n break;\n case \"leftFinger\":\n ivCurrent = ivRingL;\n break;\n case \"neck\":\n ivCurrent = ivAmulet;\n break;\n default:\n Toast.makeText(CharacterSheetActivity.this, \"Failed to find item type \" + itemTypeLabel, Toast.LENGTH_SHORT).show();\n }\n\n //load the images using their respective image URLs\n Picasso.with(CharacterSheetActivity.this).load(url).into(ivCurrent);\n }", "private void helperDisplayInputImage()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//---- Get currently selected file index in the combo box\r\n\t\t\tint index = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t//---- Check the index if the action is invoked by image deletion then causes error\r\n\t\t\tint imageCount = DataController.getTable().getTableSize();\r\n\r\n\t\t\tif (index >= 0 && index < imageCount)\r\n\t\t\t{\r\n\t\t\t\t//---- Get file path of the table\r\n\r\n\t\t\t\tString filePath = DataController.getTable().getElement(index).getDataFile().getFilePath();\r\n\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().displayPolygonStop();\r\n\t\t\t\tmainFormLink.getComponentPanelCenter().getComponentPanelImageView().loadImage(filePath);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public void loadCard(String cid) {\n\t\tmDisplayedCard = BitmapFactory.decodeResource(this.getResources(), R.drawable.card_base);\r\n\t\t\r\n\t}", "public static void clearImages()\n\t{\n\t\tfor(int i=0;i<4;i++)\n\t\t{\n\t\t\tif(i<2)\n\t\t\t{\n\t\t\t\tdealerCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(\"/cards/purple_back.png\")));\n\t\t\t\tuserCardImg[i].setIcon(new ImageIcon(Gameplay.class.getResource(\"/cards/purple_back.png\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdealerCardImg[i].setIcon(null);\n\t\t\t\tuserCardImg[i].setIcon(null);\n\t\t\t}\n\t\t}\n\t}", "public void picLoader() {\n if (num==0){\n image.setImageResource(R.drawable.mario);\n }\n if(num==1){\n image.setImageResource(R.drawable.luigi);\n }\n if(num==2){\n image.setImageResource(R.drawable.peach);\n }\n if(num==3){\n image.setImageResource(R.drawable.rosalina);\n }\n }", "public void defaultImageDisplay(){\n ClassLoader cl = this.getClass().getClassLoader();\n ImageIcon icon = new ImageIcon(cl.getResource(\"pictures/NewInventory/defaultPic.png\"));\n // this.finalImage = icon.getImage();\n Image img = icon.getImage().getScaledInstance(entryImage.getWidth(), entryImage.getHeight(), Image.SCALE_SMOOTH);\n entryImage.setIcon(new ImageIcon(img));\n }", "public static void initImages(Activity activity) {\n\n\t\t// if it's already initialized, then ignore\n \tif (cardImage1 != null) return;\n\t\t\n\t\tint stockBackImage = R.drawable.cardback;\n\t\tint player2BackImage = R.drawable.cardback;\n\t\t\n\t\tcardImage1 = BitmapFactory.decodeResource(activity.getResources(),stockBackImage);\n\t\tcardImage2 = BitmapFactory.decodeResource(activity.getResources(),player2BackImage);\n\t}", "static BufferedImage getImage(String directory) {\n\t\tClassLoader loader = DrawingUtility.class.getClassLoader();\n\t\tBufferedImage image;\n\t\ttry {\n\n\t\t\timage = ImageIO.read(loader.getResource(directory));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"Fail load image from \" + directory);\n\t\t\timage = null;\n\t\t}\n\t\treturn image;\n\n\t}", "private static void loadIcons(Context context)\n\t{\n\t\tResources res = context.getResources();\n\t\tSONG_ICON = BitmapFactory.decodeResource(res, R.drawable.ic_tab_songs_selected);\n\t\tALBUM_ICON = BitmapFactory.decodeResource(res, R.drawable.ic_tab_albums_selected);\n\t\tARTIST_ICON = BitmapFactory.decodeResource(res, R.drawable.ic_tab_artists_selected);\n\t}", "public static Card dohvatiPozadinu(){\r\n\t\tFile dir = new File(\"images\");\r\n\t\tFile[] lista = dir.listFiles();\r\n\t\tCard kartaPozadine = null;\r\n\t\tfor (File file : lista){\r\n\t\t\tif (file.isFile()){\r\n\t\t\t\tif (file.toString().contains(\"pozadina_0.gif\")){\r\n\t\t\t\t\tString[] niz = file.getName().toString().split(\"\\\\.\");\r\n\t\t\t\t\tkartaPozadine =new Card(new ImageIcon(file.toString()),0);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn kartaPozadine;\r\n\t}", "private void initResources()\n {\n try\n {\n searchBackgroundImage = ImageIO.read(new File(IMAGES_DIR + \"logo.jpg\"));\n searchIcon = ImageIO.read(new File(IMAGES_DIR + \"search_icon.png\"));\n miniMenuAddImage = ImageIO.read(new File(IMAGES_DIR + \"addSmallIcon.png\"));\n miniMenuRemoveImage = ImageIO.read(new File(IMAGES_DIR + \"removeSmallIcon.png\"));\n updateMiniImage = ImageIO.read(new File(IMAGES_DIR + \"up.png\"));\n playButtonImage = ImageIO.read(new File(IMAGES_DIR + \"play_arrow.png\"));\n stopButtonImage = ImageIO.read(new File(IMAGES_DIR + \"stop_square.png\"));\n openFileImage = ImageIO.read(new File(IMAGES_DIR + \"open_icon.png\"));\n newFileImage = ImageIO.read(new File(IMAGES_DIR + \"new_file.png\"));\n settingsImage = ImageIO.read(new File(IMAGES_DIR + \"settings.png\"));\n spiderImage = ImageIO.read(new File(IMAGES_DIR + \"spider_icon.png\"));\n searchIconDark = ImageIO.read(new File(IMAGES_DIR + \"search_icon_dark.png\"));\n webIconImage = ImageIO.read(new File(IMAGES_DIR + \"web_icon.png\"));\n clipboardImage = ImageIO.read(new File(IMAGES_DIR + \"clipboard.png\"));\n colorIconImage = ImageIO.read(new File(IMAGES_DIR + \"color_icon.png\"));\n transitionSpinnerImage = IMAGES_DIR + \"loading.gif\";\n processingImage = IMAGES_DIR + \"processing.gif\";\n processingMiniImage = IMAGES_DIR + \"spinner.gif\";\n }\n \n catch(IOException e)\n {\n JOptionPane.showMessageDialog(null, \"[Error] Failed to load resource(s)\");\n }\n }", "public void initIcons(){\n\t \troot_iconsFileNames = new ArrayList<String>();\n\t root_iconsBitmaps = new ArrayList<Bitmap>(); \n \t\ttry{\n \t\t\tResources res = this.getResources();\n \t\t\tInputStream iconInputStream = res.openRawResource(R.raw.icons);\n \t\t\tZipInputStream zipStream = new ZipInputStream(iconInputStream);\n \t\t ZipEntry entry;\n\n \t\t while ((entry = zipStream.getNextEntry()) != null) {\n \t\t \t//file name may start with MACOSX. This is strange, ignore it.\n \t\t \tString fileName = entry.getName();\n \t\t \tif(fileName.length() > 1){\n\t \t\t \tif(fileName.contains(\".png\") && !entry.isDirectory()){\n\t \t\t \t\tif(!fileName.contains(\"MACOSX\")){ //OSX adds junk sometimes, ignore it\n\t \t\t \t\t\tfileName = fileName.replace(\"icons/\",\"\");\n\t \t\t \t\t\tBitmap iconBitmap = BitmapFactory.decodeStream(zipStream); \n\t \t\t \t\t\troot_iconsFileNames.add(fileName);\n\t \t\t \t\t\troot_iconsBitmaps.add(iconBitmap);\n\t \t\t \t\t\t//Log.i(\"ZZ\", \"loading bitmaps: \" + fileName); \n\t \t\t \t\t}\n\t \t\t \t} //macosx\n\t \t\t } // fileName\n \t\t }//end while\n \t\t \n \t\t //clean up\n \t\t if(zipStream != null){\n \t\t \tzipStream.close();\n \t\t }\n \t\t \n \t\t}catch(Exception ex){\n \t\t\t Log.i(\"ZZ\", \"getZippedIcon: \" + ex.toString()); \n \t\t}\t \n\t }", "public void generateCardImage() {\r\n\t\tString i1 = \"lib/card/\" + cardSuit + \"/\" + cardSuit + \" \"\r\n\t\t\t\t+ cardValue + \".PNG\";\r\n\t\tString i2 = \"lib/card/back2.PNG\";\r\n\t\t\r\n\t\tFile f1 = new File(i1);\r\n\t\tFile f2 = new File(i2);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcardImage = ImageIO.read(f1);\r\n\t\t\tcardBack = ImageIO.read(f2);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(cardValue);\r\n\t\t\tSystem.out.println(cardSuit);\r\n\t\t}\r\n\t}", "private void setIcons(){\n\t\tfinal List<BufferedImage> icons = new ArrayList<BufferedImage>();\n\t\ttry {\n\t\t\ticons.add(ImageLoader.getBufferedImage(SMALL_ICON_PATH));\n\t\t\ticons.add(ImageLoader.getBufferedImage(BIG_ICON_PATH));\n\t\t} catch (IOException e) {\n\t\t\tmanager.handleException(e);\n\t\t}\n\t\tif(icons.size() > 0)\n\t\t\tsetIconImages(icons);\n\t}", "private void importImages() {\n\n\t\t// Create array of the images. Each image pixel map contains\n\t\t// multiple images of the animate at different time steps\n\n\t\t// Eclipse will look for <path/to/project>/bin/<relative path specified>\n\t\tString img_file_base = \"Game_Sprites/\";\n\t\tString ext = \".png\";\n\n\t\t// Load background\n\t\tbackground = createImage(img_file_base + \"Underwater\" + ext);\n\t}", "private void loadImages() {\n\t\ttry {\n\t\t\timage = ImageIO.read(Pillar.class.getResource(\"/Items/Pillar.png\"));\n\t\t\tscaledImage = image;\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Failed to read Pillar image file: \" + e.getMessage());\n\t\t}\n\t}", "public void displayStarters()\n\t{\n\t\tfor (int i=0;i<5;i++)\n\t\t{\n\t\t// Allow the images the .jar file to always access the image files\n\t\t\ttry\n\t\t\t{\n\t\t\t\tImage myImage = ImageIO.read(getClass().getResourceAsStream(\"0.jpg\"));\n\t\t\t\ticon = new ImageIcon(myImage); //display back of card\n\t\t\t} \n\t\t\tcatch (IOException e1){}\n\t\t\tunderneathDisplay[i] = new JPanel();\n\t\t\tunderneathDisplay[i].setBackground(tableGreen);\n\t\t\tdisplay[i] = new JLabel(); //use array instead to know which one was selected\n\t\t\tdisplay[i].setIcon(icon); //sets the correct icon to display\n\t\t\tunderneathDisplay[i].add(display[i]); //panel for the JLabels\n\t\t\tcardPanel.add(underneathDisplay[i]); //panel that holds all of the cards\n\t\t}\n\t}", "private void loadAndSetIcon()\n\t{\t\t\n\t\ttry\n\t\t{\n\t\t\twindowIcon = ImageIO.read (getClass().getResource (\"calculator.png\"));\n\t\t\tsetIconImage(windowIcon);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\t\t\n\t}", "public void openDialog() {\r\n\t\tString filename = this.getFileName();\r\n\t\tif (filename.equals(null) || filename.equals(\"\") ) {\r\n\t\t\ttext.append(\"\\nPlease select valid image\");\r\n\t\t\topenDialog();\r\n\t\t}\r\n\t\tdisplay_img = this.loadImage(filename);\r\n\r\n\t}", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado7.jpg\"));\n }\n if(oportunidades==1){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado6.jpg\"));\n }\n if(oportunidades==2){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado5.jpg\"));\n }\n if(oportunidades==3){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado4.jpg\"));\n }\n if(oportunidades==4){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado3.jpg\"));\n }\n if(oportunidades==5){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado2.jpg\"));\n }\n if(oportunidades==6){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado1.jpg\"));\n }\n if(oportunidades==7){\n respuesta=new ImageIcon(getClass().getResource(\"Ahorcado0.jpg\"));\n }\n this.imgAhorcado=respuesta; \n }", "private void showImageChooser() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Profile Image\"), CHOOSE_IMAGE);\n }", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "public void getPictures(){\n\t\t\ttry{\n\t\t\t\timg = ImageIO.read(new File(\"background.jpg\"));\n\t\t\t\ttank = ImageIO.read(new File(\"Tank.png\"));\n\t\t\t\tbackground2 = ImageIO.read(new File(\"background2.png\"));\n\t\t\t\t\n\t\t\t\trtank = ImageIO.read(new File(\"RTank.png\"));\n\t\t\t\tboom = ImageIO.read(new File(\"Boom.png\"));\n\t\t\t\tboom2 = ImageIO.read(new File(\"Boom2.png\"));\n\t\t\t\tinstructions = ImageIO.read(new File(\"Instructions.png\"));\n\t\t\t\tshotman = ImageIO.read(new File(\"ShotMan.png\"));\n\t\t\t\tlshotman = ImageIO.read(newFile(\"LShotMan.png\"));\n\t\t\t\tboomshotman = ImageIO.read(new File(\"AfterShotMan\"));\n\t\t\t\tlboomshotman = ImageIO.read(new File(\"LAfterShotMan\"));\n\t\t\t\t\n\t\t\t}catch(IOException e){\n\t\t\t\tSystem.err.println(\"d\");\n\t\t\t}\n\t\t}", "abstract public void setImageResourcesDir(String path);", "public static ImageIcon[] getCardImage(){\n\t\treturn cardImage;\n\t}", "public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }", "public static List<InputStream> getAllImages(){\n\t\treturn IOHandler.getResourcesIn(IMAGES_DIR);\n\t}", "private void reloadIconBaseDirs() {\n\t\t\n\t\t// Load dirs from XDG_DATA_DIRS\n\t\tString xdg_dir_env = System.getenv(\"XDG_DATA_DIRS\");\n\t\tif(xdg_dir_env != null && !xdg_dir_env.isEmpty()) {\n\t\t\tString[] xdg_dirs = xdg_dir_env.split(\":\");\n\t\t\tfor(String xdg_dir : xdg_dirs) {\n\t\t\t\taddDirToList(new File(xdg_dir, \"icons\"), iconBaseDirs);\n\t\t\t\taddDirToList(new File(xdg_dir, \"pixmaps\"), iconBaseDirs);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Load user's icon dir\n\t\taddDirToList(new File(System.getProperty(\"user.home\"), \".icons\"), iconBaseDirs);\n\t\taddDirToList(new File(System.getProperty(\"user.home\"), \".local/share/icons\"), iconBaseDirs);\n\t\t\n\t}", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "private void drawCard(String path, Card card, Graphics g, int x, int y) throws IOException{\n\t\t ImageIcon img;\n\t\t\t img = new ImageIcon(ImageIO.read(new File(path+card.toString()+\".png\")));\n\t\t\t Image card1 = img.getImage();\n\t\t\t Image card1New = card1.getScaledInstance(45, 65, java.awt.Image.SCALE_SMOOTH);\n\t\t\t ImageIcon card1Icon = new ImageIcon(card1New);\n\t\t\t card1Icon.paintIcon(this, g, x, y);\n\t }", "private void iconImage() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"icon.jpg\")));\n }", "public void loadImage() {\r\n // creates a new image icon with the characters array and the count as a file path\r\n ImageIcon ii = new ImageIcon(game.characters[count]);\r\n // load the image\r\n image = ii.getImage(); \r\n \r\n // sets width\r\n w = image.getWidth(null);\r\n // sets height\r\n h = image.getHeight(null);\r\n }", "public void lightIcons() {\n teamPhoto.setImage((new Image(\"/Resources/Images/emptyTeamLogo.png\")));\n copyIcon.setImage((new Image(\"/Resources/Images/black/copy_black.png\")));\n helpPaneIcon.setImage((new Image(\"/Resources/Images/black/help_black.png\")));\n if (user.getUser().getProfilePhoto() == null) {\n accountPhoto.setImage((new Image(\"/Resources/Images/black/big_profile_black.png\")));\n }\n }", "abstract public String getImageResourcesDir();", "private void addImgList() {\n\t\tdogImg.add(\"./data/img/labrador.jpg\");\t\t\t\t\n\t\tdogImg.add(\"./data/img/germanshepherd.jpg\");\t\n\t\tdogImg.add(\"./data/img/bulldog.jpg\");\t\t\t\t\t\t\t\t\n\t\tdogImg.add(\"./data/img/rottweiler.jpg\");\n\t\tdogImg.add(\"./data/img/husky.jpg\");\n\n\t}", "private void loadImages() {\n\t\t\n\t\tImageView playerImage1;\n\t\tImageView playerImage2;\n Bitmap selectedPicture;\n \n\t\tplayerImage1 = (ImageView)findViewById(R.id.player_image_1);\n\t\tplayerImage2 = (ImageView)findViewById(R.id.player_image_2);\n\t\t\n\t\tif (playerUri1 != null) {\n\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri1);\n\t playerImage1.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish();\n\t }\n\t\t} else {\n\t\t\tplayerImage1.setImageResource(R.drawable.red);\n\t\t}\n \n\t\tif (playerUri2 != null) {\t \n\t try {\n\t selectedPicture = MediaStore.Images.Media.getBitmap(\n\tthis.getContentResolver(),playerUri2);\n\t playerImage2.setImageBitmap(selectedPicture);\n\t } catch (Exception e) {\n\t \tLog.e(DISPLAY_SERVICE, \"Pic not displaying\");\n\t \tfinish(); \n\t }\n\t\t} else {\n\t\t\tplayerImage2.setImageResource(R.drawable.green);\n\t\t}\n\t}", "public void initialiseAvatars() {\n\n\t\timage1 = null;\n\t\timage2 = null;\n\t\timage3 = null;\n\t\timage4 = null;\n\t\timage5 = null;\n\t\timage6 = null;\n\n\t\ttry {\n\t\t\timage1 = new Image(new FileInputStream(\"avatars/avatar1.png\"));\n\t\t\timage2 = new Image(new FileInputStream(\"avatars/avatar2.png\"));\n\t\t\timage3 = new Image(new FileInputStream(\"avatars/avatar3.png\"));\n\t\t\timage4 = new Image(new FileInputStream(\"avatars/avatar4.png\"));\n\t\t\timage5 = new Image(new FileInputStream(\"avatars/avatar5.png\"));\n\t\t\timage6 = new Image(new FileInputStream(\"avatars/avatar6.png\"));\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tav1.setImage(image1);\n\t\tav2.setImage(image2);\n\t\tav3.setImage(image3);\n\t\tav4.setImage(image4);\n\t\tav5.setImage(image5);\n\t\tav6.setImage(image6);\n\n\t}", "void fillProblemsImages() {\n problemsImages = new ArrayList();\n problemsImages.add(R.drawable.fever_face);\n problemsImages.add(R.drawable.headache);\n problemsImages.add(R.drawable.cold);\n problemsImages.add(R.drawable.vomiting);\n problemsImages.add(R.drawable.constipation);\n problemsImages.add(R.drawable.blood_presure);\n problemsImages.add(R.drawable.daily_health_care);\n }", "void selectImage(String path);", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "public ImageIcon ImagePrompt(){\r\n\t\t\tImageIcon promptImage = null;\r\n\t\t\tRandom rand = new Random();\r\n\t\t\tImageIcon aImage = new ImageIcon(\"aFinal.png\");\r\n\t\t\tImageIcon bImage = new ImageIcon(\"bFinal.png\");\r\n\t\t\tImageIcon cImage = new ImageIcon(\"cFinal.png\");\r\n\t\t\tImageIcon dImage = new ImageIcon(\"dFinal.png\");\r\n\t\t\tImageIcon eImage = new ImageIcon(\"eFinal.png\");\r\n\t\t\tImageIcon fImage = new ImageIcon(\"fFinal.png\");\r\n\t\t\tImageIcon gImage = new ImageIcon(\"gFinal.png\");\r\n\t\t\tImageIcon e1Image = new ImageIcon(\"eFinal1.png\");\r\n\t\t\tImageIcon f1Image = new ImageIcon(\"fFinal1.png\");\r\n\t\t\t\r\n\t\t\tImageIcon[] note ={aImage, bImage, cImage, dImage, eImage, fImage, gImage, e1Image, f1Image};\r\n\t\t\t\r\n\t\t\tint noteIndex = rand.nextInt(note.length);\r\n\t\t\tpromptImage = note[noteIndex];\r\n\t\t\t\r\n\t\t\treturn promptImage;\r\n\t\t\t\r\n\t\t}", "public void initializeCards(){\n\n File dir = new File(\"Cards\");\n if(!dir.exists()){\n boolean success = dir.mkdir();\n System.out.println(\"Cards directory created!\");\n }\n if(dir.list() != null){\n for(String strng : dir.list()){\n cards.add(new BsbCard(strng));\n }\n }\n }", "public void setStartingImages() {\n\t\t\n\t}", "private void getImage() {\n\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //intent.setType(\"text/xls\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n try {\n startActivityForResult(\n Intent.createChooser(intent, \"Complete action using\"),\n MY_INTENT_CLICK);\n }catch (Exception e) {\n e.getMessage();\n }\n }", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void initSpriteSheet() {\n\t\tString url = \"https://amiealbrecht.files.wordpress.com/2016/08/set-cards.jpg?w=1250\";\n\n\t\tcimg = loadImage(url, \"png\");\n\t}", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "private void createCircleImages(){\n offScreenCircles = new Image[8];\n try {\n offScreenCircles[0] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleDown.png\"));\n offScreenCircles[1] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftDown.png\"));\n offScreenCircles[2] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeft.png\"));\n offScreenCircles[3] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleLeftUp.png\"));\n offScreenCircles[4] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleUp.png\"));\n offScreenCircles[5] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightUp.png\"));\n offScreenCircles[6] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRight.png\"));\n offScreenCircles[7] = ImageIO.read(new File(\"assets/img/ingame/offScreenCircles/circleRightDown.png\"));\n } catch (IOException ex) {\n System.out.println(\"Bild konnte nicht geladen werden!\");\n }\n activeOffScreenCircle = offScreenCircles[0];\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "public String getDefaultImgSrc(){return \"/students/footballstudentdefault.png\";}", "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "private void initIcons() {\n \n \n addIcon(lblFondoRest, \"src/main/java/resource/fondo.png\");\n addIcon(lblCheckRest, \"src/main/java/resource/check.png\");\n \n }", "public static void loadImages(){\n\t\tsetPath(main.getShop().inventory.getEquipID());\n\t\ttry {\n\t\t\tbackground = ImageIO.read(new File(\"res/world/bg.png\"));\n\t\t\tterrain = ImageIO.read(new File(\"res/world/solids.png\"));\n\t\t\t// Character and Armour\n\t\t\tcharacters = ImageIO.read(new File(\"res/world/char3.png\"));\n\t\t\tcharactersHead =ImageIO.read(new File(\"res/world/charhead\"+path[0]+\".png\"));\n\t\t\tcharactersTop = ImageIO.read(new File(\"res/world/chartop\"+path[2]+\".png\"));\n\t\t\tcharactersShoulder = ImageIO.read(new File(\"res/world/charshoulders\"+path[3]+\".png\"));\n\t\t\tcharactersHand = ImageIO.read(new File(\"res/world/charhands\"+path[5]+\".png\"));\n\t\t\tcharactersBottom = ImageIO.read(new File(\"res/world/charbottom\"+path[8]+\".png\"));\n\t\t\tcharactersShoes = ImageIO.read(new File(\"res/world/charshoes\"+path[9]+\".png\"));\n\t\t\tcharactersBelt = ImageIO.read(new File(\"res/world/charBelt\"+path[4]+\".png\"));\n\n\t\t\tweaponBow = ImageIO.read(new File(\"res/world/bow.png\"));\n\t\t\tweaponArrow = ImageIO.read(new File(\"res/world/arrow.png\"));\n\t\t\tweaponSword = ImageIO.read(new File(\"res/world/sword.png\"));\n\t\t\titems = ImageIO.read(new File(\"res/world/items.png\"));\n\t\t\tnpc = ImageIO.read(new File(\"res/world/npc.png\"));\n\t\t\thealth = ImageIO.read(new File(\"res/world/health.png\"));\n\t\t\tenemies = ImageIO.read(new File(\"res/world/enemies.png\"));\n\t\t\tcoin = ImageIO.read(new File(\"res/world/coin.png\"));\n\t\t\tmana = ImageIO.read(new File(\"res/world/mana.gif\"));\n\t\t\tarrowP = ImageIO.read(new File(\"res/world/arrowP.png\"));\n\t\t\tbutton = ImageIO.read(new File(\"res/world/button.png\"));\n\t\t\tblood = ImageIO.read(new File(\"res/world/blood.png\"));\n\t\t\tarrowDisp = ImageIO.read(new File(\"res/world/arrowDisp.png\"));\n\t\t\tboss1 = ImageIO.read(new File(\"res/world/boss1.png\"));\n\t\t\tmagic = ImageIO.read(new File(\"res/world/magic.png\"));\n\t\t\tmainMenu = ImageIO.read(new File(\"res/world/MainMenu.png\"));\n\t\t\tinstructions = ImageIO.read(new File(\"res/world/instructions.png\"));\n\t\t\trespawn = ImageIO.read(new File(\"res/world/respawn.png\"));\n\t\t\tinventory = ImageIO.read(new File(\"res/world/inventory.png\"));\n shop = ImageIO.read(new File(\"res/world/shop.png\"));\n dizzy = ImageIO.read(new File(\"res/world/dizzy.png\"));\n pet = ImageIO.read(new File(\"res/world/pet.png\"));\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error Loading Images\");\n\t\t}\n\t}", "private BufferedImage[] loadImages(String directory, BufferedImage[] img) throws Exception {\n\t\tFile dir = new File(directory);\n\t\tFile[] files = dir.listFiles();\n\t\tArrays.sort(files, (s, t) -> s.getName().compareTo(t.getName()));\n\t\t\n\t\timg = new BufferedImage[files.length];\n\t\tfor (int i = 0; i < files.length; i++) {\n\t\t\timg[i] = ImageIO.read(files[i]);\n\t\t}\n\t\treturn img;\n\t}", "private List<? extends Image> getIconImages(String imgunnamedjpg) {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "private void initTabImage() {\n firstImage.setImageResource(R.drawable.home);\n secondImage.setImageResource(R.drawable.profile);\n// thirdImage.setImageResource(R.drawable.addcontent);\n fourthImage.setImageResource(R.drawable.channels);\n fifthImage.setImageResource(R.drawable.search);\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser jfc=new JFileChooser(); \r\n\t\t jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES ); \r\n\t\t jfc.showDialog(new JLabel(), \"选择\"); \r\n\t\t File file=jfc.getSelectedFile();\r\n\t\t if(null==file){\r\n\t\t \treturn;\r\n\t\t }\r\n\t\t if(file.isDirectory()){\r\n\t\t System.out.println(\"文件夹:\"+file.getAbsolutePath()); \r\n\t\t }else if(file.isFile()){\r\n\t\t System.out.println(\"文件:\"+file.getAbsolutePath()); \r\n\t\t }\r\n\t\t if(Util.isImage(file)){\r\n\t\t \tImageIcon img = new ImageIcon(file.getAbsolutePath());\r\n\t\t\t\t\tlbImage.setIcon(img);\r\n\t\t\t\t\tMain.img = img.getImage();\r\n\t\t }else{\r\n\t\t \tJOptionPane.showMessageDialog(Main.this, \"请选择图片\");\r\n\t\t }\r\n\t\t\t}", "@Override // Override the start method in the Application class\n\tpublic void start(Stage primaryStage) {\n ArrayList<Integer> list = new ArrayList<>();\n //Get card generated from total of 52 cards\n for (int i = 1; i <= 52; i++){\n list.add(i);\n }\n //Add shuffle utility\n java.util.Collections.shuffle(list);\n //Create HBox for displaying the cards\n HBox pane = new HBox(5);\n //Create pane that is centered with 3 images presented\n pane.setAlignment(Pos.CENTER);\n pane.getChildren().add(new ImageView(\"card/\" + list.get(0) + \".png\"));\n pane.getChildren().add(new ImageView(\"card/\" + list.get(1) + \".png\"));\n pane.getChildren().add(new ImageView(\"card/\" + list.get(2) + \".png\"));\n //Create new scene to put the pane in\n Scene scene = new Scene(pane);\n primaryStage.setTitle(\"Exercise 14-3\");\n primaryStage.setScene(scene);\n primaryStage.show();\n }", "private void setIcon() {\n \n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"iconabc.png\")));\n }", "@Source(\"images/Default_user_icon.png\")\n @ImageOptions(flipRtl = true)\n ImageResource defaultUserAvatar();", "public void cargarimagen(){\n Intent intent= new Intent(Intent.ACTION_GET_CONTENT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(intent.createChooser(intent,\"Seleccione la imagen\"),69);\n }", "private void changeDirectory()\n {\n directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory\n\n if (directory != null) //if a valid directory was selected...\n {\n JFrame loading = new JFrame(\"Loading...\");\n Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);\n loading.setIconImage(icon);\n loading.setResizable(false);\n loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n loading.setSize(new Dimension(250,30));\n loading.setLocationRelativeTo(null);\n loading.setVisible(true);\n\n timeline.reset();\n timeline.setSlideDurationVisible(automated);\n timeline.setDefaultSlideDuration(slideInterval);\n\n m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents...\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Images\", spImages);\n \n m_AudioLibrary.resetAudio();\n m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Audio\", spAudio);\n\n loading.dispose();\n }\n }", "public void showImageChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"image/*\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "public void openFile()\n { \n JFileChooser chooser = new JFileChooser();\n chooser.setCurrentDirectory(new File(\".\"));\n \n chooser.setFileFilter(new\n javax.swing.filechooser.FileFilter()\n { \n public boolean accept(File f)\n { \n String name = f.getName().toLowerCase();\n return name.endsWith(\".gif\") || name.endsWith(\".jpg\") || name.endsWith(\".jpeg\")\n || f.isDirectory();\n }\n public String getDescription() { return \"Image files\"; }\n });\n\n int r = chooser.showOpenDialog(this);\n if(r != JFileChooser.APPROVE_OPTION) return;\n\n try\n {\n image = ImageIO.read(chooser.getSelectedFile());\n }\n catch (IOException e)\n {\n JOptionPane.showMessageDialog(this, e);\n }\n repaint();\n }", "private void handleImageLoading(File coinImageFile, int buttonPressed)\r\n {\r\n //save folder path to prefrences\r\n if (coinImageFile != null && coinImageFile.exists())\r\n {\r\n BufferedImage bufferedImage = FileHandleClass.getBufferedImageFromFile(coinImageFile);\r\n Image image = SwingFXUtils.toFXImage(bufferedImage, null);\r\n switch (buttonPressed)\r\n {\r\n case 1:\r\n {\r\n coinImageView1.setImage(image);\r\n bufferedImage1 = bufferedImage;\r\n removeCoinImageBtn1.setVisible(true);\r\n break;\r\n }\r\n case 2:\r\n {\r\n coinImageView2.setImage(image);\r\n bufferedImage2 = bufferedImage;\r\n removeCoinImageBtn2.setVisible(true);\r\n break;\r\n }\r\n default:\r\n {\r\n MyLogger.log(Level.SEVERE,LOG_CLASS_NAME+ \" Something went wrong in image loading, requested image was {0}\",buttonPressed);\r\n }\r\n }\r\n } else\r\n {\r\n showErrorMessage(ERROR_IMAGE_CANT_BE_LOADED_TITLE, ERROR_IMAGE_CANT_BE_LOADED_BODY);\r\n }\r\n\r\n }", "private void loadImages() {\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_alien_img)\n .into(game_IMAGE_p1);\n\n Glide\n .with(Activity_Game.this)\n .load(R.drawable.game_predator_img)\n .into(game_IMAGE_p2);\n }", "private void setICon() {\r\n \r\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"IconImage_1.png\")));\r\n }", "private String getConsoleIconPath(DesiredCapabilities cap) {\n String name = consoleIconName(cap);\n String path = \"org/openqa/grid/images/\";\n InputStream in =\n Thread.currentThread().getContextClassLoader()\n .getResourceAsStream(path + name + \".png\");\n if (in == null) {\n return null;\n }\n return \"/grid/resources/\" + path + name + \".png\";\n }", "private void onLoad() {\n\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent, RESULT_LOAD_ARTIST_IMAGE);\n }", "private void setIcon() {\n setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource(\"croissant.png\")));\n }" ]
[ "0.7295657", "0.6593426", "0.62699306", "0.6261478", "0.6183413", "0.60783195", "0.59495616", "0.5944569", "0.5923273", "0.5884669", "0.58257747", "0.578596", "0.5752771", "0.57385707", "0.5725863", "0.5718007", "0.5679597", "0.56509405", "0.5635986", "0.5618256", "0.5599619", "0.55993176", "0.55304235", "0.5527214", "0.5519529", "0.55139774", "0.55136263", "0.5508983", "0.54944515", "0.5494171", "0.54896206", "0.5472008", "0.5463211", "0.54597694", "0.5447898", "0.5446391", "0.5436796", "0.5424888", "0.5418652", "0.5413404", "0.54079425", "0.5407205", "0.5403681", "0.5398988", "0.53971684", "0.53960353", "0.5393497", "0.5375358", "0.5375014", "0.5365715", "0.53613037", "0.5334627", "0.5331161", "0.53278565", "0.532211", "0.5321199", "0.5319625", "0.52998465", "0.52993315", "0.52979016", "0.52945673", "0.5294365", "0.52895415", "0.52877635", "0.5287359", "0.5285671", "0.5282002", "0.52792436", "0.5276194", "0.52745354", "0.5273838", "0.5261621", "0.5258296", "0.52534837", "0.5241598", "0.5233015", "0.52286077", "0.52252823", "0.5222698", "0.52190816", "0.5217571", "0.5212127", "0.52075684", "0.520346", "0.51930237", "0.51826036", "0.5182313", "0.5171383", "0.5165434", "0.5150994", "0.5126452", "0.5124974", "0.5123285", "0.51201135", "0.511519", "0.51137173", "0.51132756", "0.5111496", "0.51029444", "0.5097883" ]
0.76824
0
/ In: A card object Out: An integer representing the row in iconCards that contains that value.
private static int valueAsInt(Card card) { String values = new String(Card.validCardValues); return values.indexOf(card.getValue()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public Icon getIcon(Card card)\n {\n loadCardIcons();\n // return iconCards[valueAsInt(card)][suitAsInt(card)];\n return iconCards[suitAsInt(card)][valueAsInt(card)];\n // return iconCards[0][0];\n }", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "public int getNumCards() {\n return this.topCard;\n }", "public int getIconImageNumber(){return iconImageNumber;}", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\n ItemsIconId id = new ItemsIconId();\n byte[] rawValue = ctlv.getRawValue();\n int valueIndex = ctlv.getValueIndex();\n boolean z = true;\n int numOfItems = ctlv.getLength() - 1;\n id.recordNumbers = new int[numOfItems];\n int valueIndex2 = valueIndex + 1;\n try {\n if ((rawValue[valueIndex] & 255) != 0) {\n z = false;\n }\n id.selfExplanatory = z;\n int index = 0;\n while (index < numOfItems) {\n int index2 = index + 1;\n int valueIndex3 = valueIndex2 + 1;\n try {\n id.recordNumbers[index] = rawValue[valueIndex2];\n index = index2;\n valueIndex2 = valueIndex3;\n } catch (IndexOutOfBoundsException e) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }\n return id;\n } catch (IndexOutOfBoundsException e2) {\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\n }\n }", "public int getRow() {\r\n\t\treturn slot / 9;\r\n\t}", "public int getTopCard() {\n return this.topCard;\n }", "public Integer getYellowCards() {\n return this.yellowCards;\n }", "public ImageIcon getTopCardImage() {\r\n return new ImageIcon(validColor + \"_\" + validValue + \".png\");\r\n }", "@Override\n public Card getCard(int i) {\n return this.cards.get(i);\n }", "public int topCardVal(){\n if(pile.size() == 0)\n return 0;\n int val = pile.get(pile.size() - 1).getVal();\n return val;\n }", "public int getHighCard() {\r\n return highCard;\r\n }", "public int getCardSlot() {\n return cardSlot;\n }", "public Integer getIscard() {\n return iscard;\n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\treturn id % 13;\n\t\telse\n\t\t\treturn 13;\n\t}", "private int getIcon(int i, int j){\n \n // ADD YOU CODE HERE\n\n // Case 11 (unopened fields)\n if (gameModel.isCovered(i,j)) {\n\n return 11;\n\n }\n\n // Case 10 (user presses on a field that is mined)\n else if (gameModel.hasBeenClicked(i,j) && gameModel.isMined(i,j)) {\n\n return 10;\n\n }\n\n // Case 9 (if the field is a mine)\n else if (gameModel.isMined(i,j)) {\n\n return 9;\n \n }\n\n // Case 0 to 8 (user presses on a field that is not mined and program displays neighboring mines)\n else {\n\n return gameModel.getNeighbooringMines(i,j);\n\n }\n\n // CASE 12 BONUS\n\n }", "int getFlipped() {\n\t\tint i=0;\n\t\tCard card=top();\n\t\twhile (card!=null && card.isFaceUp()) {\n\t\t\ti++;\n\t\t\tcard = card.next();\n\t\t}\n\t\treturn i;\n\t}", "public int cardValue(Card card) //translate string into card's numerical value\r\n {\r\n if (card.face.equals(\"Deuce\"))\r\n return 2;\r\n if (card.face.equals(\"Three\"))\r\n return 3;\r\n if (card.face.equals(\"Four\"))\r\n return 4;\r\n if (card.face.equals(\"Five\"))\r\n return 5;\r\n if (card.face.equals(\"Six\"))\r\n return 6;\r\n if (card.face.equals(\"Seven\"))\r\n return 7;\r\n if (card.face.equals(\"Eight\"))\r\n return 8;\r\n if (card.face.equals(\"Nine\"))\r\n return 9;\r\n if (card.face.equals(\"Ten\"))\r\n return 10;\r\n if (card.face.equals(\"Jack\"))\r\n return 11;\r\n if (card.face.equals(\"Queen\"))\r\n return 12;\r\n if (card.face.equals(\"King\"))\r\n return 13;\r\n if (card.face.equals(\"Ace\"))\r\n return 14;\r\n return -2;\r\n }", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "public int packed() {\n return this.nbCard;\n }", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public int getIconIndex() {\n return iconIndex;\n }", "public Integer getRedCards() {\n return this.redCards;\n }", "private int getIconInt(String icon) {\n switch (icon){\n case \"01d\": return R.drawable.w01d;\n case \"01n\": return R.drawable.w01n;\n case \"02d\": return R.drawable.w02d;\n case \"02n\": return R.drawable.w02n;\n case \"03d\": return R.drawable.w03d;\n case \"03n\": return R.drawable.w03n;\n case \"04d\": return R.drawable.w04d;\n case \"04n\": return R.drawable.w04n;\n case \"09d\": return R.drawable.w09d;\n case \"09n\": return R.drawable.w09n;\n case \"10d\": return R.drawable.w10d;\n case \"10n\": return R.drawable.w10n;\n case \"11d\": return R.drawable.w11d;\n case \"11n\": return R.drawable.w11n;\n case \"13d\": return R.drawable.w13d;\n case \"13n\": return R.drawable.w13n;\n case \"50d\": return R.drawable.w50d;\n case \"50n\": return R.drawable.w50n;\n\n }\n\n return R.drawable.w01d;\n }", "public int getNumCards() {\n return this.numCards;\n }", "public int getIconId(){\n return mIconId;\n }", "private void findCardValue() {\r\n\r\n int testArr[] = new int[5];\r\n\r\n for(int i = 0,j=0; i < this.handStr.length(); i+=3,j++){\r\n\r\n String subOfElement = this.handStr.substring(i,i + 1);\r\n if(subOfElement.equals(\"J\") )\r\n testArr[j] = 11;\r\n else if(subOfElement.equals(\"Q\"))\r\n testArr[j] = 12;\r\n else if(subOfElement.equals(\"K\"))\r\n testArr[j] = 13;\r\n else if(subOfElement.equals(\"A\"))\r\n testArr[j] = 14;\r\n\r\n else {\r\n testArr[j] = Integer.parseInt(subOfElement);\r\n if (testArr[j] == 1) {\r\n testArr[j] = 10;\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n //TESTARR IS SORTED\r\n Arrays.sort(testArr);\r\n\r\n setIntArr(testArr);\r\n\r\n //I also set high card to last element in array after it is sorted.\r\n setHighCard(testArr[4]);\r\n\r\n }", "private int getAnimationRow() {\n double dirDouble = (Math.atan2(xSpeed, ySpeed) / (Math.PI / 2) + 2);\n int direction = (int) Math.round(dirDouble) % BMP_ROWS;\n return DIRECTION_TO_ANIMATION_MAP[direction];\n }", "public int getIconFromDamage(int i){\n\t\treturn 4;\n\t}", "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public void ComputerUpdateTopCard(int value){\n topCard = handComputer.get(value);\n }", "public static ItemsIconId retrieveItemsIconId(ComprehensionTlv ctlv) throws ResultException {\r\n CatLog.d(\"ValueParser\", \"retrieveItemsIconId:\");\r\n ItemsIconId id = new ItemsIconId();\r\n byte[] rawValue = ctlv.getRawValue();\r\n int valueIndex = ctlv.getValueIndex();\r\n int numOfItems = ctlv.getLength() - 1;\r\n id.recordNumbers = new int[numOfItems];\r\n int valueIndex2 = valueIndex + 1;\r\n try {\r\n id.selfExplanatory = (rawValue[valueIndex] & 255) == 0;\r\n int index = 0;\r\n while (index < numOfItems) {\r\n int index2 = index + 1;\r\n int valueIndex3 = valueIndex2 + 1;\r\n try {\r\n id.recordNumbers[index] = rawValue[valueIndex2];\r\n index = index2;\r\n valueIndex2 = valueIndex3;\r\n } catch (IndexOutOfBoundsException e) {\r\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\r\n }\r\n }\r\n return id;\r\n } catch (IndexOutOfBoundsException e2) {\r\n }\r\n }", "public Card getCard(int i) {\n\t\treturn cards.get(i);\n\t}", "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public static ImageIcon[] getCardImage(){\n\t\treturn cardImage;\n\t}", "ICard getCard(int cardIndex) throws IllegalArgumentException;", "private int getInstr(int index) {\n switch (index) {\n case 0:\n return R.drawable.chickpeacurry;\n case 1:\n return R.drawable.sweetpotatoblackbeanburger;\n case 2:\n return R.drawable.cabbagedietsoup;\n case 3:\n return R.drawable.instantpotvegetablesoup;\n case 4:\n return R.drawable.veganpumpkinsoup;\n\n default:\n return -1;\n }\n }", "public int getSuit() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id < 14)\n\t\t\treturn 1;\n\t\telse if (id >= 14 && id < 27)\n\t\t\treturn 2;\n\t\telse if (id >= 27 && id < 40)\n\t\t\treturn 3;\n\t\telse\n\t\t\treturn 4;\n\t}", "public void setIconIndex(int value) {\n this.iconIndex = value;\n }", "public int SetPlayerCard(int getIndex,int cardValue){\n\t\tif (getIndex==0) {\n\t\t\tImage playCard1=new ImageIcon(this.getClass().getResource(\"/\"+deck[cardValue]+\".gif\")).getImage();\n\t\t\tp1Card.setIcon(new ImageIcon(playCard1));\n\t\t}\n\t\telse if (getIndex==1) {\n\t\t\tImage playCard2=new ImageIcon(this.getClass().getResource(\"/\"+deck[cardValue]+\".gif\")).getImage();\n\t\t\tp2Card.setIcon(new ImageIcon(playCard2));\n\t\t}\n\t\telse if (getIndex==2) {\n\t\t\tImage playCard3=new ImageIcon(this.getClass().getResource(\"/\"+deck[cardValue]+\".gif\")).getImage();\n\t\t\tp3Card.setIcon(new ImageIcon(playCard3));\n\t\t}\n\t\telse {\n\t\t\tImage playCard4=new ImageIcon(this.getClass().getResource(\"/\"+deck[cardValue]+\".gif\")).getImage();\n\t\t\tp4Card.setIcon(new ImageIcon(playCard4));\n\t\t\t\n\t\t\tTh=new Thread(){\n\t\t\t\tpublic void run(){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsleep(3000);\n\t\t\t\t\t\tImage imgBlank=new ImageIcon(this.getClass().getResource(\"\")).getImage();\n\t\t\t\t\t\tp1Card.setIcon(new ImageIcon(imgBlank));\n\t\t\t\t\t\tp2Card.setIcon(new ImageIcon(imgBlank));\n\t\t\t\t\t\tp3Card.setIcon(new ImageIcon(imgBlank));\n\t\t\t\t\t\tp4Card.setIcon(new ImageIcon(imgBlank));\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tTh.start();\n\t\t}\n\t\treturn 0;\n\t}", "public static int face(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) % 13 + 1;\n }", "public int getCardValue()\n {\n return cardValue; \n }", "public int value(){\r\n\t\t\r\n\t\tthis.sort();\r\n\t\t\r\n\t\tint result = 0;\r\n\t\t\r\n\t\tfor(int i = this.cardCount()-1; i >= 0; i--){\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.ACE) == 0){\r\n\t\t\t\tif(result <= 10 - i)\r\n\t\t\t\t\tresult += 11;\r\n\t\t\t\telse\r\n\t\t\t\t\tresult += 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.JACK) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.QUEEN) == 0 ||\r\n\t\t\t\tthis.getCard(i).getValue().compareTo(CardValue.KING) == 0 ){\r\n\t\t\t\tresult += 10;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.TWO) == 0){\r\n\t\t\t\tresult += 2;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.THREE) == 0){\r\n\t\t\t\tresult += 3;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FOUR) == 0){\r\n\t\t\t\tresult += 4;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.FIVE) == 0){\r\n\t\t\t\tresult += 5;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SIX) == 0){\r\n\t\t\t\tresult += 6;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.SEVEN) == 0){\r\n\t\t\t\tresult += 7;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.EIGHT) == 0){\r\n\t\t\t\tresult += 8;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(this.getCard(i).getValue().compareTo(CardValue.NINE) == 0){\r\n\t\t\t\tresult += 9;\r\n\t\t\t}\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "@Override\n public int getSmallIconId() throws android.os.RemoteException {\n android.os.Parcel _data = android.os.Parcel.obtain();\n android.os.Parcel _reply = android.os.Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n boolean _status =\n mRemote.transact(Stub.TRANSACTION_getSmallIconId, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }", "public int getIconCustomColor() {\n int value;\n try {\n String[] splits = _icon.split(\"\\\\|\");\n value = Integer.valueOf(splits[3]);\n } catch (Exception e) {\n value = 0;\n }\n return value;\n }", "public String get_card(int index){\r\n return String.valueOf(hand.get(index).get_value()) + hand.get(index).get_suit() + \".jpg\";\r\n }", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int getIconWidth()\r\n/* 50: */ {\r\n/* 51: 99 */ return SIZE;\r\n/* 52: */ }", "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "public int suitNum() {\r\n return this.i;\r\n }", "public int getValue()\n { \n return table.get(getSelectedItem());\n }", "private static final int getNumericValue(final Card card) throws Exception\r\n {\r\n switch (card.getValue())\r\n {\r\n case Two:\r\n return 2;\r\n \r\n case Three:\r\n return 3;\r\n \r\n case Four:\r\n return 4;\r\n \r\n case Five:\r\n return 5;\r\n \r\n case Six:\r\n return 6;\r\n \r\n case Seven:\r\n return 7;\r\n \r\n case Eight:\r\n return 8;\r\n \r\n case Nine:\r\n return 9;\r\n \r\n case Ten:\r\n return 10;\r\n \r\n case Jack:\r\n return 11;\r\n \r\n case Queen:\r\n return 12;\r\n \r\n case King:\r\n return 13;\r\n \r\n case Ace:\r\n return 14;\r\n \r\n default:\r\n throw new Exception(\"Face value not handled here \" + card.getValue().toString());\r\n }\r\n }", "public int packed() {\n return packedCard;\n }", "int getNumCards();", "public static Icon getIcon(Card card) {\n //Load all of the card icons if they haven't been already.\n if (!GUICard.iconsLoaded)\n GUICard.loadCardIcons();\n //return the appropriate card icon.\n return iconCards[valueAsInt(card)][suitAsInt(card)];\n }", "@Override\r\n\tpublic String getBind_oth_card_ind() {\n\t\treturn super.getBind_oth_card_ind();\r\n\t}", "private int getDrawableByIcon(String iconID) {\n int icon = 0;\n\n //Get drawable according to iconID\n // xxd are for day and xxn are for night\n switch (iconID) {\n case \"01d\":\n icon = R.drawable.ic_01d;\n break;\n case \"02d\":\n icon = R.drawable.ic_02d;\n break;\n case \"03d\":\n icon = R.drawable.ic_03d;\n break;\n case \"04d\":\n icon = R.drawable.ic_04d;\n break;\n case \"09d\":\n icon = R.drawable.ic_09d;\n break;\n case \"10d\":\n icon = R.drawable.ic_10d;\n break;\n case \"11d\":\n icon = R.drawable.ic_11d;\n break;\n case \"13d\":\n icon = R.drawable.ic_13d;\n break;\n case \"50d\":\n icon = R.drawable.ic_50d;\n break;\n case \"01n\":\n icon = R.drawable.ic_01n;\n break;\n case \"02n\":\n icon = R.drawable.ic_02n;\n break;\n case \"03n\":\n icon = R.drawable.ic_03n;\n break;\n case \"04n\":\n icon = R.drawable.ic_04n;\n break;\n case \"09n\":\n icon = R.drawable.ic_09n;\n break;\n case \"10n\":\n icon = R.drawable.ic_10n;\n break;\n case \"11n\":\n icon = R.drawable.ic_11n;\n break;\n case \"13n\":\n icon = R.drawable.ic_13n;\n break;\n case \"50n\":\n icon = R.drawable.ic_50n;\n break;\n\n }\n return icon;\n }", "private static Integer getOutcome(List<String> row) {\n\t return Integer.parseInt(row.get(8));\n\t}", "static int getCardPointValue(Card card) {\n if (card.errorFlag)\n return -1;\n String values = new String(Card.validCardValues);\n return cardPointValues[values.indexOf(card.getValue())];\n }", "public String getCardNum(int i, int j){\n //Return the number string of the card at ij\n return cardArray[i][j].getNumString();\n }", "public int getCard(List<Integer> hand2, int position) {\n\t\tif (position >= 0 && position < hand2.size()) {\n\t\t\treturn ((Integer) hand2.get(position)).intValue();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public MatchingCardsTile(int number){\n this.cardNumber = number;\n }", "public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public void nextCarIcon() {\n Profile profile = null;\n String playerPicked = playerList.getSelectionModel().getSelectedItem();\n try {\n profile = Profile.readProfile(playerPicked);\n profile.setLevel();\n } catch (IOException e) {\n e.printStackTrace();\n }\n carIcon.setOpacity(1);\n currentIndexCar++;\n if (currentIndexCar == 0) {\n carIcon.setImage(carIcon0);\n } else if (currentIndexCar == 1) {\n carIcon.setImage(carIcon1);\n if (!carIconLevelCheck(\"truck\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n } else if (currentIndexCar == 2) {\n carIcon.setImage(carIcon2);\n if (!carIconLevelCheck(\"bike\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n } else if (currentIndexCar == 3) {\n if (!carIconLevelCheck(\"sportscar\", profile.getLevel())) {\n carIcon.setOpacity(0.5);\n }\n carIcon.setImage(carIcon3);\n } else if (currentIndexCar == 4) {\n currentIndexCar = 0;\n carIcon.setImage(carIcon0);\n carIcon.setOpacity(1);\n }\n }", "private int getRow() {\n return binaryPartition(row);\n }", "public char getIcon() {\n return this.icon;\n }", "@Override\r\n\tpublic double getItemX(int i) {\n\t\tif(i > 0 && i< this.items.size())\r\n\t\t{\r\n\t\t\tInfoBit firstBit = items.get(0);\r\n\t\t\tInfoBit currentBit = items.get(i);\r\n\t\t\treturn this.x + firstBit.getWidth()-currentBit.getWidth();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn super.getItemX(i);\r\n\t\t}\r\n\t\t\r\n\t}", "private static int RowNumber(int y, short puzzleValue) {\r\n\t\tint retVal = 162 +y*9+puzzleValue;\r\n\t\treturn retVal;\r\n\t}", "public int getRow() {\n\t\treturn i;\n\t}", "public int getRank(){\r\n\t\tif(this.rank.equals(RANKS[0])){ return -1; } // \"no card\"\r\n\t\treturn rankValue.get(this.rank);\r\n\t}", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public int getSmallIconId() throws android.os.RemoteException;", "int atRow();", "public Card getCardAtIndex(int i)\n {\n return cards.get(i);\n }", "public Rank rank(){\n return PackedCard.rank(this.nbCard);\n }", "public int getSlots() {\n\t\treturn this.rows * 9;\n\t}", "int compareValue(Card c);", "public ImageIcon getCardPicture()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getCardPicture Method *****************/\n\n // Return card picture\n return picture;\n\n }", "private int nobValue() {\n int numberOfCards= cards.length;\n int nValue = 0;\n \n for (int i = 0; i < numberOfCards - 1; i++) {\n char cardRank = cards[i].charAt(0);\n char cardSuit = cards[i].charAt(1);\n char startSuit = cards[numberOfCards - 1].charAt(1);\n \n if (cardRank=='J'&&cardSuit == startSuit) {\n nValue += 1;\n }\n } \n return nValue;\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public int getRow() { return _row; }", "public int getCardVal(boolean aceIsOne) {\n\t\tint val = (this.getCardNum()-1)/4 + 2;\n\t\tif(val==14 && aceIsOne)\n\t\t\tval = 1;\n\t\telse if(val > 10 && val < 14)\n\t\t\tval = 10;\n\t\telse if(val == 14)\n\t\t\tval = 11;\n\t\t\n\t\treturn val;\n\t}", "public int getIcon() {\n int i=0;\n String b = \"\";\n try {\n FileInputStream i1 = c.openFileInput(\"faculty.txt\"); //open the faculty file\n int size1 = i1.available();\n byte[] buffer1 = new byte[size1];\n i1.read(buffer1);\n i1.close();\n b = new String(buffer1); //b set to the text in the file\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n if(b.equals(\"Faculty of Engineering\")){ //comparing b(faculty in the file) to the Faculty of Engineering.This is repeated for the other faculties\n i=R.drawable.engine; //id of the engneering icon in the drawable file\n }\n if(b.equals(\"Faculty of Food and Agriculture\")){\n i=R.drawable.food;\n }\n if(b.equals(\"Faculty of Science and Technology\")){\n i=R.drawable.tech;\n }\n if(b.equals(\"Faculty of Medical Sciences\")){\n i=R.drawable.med;\n }\n if(b.equals(\"Faculty of Social Sciences\")){\n i=R.drawable.oc;\n }\n if(b.equals(\"aculty of Humanities and Education\")){\n i=R.drawable.human;\n }\n if(b.equals(\"Faculty of Law\")){\n i=R.drawable.la;\n }\n return i;\n }", "public int getValue(int column, int row) {\n\t\treturn this.bitmap[column][row];\n\t}", "public int getImageResource() {\n switch (id) {\n case 0: return R.drawable.aatrox_square_0;\n case 1: return R.drawable.ahri_square_0;\n case 2: return R.drawable.akali_square_0;\n case 3: return R.drawable.alistar_square_0;\n case 4: return R.drawable.amumu_square_0;\n case 5: return R.drawable.anivia_square_0;\n case 6: return R.drawable.annie_square_0;\n case 7: return R.drawable.ashe_square_0;\n case 8: return R.drawable.azir_square_0;\n case 9: return R.drawable.bard_square_0;\n case 10: return R.drawable.blitzcrank_square_0;\n case 11: return R.drawable.brand_square_0;\n case 12: return R.drawable.braum_square_0;\n case 13: return R.drawable.caitlyn_square_0;\n case 14: return R.drawable.cassiopeia_square_0;\n case 15: return R.drawable.chogath_square_0;\n case 16: return R.drawable.corki_square_0;\n case 17: return R.drawable.darius_square_0;\n case 18: return R.drawable.diana_square_0;\n case 19: return R.drawable.draven_square_0;\n case 20: return R.drawable.drmundo_square_0;\n default:\n return R.drawable.fizz_square_0;\n }\n }", "public int getColumn() {\r\n\t\treturn slot % 9;\r\n\t}", "public Integer getRoomcard() {\n return roomcard;\n }", "public int getCurrentPawnRow(){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\treturn curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\treturn curPos.getBlackPosition().getTile().getRow();\n\t\t}\r\n }", "public static IconId retrieveIconId(ComprehensionTlv ctlv) throws ResultException {\r\n IconId id = new IconId();\r\n byte[] rawValue = ctlv.getRawValue();\r\n int valueIndex = ctlv.getValueIndex();\r\n int valueIndex2 = valueIndex + 1;\r\n try {\r\n id.selfExplanatory = (rawValue[valueIndex] & OemCdmaTelephonyManager.OEM_RIL_CDMA_RESET_TO_FACTORY.RESET_DEFAULT) == 0;\r\n id.recordNumber = rawValue[valueIndex2] & OemCdmaTelephonyManager.OEM_RIL_CDMA_RESET_TO_FACTORY.RESET_DEFAULT;\r\n return id;\r\n } catch (IndexOutOfBoundsException e) {\r\n throw new ResultException(ResultCode.CMD_DATA_NOT_UNDERSTOOD);\r\n }\r\n }", "public Cards get(int i) {\r\n\t\treturn seedCards.get(i);\r\n\t}", "int getSelectedSpriteValue();", "public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public int numOfCards() {\n return cards.size();\n }", "public int getRow()\r\n {\r\n return row;\r\n }", "public int getColAmount(Enum c) {\r\n int x = 0;\r\n for (Property prop : owned) {\r\n if (prop.getColour() == c) {\r\n x++;\r\n } \r\n }\r\n return x;\r\n }", "private int flushValue() {\n int flushValue = 0;\n if (inSameSuit()) {\n flushValue += 4;\n \n char firstCardSuit = cards[0].charAt(1);\n char StartCardSuit = cards[cards.length-1].charAt(1);\n \n if(firstCardSuit==StartCardSuit){\n flushValue +=1;\n }\n } \n return flushValue;\n }", "public int getCardsToDraw() {\r\n return cardsToDraw;\r\n }" ]
[ "0.61320114", "0.5796064", "0.5733073", "0.5701161", "0.5677203", "0.56761986", "0.56631476", "0.5645274", "0.5643325", "0.56427467", "0.5636376", "0.5634097", "0.55950063", "0.5576622", "0.55512327", "0.5510892", "0.5497961", "0.5494974", "0.54868525", "0.54862183", "0.5458335", "0.54569846", "0.54513526", "0.54303753", "0.54263633", "0.5423512", "0.5405155", "0.5400715", "0.5397355", "0.5391931", "0.53756404", "0.5375138", "0.537055", "0.536572", "0.5350766", "0.5348567", "0.5348139", "0.5342004", "0.53362554", "0.5292472", "0.5282282", "0.527505", "0.52456355", "0.5240986", "0.52368754", "0.52361774", "0.5235535", "0.52328455", "0.52209723", "0.52083814", "0.5204504", "0.5201856", "0.5197711", "0.5193495", "0.5186722", "0.5182364", "0.5179561", "0.5167229", "0.5162152", "0.5160543", "0.51538336", "0.5142866", "0.5139559", "0.513251", "0.5128169", "0.5116374", "0.5114931", "0.5113918", "0.5113572", "0.5110856", "0.5106064", "0.5102131", "0.5101167", "0.50995207", "0.50908506", "0.5088686", "0.50793785", "0.50749946", "0.50720876", "0.50692624", "0.50673985", "0.5064552", "0.50611", "0.504402", "0.5041882", "0.50356853", "0.50345147", "0.50255156", "0.50235474", "0.5019791", "0.50176567", "0.5017608", "0.50169826", "0.500226", "0.49993786", "0.49990454", "0.4998388", "0.49973992", "0.49908787", "0.49900696" ]
0.5779312
2
/ In: A card object Out: An integer representing the column in the iconCards array that contains that suit.
private static int suitAsInt(Card card) { return card.getSuit().ordinal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int suitNum() {\r\n return this.i;\r\n }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) / 13 + 1;\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public static int face(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) % 13 + 1;\n }", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "static public Icon getIcon(Card card)\n {\n loadCardIcons();\n // return iconCards[valueAsInt(card)][suitAsInt(card)];\n return iconCards[suitAsInt(card)][valueAsInt(card)];\n // return iconCards[0][0];\n }", "public int getSuit(){\n\t\treturn suit; \n\t}", "public int getSuitInt() {\n return this.suit;\n }", "public int getSuit() {\r\n return suit;\r\n }", "public int getSuit()\n {\n return suit;\n }", "public int getSuit() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id < 14)\n\t\t\treturn 1;\n\t\telse if (id >= 14 && id < 27)\n\t\t\treturn 2;\n\t\telse if (id >= 27 && id < 40)\n\t\t\treturn 3;\n\t\telse\n\t\t\treturn 4;\n\t}", "public int getSuit() {\n return suit;\n }", "public int getSuit() {\n return suit;\n }", "public Card getCardInDeck(int i){\n\t\treturn deck[i];\n\t}", "public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}", "public int getSuit() {\n\t\treturn suit;\n\t}", "public int getHighCard() {\r\n return highCard;\r\n }", "public String get_card(int index){\r\n return String.valueOf(hand.get(index).get_value()) + hand.get(index).get_suit() + \".jpg\";\r\n }", "public int getSuit()\n {\n return suit;\n }", "public int compareBySuit(Card otherCard){\n\t\tint num = 0;\n\t\tif (this.suit == otherCard.suit)\n\t\t\tnum = 0;\n\t\telse if (this.suit > otherCard.suit)\n\t\t\tnum = 1;\n\t\telse if (this.suit < otherCard.suit)\n\t\t\tnum = -1;\n\t\treturn num;\n\t}", "public String getCardSuit() {\n return Csuit;\n }", "public String resolvePNG(int suit, int rank) {\n String cardName = null;\n String sut = null;\n int rnk = 1;\n\n //Search through each suit and rank\n for (int s = 0; s < 4; s++) {\n for (int r = 0; r < 13; r++) {\n //When the rank and suit are found, set the corresponding variables\n if ((suit == s) && (rank == r)) {\n switch (s) {\n case 0:\n sut = \"c\";\n break;\n case 1:\n sut = \"d\";\n break;\n case 2:\n sut = \"h\";\n break;\n case 3:\n sut = \"s\";\n break;\n }\n\n rnk = r + 1;\n }\n }\n }\n\n //Assuming the suit is not empty, set it to the int, char pair\n if (sut != null)\n cardName = rnk + sut;\n\n //Return the final char/int string pair\n return cardName;\n }", "public int getSuit() {\n return this.suit;\n }", "private void findCardValue() {\r\n\r\n int testArr[] = new int[5];\r\n\r\n for(int i = 0,j=0; i < this.handStr.length(); i+=3,j++){\r\n\r\n String subOfElement = this.handStr.substring(i,i + 1);\r\n if(subOfElement.equals(\"J\") )\r\n testArr[j] = 11;\r\n else if(subOfElement.equals(\"Q\"))\r\n testArr[j] = 12;\r\n else if(subOfElement.equals(\"K\"))\r\n testArr[j] = 13;\r\n else if(subOfElement.equals(\"A\"))\r\n testArr[j] = 14;\r\n\r\n else {\r\n testArr[j] = Integer.parseInt(subOfElement);\r\n if (testArr[j] == 1) {\r\n testArr[j] = 10;\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n //TESTARR IS SORTED\r\n Arrays.sort(testArr);\r\n\r\n setIntArr(testArr);\r\n\r\n //I also set high card to last element in array after it is sorted.\r\n setHighCard(testArr[4]);\r\n\r\n }", "public Integer getYellowCards() {\n return this.yellowCards;\n }", "public void setSuitOfCard(int suitOfCard) {\n this.suitOfCard = suitOfCard;\n }", "public int getCard(List<Integer> hand2, int position) {\n\t\tif (position >= 0 && position < hand2.size()) {\n\t\t\treturn ((Integer) hand2.get(position)).intValue();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public int getSuit(){\n return suit;\n }", "public int getNumCards() {\n return this.topCard;\n }", "ICard getCard(int cardIndex) throws IllegalArgumentException;", "public Card getCard(int idx) {\n return deck[idx];\n }", "public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}", "public int cardValue(Card card) //translate string into card's numerical value\r\n {\r\n if (card.face.equals(\"Deuce\"))\r\n return 2;\r\n if (card.face.equals(\"Three\"))\r\n return 3;\r\n if (card.face.equals(\"Four\"))\r\n return 4;\r\n if (card.face.equals(\"Five\"))\r\n return 5;\r\n if (card.face.equals(\"Six\"))\r\n return 6;\r\n if (card.face.equals(\"Seven\"))\r\n return 7;\r\n if (card.face.equals(\"Eight\"))\r\n return 8;\r\n if (card.face.equals(\"Nine\"))\r\n return 9;\r\n if (card.face.equals(\"Ten\"))\r\n return 10;\r\n if (card.face.equals(\"Jack\"))\r\n return 11;\r\n if (card.face.equals(\"Queen\"))\r\n return 12;\r\n if (card.face.equals(\"King\"))\r\n return 13;\r\n if (card.face.equals(\"Ace\"))\r\n return 14;\r\n return -2;\r\n }", "public String suit() {\r\n return suit;\r\n }", "@Override\n public Card getCard(int i) {\n return this.cards.get(i);\n }", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }", "public Suit getSuit() {\n return cardSuit;\n }", "public int getNumCards() {\n return this.numCards;\n }", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public Card inspectCard(int k) {\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n return new Card(this.myCards[k]);\n }", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "public int compareSuits(Card anotherCard) {\n\t\treturn getSuit().compareTo(anotherCard.getSuit());\n\t}", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public int getTopCard() {\n return this.topCard;\n }", "static int getComputerCard(Card playerCard) {\n //The computer will iterate through different possible cards it might choose to play.\n //This represents a chosen card at any given time.\n Card possibleCard = null;\n //The position in the computer's hand where the possibleCard is stored.\n int cardPosition = 0;\n //True if the computer has a card of higher value than the player's.\n boolean hasHigherCard = false;\n //Iterate through the computer's hand, trying to find a card higher than the player's\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++) {\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) < 0) {\n //The computer has a higher card.\n if (possibleCard != null) {\n //If this card is lower than the possible card, but can still beat the player, then replace possible card.\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n //If the computer has not yet chosen a possible card, choose this one.\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n hasHigherCard = true;\n cardPosition = i;\n }\n }\n }\n if (!hasHigherCard) {\n //If the computer does not have a card that can beat the player, then feed the lowest card\n //that the computer has to the player.\n for (int i = 0; i < highCardGame.getHand(0).getNumCards(); i++)\n if (playerCard.compareTo(highCardGame.getHand(0).inspectCard(i)) >= 0) {\n if (possibleCard != null) {\n if (possibleCard.compareTo(highCardGame.getHand(0).inspectCard(i)) > 0) {\n possibleCard = new Card(highCardGame.getHand(0).inspectCard(i));\n cardPosition = i;\n }\n } else {\n possibleCard = highCardGame.getHand(0).inspectCard(i);\n cardPosition = i;\n }\n }\n }\n return cardPosition;\n }", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card getCard(int i) {\n\t\treturn cards.get(i);\n\t}", "@Override\r\n\tpublic String getBind_oth_card_ind() {\n\t\treturn super.getBind_oth_card_ind();\r\n\t}", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public Integer getIscard() {\n return iscard;\n }", "int getFlipped() {\n\t\tint i=0;\n\t\tCard card=top();\n\t\twhile (card!=null && card.isFaceUp()) {\n\t\t\ti++;\n\t\t\tcard = card.next();\n\t\t}\n\t\treturn i;\n\t}", "public int compareTo(Card cr1) {\n// if suits don't match, figure out who is highest suit\n if (suit != cr1.getSuit()) {\n int suitIndex = 0, cr1Index = 0;\n for (int i = 0; i < SUITCARDS.length; i++) {\n if (suit == SUITCARDS[i]) {\n suitIndex = i;\n }\n if (cr1.suit == SUITCARDS[i]) {\n cr1Index = i;\n }\n }\n// way I organized the array means lower index is worse\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n// if suits do match, figure out which card is higher\n else {\n int suitIndex = 0, cr1Index = 0;\n for (int j = 0; j < FACECARDS.length; j++) {\n if (value == FACECARDS[j]) {\n suitIndex = j;\n }\n if (cr1.value == FACECARDS[j]) {\n cr1Index = j;\n }\n }\n\n if (suitIndex > cr1Index)\n return 1;\n else if (suitIndex < cr1Index)\n return -1;\n else\n return 0;\n }\n }", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "private void setHighCard(int highCard) {\r\n this.highCard = highCard;\r\n }", "public Card getCard( int cardNum ) {\n\t\treturn deck[ cardNum ];\n\t}", "public Card getCardAt( int index ) {\n return this.cards[index];\n }", "public int getNumDevCardType(Cards card) {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < newCards.size(); i++) {\n \t\t\tif (newCards.get(i) == card)\n \t\t\t\tcount += 1;\n \t\t}\n \n \t\treturn cards[card.ordinal()] + count;\n \t}", "static int getHighCardWithinHand(String[] hand) {\n\tint highCard = 1;\n\tfor (int i = 0; i < hand.length; i++) {\n\t if (getNumberOfCard(hand[i]) > highCard) {\n\t\thighCard = getNumberOfCard(hand[i]);\n\t }\n\t}\n\treturn highCard;\n }", "public static Icon getIcon(Card card) {\n //Load all of the card icons if they haven't been already.\n if (!GUICard.iconsLoaded)\n GUICard.loadCardIcons();\n //return the appropriate card icon.\n return iconCards[valueAsInt(card)][suitAsInt(card)];\n }", "public int getRank(){\r\n\t\tif(this.rank.equals(RANKS[0])){ return -1; } // \"no card\"\r\n\t\treturn rankValue.get(this.rank);\r\n\t}", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public int getCardSlot() {\n return cardSlot;\n }", "public int compareTo(Card card) {\r\n return Integer.compare(rank, card.rank);\r\n\r\n }", "public String getSuit()\r\n { return suit; }", "private void findIdealSuitAndRank() {\n Map<Card.Suit, Integer> suitsInHand = new HashMap<Card.Suit, Integer>();\n Map<Card.Rank, Integer> ranksInHand = new HashMap<Card.Rank, Integer>();\n\n // Use the enumerable methods in Card class to put all the keys in the HashMaps\n for (Card.Suit suit : Card.Suit.values()) {\n suitsInHand.put(suit, 0);\n }\n for (Card.Rank rank : Card.Rank.values()) {\n ranksInHand.put(rank, 0);\n }\n\n // Place all cards played in their respective locations in the HashMap\n for (Card card : cardsInHand) {\n suitsInHand.put(card.getSuit(), suitsInHand.get(card.getSuit()) + 1);\n ranksInHand.put(card.getRank(), ranksInHand.get(card.getRank()) + 1);\n }\n /**\n * The following for loop was derived from\n * https://stackoverflow.com/questions/5911174/finding-key-associated-with-max-value-in-a-java-map\n * for finding the key with the max value in a HashMap.\n */\n Map.Entry<Card.Suit, Integer> maxEntrySuit = null;\n for (Map.Entry<Card.Suit, Integer> entry : suitsInHand.entrySet()) {\n if (maxEntrySuit == null || entry.getValue().compareTo(maxEntrySuit.getValue()) > 0) {\n maxEntrySuit = entry;\n }\n }\n idealSuit = maxEntrySuit.getKey();\n\n Map.Entry<Card.Rank, Integer> maxEntryRank = null;\n for (Map.Entry<Card.Rank, Integer> entry : ranksInHand.entrySet()) {\n if (maxEntryRank == null || entry.getValue().compareTo(maxEntryRank.getValue()) > 0) {\n maxEntryRank = entry;\n }\n }\n idealRank = maxEntryRank.getKey();\n }", "public static ImageIcon getCardImage(Card card) {\r\n // Use image order, which is different from value order.\r\n String CardImageFileName = card.getCardImg();\r\n String path = String.format(IMAGE_PATH_FORMAT, CardImageFileName);\r\n return getIcon(path);\r\n }", "public static ImageIcon[] getCardImage(){\n\t\treturn cardImage;\n\t}", "int getNumCards();", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public Card inspectCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.topCard || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n //Otherwise, return a copy of the card in position k.\n return new Card(this.cards[k]);\n }", "public Rank rank(){\n return PackedCard.rank(this.nbCard);\n }", "public Suits getSuit() {\n\t\treturn suit;\n\t}", "public int packed() {\n return this.nbCard;\n }", "public Card getCardAtIndex(int i)\n {\n return cards.get(i);\n }", "private int Flush() {\r\n for (int i = 0; i < Card.length; i++) {\r\n if (!suit.contains(Card[i].substring(1,2))){\r\n System.out.println(\"Error Input, Invalid Suit\");\r\n System.exit(1);\r\n }\r\n if (i<Card.length-1) {\r\n if (!Card[0].substring(1,2).equals(Card[i].substring(1,2))){\r\n return 0;\r\n }\r\n }\r\n if (i==(Card.length-1)) {\r\n if (Card[0].substring(1,2).equals(Card[i].substring(1,2))){\r\n return 5;\r\n }\r\n else {return 4;}\r\n }\r\n }\r\n return 0;\r\n }", "public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= topCard)\n return errorReturn;\n else\n return cards[k];\n }", "public String getCardNum(int i, int j){\n //Return the number string of the card at ij\n return cardArray[i][j].getNumString();\n }", "protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }", "public Suit getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit() {\r\n return suit;\r\n }", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public int getColumn() { return cc; }", "public Integer getRedCards() {\n return this.redCards;\n }", "public String getSuit()\r\n {\r\n return suit;\r\n }", "public Suit getSuit() {\n return suit;\n }", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public Card(){\n suit = 0;\n rank = 0;\n }", "public void ComputerUpdateTopCard(int value){\n topCard = handComputer.get(value);\n }", "public Cards get(int i) {\r\n\t\treturn seedCards.get(i);\r\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}" ]
[ "0.6613794", "0.64540774", "0.63238305", "0.6136769", "0.6111638", "0.6047704", "0.6031042", "0.6004407", "0.5999935", "0.59928435", "0.5985066", "0.59542304", "0.59542304", "0.5936215", "0.5932439", "0.59319526", "0.59311265", "0.5905127", "0.5901253", "0.5870276", "0.5842806", "0.58281744", "0.58235", "0.5821669", "0.5807481", "0.57796466", "0.57688725", "0.57536495", "0.57415617", "0.57335913", "0.572178", "0.5720423", "0.5717508", "0.5691048", "0.56715566", "0.5669304", "0.56512886", "0.5633447", "0.55990565", "0.5598272", "0.5595451", "0.5576302", "0.55551827", "0.55520636", "0.55514044", "0.5547952", "0.5547323", "0.5542018", "0.554112", "0.55309504", "0.5524347", "0.5523546", "0.5522906", "0.55211353", "0.5516665", "0.55129737", "0.55088085", "0.54635274", "0.5451088", "0.5447323", "0.54236114", "0.54126227", "0.54022676", "0.5399287", "0.5397322", "0.53925836", "0.5387613", "0.53837323", "0.53747094", "0.5368792", "0.5365856", "0.53587806", "0.5350591", "0.5348959", "0.5342838", "0.53337073", "0.5330007", "0.53237736", "0.5320104", "0.5309005", "0.5305677", "0.528818", "0.52873504", "0.52864397", "0.52803606", "0.52795905", "0.5274536", "0.52741873", "0.52713853", "0.52641624", "0.5263488", "0.52631634", "0.525271", "0.5249597", "0.52493834", "0.5240726", "0.5240441", "0.52403915", "0.52395755", "0.5239189" ]
0.7137165
0
/ In: Nothing Out: An Icon object containing the back card icon.
public static Icon getBackCardIcon() { //Load all of the icons if they have not been already. if (!GUICard.iconsLoaded) GUICard.loadCardIcons(); return GUICard.iconBack; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public Icon getBackCardIcon()\n {\n iconBack = new ImageIcon(\"images/\" + \"BK.gif\");\n return iconBack;\n }", "private Image getBackImage() {\n return getImage(\"playing-cards/blue-back.png\");\n }", "public GImage getBack(){\r\n \t\t return back;\r\n\t }", "public Node renderCardBack(State.Hero h){\n this.belongsTo = h;\n Rectangle card = new Rectangle();\n card.setHeight(152);\n card.setWidth(106.4);\n ImagePattern p = new ImagePattern(new Image(\"vendor/assets/card_back.png\"));\n card.setFill(p);\n\n return card;\n }", "private void createBack() {\n String backString = \"\";\n if(host.locale == host.FINNISH) {\n backString = \"TAKAISIN\";\n } else if(host.locale == host.ENGLISH) {\n backString = \"BACK\";\n }\n back = new FontActor(backString,\n screenWidth * 1 / 8,\n screenHeight * 1 / 8);\n }", "@Override\r\n\tpublic void onBackPressed()\r\n\t{\r\n\t\tif (flipper.getDisplayedChild() != 0)\r\n\t\t{\r\n\t\t\tflipper.showPrevious();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsuper.onBackPressed();\r\n\t\t}\r\n\t}", "private void showBack() {\n Drawable buttonDrawableBack = new TextureRegionDrawable(new TextureRegion((Texture)game.getAssetManager().get(\"buttonBack.png\")));\n BackButton = new ImageButton(buttonDrawableBack);\n BackButton.setSize(MENU_WIDTH/7,MENU_HEIGHT/7);\n BackButton.setPosition(7*MENU_WIDTH/8 - BackButton.getWidth()/2, MENU_HEIGHT/7 -DELTA_Y_MENU);\n stage.addActor(BackButton);\n }", "public static Drawable GetCardBackSideImage()\r\n\t{\r\n\t\tDrawable image = null;\r\n\t\tif(IsPortraitMode())\r\n\t\t{\r\n\t\t\tif(m_CardBackImageProtrait == null)\r\n\t\t\t{\r\n\t\t\t\tm_CardBackImageProtrait = CGameHelper.GetCardBackSideImage_Internal();\r\n\t\t\t}\r\n\t\t\timage = m_CardBackImageProtrait;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(m_CardBackImageLandscape == null)\r\n\t\t\t{\r\n\t\t\t\tm_CardBackImageLandscape = CGameHelper.GetCardBackSideImage_Internal();\r\n\t\t\t}\r\n\t\t\timage = m_CardBackImageLandscape;\r\n\t\t}\r\n\t\t\r\n\t\treturn image;\r\n\t}", "public void setBackArrowIcon() {\n Log.i(tag, \"setBackArrowIcon\");\n this.actionBarDrawerToggle.setHomeAsUpIndicator(this.chevronIcon);\n this.settingsButton.setVisibility(4);\n }", "public JButton getBtnBack(){\n\t\treturn btnBack;\n\t}", "private void paintBack(Graphics2D g, int x, int y) {\n g.drawImage(getBackImage(), x, y, CARD_WIDTH, CARD_HEIGHT, null);\n }", "private void setUpBackButton() {\n mBackButton = mDetailToolbar.getChildAt(0);\n if (null != mBackButton && mBackButton instanceof ImageView) {\n\n // the scrim makes the back arrow more visible when the image behind is very light\n mBackButton.setBackgroundResource(R.drawable.scrim);\n\n ViewGroup.MarginLayoutParams lpt = (ViewGroup.MarginLayoutParams) mBackButton.getLayoutParams();\n lpt.setMarginStart((int) getResources().getDimension(R.dimen.keyline_1));\n\n ViewGroup.LayoutParams lp = mBackButton.getLayoutParams();\n lp.height = (int) getResources().getDimension(R.dimen.small_back_arrow);\n lp.width = (int) getResources().getDimension(R.dimen.small_back_arrow);\n\n // tapping the back button or the Up button should return to the list of articles\n mBackButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onBackPressed();\n supportFinishAfterTransition();\n }\n });\n }\n }", "private JMenuItem getMniBack() {\r\n\t\tif (mniBack == null) {\r\n\t\t\tmniBack = new JMenuItem();\r\n\t\t\tmniBack.setText(\"Back\");\r\n\t\t\tmniBack.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tbtnBack.doClick();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn mniBack;\r\n\t}", "private JButton getBtnBack() {\r\n\t\tif (btnBack == null) {\r\n\t\t\tbtnBack = new JButton();\r\n\t\t\tbtnBack.setText(\"<\");\r\n\t\t\tbtnBack.setToolTipText(\"Back\");\r\n\t\t\tbtnBack.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tif(historyIndex > 0) {\r\n\t\t\t\t\t\thistoryIndex --;\r\n\t\t\t\t\t\tgoTo(history.get(historyIndex), HistoryManagement.NAVIGATE);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn btnBack;\r\n\t}", "protected void drawBackButton() {\n backButton = new TextButton(\"Back\", skin);\n stage.addActor(backButton);\n\n setPrevious();\n }", "public void Back(){\n setImage(\"button-blue.png\");\n }", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "private JButton getJButton_back() {\r\n\t\tif (jButton_back == null) {\r\n\t\t\tjButton_back = new JButton();\r\n\t\t\tjButton_back.setLocation(new Point(94, 480));\r\n\t\t\tjButton_back.setText(\"Back\");\r\n\t\t\tjButton_back.setSize(new Dimension(208, 34));\r\n\t\t\tjButton_back.addActionListener(this);\r\n\t\t}\r\n\t\treturn jButton_back;\r\n\t}", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "public void showBack(Graphics g, int x, int y) {\r\n\t\tg.drawImage(cardBack, x, y, null);\r\n\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "private Card drawCard() {\n return cardStack.pop();\n }", "private static void backButtonCreator(int backWidth, int backHeight){\n backButton = shadowEffect(configureImageView(\"\",\"button-back\",\".png\",backWidth,backHeight));\n }", "private void displayBackButton() {\n RegularButton backButton = new RegularButton(\"BACK\", 200, 600);\n\n backButton.setOnAction(e -> backButtonAction());\n\n sceneNodes.getChildren().add(backButton);\n }", "public void onBackPressed() {\n if (!searchView.isIconified()) {\n searchView.setIconified(true);\n return;\n }\n super.onBackPressed();\n }", "void onDismissByBackPressed();", "public backCard() {\n\t\tsuper(null,null);\n\t}", "void onGoBackButtonClick();", "@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}", "@JSProperty(\"back\")\n @Nullable\n Chart3dFrameBackOptions getBack();", "public JoystickButton getButtonBack() {\n\t\treturn button[6];\n\t}", "public void back() {\n\t\tstate.back();\n\t}", "public Icon getIcon() {\n \t\treturn null;\n \t}", "public static ImageView getBackButton(int backWidth, int backHeight) {\n backButtonCreator(backWidth, backHeight);\n return backButton;\n }", "public synchronized void back ()\n\t// one move up\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tgoback();\n\t\tshowinformation();\n\t\tcopy();\n\t}", "@Override\n public void onBackPressed() {\n if (!searchView.isIconified()) {\n searchView.setIconified(true);\n return;\n }\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n if (!searchView.isIconified()) {\n searchView.setIconified(true);\n return;\n }\n super.onBackPressed();\n }", "@Override\n public void onBackPressed() {\n if (!searchView.isIconified()) {\n searchView.setIconified(true);\n return;\n }\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\n\t}", "public void back() {\n Views.goBack();\n }", "public static void back()\n {\n throw new UnsupportedOperationException();\n }", "public void goBack() {\n goBackBtn();\n }", "public void setBackArrowFunction() {\n final ImageView backArrowIV = (ImageView) findViewById(R.id.backArrow);\n backArrowIV.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n finish();\n }\n });\n }", "@Override\n\t\t\tpublic void onCancel(DialogInterface arg0) {\n\t\t\t\tdialog.findViewById(R.id.ast_back_icon).callOnClick();\n\t\t\t}", "public void onBackPressed() {\n backbutton();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\toverridePendingTransition(R.anim.push_right_out, R.anim.push_right_in);\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}", "void actionBack();", "private void navBack() {\n Intent intent = new Intent(this, standard_home.class);\n startActivity(intent);\n }", "public void onBackPressed() {\r\n }", "public String setBack(){\n\t\tif(back.empty())\n\t\t\treturn null;\n\t\treturn back.pop();\n\t}", "@Override\n \tpublic void onBackPressed() {\n \t}", "@Override\n public void backButton() {\n\n\n }", "@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}", "@Override\r\n\tpublic void onBackPressed() {\r\n\t\tif (isMapDisplayed) {\r\n\t\t\tisMapDisplayed=false;\r\n\t\t\tswitcher.showPrevious();\r\n\t\t} else super.onBackPressed();\r\n\t}", "@Override\r\n public void onBackPressed() {\n }", "public void clickCalendarBackArrow() {\n\t\tcalendarBackArrow.click();\n\t}", "public ImageIcon getTopCardImage() {\r\n return new ImageIcon(validColor + \"_\" + validValue + \".png\");\r\n }", "private void previous()\r\n {\r\n if(currentCard != 0) // if we are not at the first card\r\n {\r\n currentCard--; // make the previous card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }", "public void actionPerformedBack(ActionListener back) {\n btnBack.addActionListener(back);\n }", "public javax.swing.JButton getjBtnContainerBack() {\n return jBtnContainerBack;\n }", "public void back () {\r\n if (backHistory.size() > 1) {\r\n forwardHistory.addFirst(current);\r\n current = backHistory.getLast();\r\n backHistory.removeLast();\r\n }\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "@Override\n\tpublic void onBackPressed() {\n\t}", "public Icon getIcon() {\n\t\treturn null;\n\t}", "public String getIcon(int current_turn){\r\n if(isBlue()){\r\n if(current_turn == 0){\r\n if(reached_end){\r\n return \"BlueArrow.png\";\r\n }\r\n return \"BlueArrow-reverse.png\";\r\n } else {\r\n if(reached_end){\r\n return \"BlueArrow-reverse.png\";\r\n }\r\n return \"BlueArrow.png\";\r\n }\r\n }\r\n if(current_turn == 0){\r\n if(reached_end){\r\n return \"RedArrow-reverse.png\";\r\n }\r\n return \"RedArrow.png\";\r\n } else {\r\n if(reached_end){\r\n return \"RedArrow.png\";\r\n }\r\n return \"RedArrow-reverse.png\";\r\n }\r\n }", "@Override\n public void backPressed(){\n }", "@Override\n public void onBackPressed() {\n exitReveal();\n\n super.onBackPressed();\n }", "public static ImageIcon getEmptyCardIcon() {\n\t\treturn new ImageIcon(Card.class.getResource(Constants.IMAGES_FOLDER + \"/\" + \"empty_card.png\"));\n\t}", "public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}", "public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\toverridePendingTransition(R.anim.in_from__left, R.anim.out_to_right);\n\t}", "@Override\n public void onBackPressed() {\n backToHome();\n }", "public String getBack() {\n index--;\n return (String) history.get(index);\n }", "@Override\r\n\tpublic String back() {\n\t\treturn RDIR + \"homeContents\";\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\toverridePendingTransition(R.anim.open_scale, R.anim.close_translate);\r\n\t}", "public String getIdentityCardBack() {\n return identityCardBack;\n }", "@Override\n\tpublic void onCardBack() {\n\t\tLoggerUtils.d(\"onCardBack Start!!!\");\n\t\tif(!isCancelCheckCard) {\n\t\t\tonBack();\n\t\t}\n\t}", "private void setupBackButton(){\n\t\tImageIcon back_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"back.png\");\n\t\tJButton back_button = new JButton(\"\", back_button_image);\n\t\tback_button.setBorderPainted(false);\n\t\tback_button.setContentAreaFilled(false);\n\t\tback_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean leave_result = askToLeave();\n\t\t\t\tif (leave_result){\n\t\t\t\t\t//no point speaking any more words if exiting\n\t\t\t\t\tparent_frame.getFestival().emptyWorkerQueue();\n\t\t\t\t\tparent_frame.changePanel(PanelID.MainMenu);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tback_button.addMouseListener(new VoxMouseAdapter(back_button,null));\n\t\tadd(back_button);\n\t\tback_button.setBounds(1216, 598, 100, 100);\n\t}", "@Override\n public void handleOnBackPressed() {\n }", "@Override\n\tpublic boolean onNaviBackClick() {\n\t\treturn false;\n\t}", "public CardBuilder withBackFace(String back) {\n BackFace backFace = new BackFace(back);\n this.backFace = backFace;\n return this;\n }", "@Override\n public void onBackPressed() { }", "@Override\n\tpublic void onBackPressed()\n\t{\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}", "public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }", "@Override\n public void onBackPressed() {}", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }", "@Override\n public void onBackPressed() {\n }" ]
[ "0.80608755", "0.76674515", "0.6967381", "0.6703697", "0.65202326", "0.64692855", "0.6465936", "0.6453745", "0.64483213", "0.6413046", "0.63774824", "0.6375087", "0.6358919", "0.63274366", "0.6324186", "0.63198376", "0.615984", "0.61485595", "0.6148182", "0.6134997", "0.6101416", "0.60816777", "0.60685176", "0.60527337", "0.60465825", "0.6035638", "0.60332614", "0.6022143", "0.60039765", "0.5998057", "0.5997515", "0.5978702", "0.5945712", "0.5938353", "0.59269136", "0.5911619", "0.5911619", "0.5911619", "0.5899817", "0.5898395", "0.58860695", "0.58817625", "0.5881495", "0.5881441", "0.5880652", "0.587182", "0.58646786", "0.58624744", "0.5858385", "0.58565426", "0.58561397", "0.5843302", "0.583582", "0.58311903", "0.5826595", "0.5824872", "0.5814162", "0.5807797", "0.5804396", "0.58038014", "0.5802177", "0.5789621", "0.5789094", "0.5789094", "0.5789094", "0.5789094", "0.57848865", "0.5781366", "0.57795906", "0.5766573", "0.5761676", "0.5757597", "0.57559395", "0.5752653", "0.5731305", "0.5727579", "0.5724894", "0.57215357", "0.5719806", "0.5719153", "0.57179284", "0.5713334", "0.5707757", "0.5705187", "0.5698264", "0.56976485", "0.5696159", "0.5696159", "0.5688889", "0.568726", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368", "0.5686368" ]
0.8431247
0
/ In: [1] A String represetning the desired window title [2] An integer representing the number of cards per hand [3] An integer value representing the number of players playing on the table Out: Nothing.
public CardTable(String title, int numCardsPerHand, int numPlayers) { super(); //Call JFrame's constructor. this.handPanels = new JPanel[numPlayers]; //Verify that the input is valid. Fix it if it is not. if (numCardsPerHand < 0 || numCardsPerHand > CardTable.MAX_CARDS_PER_HAND) this.numCardsPerHand = 20; this.numCardsPerHand = numCardsPerHand; if (numPlayers < 2 || numPlayers > CardTable.MAX_PLAYERS) this.numPlayers = numPlayers; if (title == null) title = ""; //Set some of the window's attributes. this.setTitle(title); this.setSize(800, 600); this.setMinimumSize(new Dimension(800, 600)); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //The card table will use a BorderLayout style. This allows each panel //To have a different height. This allows for a larger play area and smaller //hand areas. BorderLayout layout = new BorderLayout(); this.setLayout(layout); //Both the comptuer and human hand panels will use the flow layout. FlowLayout flowLayout = new FlowLayout(FlowLayout.LEFT); //Crate a titled border for the display of labels indicating //what each panel is for. TitledBorder border = new TitledBorder("Computer Hand"); this.handPanels[0] = new JPanel(); this.handPanels[0].setLayout(flowLayout); this.handPanels[0].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105)); //Use a JScrollPane in case the cards per hand is greater than can be displayed in the panel //without a scroll bar. JScrollPane scrollComputerHand = new JScrollPane(this.handPanels[0]); scrollComputerHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); scrollComputerHand.setBorder(border); this.add(scrollComputerHand, BorderLayout.NORTH); //Create the playing area. border = new TitledBorder("Playing Area"); //The play area will use a grid layout, so that the played cards, labels, and //status text can be displayed in neat columns. GridLayout gridLayoutCardsArea = new GridLayout(1, 2); GridLayout gridLayoutStatusArea = new GridLayout(1, 1); pnlPlayArea = new JPanel(); pnlPlayArea.setBorder(border); layout = new BorderLayout(); pnlPlayArea.setLayout(layout); pnlTimer = new JPanel(); pnlTimer.setLayout(gridLayoutStatusArea); pnlPlayedCards = new JPanel(); pnlPlayedCards.setLayout(gridLayoutCardsArea); pnlPlayerText = new JPanel(); pnlPlayerText.setLayout(gridLayoutCardsArea); pnlStatusText = new JPanel(); pnlStatusText.setLayout(gridLayoutStatusArea); pnlPlayedCards.setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 150)); pnlPlayerText.setPreferredSize(new Dimension(100, 30)); pnlStatusText.setPreferredSize(new Dimension(100, 30)); pnlPlayArea.add(pnlTimer, BorderLayout.EAST); pnlPlayArea.add(pnlPlayedCards, BorderLayout.NORTH); pnlPlayArea.add(pnlPlayerText, BorderLayout.CENTER); pnlPlayArea.add(pnlStatusText, BorderLayout.SOUTH); this.add(pnlPlayArea, BorderLayout.CENTER); ///Create the human's hand area. border = new TitledBorder("Human Hand"); this.handPanels[1] = new JPanel(); this.handPanels[1].setLayout(flowLayout); this.handPanels[1].setPreferredSize(new Dimension((int) this.getMinimumSize().getWidth() - 50, 105)); JScrollPane scrollHumanHand = new JScrollPane(this.handPanels[1]); scrollHumanHand.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); scrollHumanHand.setBorder(border); this.add(scrollHumanHand, BorderLayout.SOUTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Title ()\n {\n\tTitle = new Panel ();\n\tTitle.setBackground (Color.white);\n\tchessboard (Title);\n\tp_screen.add (\"1\", Title);\n }", "public void display_title_screen() {\n parent.textAlign(CENTER);\n parent.textFont(myFont);\n parent.textSize(displayH/10);\n parent.fill(255, 255, 0);\n parent.text(\"PACMAN\", 0.5f*displayW, 0.3f*displayH);\n\n parent.image(maxusLogoImage, 0.5f*displayW, 0.4f*displayH);\n\n parent.textFont(myFont);\n parent.textSize(tileSize);\n parent.fill(180);\n parent.text(\"2013\", 0.5f*displayW, 0.45f*displayH);\n\n display_chase_animation();\n\n display_insert_coin_text();\n }", "String getTitle(int row, int column);", "private void showTitleScreen() {\n\t\tresetParameters();\n\t\t\n\t\t// if the play button is not clicked\n\t\twhile (!Mouse.isButtonDown(0)\n\t\t\t\t|| !(Mouse.getX() >= 249 && Mouse.getX() <= 539 && Mouse.getY() <= (displayHeight - 215) && Mouse.getY() >= (displayHeight - 284))) {\n\t\t\t// draw title screen\n\t\t\tdrawScreen(sprite.get(\"titleScreen\"));\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 304) && Mouse.getY() >= (displayHeight - 373)) {\n\t\t\t\tshowInstructScreen();\n\t\t\t}\n\t\t\t\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 393) && Mouse.getY() >= (displayHeight - 462)) {\n\t\t\t\tshowCreditsScreen();\n\t\t\t}\n\t\t\tif (Mouse.isButtonDown(0) && Mouse.getX() >= 249 && Mouse.getX() <= 539\n\t\t\t\t\t&& Mouse.getY() <= (displayHeight - 482) && Mouse.getY() >= (displayHeight - 551)) {\n\t\t\t\tDisplay.destroy();\n\t\t\t\tAL.destroy();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\t// update display\n\t\t\tupdateDisplay();\n\t\t}\n\t\t\n\t\t// reset beginning time\n\t\tDelta.setBeginningTime(Delta.getTime());\n\t}", "private void displayGameHeader()\n {\n System.out.println(\"########Welcome to Formula 9131 Championship########\");\n }", "public static void main(String[] args)\n {\n int k;\n //create card table\n CardTable myCardTable = new CardTable(\"Card Table\", \n NUM_CARDS_PER_HAND, NUM_PLAYERS);\n myCardTable.setSize(800,600);\n myCardTable.setLocationRelativeTo(null);\n myCardTable.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //show the user everything\n myCardTable.setVisible(true);\n\n //create labels\n //create computerLabels\n for(k = 0; k < computerLabels.length; k++)\n {\n computerLabels[k] = new JLabel(GUICard.getBackCardIcon());\n }\n //create humanLabels\n for(k = 0; k < humanLabels.length; k++)\n {\n Card randCard = generateRandomCard();\n humanLabels[k] = new JLabel(GUICard.getIcon(randCard));\n }\n //create random playedCardLabels\n for(k = 0; k < playedCardLabels.length; k++)\n {\n Card randCard = generateRandomCard();\n playedCardLabels[k] = new JLabel(GUICard.getIcon(randCard));\n }\n //create playLabelText\n playLabelText[0] = new JLabel(\"Computer\", JLabel.CENTER);\n playLabelText[1] = new JLabel(\"You\", JLabel.CENTER);\n\n //add labels to panels\n //computerLabels\n for(k = 0; k < computerLabels.length; k++)\n {\n myCardTable.pnlComputerHand.add(computerLabels[k], \n BorderLayout.SOUTH);\n }\n //humanLabels\n for(k = 0; k < humanLabels.length; k++)\n {\n myCardTable.pnlHumanHand.add(humanLabels[k], \n BorderLayout.SOUTH);\n }\n //playedCardLabels\n for(k = 0; k < playedCardLabels.length; k++)\n {\n myCardTable.pnlPlayArea.add(playedCardLabels[k]);\n }\n //playLabelText\n for(k = 0; k < playedCardLabels.length; k++)\n {\n myCardTable.pnlPlayArea.add(playLabelText[k]);\n }\n\n //show the user everything\n myCardTable.setVisible(true);\n\n //info for CardGameFramework\n int numPacksPerDeck = 1;\n int numJokersPerPack = 0;\n int numUnusedCardsPerPack = 0;\n Card[] unusedCardsPerPack = null;\n\n //instantiate new CardGameFramework\n CardGameFramework newGame = new CardGameFramework(\n numPacksPerDeck, numJokersPerPack, numUnusedCardsPerPack, \n unusedCardsPerPack, NUM_PLAYERS, NUM_CARDS_PER_HAND);\n //deal cards \n if(!newGame.deal())\n {\n JOptionPane.showMessageDialog(myCardTable, \n \"There was an error with dealing\");\n }\n else //get new cards\n {\n //get the first hand dealt to use for player\n Hand newHand = newGame.getHand(0);\n //update JLabels\n for(k = 0; k < NUM_CARDS_PER_HAND; k++)\n {\n humanLabels[k].setIcon(GUICard.getIcon(newHand.inspectCard(k)));\n }\n }\n\n\n }", "void showTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "private void setNewTitle(int index)\r\n {\r\n debug(\"setNewTitle(\" + index + \") - on Tab Panel\");\r\n // Get a copy of the Old Title\r\n String oldTitle = tabPane.getTitleAt(index);\r\n String newTitle = null;\r\n\r\n // Now we want to present a Dialog box to get a new title\r\n newTitle =\r\n JOptionPane.showInputDialog(\r\n this.getModulePanel(),\r\n \"Please enter a new title for the list,\\nCurrent name is [\" + oldTitle + \"]\",\r\n \"Name Watch List\",\r\n JOptionPane.INFORMATION_MESSAGE);\r\n\r\n // If the Dialog box returned null or empy string then our new title will\r\n // the existing tab title\r\n if (newTitle == null || \"\".equals(newTitle.trim()))\r\n {\r\n newTitle = oldTitle;\r\n }\r\n\r\n // Build a defailt label for the TabPane\r\n String watchListName = getString(\"WatchListTableModule.edit.watch_list_basic_name\") + index;\r\n\r\n // Set the Propery file to reflect the new title\r\n appProps.setProperty(watchListName, newTitle);\r\n\r\n // set the Name of the title for the Tab \r\n tabPane.setTitleAt(index, newTitle);\r\n\r\n debug(\"setNewTitle(\" + index + \") - on Tab Panel to [\" + newTitle + \"] - complete\");\r\n }", "public void displayTitleScreen() {\n System.out.println(\n \" @@@: @@@@ \\n\" +\n \" %@@: @@%@ \\n\" +\n \" @@@: @@@@ \\n\" +\n \" @@@: @@@@ \\n\" +\n \" @@@: @%%% \\n\" +\n \" @@@: %@@@ \\n\" +\n \" *@@%@@# @@@% @@@%%@ @@@@@@ @@@@ #%@%@@+ @@@@@ =@%@@@% \\n\" +\n \" @@@@@@@%@@@ @@@@@@@@@@@%@ +%@%@@@@@@@ %%@@ @@@@@@@@@%@ @@@@%@@%% %%%@@@@%%@@ \\n\" +\n \" @@@% %@@@ @@@@@* %@@@% @@@@+ %@@@* @@@@ @@@@ @@@@ @@@@ %@@@ @@@@ @@%@ \\n\" +\n \" @%@@ #@%@* @@@@ %%@ %@@@ @@%@ @@@@ %@@% @@@@ +%@% @@@@ @@@@ +%@%@ \\n\" +\n \" @@% @%@@ @@@% @@%@ @%%- @@@@ @@%@ .@%@ @@@ @@%@ %@%% @@@ @@%@@ \\n\" +\n \"+@@@ @@@@ @@%- @@%@ %%% %@%% @%@% %@@% @@@ @@%@ %%@@ @%@ @@+ \\n\" +\n \" @@@ @@@@ %@@: %@%@ %@@@ =%%@# %@%% @@@ @%@ @%%@ @@@@ @@%. \\n\" +\n \" #%@% %* #%@%# @@@: @@@@ @@@# @@ @@@@ @%%% @%%% %@@% @%@% @@@@ -@@% \\n\" +\n \" #@%@@@@@%%@%% @%@@@%%: @%%@%@%@ %@%@%@@@@@%@ @@@@@%@@ %@@%@@%%@@@@% %@@@ %@@@ -@@@%@@@@@@%# \\n\" +\n \" %@%@@%@@% @@%@@@: @@@%%% #%@@%@@%@ @@%@@@@ @@%@@@@@@ @@@@ %%%@ %@%@@%@@@ \\n\" +\n \"―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― \\n\" +\n \" Nouvelle partie \"\n );\n }", "void showRanking(String winner, String rank);", "@Override\n protected void updateTitle()\n {\n String frameName =\n SWTStringUtil.insertEllipsis(frame.getName(),\n StringUtil.NO_FRONT,\n SWTStringUtil.DEFAULT_FONT);\n\n view.setWindowTitle(modificationFlag\n + FRAME_PREFIX\n + \": \"\n + project.getName()\n + \" > \"\n + design.getName()\n + \" > \"\n + frameName\n + ((OSUtils.MACOSX) ? \"\" : UI.WINDOW_TITLE));\n }", "public static void displayScoreCard(){\r\n\t\t\r\n\t\t try {\r\n\t\t\t \r\n\t\t\t //getting the connection\r\n\t\t\tstatement = connection.createStatement();\r\n\t\t\t\r\n\t\t\t//retriving the data from the database\r\n\t\t\t ResultSet results = statement.executeQuery(\"select * from \" + tableName);\r\n\t\t\t \r\n\t\t\t //Retrieves the Players_Name, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE and OUT_FRONT of this ResultSet object's columns. \r\n\t\t\t ResultSetMetaData rsmd = results.getMetaData();\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t System.out.println(\"\\t\\t\\t\\t Fort Cherry Golf Course\");\r\n\t\t\t // print the names of the above the table\r\n\t\t\t int numberCols = rsmd.getColumnCount();\r\n\t\t\t for (int i=1; i<=numberCols; i++) \r\n\t\t\t {\r\n\t\t\t // extract each column name from the meta data and print them\r\n\t\t\t System.out.print(rsmd.getColumnLabel(i)+\"\\t\"); \r\n\t\t\t }\r\n\r\n\t\t\t //simply printing the line\r\n\t\t\t System.out.println(\"\\n--------------------------------------------------------------------------------------------------\");\r\n\t\t\t \r\n\t\t\t // Reteriving all data one by one from the data base\r\n\t\t\t while(results.next())\r\n\t\t\t {\r\n\t\t\t String players_Name = results.getString(1);\r\n\t\t\t int ONE = results.getInt(2);\r\n\t\t\t int TWO = results.getInt(3);\r\n\t\t\t int THREE = results.getInt(4);\r\n\t\t\t int FOUR = results.getInt(5);\r\n\t\t\t int FIVE = results.getInt(6);\r\n\t\t\t int SIX = results.getInt(7);\r\n\t\t\t int SEVEN = results.getInt(8);\r\n\t\t\t int EIGHT = results.getInt(9);\r\n\t\t\t int NINE = results.getInt(10);\r\n\t\t\t int OUT_FRONT = results.getInt(11);\r\n\t\t\t \r\n\t\t\t //printing the retrive data to the console\r\n\t\t\t System.out.println(players_Name + \"\\t\" + ONE + \"\\t\" + TWO + \"\\t\" + THREE + \"\\t\" + FOUR + \"\\t\" + FIVE + \"\\t\" + SIX + \"\\t\" + SEVEN + \"\\t\" + EIGHT + \"\\t\" + NINE + \"\\t\" + OUT_FRONT);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t //closing the resultset and the statement\r\n\t\t\t results.close();\r\n\t\t\t statement.close();\r\n\t\t\t \r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void displayTableTitle()\r\n {\n }", "@Test\n public void panelTitleTest() {\n Player.GetItem item = getPlayerHandler().getMediaItem();\n onView(withId(R.id.title)).check(matches(withText(item.getTitle())));\n }", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "public void helpMenu()\n {\n System.out.println(\"*********************************************Help Menue**************************************************************\");\n System.out.println(\"Each player starts the game with zero points.\");\n System.out.println(\"Each player is given the following set of five tiles. Each tile has a value and an associated score\");\n System.out.println(\"For each round, each player will play ONE tile, with the tile value adding to the game total for that round.\"); \n System.out.println(\"Provided the game total is less than or equal to 21, the player will get the score for using that tile.\");\n System.out.println(\"If the game total is greater than 21\");\n System.out.println(\"no score is allocated to the player who played the last tile causing the score to become greater than 21.\");\n System.out.println(\"Once the round ends, Each player will get their score based on the total of the tiles they have used during the round.\");\n System.out.println(\"Any player who has NOT used the tile with the value of 5, will get a penalty of -3 points.\");\n System.out.println(\"The player who, after all deductions, has the highest score, will be the winner of that round and will get 5 points.\"); \n System.out.println(\"At the end of all the rounds, the player who has won the most rounds is declared the winner of the game.\");\n System.out.println(\"**********************************************************************************************************************\");\n getUserStringInput(\"Please enter continue\");\n }", "TITLE createTITLE();", "public void setTitleAccordingToState(){\n String ts=null;\n switch(getPlayMode()){\n case LIVE:\n ts=\" LIVE\";\n break;\n case PLAYBACK:\n ts=currentFile.getName()+\" PLAYING\";\n break;\n case WAITING:\n ts=\"MotionViewer - WAITING\";\n break;\n }\n setTitle(ts);\n }", "private Widget getTitle(DatabaseObject databaseObject) {\n HorizontalPanel titlePanel = new HorizontalPanel();\n titlePanel.setStyleName(\"elv-Details-Title\");\n try{\n ImageResource img = InstanceTypeIconProvider.getItemIcon(databaseObject.getSchemaClass());\n String helpTitle = databaseObject.getSchemaClass().name;\n HTMLPanel helpContent = new HTMLPanel(InstanceTypeExplanation.getExplanation(databaseObject.getSchemaClass()));\n titlePanel.add(new HelpPopupImage(img, helpTitle, helpContent));\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(databaseObject.getDisplayName());\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n titlePanel.add(title);\n\n return titlePanel;\n }", "public void setTitlePopup(String t) {\n/* 147 */ getCOSObject().setString(COSName.T, t);\n/* */ }", "public void resetTitle();", "public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}", "public static void main(String[] args) {\r\n \r\n //Check the input of cards should be multiple of 5 and more than 0\r\n if (args.length % 5 == 0 && args.length > 0) {\r\n \r\n int player = args.length / N; //count the player based on input\r\n int playerNo; //store the number of player for print\r\n int countCard = args.length; //count the number of card \r\n\r\n Suit[] CardSuit = new Suit[countCard]; //store the suit of cards\r\n Rank[] CardRank = new Rank[countCard]; //store the rank of cards\r\n Card[] card = new Card[countCard]; //store all cards\r\n Card[] cardinhand = new Card[N]; //store cards in one hand\r\n PokerHand[] hand = new PokerHand[player]; //store all players' hands\r\n \r\n //Deal with print of players draw\r\n int[] drawPlayer = new int[player]; //store draw players number \r\n /*set default value in the array as bigger than the number of player, \r\n so that will be sorted to the last if not updated*/\r\n Arrays.fill(drawPlayer, player + 1); \r\n int countDraw = 0; //count the number of draw players\r\n \r\n //Get the input: rank of the card\r\n for (int i = 0; i < countCard; i++) {\r\n switch (args[i].charAt(0)) {\r\n case ('2'):\r\n CardRank[i] = Rank.TWO;\r\n break;\r\n case ('3'):\r\n CardRank[i] = Rank.THREE;\r\n break;\r\n case ('4'):\r\n CardRank[i] = Rank.FOUR;\r\n break;\r\n case ('5'):\r\n CardRank[i] = Rank.FIVE;\r\n break;\r\n case ('6'):\r\n CardRank[i] = Rank.SIX;\r\n break;\r\n case ('7'):\r\n CardRank[i] = Rank.SEVEN;\r\n break;\r\n case ('8'):\r\n CardRank[i] = Rank.EIGHT;\r\n break;\r\n case ('9'):\r\n CardRank[i] = Rank.NINE;\r\n break;\r\n case ('T'):\r\n case ('t'):\r\n CardRank[i] = Rank.TEN;\r\n break;\r\n case ('J'):\r\n case ('j'):\r\n CardRank[i] = Rank.JACK;\r\n break;\r\n case ('Q'):\r\n case ('q'):\r\n CardRank[i] = Rank.QUEEN;\r\n break;\r\n case ('K'):\r\n case ('k'):\r\n CardRank[i] = Rank.KING;\r\n break;\r\n case ('A'):\r\n case ('a'):\r\n CardRank[i] = Rank.ACE;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Get the input: suit of the card\r\n switch (args[i].charAt(1)) {\r\n case ('C'):\r\n case ('c'):\r\n CardSuit[i] = Suit.Clubs;\r\n break;\r\n case ('D'):\r\n case ('d'):\r\n CardSuit[i] = Suit.Diamonds;\r\n break;\r\n case ('H'):\r\n case ('h'):\r\n CardSuit[i] = Suit.Hearts;\r\n break;\r\n case ('S'):\r\n case ('s'):\r\n CardSuit[i] = Suit.Spades;\r\n break;\r\n default:\r\n System.out.println\r\n (\"Error: invalid card name '\" + args[i] + \"'\");\r\n System.exit(i);\r\n break;\r\n }\r\n //Set all cards in the array\r\n card[i] = new Card(CardRank[i], CardSuit[i]);\r\n }\r\n\r\n //Use all cards to set cards for each player\r\n for (int i = 0; i < player; i++) {\r\n for (int j = 0; j < N; j++) {\r\n cardinhand[j] = card[i * 5 + j];\r\n }\r\n playerNo = i + 1;\r\n //Set cards and player number of each hand\r\n hand[i] = new PokerHand(cardinhand, playerNo);\r\n System.out.print(\"Player \" + playerNo + \": \");\r\n //Find the classification of each hand and print\r\n switch (hand[i].FindClass()) {\r\n case Straight_flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight flush\");\r\n break;\r\n case Four_of_a_kind:\r\n System.out.println\r\n (\"Four \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Full_house:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s full of \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case Flush:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high flush\");\r\n break;\r\n case Straight:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high straight\");\r\n break;\r\n case Three_of_a_kind:\r\n System.out.println\r\n (\"Three \" + hand[i].getR1().getRankName() + \"s\");\r\n break;\r\n case Two_pair:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"s over \" + \r\n hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case One_pair:\r\n System.out.println\r\n (\"Pair of \" + hand[i].getR2().getRankName() + \"s\");\r\n break;\r\n case High_cards:\r\n System.out.println\r\n (hand[i].getR1().getRankName() + \"-high\");\r\n break;\r\n }\r\n }\r\n\r\n Arrays.sort(hand);//sort the comparable object hand\r\n\r\n // Find the player number that draw with the highest hand player\r\n for (int i = player - 2; i >= 0; i--) {\r\n if (hand[player - 1].compareTo(hand[i]) == 0) {\r\n drawPlayer[countDraw] = hand[i].getPlayerNo();\r\n countDraw++; // count the number of draw players\r\n }\r\n }\r\n\r\n Arrays.sort(drawPlayer); // ascending sort the player number \r\n //print result after compare and sort\r\n if (player > 1) {\r\n if (countDraw > 1)\r\n\r\n {\r\n System.out.print(\"Players \");\r\n for (int i = 0; i < countDraw - 1; i++) {\r\n System.out.print(drawPlayer[i] + \", \");\r\n }\r\n System.out.println(\r\n hand[player - 2].getPlayerNo() + \" and \" + \r\n hand[player - 1].getPlayerNo() + \" draw.\");\r\n } else if (countDraw == 1)\r\n System.out.println\r\n (\"Players \" + hand[player - 2].getPlayerNo() + \r\n \" and \"+ hand[player - 1].getPlayerNo() + \" draw.\");\r\n else\r\n System.out.println\r\n (\"Player \" + hand[player - 1].getPlayerNo() + \" wins.\");\r\n }\r\n } else\r\n System.out.println\r\n (\"Error: wrong number of arguments; must be a multiple of 5\");\r\n System.exit(args.length);\r\n }", "public void updateTitle() {\n String text = protocol.getOnlineCount() + \"/\" + getContactItems().size();\n if (!Options.getBoolean(Options.OPTION_SHOW_SOFTBAR)) {\n text += \"-\" + Util.getDateString(true);\n }\n setCaption(text);\n }", "private JPanel getTitlePanel() {\n JPanel main = ProgramPresets.createPanel();\n main.setLayout(new FlowLayout());\n JLabel tron1 = new JLabel(ProgramPresets.TRON);\n JLabel tron2 = new JLabel(ProgramPresets.TRON);\n mainTitle = ProgramPresets.createCenteredTitle(TITLE);\n subTitle = ProgramPresets.createCenteredTitle(SUB_TITLE);\n JPanel mainSub = ProgramPresets.createPanel();\n mainSub.setLayout(new GridLayout(2, 1));\n mainSub.add(mainTitle);\n mainSub.add(subTitle);\n main.add(tron1);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(mainSub);\n main.add(Box.createRigidArea(new Dimension(50, 0)));\n main.add(tron2);\n return main;\n }", "public void setTitle(String titleTemplate);", "public void setTitle(String value) {\n/* 337 */ setTitle((String)null, value);\n/* */ }", "protected void setTitle(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString title = rs.getString(UiActionTable.COLUMN_TITLE);\n\t\t\n\t\tif(title == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setTitle(title);\n\t}", "void setTitle(java.lang.String title);", "@Override\n public void actionPerformed(ActionEvent arg0)\n {\n new TitleWindow();\n frame.dispose();\n }", "private static void displayMenu() {\n System.out.println(\"Menu : \");\n System.out.println(\"Type any number for selection\");\n for (int i = 1; i <= totalPlayers; i++) {\n System.out.println(i + \")View \" + playerList.get(i - 1) + \" cards\");\n }\n System.out.println(\"8)Display Each Player's Hand Strength\");\n System.out.println(\"9)Declare Winner\");\n System.out.println(\"10)Exit\");\n }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "public String getTitlePopup() {\n/* 136 */ return getCOSObject().getString(COSName.T);\n/* */ }", "protected abstract void setTitle();", "public void displayTitle() {\n\t\tthis.theScreen.setFont(Preferences.TITLE_FONT);\n\t\tthis.theScreen.setColor(Preferences.TITLE_COLOR);\n\t\tthis.theScreen.drawString(Preferences.TITLE,\n\t\t\t\tPreferences.TITLE_X, Preferences.TITLE_Y);\n\t}", "public String getWindowTitle() {\r\n\t\treturn windowTitle;\r\n\t}", "public void setTitle(java.lang.String title);", "public void promptTitle(String title)\n {\n this.title = title;\n }", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "@Override\n\tprotected void initTitle() {\n\t\tsetTitleContent(R.string.tocash);\n\t\tsetBtnBack();\n\t}", "public void setFrameTitel(JFrame frame) throws Throwable {\n\t\tString mode = \"Business Application \";\r\n\t\tString Edition = \"Stand Alone Branch Edition- \";\r\n\t\t// frame.setIconImage(Toolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/meretoologo.png\")));\r\n\t\tString vpara = \"809\";\r\n\r\n\t\tString vpara805 = \"805\"; // No of Lines per Bill\r\n\t\tint para805 = Integer.parseInt(new getConfigurationSetting().getSpecificConfiguration(vpara805));\r\n\r\n\t\t//frame.setTitle(new getConfigurationSetting().getSpecificConfiguration(vpara));\r\n\t\tframe.setFont(new Font(\"Cambria\", Font.BOLD, 16));\r\n\t\t//frame.setIconImage(\r\n\t\t//\t\tToolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/mymain.png\")));\r\n\t\t// frame.setIconImage(Toolkit.getDefaultToolkit().getImage(Loginwindow.class.getResource(\"/RetailProduct/mymainIcon7.ICO\")));\r\n\t\tframe.setFocusableWindowState(true);\r\n\r\n\t}", "protected GuiTestObject title() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"title\"));\n\t}", "IDisplayString getTitle();", "public String getWindowTitle() {\n\t\treturn windowTitle;\n\t}", "@Override\n\tpublic int getTitle() {\n\t\treturn 0;\n\t}", "public static String display(String title, String header){\n Stage window = new Stage();\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(title);\n \n Label head = new Label(header);\n Button save = new Button(\"Save\");\n Button dontSave = new Button(\"Don't Save\");\n Button cancel = new Button(\"Cancel\");\n \n save.setOnAction(e-> {answer = \"save\"; window.close();}); \n dontSave.setOnAction(e-> {answer = \"dontSave\"; window.close();});\n cancel.setOnAction(e-> {answer = \"cancel\"; window.close();});\n \n VBox vBox = new VBox(10);\n vBox.setAlignment(Pos.CENTER);\n vBox.getChildren().addAll(head,save,dontSave,cancel);\n \n Scene scene = new Scene(vBox, 300, 200);\n window.setScene(scene);\n window.showAndWait();\n \n return answer;\n }", "private void displayByTitle() {\n\t\tString titleHolder; // declares titleHolder\n\t\t\n\t\tSystem.out.println(\"Please enter title of the book you would like displayed:\");\n\t\ttitleHolder = scan.next();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayByTitle(titleHolder));\n\t\tgetUserInfo();\n\t}", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "public void setTitlePanel() {\n\t\ttitleview = new TitlePanelView();\n\t\ttitleview.createView();\n\t\tnorthpanel.add(titleview.getView());\n\t\n\t}", "public Window(String title) {\n this.title = title;\n }", "public static void main(String[] args) {\n\t\tExcelSheetColumnTitle slt = new ExcelSheetColumnTitle();\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.println(\"Please inpute a Excel Shee tColumn Number\");\n\t\tint n = sc.nextInt();\n\t\tSystem.out.print(slt.convertToTitle(n));\n\t\t\n\t}", "static void showHighScoreWindow( Frame owner, HighScore [] scores )\n\t{\n\t\tString message;\n\n\t\t// Special message if there are no high scores set\n\t\tif( scores[0] == null )\n\t\t\tmessage = \"No high scores.\";\n\t\telse\n\t\t\tmessage = \"\";\n\n\t\t// Show all non-null high scores\n\t\tfor( int i = 0; i < scores.length && scores[i] != null; i++ )\n\t\t\tmessage += scores[i].getName() + \": \" + scores[i].getScore() + \"\\n\";\n\n\t\tJOptionPane.showMessageDialog( owner, message, \"High Scores\",\n\t\t\t\t JOptionPane.INFORMATION_MESSAGE );\n\t}", "public void setGameDisplay(GameList gameList){\n String[][] m_data = new String[gameList.getLength()][3];\n int m_counter = 0;\n //iterates through the game list and sets the information at each column to the current games information\n for (Game g : (Iterable<Game>)gameList) {\n m_data[m_counter][0] = g.getTitle();\n m_data[m_counter][1] = g.getGenre();\n m_data[m_counter++][2] = g.getPublisher();\n\n Game m_tmpGame = new Game();\n m_tmpGame = g;\n m_searchResult.addGame(g); // adds the game to the searchResults List\n }\n //sets the table with basic information\n m_gameTable.setModel( new DefaultTableModel(\n m_data,\n new String[]{\"Title\", \"Genre\", \"Publisher\"}\n ));\n TableColumnModel columns = m_gameTable.getColumnModel();\n columns.getColumn(0).setMinWidth(0);\n m_gameTable.setAutoCreateRowSorter(true);\n }", "public static void setTitle(int currentScore, int lives) {\r\n\t\tpacHumanGameFrame.setTitle(\"Score: \" + currentScore + \" Lives: \" + lives);\r\n\t}", "@Override\n\tprotected String getWindowTitle() {\n\t\treturn \"LodeRunnerGANLevelBreeder\";\n\t}", "protected void setPopUpTitle(String title){\r\n\t\tthis.stage.setTitle(title);\r\n\t}", "public abstract CharSequence getTitle();", "private static void printBoard() {\n\n\t//\tJOptionPane.showMessageDialog(null, \"Heyoo\", \".-*Board*-.\", -1);\n\t\t//String name = JOptionPane.showInputDialog(\"Vat is dain name?\");\n\t\t//JOptionPane.showMessageDialog(null, \"Aiight you good, \" + name);\n\t\t\n\t\t\n\t\tString[] options = {\"Sten\", \"Sax\", \"Påse\"};\n\t\tString Val = (String)JOptionPane.showInputDialog(null, \"Sten, Sax eller Påse?\",\n \"Game nr\", JOptionPane.QUESTION_MESSAGE, null, options, options[2]);\n\t\t\n\t\t\n\t\t\n\t}", "String title();", "String title();", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "@Override\r\n\tpublic String getShowTitle() {\n\t\treturn getQymc();\r\n\t}", "private void howToPlay() {\n\n String s = \"You are presented with a grid of tiles, some of which contain mines.\\n\"\n + \"The aim of Minesweeper is to reveal all tiles in the grid which do not contain mines.\\n\"\n + \"To reveal a tile, click on it. If the tile you reveal is a mine, you lose the game.\\n\"\n + \"If the tile you reveal is empty, all surrounding tiles will be revealed, \\n\"\n + \"and if those are also empty, their surrounding tiles will be revealed too.\\n\"\n + \"Tiles containing numbers indicate how many mines there are surrounding that tile.\\n\"\n + \"If you think a tile contains a mine, right click on it to mark it as a mine.\\n\"\n + \"You win the game once either you mark all mines, or reveal all tiles which are not mines.\";\n\n JFrame helpframe = new JFrame(\"How to play\");\n JPanel helppanel = new JPanel();\n JButton close = new JButton(\"Got it!\");\n JTextArea text = new JTextArea(s);\n\n close.addActionListener((ActionEvent ev) -> {\n helpframe.dispose();\n });\n\n text.setEditable(false);\n text.setOpaque(false);\n text.setWrapStyleWord(true);\n helppanel.add(text);\n helppanel.add(close);\n helpframe.add(helppanel);\n helpframe.setLocationRelativeTo(null);\n helpframe.setSize(560, 200);\n helpframe.setVisible(true);\n helpframe.setResizable(false);\n }", "public void prepareTitleView(int i) {\n int i2;\n setBackground(getResources().getDrawable(R.drawable.fs_gesture_back_bg, (Resources.Theme) null));\n int i3 = R.string.how_to_use_app_quick;\n switch (i) {\n case 0:\n i2 = R.string.fs_gesture_left_back_ready_summary;\n break;\n case 1:\n i2 = R.string.fs_gesture_right_back_ready_summary;\n break;\n case 2:\n i3 = R.string.how_to_back_home;\n i2 = R.string.fs_gesture_back_home_summary;\n break;\n case 3:\n i3 = R.string.how_to_switch_recents;\n i2 = R.string.fs_gesture_switch_recents_summary;\n break;\n case 4:\n i3 = R.string.how_to_use_drawer;\n i2 = R.string.how_to_use_drawer_summary;\n break;\n case 5:\n i2 = R.string.how_to_use_app_quick_summary;\n break;\n case 6:\n i2 = R.string.how_to_use_app_quick_hide_line_summary;\n break;\n default:\n i2 = 0;\n i3 = 0;\n break;\n }\n i3 = R.string.fs_gesture_back_ready_title;\n TextView textView = this.mTitleView;\n if (textView != null && this.mSummaryView != null) {\n textView.setText(i3);\n this.mSummaryView.setText(i2);\n this.mTitleView.setVisibility(0);\n }\n }", "public void assertWindowTitle(String seriesName) {\r\n\r\n\t\tString windowText = driver.getTitle();\r\n\t\t// Assert.assertEquals(\"Text not found!\", windowText.contains(seriesName));\r\n\t\tAssert.assertEquals(true, windowText.contains(seriesName));\r\n\t}", "public void setTitle(Player p, String title, String objectiveName) {\r\n\t\t\r\n\t\tif(!hasScoreboard(p)) {\r\n\t\t\tcreate(p);\r\n\t\t\tsetTitle(p, title, objectiveName);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tObjective obj = getSB(p).getObjective(objectiveName);\r\n\t\t\r\n\t\tif(obj == null) {\r\n\t\t\tgetSB(p).registerNewObjective(objectiveName, \"dummy\");\r\n\t\t\tgetSB(p).getObjective(objectiveName).setDisplaySlot(DisplaySlot.SIDEBAR);\r\n\t\t\tsetTitle(p, title, objectiveName);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tobj.setDisplayName(title);\r\n\t}", "public void resetTitle ( ) {\n\t\texecute ( handle -> handle.resetTitle ( ) );\n\t}", "private void createYourMusicTitle() {\n\t\tjpYourMusic = new JPanel(new GridLayout(1,1));\n\t\tjpYourMusic.setOpaque(false);\n\t\tJLabel jlYourMusic = new JLabel(\"YOUR MUSIC\");\t\t\n\t\tjlYourMusic.setFont(new java.awt.Font(\"Century Gothic\",0, 17));\n\t\tjlYourMusic.setForeground(new Color(250,250,250));\n\t\tjpYourMusic.add(jlYourMusic);\n\t}", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "public void announceWinners(String winners) {\n JOptionPane.showMessageDialog(frame, winners + \" won the game!\");\n }", "private void showGameOver()\n {\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //Todo:\n // step 1. get the winner name using game.getWinner()\n // step 2. put the string player.getName()+\" won the game!\" to the string reference called \"result\"\n Player winner = game.getWinner();\n String result = winner.getName() + \" won the game!\";\n\n // pass the string referred by \"result\" to make an alert window\n // check the bottom of page 9 of the PA description for the appearance of this alert window\n Alert alert = new Alert(AlertType.CONFIRMATION, result, ButtonType.YES, ButtonType.NO);\n alert.showAndWait();\n if (alert.getResult() == ButtonType.YES)\n {\n Platform.exit();\n }\n }\n });\n }", "public void win() {\n JOptionPane.showConfirmDialog(null, \"You won! You got out with \" + this.player.getGold() + \" gold!\", \"VICTORY!\", JOptionPane.OK_OPTION);\n this.saveScore();\n this.updateScores();\n this.showTitleScreen();\n }", "private void updateTitle()\n {\n if (this.m_bClosing)\n return;\n\n final String agentName = (m_AgentFocus == null ? kNoAgent\n : m_AgentFocus.GetAgentName());\n boolean remote = m_Document.isRemote();\n final String remoteString = remote ? \"remote \" : \"\";\n\n // Need to make sure we make this change in the SWT thread as the event\n // may come to us\n // in a different thread\n Display.getDefault().asyncExec(() -> getShell().setText(\n \"Soar Debugger in Java - \" + remoteString + agentName));\n }", "public static void switchTo_Window_with_title(String Exp_title)\r\n\t{\n\t\tSet<String> All_Window_IDS=driver.getWindowHandles();\r\n\t\t\r\n\t\t//Applying foreach window to iterator for all windows\r\n\t\tfor (String EachWindowID : All_Window_IDS) \r\n\t\t{\r\n\t\t\tdriver.switchTo().window(EachWindowID);\r\n\t\t\t//After switch get window title\r\n\t\t\tString Runtime_Title=driver.getTitle();\r\n\t\t\tSystem.out.println(Runtime_Title);\r\n\t\t\t\r\n\t\t\tif(Runtime_Title.contains(Exp_title))\r\n\t\t\t{\r\n\t\t\t\tbreak; //At what window it break , It keep browser controls at same window\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.6151294", "0.58792484", "0.58282477", "0.5794891", "0.5608451", "0.5602944", "0.549951", "0.54308474", "0.54308474", "0.54308474", "0.54308474", "0.54308474", "0.5424993", "0.54247296", "0.54185796", "0.5396598", "0.5374344", "0.5368026", "0.5363961", "0.53489673", "0.53489673", "0.53489673", "0.5339106", "0.53040177", "0.53024757", "0.529638", "0.52939683", "0.5293291", "0.52759737", "0.52708817", "0.52687716", "0.52530974", "0.5249067", "0.5246724", "0.5239888", "0.5239668", "0.523836", "0.52312666", "0.5215379", "0.5210922", "0.5209766", "0.5200735", "0.5197839", "0.51965237", "0.51958174", "0.51724136", "0.51724136", "0.51724136", "0.51724136", "0.51724136", "0.5170685", "0.51633734", "0.51478654", "0.5145015", "0.512779", "0.5126171", "0.5116547", "0.5109819", "0.5103546", "0.50956905", "0.50948864", "0.5093254", "0.5087173", "0.5084968", "0.5082243", "0.5080482", "0.50777495", "0.5060405", "0.505985", "0.5055454", "0.5055454", "0.5042051", "0.5025195", "0.501158", "0.5004122", "0.50028145", "0.49948567", "0.49791604", "0.4978255", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49763313", "0.49757677", "0.49739984", "0.49699554", "0.4969058", "0.49631625", "0.49544352" ]
0.5474014
7
/ In: A MouseEvent object Out: Nothing Fires when the mouse enters a card or status JLabel
public void mouseEntered(MouseEvent e) { JLabel source = (JLabel)e.getSource(); view.highlightLabel(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void mouseEntered(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.BLUE);\n levelPanel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n }", "public void mouseEntered( MouseEvent event ){}", "public void mouseEntered (MouseEvent e) {}", "@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.blue);\n\t\t\t\t\t\t\t\t}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "public void mouseEntered(MouseEvent e) {}", "@Override\n\tpublic void mouseEntered(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.orange);\n\t\t\n\t}", "@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.RED);\n\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(final MouseEvent event){}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "public void mouseClicked(MouseEvent e) {\n //The source will always be a JLabel\n JLabel source = (JLabel)e.getSource();\n if(source == view.statusText){\n model.initGame();\n return;\n }\n for(int playerHand = 0; playerHand < view.playerHands.length; playerHand++){\n for(int card = 0; card < model.highCardGame.getHand(playerHand).getNumCards(); card++){\n if(view.playerHands[playerHand][card].getIcon() == View.GUICard.getBackCardIcon())\n continue;\n if(view.playerHands[playerHand][card] == source){\n //A card was clicked.\n Model.playCard(playerHand, card);\n return;\n }\n }\n }\n }", "@Override\n public void mouseEntered(MouseEvent evt) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tl1.setText(\"You entered the mouse\");\r\n\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\r\n }", "@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.blue);\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\" You Entered the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t\t\r\n\t}", "public void mouseExited(MouseEvent event){\t\n\t\t// We left the card without releasing the mouse press, so we're not counting it as a click\n\t\tclickflag = false;\n\t}", "@Override\n public void mouseEntered(final MouseEvent e)\n {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent arg0) {\n \n }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n }", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void mouseEntered(MouseEvent e)\n {\n }", "@Override\n public void mouseEntered(MouseEvent e)\n {\n }", "public void mouseEntered(MouseEvent evt) {\r\n }", "public void mouseEntered(MouseEvent e)\n { }", "@Override\n public void mouseEntered(MouseEvent e){\n }", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}", "@Override\n\tpublic void mouseEntered() {\n\t\t\n\t}", "public void mouseEntered(MouseEvent e) {\n\n }", "public void mouseEntered (MouseEvent me) { }", "@Override\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "public void mouseEntered (MouseEvent m) { }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n }", "@Override\r\n public void mouseEntered(MouseEvent e) {\n\r\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n }", "private void JPOpcao_13MouseEntered(java.awt.event.MouseEvent evt) {\n }", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "@Override\n public void mouseEntered(MouseEvent e) {\n\n }", "public void mouseEntered(MouseEvent e)\n {}", "public void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "public void mouseEntered(MouseEvent e) {\n \t\t\r\n \t}", "@Override\r\n\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t public void mouseEntered(MouseEvent arg0) {\n\t\t }", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseEntered(MouseEvent e) {\n\t\t\r\n\t}" ]
[ "0.73713005", "0.7242447", "0.71926355", "0.7152478", "0.71368253", "0.71368253", "0.71368253", "0.71368253", "0.71217716", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.71206325", "0.7100797", "0.70764434", "0.7075516", "0.7072613", "0.70685065", "0.7067843", "0.7064128", "0.70364743", "0.70354646", "0.7027054", "0.700901", "0.70077556", "0.700491", "0.7003683", "0.70026255", "0.6982965", "0.69817734", "0.6977422", "0.6972505", "0.6971521", "0.69649285", "0.6963365", "0.6963365", "0.6960277", "0.69601", "0.69601", "0.6952459", "0.69451123", "0.6939471", "0.6938422", "0.6925345", "0.6918883", "0.691815", "0.6909519", "0.69082636", "0.69082636", "0.69082636", "0.69082636", "0.6908037", "0.6907392", "0.6907392", "0.6907392", "0.6907392", "0.6907392", "0.6907392", "0.69036835", "0.6902191", "0.6899748", "0.6899748", "0.6899748", "0.6899748", "0.68921465", "0.6888344", "0.68858933", "0.68843967", "0.68843967", "0.68843967", "0.68843967", "0.68840265", "0.68840265", "0.68840265", "0.68840265", "0.68775517", "0.6872776", "0.6870274", "0.68701553", "0.6859068", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.6856217", "0.68555856", "0.68549126", "0.68549126" ]
0.70120543
26
/ In: A MouseEvent object Out: Nothing Fires when the mouse exits a card or status JLabel
public void mouseExited(MouseEvent e) { JLabel source = (JLabel)e.getSource(); view.deHighlightLabel(source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mouseExited(MouseEvent event){\t\n\t\t// We left the card without releasing the mouse press, so we're not counting it as a click\n\t\tclickflag = false;\n\t}", "@Override\n public void mouseExited(MouseEvent e) {\n JLabel x = (JLabel) e.getSource();\n x.setForeground(Color.black);\n levelPanel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t\t}", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel j1 = (JLabel)e.getSource();\n\t\tj1.setForeground(Color.BLACK);\n\t}", "@Override\n\t\t\t\t\t\t\t\tpublic void mouseExited(MouseEvent arg0) {\n\t\t\t\t\t\t\t\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\t\t\t\t\t\t\t\tjlb.setForeground(Color.black);\n\t\t\t\t\t\t\t\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tmsg=\"\";\r\n\t\tmsg+=\"You Exited the frame\";\r\n\t\t\r\n\t\tlabel.setText(msg);\r\n\t}", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.black);\n\t}", "@Override\n\tpublic void mouseExited(java.awt.event.MouseEvent e) {\n\t\tJLabel jl=(JLabel)e.getSource();\n\t\tjl.setForeground(Color.BLACK);\n\t\t\n\t}", "@Override\n\tpublic void mouseExited(MouseEvent arg0) {\n\t\tJLabel jlb=(JLabel)arg0.getSource();\n\t\tjlb.setForeground(Color.black);\n\t}", "@Override\r\n\tpublic void mouseExited(MouseEvent e) {\n\t\tl1.setText(\"You exited the mouse\");\r\n\t}", "public void mouseReleased( MouseEvent event ){}", "@Override\n public void mouseExited(MouseEvent evt) {\n }", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t mouseReleased = true;\n\t\t cardClicked = false;\n\t\t mouseClick = false;\n\t\t \n\t}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "public void mouseExited(MouseEvent e) {}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}", "@Override\n\t\t\tpublic void mouseExited(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.black);\n\t\t\t\tsetCursor(Cursor.getDefaultCursor());\n\t\t\t}", "@Override\n public void mouseExited(final MouseEvent event){}", "@Override\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t}", "@Override\r\n public void mouseExited(MouseEvent e) {\n\r\n }", "@Override\n public void mouseReleased(MouseEvent evt) {\n }", "@Override\r\n\tpublic void mouseReleased(MouseEvent e) {\n\t\tl1.setText(\"You released the mouse\");\r\n\t}", "@Override\n public void mouseReleased(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "public void mouseExited (MouseEvent m) {}", "@Override\n public void mouseExited(MouseEvent e){\n }", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public void mouseExited(MouseEvent e)\n { }", "@Override\n public void mouseReleased(MouseEvent e)\n {\n }", "@Override\n public void mouseReleased(MouseEvent e)\n {\n }", "public void mouseExited(MouseEvent evt) {\r\n }", "void mouseExited(MouseEvent mouseEvent);", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\r\n public void mouseReleased(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent arg0) {\n \n }", "@Override\r\n public void mouseExited(MouseEvent arg0)\r\n {\n\r\n }", "@Override\r\n public void mouseExited(MouseEvent e)\r\n {\n\r\n }", "@Override\r\n public void mouseExited(MouseEvent e) {\n }", "public void mouseReleased(MouseEvent e) {}", "public void mouseReleased(MouseEvent e) {}", "public void mouseReleased(MouseEvent e) {}", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "@Override\n public void mouseExited(MouseEvent e)\n {\n }", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n\tpublic void mouseReleased(MouseEvent event){}", "@Override\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\n\t\t\t\t\t}", "@Override\r\n\t\t public void mouseExited(MouseEvent arg0) {\n\t\t }", "@Override\r\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n public void mouseExited(MouseEvent e) {\n\n }", "@Override\n\tpublic void mouseReleased(MouseEvent event) {\n\t\t\n\t}", "@Override\r\n\tpublic void exited(DNDEvent e) {\n\t\tif (dockable.getTitle() == e.getDragSource()) return;\r\n\t\t\r\n\t\tmouseOver = false;\r\n\t\tthis.repaint();\r\n\t}", "@Override\n public void mouseReleased(MouseEvent e){\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseExited(MouseEvent e) {\n }", "@Override\n public void mouseReleased(final MouseEvent e)\n {\n }", "@Override\npublic void mouseExited(MouseEvent e)\n{\n\t\n}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void mouseExited(MouseEvent arg0) {\n\n }", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.7794189", "0.76487297", "0.7434441", "0.7411204", "0.7411204", "0.7411204", "0.7411204", "0.7399679", "0.73933065", "0.73425436", "0.7322706", "0.7313474", "0.7305068", "0.7256047", "0.72541845", "0.72061956", "0.71885747", "0.7176047", "0.7176047", "0.7176047", "0.7176047", "0.71745837", "0.7156403", "0.7155323", "0.7149855", "0.71337175", "0.7119913", "0.7119913", "0.71175855", "0.71086895", "0.70821255", "0.7082018", "0.70776683", "0.7075787", "0.70717585", "0.7069955", "0.7068709", "0.7060919", "0.7060919", "0.7058519", "0.70503515", "0.7049552", "0.7049552", "0.70450234", "0.70450234", "0.70403445", "0.703897", "0.7037654", "0.7036679", "0.7033216", "0.7033216", "0.7033216", "0.7029067", "0.70283866", "0.70283866", "0.7025249", "0.7025249", "0.7025249", "0.7023292", "0.7023292", "0.70225525", "0.70225525", "0.70225525", "0.70225525", "0.70225525", "0.7018583", "0.70152783", "0.70129454", "0.7005575", "0.7005489", "0.7005489", "0.7005129", "0.7005129", "0.7005129", "0.7005129", "0.7005129", "0.70038307", "0.70016855", "0.6993021", "0.6989197", "0.6989197", "0.6989197", "0.6989197", "0.6989197", "0.69880015", "0.6987027", "0.69857585", "0.69857585", "0.69857585", "0.698243", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896", "0.6981896" ]
0.72586095
13
/ In: A MouseEvent object Out: Nothing Fires when the mouse clicks a card or status JLabel
public void mouseClicked(MouseEvent e) { //The source will always be a JLabel JLabel source = (JLabel)e.getSource(); if(source == view.statusText){ model.initGame(); return; } for(int playerHand = 0; playerHand < view.playerHands.length; playerHand++){ for(int card = 0; card < model.highCardGame.getHand(playerHand).getNumCards(); card++){ if(view.playerHands[playerHand][card].getIcon() == View.GUICard.getBackCardIcon()) continue; if(view.playerHands[playerHand][card] == source){ //A card was clicked. Model.playCard(playerHand, card); return; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handleMouseClicked(MouseEvent e, CardLabel clickedLabel){\n\t\tif(status == Status.YOUR_TURN || status == Status.YOUR_FIRST_TURN){\n\t\t\tCardTile clickedTile = you.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo());\n\t\t\tif(clickedTile == null)\n\t\t\t\tclickedTile = opponent.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo());\n\t\t\t// if you clicked on one of your card labels and not on your opponent card labels\n\t\t\tif(clickedTile.getPlace() == Place.MY_ACTIVE || clickedTile.getPlace() == Place.MY_BENCH || clickedTile.getPlace() == Place.MY_DECK || \n\t\t\t\t\tclickedTile.getPlace() == Place.MY_DISCARD || clickedTile.getPlace() == Place.MY_HAND || clickedTile.getPlace() == Place.MY_PRIZE){\n\t\t\t\t\n\t\t\t\t// if no card was selected yet\n\t\t\t\tif(selectedTile == null){\n\t\t\t\t\tselectTile(clickedTile);\n\t\t\t\t}\n\t\t\t\telse{ // if you have already selected a card and this click is after that\n\t\t\t\t\t// if you clicked again on the selected tile you will unselect it\n\t\t\t\t\tif(clickedTile.getPlace() == selectedTile.getPlace() && clickedTile.getSeqNo() == selectedTile.getSeqNo()){\n\t\t\t\t\t\tunSelectTile();\n\t\t\t\t\t}\n\t\t\t\t\telse{ // if you clicked on different tile than the selected one\n\t\t\t\t\t\tmoveCard(clickedTile);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(status == Status.YOU_WIN_PRIZE){\n\t\t\tif(clickedLabel.getPlace() == Place.MY_PRIZE && you.getCardTile(Place.MY_PRIZE, clickedLabel.getSeqNo()).getCard() != null){\n\t\t\t\tyou.addCardToHand(you.getPrize(), you.getCardTile(Place.MY_PRIZE, clickedLabel.getSeqNo()).getCard());\n\t\t\t\tyou.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo()).setCard(null);\n\t\t\t\tif(selectedTile != null){\n\t\t\t\t\tunSelectTile();\n\t\t\t\t}\n\t\t\t\t//board.updateInfo(\"\");\n\t\t\t\tsetStatus(Status.OP_TURN);\n\t\t\t}\n\t\t}else if(status == Status.OP_WIN_PRIZE){\n\t\t\tif(clickedLabel.getPlace() == Place.MY_BENCH && you.getCardTile(Place.MY_BENCH, clickedLabel.getSeqNo()).getCard() != null){\n\t\t\t\tyou.moveCardBtwTiles(you.getCardTile(Place.MY_BENCH, clickedLabel.getSeqNo()), you.getCardTile(Place.MY_ACTIVE, 1), \"\");\n\t\t\t\tsetStatus(Status.YOUR_TURN);\n\t\t\t}\n\t\t}else if(status == Status.SELECT_CARD){\n\t\t\tCardTile clickedTile = you.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo());\n\t\t\tif(clickedTile == null){\n\t\t\t\tclickedTile = opponent.getCardTile(clickedLabel.getPlace(), clickedLabel.getSeqNo());\n\t\t\t}\n\t\t\tif(currentAb instanceof Dam){\n\t\t\t\tSystem.out.println(((Dam) currentAb).getChooseFrom());\n\t\t\t\tif(((Dam) currentAb).getChooseFrom().equals(\"opponent\") || ((Dam) currentAb).getTarget().equals(\"opponent\")){\n\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.OP_BENCH || \n\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.OP_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t}\n\t\t\t\t}else if(((Dam) currentAb).getChooseFrom().equals(\"opponent-bench\")){\n\t\t\t\t\t\n\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.OP_BENCH)){\n\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(currentAb instanceof Deck){\n\t\t\t\tif(currentAb.getAbInfo().selectedCards.size()<((Deck)currentAb).getAmount()){\n\t\t\t\t\tif(clickedTile.getCard() != null && clickedTile.getPlace() == Place.MY_HAND){\n\t\t\t\t\t\tif(clickedTile.isSelected()){\n\t\t\t\t\t\t\tclickedTile.setSelected(false);\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCards.remove(clickedTile);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tclickedTile.setSelected(true);\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCards.add(clickedTile);\n\t\t\t\t\t\t\tif(currentAb.getAbInfo().selectedCards.size()==((Deck)currentAb).getAmount()){\n\t\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(currentAb instanceof Heal){\n\t\t\t\tif(((Heal) currentAb).getChooseFrom().equals(\"your\")){\n\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.MY_BENCH || \n\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.MY_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\tif(((Pokemon)clickedTile.getCard()).getHP() < ((Pokemon)clickedTile.getCard()).getTotalHP()){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}else if(currentAb instanceof Redamage){\n\t\t\t\tif(((Redamage)currentAb).getSource().equals(\"opponent\")){\n\t\t\t\t\tif(currentAb.getAbInfo().selectedCard == null){\n\t\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.OP_BENCH || \n\t\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.OP_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(((Redamage)currentAb).getDest().equals(\"opponent\")){\n\t\t\t\t\tif(currentAb.getAbInfo().selectedCard2 == null){\n\t\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.OP_BENCH || \n\t\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.OP_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard2 = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(currentAb instanceof Reenergize){\n\t\t\t\tif(((Reenergize)currentAb).getChooseSourceFrom().equals(\"your\") && currentAb.getAbInfo().selectedCard == null){\n\t\t\t\t\tif(currentAb.getAbInfo().selectedCard == null){\n\t\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.MY_BENCH || \n\t\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.MY_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else if(((Reenergize)currentAb).getChooseDestFrom().equals(\"your\")){\n\t\t\t\t\tif(currentAb.getAbInfo().selectedCard2 == null){\n\t\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.MY_BENCH || \n\t\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.MY_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard2 = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(currentAb instanceof Search){\n\t\t\t\tif(((Search)currentAb).getChoiceTarget().equals(\"your-pokemon-basic\")){\n\t\t\t\t\tif(clickedTile.getCard() != null && (clickedTile.getPlace() == Place.MY_BENCH || \n\t\t\t\t\t\t\t(clickedTile.getPlace() == Place.MY_ACTIVE && clickedTile.getSeqNo() == 1))){\n\t\t\t\t\t\tif(((Pokemon)clickedTile.getCard()).getStage() == Stage.BASIC){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else if(currentAb instanceof Swap){\n\t\t\t\t\tif(clickedTile.getCard() != null && clickedTile.getPlace() == Place.MY_BENCH){\n\t\t\t\t\t\t\tcurrentAb.getAbInfo().selectedCard = clickedTile;\n\t\t\t\t\t\t\tcardSelected();\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}else if(status == Status.RETREAT){\n\t\t\tif(clickedLabel.getPlace() == Place.MY_BENCH && you.getCardTile(Place.MY_BENCH, clickedLabel.getSeqNo()).getCard() != null){\n\t\t\t\tCard p = you.getActive1();\n\t\t\t\tyou.moveCardBtwTiles(you.getCardTile(Place.MY_BENCH, clickedLabel.getSeqNo()), you.getCardTile(Place.MY_ACTIVE, 1), \"\");\n\t\t\t\tyou.getCardTile(Place.MY_BENCH, clickedLabel.getSeqNo()).setCard(p);\n\t\t\t\tyou.getBench().add(p);\n\t\t\t\tyou.removeRetreatCost((Pokemon)p);\n\t\t\t\tboard.setNotification(\"\", false);\n\t\t\t\tsetStatus(Status.YOUR_TURN);\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tSystem.out.println(\"Clicked on: \" + x + \",\" + y);\r\n\t\t\tif (lastSelected != null) {\r\n\t\t\t\tlastSelected.setBorder(null);\r\n\t\t\t}\r\n\t\t\tsetBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n\t\t\tGCollector.getInstance().getEnv().setAgentPosTextFields(x, y);\r\n\t\t\tGCollector.getInstance().getEnv().setModifyPosTextFields(x, y);\r\n\r\n\t\t\tlastSelected = (JLabel) e.getComponent();\r\n\t\t}", "@Override\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t}", "private void jLabel97MouseClicked(java.awt.event.MouseEvent evt) {\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tl1.setText(\"You cliked the mouse\");\r\n\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void mouseClicked(MouseEvent arg0) {\n \n }", "@Override\r\n public void mouseClicked(MouseEvent e) {}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent event) {\n\n\t\t}", "public void mouseClicked( MouseEvent event ){}", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n public void mouseClicked(MouseEvent e) { }", "@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\n }", "@Override\n\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\n\t\t\t\t}", "private void CardButtonMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_CardButtonMouseClicked\r\n\t\t// risk.setState(RiskGameModel.TRADE_CARDS);\r\n\t\tGenerateCardPanel();\r\n\t\ttoggleCardButtonsPanel();\r\n\t\tjPanel1.repaint();\r\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\ttoggleFullSceen();\n\t\t\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void mouseClicked(MouseEvent e) {\n \n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\r\n\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void mouseClicked(MouseEvent me) {\n }", "@Override\n public void mouseClicked(MouseEvent e) {\n }", "@Override\r\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\n\t}", "@Override\r\n public void mouseClicked(MouseEvent e) {\r\n \r\n }", "@Override\n public void mouseClicked(MouseEvent e){\n String boton = W.detClick( e.getButton() );\n \n System.out.println(\" Mouse: Click \" + boton ); \n }", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\r\n\t\t}", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\r\n\t\t\t\r\n\t\t}", "@Override\n public void mouseClicked(MouseEvent e) {}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t}", "public void mouseClicked(MouseEvent event){}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "public void mouseClicked(MouseEvent e) {}", "private void jLabel83MousePressed(java.awt.event.MouseEvent evt) {\n }", "public void mouseClicked(MouseEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void mouseReleased(MouseEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t mouseReleased = true;\n\t\t cardClicked = false;\n\t\t mouseClick = false;\n\t\t \n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\n\t}" ]
[ "0.7299617", "0.7190706", "0.717458", "0.7170466", "0.71585226", "0.71349394", "0.713123", "0.713123", "0.713123", "0.713058", "0.71234447", "0.7123059", "0.7123059", "0.71177256", "0.71039355", "0.7103807", "0.7102388", "0.7102388", "0.7102388", "0.7101252", "0.70930505", "0.70861274", "0.70807165", "0.70787144", "0.70579875", "0.70579875", "0.70579875", "0.70579875", "0.70579875", "0.70579875", "0.70579875", "0.70507234", "0.70507234", "0.7039384", "0.7034092", "0.7033369", "0.70312214", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.7022579", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.70207024", "0.7011376", "0.70081526", "0.7007351", "0.7007351", "0.7007351", "0.7007351", "0.7007351", "0.7007351", "0.7007351", "0.7007351", "0.7000697", "0.69956756", "0.69956756", "0.69952345", "0.6994954", "0.69940865", "0.69920015", "0.69920015", "0.69920015", "0.69920015", "0.69920015", "0.69920015", "0.69899416", "0.6989212", "0.6983748", "0.6982579", "0.69819105", "0.6981849", "0.6981849", "0.69734263", "0.6968504", "0.6968504", "0.6968504", "0.6968504", "0.6963862", "0.6963037", "0.6961974", "0.6960135", "0.6960135", "0.6960135", "0.6960135", "0.6960135", "0.6960135" ]
0.7356572
0
The only time this is called is when the timer ticks.
public void actionPerformed(ActionEvent e){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void tick(){\r\n if(timer != 0)\r\n timer++;\r\n }", "@Override\n\tpublic boolean tick() {\n\t\treturn false;\n\t}", "@Override\n public void onTick(long arg0) {\n }", "public void timer() \r\n\t{\r\n\t\tSeconds.tick();\r\n\t \r\n\t if (Seconds.getValue() == 0) \r\n\t {\r\n\t \tMinutes.tick();\r\n\t \r\n\t \tif (Minutes.getValue() == 0)\r\n\t \t{\r\n\t \t\tHours.tick();\r\n\t \t\t\r\n\t \t\tif(Hours.getValue() == 0)\r\n\t \t\t{\r\n\t \t\t\tHours.tick();\r\n\t \t\t}\r\n\t \t}\r\n\t }\t\t\r\n\t \r\n\t updateTime();\r\n\t }", "@Override\n\t\tpublic void onTick(long arg0) {\n\t\t\t\n\t\t}", "public void setTimer() {\n\t\t\n\t}", "private void checkTickListener()\n\t{\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "private float resetTimer() {\r\n final float COUNTDOWNTIME = 10;\r\n return COUNTDOWNTIME;\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n return;\r\n }", "@Override\n public void tick() {\n super.tick();\n }", "private void TimerMethod() {\n this.runOnUiThread(Timer_Tick);\n }", "public static void tick() {\n if (tickTime == 0L) {\n tickTime = System.currentTimeMillis();\n } else {\n System.err.println(\"Must call tock before tick\");\n System.exit(1);\n }\n }", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "@Override\n\tpublic void tick() {\n\t\t\n\t}", "private void onPingingTimerTick()\r\n {\r\n EneterTrace aTrace = EneterTrace.entering();\r\n try\r\n {\r\n try\r\n {\r\n myConnectionManipulatorLock.lock();\r\n try\r\n {\r\n // Send the ping message.\r\n myUnderlyingOutputChannel.sendMessage(myPreserializedPingMessage);\r\n\r\n // Schedule the next ping.\r\n myPingingTimer.change(myPingFrequency);\r\n }\r\n finally\r\n {\r\n myConnectionManipulatorLock.unlock();\r\n }\r\n }\r\n catch (Exception err)\r\n {\r\n // The sending of the ping message failed - the connection is broken.\r\n cleanAfterConnection(true, true);\r\n }\r\n }\r\n finally\r\n {\r\n EneterTrace.leaving(aTrace);\r\n }\r\n }", "@Override\n\tpublic void periodic()\n\t{\n\t}", "@Override\r\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void onTick() {\n \n }", "@Override\n\tpublic void tick() {\n\n\t}", "public void tick() {\r\n }", "public void tick() {\n\t}", "public void tick() {\n\t}", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }", "@Override\r\n\tpublic void freezeTimer() {\n\t\t\r\n\t}", "@Override\r\n\t\tprotected void onTick() {\n\r\n\t\t}", "@Override\n public void livingTick() {\n super.livingTick();\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\r\n public void timePassed() {\r\n }", "@Override\n\tpublic Double getTimer() {\n\t\treturn null;\n\t}", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n\tpublic void periodic() {\n\t}", "@Override\n public void timePassed() {\n }", "public void resetTimer(){\n timerStarted = 0;\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "public void timeChanged();", "public boolean onTick();", "public void timePassed(double dt) {\r\n // Currently- nothing\r\n }", "void tick(long tickSinceStart);", "public static void ComienzaTimer(){\n timer = System.nanoTime();\n }", "public void run()\r\n {\n \tm_Handler.sendEmptyMessage(JMSG_TIMER);\r\n }", "public void tick()\r\n\t{\r\n\t\tduration = (int) (((Sys.getTime() - lastCall) * resolution) / Sys\r\n\t\t\t\t.getTimerResolution());\r\n\t\tlastCall = Sys.getTime();\r\n\t}", "public void onTimerEvent();", "public void resetTimer() {\n\t\tsetStartingTime(System.currentTimeMillis());\t\n\t\tthis.progressBar.setForeground(Color.black);\n\t\tlogger.fine(\"Set normal timer with data: \" + this.toString());\n\n\t}", "public void timeTick()\r\n\t{\r\n\t\tnumberDisplay1.increment();\r\n\t}", "public synchronized void resetTime() {\n }", "public void tick() {\r\n tick++;\r\n }", "protected void timerTicked() {\n\t\t// 5% of the time, increment or decrement the counter\n\t\tif (Math.random() >= 0.05) return; // do nothing 95% of the time\n\n\t\t// \"flip a coin\" to determine whether to increment or decrement\n\t\tboolean move = Math.random() >= 0.5;\n\t\t\n\t\t// send the move-action to the game\n\t\tgame.sendAction(new CounterMoveAction(this, move));\n\t}", "@Override\n public void run() {\n time_ = (int) (System.currentTimeMillis() - startTime_) / 1000;\n updateUI();\n\n if (time_ >= maxTime_) {\n // Log.v(VUphone.tag, \"TimerTask.run() entering timeout\");\n handler_.post(new Runnable() {\n public void run() {\n report(true);\n }\n });\n }\n }", "public void startTimer(){\n timerStarted = System.currentTimeMillis();\n }", "@Override\r\n public void periodic() {\n\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }", "@Override\r\n public void timePassed(double dt) {\r\n\r\n }" ]
[ "0.7472941", "0.7198207", "0.7050165", "0.7008086", "0.68860704", "0.6825837", "0.67602706", "0.67509884", "0.67509884", "0.67382264", "0.6704333", "0.66888666", "0.6661844", "0.6658044", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.6649144", "0.66378254", "0.6632092", "0.66292584", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.6618806", "0.66180974", "0.66130763", "0.66107196", "0.660368", "0.660368", "0.660145", "0.660145", "0.6599715", "0.6598682", "0.65902007", "0.65851796", "0.6564442", "0.6564442", "0.6564442", "0.6559457", "0.6550871", "0.65289515", "0.65289515", "0.65289515", "0.65289515", "0.651664", "0.6503441", "0.64811045", "0.64670664", "0.6460586", "0.6425447", "0.64081305", "0.63913924", "0.6390721", "0.6389124", "0.6386961", "0.63830954", "0.63573724", "0.6356974", "0.6352965", "0.6351311", "0.63272375", "0.63172644", "0.63134056", "0.63127863", "0.63054043", "0.63054043" ]
0.0
-1
The deck can consist of multiple packs of cards. / Deck(int) In: An integer specifying the number of packs to build the deck from. Out: Nothing Description: This is a constructor that will build a deck composed of the specified number of packs.
public Deck(int numPacks) { //Build the master pack. this.allocateMasterPack(); //If the user wants more packs than are available, give them the max. if (numPacks > Deck.MAX_PACKS) this.init(Deck.MAX_PACKS); //If the user wants 0 or less packs, give them one. else if (numPacks < 1) this.init(1); else //Otherwise, build the deck with the specified number of packs. this.init(numPacks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "private void buildDeck(int numDecks) {\n for (int i = 0; i < numDecks; ++i) {\n for (int j = 1; j < 14; ++j) {\n deck.add(new Card(j, Suit.Clubs));\n deck.add(new Card(j, Suit.Hearts));\n deck.add(new Card(j, Suit.Diamonds));\n deck.add(new Card(j, Suit.Spades));\n }\n }\n }", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public void buildDeck(){\n\t\tfor(int i = 0; i < deckSize; i++){\n\t\t\tdeck[i] = i;\n\t\t}\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }", "public Deck(Deck iDeck){\n this.addAll(iDeck);\n }", "public Deck() {\n generateDeckOfCards();\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Deck(int deckSize,Suit suits[]){\r\n this.suits = suits;\r\n this.deckSize = deckSize;\r\n this.fillDeck();\r\n this.shuffle();\r\n }", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public Shoe(int numDecks)\n {\n\n // this will construct the remaining decks.\n\n cardAry = new Card[numDecks*52];\n // create the cards ....\n for (int deckIdx=0; deckIdx<numDecks; deckIdx++)\n {\n for (int suit=0; suit<4; suit++) {\n for( int rank = 1; rank < 14; rank++) {\n cardAry[(deckIdx*52)+(suit*13+rank-1)] = new Card (Card.Suit.numToSuit(suit),\n rank);\n }\n }\n }\n this.numDecks = numDecks;\n this.numCards = 52*numDecks;\n }", "public Deck( int copiesPerCard ) {\n if (copiesPerCard <= 0) {\n throw new IllegalArgumentException();\n }\n this.cards = new Card[STANDARD_DECK_SIZE * copiesPerCard];\n this.topCardIndex = 0;\n int DeckLength = this.cards.length;\n int cardIndex = 0;\n for (int copy = 1; copy <= copiesPerCard ; copy++ ) {\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }\n }", "public void makeDeck()\r\n\t{\r\n\t\tfor (int i = 1; i < 5; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 2; j < 15; j++)\r\n\t\t\t{\r\n\t\t\t\tdeck.add(new Card(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public void createDeck() {\n\t\t// for loop that repeats 4 times - one for each suit\n\t\tfor (String suit : suits) {\n\t\t\t// for loop that repeats 13 times (2-14) - once for each value\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\t//create instance of new card createCard(value, name);\n\t\t\t\tCard card = new Card(i, suit);\n\t\t\t\t//add card to deck array\n\t\t\t\taddCardToDeck(card);\n\t\t\t}\t\n\t\t}\n\t}", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public Dealer(int deckNum, HandCard handCard) {\n List<Deck> deckList = new ArrayList<>();\n for (int i = 0; i < deckNum; i++) {\n deckList.add(new Deck());\n }\n this.deckList = deckList;\n this.handCard = handCard;\n\n this.cardIterator = new CardIterator();\n }", "public CardGameFramework(int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand) {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers)\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public static Stack<int[]> createDeck() {\n\t\t// Populate deck with 4 suits, 13 cards each [RANK, SUIT]\n\t\tStack<int[]> deck = new Stack<int[]>();\n\t\tfor (int j = HEARTS; j <= SPADES; j++) {\n\t\t\tfor (int i = 1; i <= 13; i++) {\n\t\t\t\tint[] card = new int[] {i, j};\n\t\t\t\tdeck.push(card);\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(deck);\n\t\treturn deck;\n\t}", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }", "public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public Deck() {\n this.deck = new LinkedList<>();\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public VegasDeckClass(int numberOfDecks){\n createCards(VEGAS, numberOfDecks);\n this.vegasDeckCardList = getCardList();\n }", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public Deck(boolean shuffle) {\n\t\t//52 cards\n\t\tthis.cardNumber = 52;\n\t\t//Total slots of 52 ARRAY\n\t\tthis.card = new Card[this.cardNumber];\n\t\t\n\t\t//location of the card\n\t\tint cardLocation= 0;\n\t\t\n\t\t// each suit\n\t\tfor(int suit = 0; suit < 4; suit++)\n\t\t{\n\t\t\t//each number in the deck\n\t\t\tfor(int num = 1; num <=13; num++)\n\t\t\t{\n\t\t\t\t// add a new card to the deck \n\t\t\t\tthis.card[cardLocation] = new Card(Suit.values()[suit],num);\n\t\t\t\tcardLocation++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Shuffling done\n\t\tif(shuffle == true)\n\t\t{\n\t\t\tthis.shuffle();\n\t\t}\n\t}", "public Deck()\n {\n this(1);\n }", "public SpoonsDeck() {\r\n\t deck = new ArrayList<SpoonsCard>();\r\n\t int cardCt = 0; // How many cards have been created so far.\r\n\t for ( int suit = 0; suit <= 3; suit++ ) {\r\n\t for ( int value = 2; value <= 14; value++ ) {\r\n\t \t deck.add(cardCt, new SpoonsCard(value,suit)); \r\n\t \t cardCt++;\r\n\t }\r\n\t \r\n\t }\r\n\t cardsUsed = 0;\r\n }", "public Deck(ArrayList<Card> deck)\n {\n this.deck = deck;\n }", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public Shoe(int numDecks) {\n\t\tthis.deckCount = numDecks;\n\t\tthis.numCards = deckCount * numDecks;\n\t\tif (numDecks >= minDecks) {\n\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Minimum decks is 4\");\n\t\t}\n\t\tCollections.shuffle(Shoe);\n\t}", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public void createDecks(){\r\n\t\tfor (int j = 10; j < 20; j++){\r\n\t\t\taddCard(new Card(cardNames[j]));\r\n\t\t}\r\n\t}", "public stdDeck(){\n super();\n for(int i=1; i<14; i++){\n stdCard card = new stdCard(Suit.CLUBS, i);\n deck.add(card);\n card = new stdCard(Suit.DIAMONDS, i);\n deck.add(card);\n card = new stdCard(Suit.HEARTS, i);\n deck.add(card);\n card = new stdCard(Suit.SPADES, i);\n deck.add(card);\n }\n }", "@Override\n public void createShoe(int ndecks) {\n Deck deck;\n for (int i = 0; i < ndecks; i++) {\n deck = new Deck();\n this.cards.addAll(deck.getDeck());\n }\n }", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "public Card[] initialize(Card[] deck, int decks) {\n counter = 0;\n\n //Initialize the deck\n for (int i = 0; i < decks; i++) {\n for (int suit = 0; suit < 4; suit++) {\n for (int rank = 0; rank < 13; rank++) {\n cards[counter] = new Card(suit, rank, resolvePNG(suit, rank));\n counter++;\n }\n }\n }\n\n return deck;\n }", "public Deck(ArrayList<Card> providedCards) {\n if (null == providedCards || (providedCards.size() != DECK_SIZE)) {\n throw new IllegalArgumentException(\"Deck should be initialized with minimum 52 cards\");\n }\n if (providedCards.stream().distinct().count() != providedCards.size()) {\n throw new DuplicateCardFoundException();\n }\n this.cards = new ArrayList<>(providedCards.size());\n this.cards.addAll(providedCards);\n }", "public CardGame( int handSize, int copiesPerDeck ){\n this.handOne = new Hand(handSize);\n this.handTwo = new Hand(handSize);\n this.gameDeck = new Deck(copiesPerDeck);\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public Deck makeComputerDeck()\r\n\t{\r\n\t\tDeck computer = new Deck();\r\n\r\n \tfor (int i = 0; i < (DECK_COUNT/2); i++)\r\n \t{\r\n \t computer.addToDeck(deck.remove(0));\r\n \t}\r\n\r\n\t\treturn computer;\r\n\t}", "Deck(byte decks, byte burn, byte times) \n \t{\n\t\tdeck = new ArrayList<Card>(); // Instantiate the ArrayList.\n\t \thowManyDecks = decks; // How many 52-card decks the deck should contain.\n\t \tshuffleTimes = times; // How many times to shuffle the deck\n\t \n\t \tfillDeck(); // Fill it with Cards.\n\t \tshuffleDeck(); //shuffle the deck \n\t \tburn(burn); // remove given amount of Cards from the top of the deck\n\t}", "private Pile createDeck() {\n \t\tPile deck = new Pile(\"deck\"); // TODO Refactor, no hardcoded string\n\t\tpileNames.add(\"deck\");\n \t\tfor (Suit suit : Suit.values()) {\n \t\t\tfor (Rank rank : Rank.values()) {\n \t\t\t\tdeck.addCard(new Card(suit, rank));\n \t\t\t}\n \t\t}\n \t\t// Put the deck at the middle of the table\n \t\tmTable.set(MID_OF_TABLE, deck);\n \t\treturn deck;\n \t}", "void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "public void init(int numPacks) {\n //Initialize the cards array.\n this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK];\n //Until the total number of cards are reached, keep adding cards from the\n //master pack.\n for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) {\n this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK];\n }\n //Set the top card to the last card allocated.\n this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK;\n }", "public Card(int deckValue){\n\t\t\n\t\t//Guard against an invalid state:\n\t\tif((deckValue < 1) || (deckValue > 52))\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tthis.deckValue = deckValue;\n\t\tfaceValue = toFaceValue(deckValue);\n\t\tsuitValue = toSuitValue(deckValue);\n\t}", "public static Deck buildStandardDeck() {\n final List<Card> cards = new ArrayList<>();\n for (final Rank rank : Rank.values()) {\n for (final Suite suite : Suite.values()) {\n cards.add(new Card(rank, suite));\n }\n }\n return new Deck(cards);\n }", "public GroupOfCards(int givenSize)\r\n {\r\n size = givenSize;\r\n }", "public void createDeck(){\n //Does nothing because it will be overridden in the child classes.\n }", "private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }", "public Queue(int[] Deck) {\n shuffleArray(Deck);\n Node node = new Node();\n for (int i = 0; i < Deck.length; i++) {\n node = new Node();\n node.card = Deck[i];\n node.next = null;\n if (head == null) {\n head = node;\n tail = node;\n }\n else {\n tail.next = node;\n tail = node;\n }\n }\n }", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}", "public static Group newDeck() {\n\t\tGroup g = new Group();\n\t\tfor (Suit s : Suit.values()) {\n\t\t\tfor (Rank r : Rank.values()) {\n\t\t\t\tCard c = new Card(r,s);\n\t\t\t\tg.add(c);\n\t\t\t}\n\t\t}\n\t\treturn g;\n\t}", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public PileOfCards(int numCards) {\n descriptors = CardFactory.getDescriptorKeySet();\n pile = new ArrayList<Card>(numCards);\n for(int i = 0; i < numCards; i++)\n pile.add(CardFactory.drawCard());\n }", "public Shoe(Card.Suit suit, int numCards)\n \n { \n cardAry = new Card[numCards];\n\n int numSuits = numCards / 13;\n\n for(int deckIdx = 0; deckIdx<= numSuits; deckIdx++)\n {\n int cardsInSuit;\n if(deckIdx == numSuits)\n cardsInSuit = numCards % 13;\n else\n cardsInSuit = 13;\n for(int rankIdx = 1; rankIdx<=cardsInSuit; rankIdx++)\n {\n cardAry[deckIdx*13 + rankIdx-1] = new Card(suit, rankIdx);\n }\n }\n\n this.numDecks = 0;\n this.numCards = numCards;\n }", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "public void setChosenDeckNumber(int n){\n this.chosenDeckNumber = n;\n }", "public void createFullDeck(){\n for(Suit cardSuit: Suit.values()){\n //iterating over all the values\n for(Value cardValue: Value.values()){\n cards.add(new Card(cardSuit,cardValue));\n }\n }\n }", "@Override\r\n public void fillDealerDeck(int numberOfCards, int deckPosition) {\r\n for (int i = 0; i < numberOfCards; i++) {\r\n this.dealer.addCard(deckPosition, new Card());\r\n }\r\n System.out.println(\"Deck filled\");\r\n }", "@Override\n public String toString() {\n return \"Deck{\" + \"deck=\" + deck + '}';\n }", "public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\n }", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "private void createFullPackOfCards()\r\n {\r\n // Todo\r\n\r\n // Using a for-loop, add all the Card instances to cards.\r\n for ( int i = 0; i < NOOFCARDSINFULLPACK; i ++) {\r\n addTopCard( new Card(i));\r\n }\r\n }", "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n // this was slightly sloppy: multiple packs point to same master cards\n // if something modified a card, we would be in trouble. fortunately,\n // we don't expect a card to ever be modified after instantiated\n // in the context of a deck.\n\n this.numPacks = numPacks;\n topCard = numPacks * 52;\n }", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "Pinochle(){\n createDeck();\n createDeck();\n this.originalSizeOfDeck = this.deckOfCards.size();\n }", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public Game() {\n //Create the deck of cards\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "@Test\n public void create() {\n Deck deck = new DeckImplementation();\n assertEquals(\"Wrong initial deck size!\", 180,\n deck.numberOfCardsRemaining());\n deck.drawACard();\n assertEquals(\"Wrong size deck after draw!\", 179,\n deck.numberOfCardsRemaining());\n }", "public Card() { this(12, 3); }", "public void test(){\r\n int nCards = 52;\r\n Card deck[] = new Card[nCards];\r\n //for loop that iterates the size of nCards(52)\r\n for(int i = 0; i<nCards;i++){\r\n //create a new Card object, and set it equal to (i) print out the current card.\r\n deck[i] = new Card(i);\r\n System.out.print(deck[i].toString());\r\n }\r\n }", "public Deck getDeck(){\r\n\t\t return cards;\r\n\t }", "public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "private void initializeDeck() {\n drawPile.clear();\n\n for (ICard.Color color : ICard.Color.values()) {\n // Numbered cards\n drawPile.add(new NumberedCard(color, 0));\n for (int value = 1; value < 10; value++) {\n drawPile.add(new NumberedCard(color, value));\n drawPile.add(new NumberedCard(color, value));\n }\n\n // Special cards\n drawPile.add(new SkipCard(color));\n drawPile.add(new SkipCard(color));\n\n drawPile.add(new ReverseCard(color));\n drawPile.add(new ReverseCard(color));\n\n drawPile.add(new DrawTwoCard(color));\n drawPile.add(new DrawTwoCard(color));\n }\n\n for (int i = 0; i < 4; i++) {\n drawPile.add(new WildCard());\n drawPile.add(new WildFourCard());\n }\n }", "@Test\n public void getDeckTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n assertEquals(deck.size(), 52);\n }", "public void populateStandardDeck() {\n\n int deckSize = 52; // Standard 52 card deck\n\n // Remove any cards currently in deck\n while (!this.isEmpty()) {\n cards.pop();\n }\n\n // Set suit names\n String[] allSuits = {\"Diamonds\",\"Spades\",\"Hearts\",\"Clubs\"};\n\n // Begin adding cards\n for (int i = 0; i < allSuits.length; ++i) {\n String suit = allSuits[i];\n\n for (int j = 1; j < (deckSize/allSuits.length) + 1; ++j) {\n // Iterate through values\n String value = Integer.toString(j);\n switch (value) {\n case \"1\": value = \"Ace\"; break;\n case \"11\": value = \"Jack\"; break;\n case \"12\": value = \"Queen\"; break;\n case \"13\": value = \"King\"; break;\n }\n\n // Create new card and add to deck\n Card card = new Card(suit,value);\n addCard(card);\n }\n\n }\n }" ]
[ "0.74440926", "0.72974277", "0.72418183", "0.709323", "0.69315386", "0.68453455", "0.68322265", "0.68140674", "0.67584884", "0.67158175", "0.6711135", "0.67024076", "0.6685422", "0.6681803", "0.66359544", "0.6615966", "0.6600558", "0.65884733", "0.65632474", "0.65601015", "0.65558356", "0.6528003", "0.6489489", "0.648854", "0.6486134", "0.6463966", "0.6462333", "0.643791", "0.6407067", "0.6396391", "0.63961697", "0.6389228", "0.63765997", "0.6347188", "0.6345638", "0.63451344", "0.6339559", "0.63322645", "0.63000935", "0.6279849", "0.6277235", "0.62579876", "0.6254702", "0.6244554", "0.62143815", "0.62037474", "0.6177822", "0.6175733", "0.6169807", "0.61693394", "0.6121108", "0.6091882", "0.6060462", "0.60492986", "0.603339", "0.6022494", "0.60055614", "0.59996945", "0.5982647", "0.59801036", "0.5930009", "0.59269536", "0.59037656", "0.59032965", "0.5896704", "0.58919257", "0.58869547", "0.5873018", "0.5869811", "0.58661836", "0.5864044", "0.58594614", "0.58492213", "0.5817088", "0.5762431", "0.5748159", "0.5745365", "0.5734101", "0.5707749", "0.5682107", "0.5669528", "0.5659934", "0.5648635", "0.5642012", "0.5612929", "0.56105256", "0.5586254", "0.5582382", "0.55816007", "0.5567072", "0.5563913", "0.55524045", "0.55485886", "0.5540694", "0.55272585", "0.55051553", "0.54939264", "0.5490628", "0.54862386", "0.54861546" ]
0.77669257
0
/ Deck() In: None Out: Nothing Description: This default constructor builds a deck with one pack.
public Deck() { this.allocateMasterPack(); this.init(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public Deck() {\n generateDeckOfCards();\n }", "public Deck()\n {\n this(1);\n }", "public Deck() {\n this.deck = new LinkedList<>();\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "public Deck(Deck iDeck){\n this.addAll(iDeck);\n }", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "public Deck() {\n deck = new ArrayList<>();\n for (Color d : Color.values()) {\n for (Value e : Value.values()) {\n Card c = new Card(d, e);\n deck.add(c);\n }\n }\n }", "public Deck(int numPacks) {\n //Build the master pack.\n this.allocateMasterPack();\n //If the user wants more packs than are available, give them the max.\n if (numPacks > Deck.MAX_PACKS)\n this.init(Deck.MAX_PACKS);\n //If the user wants 0 or less packs, give them one.\n else if (numPacks < 1)\n this.init(1);\n else\n //Otherwise, build the deck with the specified number of packs.\n this.init(numPacks);\n }", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public void createDeck(){\n //Does nothing because it will be overridden in the child classes.\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}", "public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}", "public Deck(String id) {\n this.id = id;\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }", "public Deck(final String fileName) {\r\n\t\tthis(fileName, true);\r\n\t}", "public static Deck buildStandardDeck() {\n final List<Card> cards = new ArrayList<>();\n for (final Rank rank : Rank.values()) {\n for (final Suite suite : Suite.values()) {\n cards.add(new Card(rank, suite));\n }\n }\n return new Deck(cards);\n }", "public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }", "public Deck(ArrayList<Card> deck)\n {\n this.deck = deck;\n }", "public Deck( int copiesPerCard ) {\n if (copiesPerCard <= 0) {\n throw new IllegalArgumentException();\n }\n this.cards = new Card[STANDARD_DECK_SIZE * copiesPerCard];\n this.topCardIndex = 0;\n int DeckLength = this.cards.length;\n int cardIndex = 0;\n for (int copy = 1; copy <= copiesPerCard ; copy++ ) {\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }\n }", "private Pile createDeck() {\n \t\tPile deck = new Pile(\"deck\"); // TODO Refactor, no hardcoded string\n\t\tpileNames.add(\"deck\");\n \t\tfor (Suit suit : Suit.values()) {\n \t\t\tfor (Rank rank : Rank.values()) {\n \t\t\t\tdeck.addCard(new Card(suit, rank));\n \t\t\t}\n \t\t}\n \t\t// Put the deck at the middle of the table\n \t\tmTable.set(MID_OF_TABLE, deck);\n \t\treturn deck;\n \t}", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public Deck makeComputerDeck()\r\n\t{\r\n\t\tDeck computer = new Deck();\r\n\r\n \tfor (int i = 0; i < (DECK_COUNT/2); i++)\r\n \t{\r\n \t computer.addToDeck(deck.remove(0));\r\n \t}\r\n\r\n\t\treturn computer;\r\n\t}", "public Deck(Deck other){\r\n this.cards = other.getCards();\r\n this.deckSize = other.getDeckSize();\r\n }", "public EmptyDeckException() {\n\t}", "public void buildDeck(){\n\t\tfor(int i = 0; i < deckSize; i++){\n\t\t\tdeck[i] = i;\n\t\t}\n\t}", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public Dealer(int deckNum, HandCard handCard) {\n List<Deck> deckList = new ArrayList<>();\n for (int i = 0; i < deckNum; i++) {\n deckList.add(new Deck());\n }\n this.deckList = deckList;\n this.handCard = handCard;\n\n this.cardIterator = new CardIterator();\n }", "@Override\n public String toString() {\n return \"Deck{\" + \"deck=\" + deck + '}';\n }", "public Card () {}", "public Deck(boolean shuffle) {\n\t\t//52 cards\n\t\tthis.cardNumber = 52;\n\t\t//Total slots of 52 ARRAY\n\t\tthis.card = new Card[this.cardNumber];\n\t\t\n\t\t//location of the card\n\t\tint cardLocation= 0;\n\t\t\n\t\t// each suit\n\t\tfor(int suit = 0; suit < 4; suit++)\n\t\t{\n\t\t\t//each number in the deck\n\t\t\tfor(int num = 1; num <=13; num++)\n\t\t\t{\n\t\t\t\t// add a new card to the deck \n\t\t\t\tthis.card[cardLocation] = new Card(Suit.values()[suit],num);\n\t\t\t\tcardLocation++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Shuffling done\n\t\tif(shuffle == true)\n\t\t{\n\t\t\tthis.shuffle();\n\t\t}\n\t}", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public GDeck(Deck startdeck){\r\n\t\t cards=startdeck;\r\n\t\t add(back=new GImage(((GCard)startdeck.get(0)).getBackImage().getImage()));\r\n\t }", "public Dealer() {\n dealerHand = new Deck();\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public static void main(String[] args) {\n\n\n Deck deck = new Deck(new ArrayList<Card>(List.of(\n new Card(\"ten\", \"diamonds\", 10),\n new Card(\"two\", \"hearts\", 2),\n new Card(\"three\", \"clubs\", 3),\n new Card(\"four\", \"spades\", 4))));\n Deck fullDeck = new Deck();\n\n deck.add(new Card(\"king\", \"hearts\", 12));\n\n ArrayList<Card> noCards = new ArrayList<Card>();\n Deck none = new Deck(noCards);\n\n System.out.println(\"The deck has \" + deck.size() + \" cards\");\n System.out.println(\"The deck is empty: \" + none.isEmpty());\n\n System.out.println(\"Dealing specific card: \" + deck.deal(0).toString());\n\n System.out.println(\"Dealing last card added: \" + deck.deal(deck.size()-1).toString());\n\n deck.remove(3);\n\n System.out.println(deck.toString());\n\n System.out.println(\"Dealing card: \" + fullDeck.deal());\n\n System.out.println(\"\\n\" + fullDeck.toString());\n }", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public Card()\n {}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public Deck(int deckSize,Suit suits[]){\r\n this.suits = suits;\r\n this.deckSize = deckSize;\r\n this.fillDeck();\r\n this.shuffle();\r\n }", "public CardDeck cardDeck(){\r\n\t\treturn deck;\r\n\t}", "public Blackjack() {\n\n\t\tKaarten deck = new Kaarten();\n\n\t\tdeck.kaartSpelAanmaken();\n\n\t\tSystem.out.println(\n\t\t\t\t\"Welkom bij Blackjack.\\n\" + \"U bent de eerste speler.\\n\" + \"Vul uw naam hier in om te beginnen!\");\n\t\tString input = scanner.next();\n\n\t\tSpelers speler1 = new Spelers(input);\n\t\tSpelers dealer = new Spelers();\n\n\t\tSystem.out.println(\"Welkom \" + input);\n\n\t\tSystem.out.println(\"Wilt u het deck met kaarten controleren? (y/n)\");\n\t\tString input2 = scanner.next();\n\t\tif (input2.contains(\"y\")) {\n\n\t\t\tdeck.kaartenLatenZien();\n\t\t\tSystem.out.println(\"De kaarten zullen nu opnieuw geschud worden!\");\n\t\t\tdeck.schudKaarten();\n\t\t} else {\n\n\t\t\tdeck.schudKaarten();\n\t\t}\n\n\t\tSystem.out.println(\"Het spel zal nu beginnen\");\n\t\teersteRondeSpelen(speler1, dealer, deck.kaartenspel);\n\n\t\twhile (stoppen = false) {\n\t\t\tkeuzeNaRonde(speler1, dealer, deck.kaartenspel);\n\t\t}\n\t}", "public Card() { this(12, 3); }", "public void initialDeck()\t{\n\t\tdeck1 = new Deck();\n\t\tdeck2 = new Deck();\n\t\tdeck1.shuffle();\n\t\tdeck2.shuffle();\n\t\tdeck1 = deck1.combine(deck2);\n\t\tdeck1.shuffle();\n\t}", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "@Override\r\n public void dealerCreateNewDeck() {\r\n this.dealer.createNewDeck();\r\n System.out.println(\"Dealer deck created\");\r\n }", "public Deck getDeck() {\n\t\treturn deck;\n\t}", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public Game() {\n //Create the deck of cards\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }", "@Test\n public void create() {\n Deck deck = new DeckImplementation();\n assertEquals(\"Wrong initial deck size!\", 180,\n deck.numberOfCardsRemaining());\n deck.drawACard();\n assertEquals(\"Wrong size deck after draw!\", 179,\n deck.numberOfCardsRemaining());\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public stdDeck(){\n super();\n for(int i=1; i<14; i++){\n stdCard card = new stdCard(Suit.CLUBS, i);\n deck.add(card);\n card = new stdCard(Suit.DIAMONDS, i);\n deck.add(card);\n card = new stdCard(Suit.HEARTS, i);\n deck.add(card);\n card = new stdCard(Suit.SPADES, i);\n deck.add(card);\n }\n }", "public War()\n {\n //Create the decks\n dealer = new Deck(); \n dw = new Deck();\n de = new Deck(); \n warPile = new Deck(); \n \n \n fillDeck(); //Add the cards to the dealer's pile \n dealer.shuffle();//shuffle the dealer's deck\n deal(); //deal the piles \n \n }", "public Queue(int[] Deck) {\n shuffleArray(Deck);\n Node node = new Node();\n for (int i = 0; i < Deck.length; i++) {\n node = new Node();\n node.card = Deck[i];\n node.next = null;\n if (head == null) {\n head = node;\n tail = node;\n }\n else {\n tail.next = node;\n tail = node;\n }\n }\n }", "@SuppressWarnings({\"MoveFieldAssignmentToInitializer\", \"unchecked\"})\n public MyStrangeDeque() {\n deck = (Item[]) new Object[1];\n }", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "public Hand() {\n downStack = new ArrayList<>();\n cardsInPlayStack = new Stack<>();\n }", "private void buildDeck(int numDecks) {\n for (int i = 0; i < numDecks; ++i) {\n for (int j = 1; j < 14; ++j) {\n deck.add(new Card(j, Suit.Clubs));\n deck.add(new Card(j, Suit.Hearts));\n deck.add(new Card(j, Suit.Diamonds));\n deck.add(new Card(j, Suit.Spades));\n }\n }\n }", "public Shoe(int numDecks)\n {\n\n // this will construct the remaining decks.\n\n cardAry = new Card[numDecks*52];\n // create the cards ....\n for (int deckIdx=0; deckIdx<numDecks; deckIdx++)\n {\n for (int suit=0; suit<4; suit++) {\n for( int rank = 1; rank < 14; rank++) {\n cardAry[(deckIdx*52)+(suit*13+rank-1)] = new Card (Card.Suit.numToSuit(suit),\n rank);\n }\n }\n }\n this.numDecks = numDecks;\n this.numCards = 52*numDecks;\n }", "public BaseballCard(){\r\n\r\n\t}", "public Hand() {\r\n\t\t\r\n\t}", "public Hand(){}", "public Card build() {\n return new Card(frontFace, backFace);\n }", "public Deck getDeck(){\r\n\t\t return cards;\r\n\t }", "public BoardSwitch(Deck<T> deck) {\n\tsuper(deck);\n}", "public Deck(ArrayList<Card> providedCards) {\n if (null == providedCards || (providedCards.size() != DECK_SIZE)) {\n throw new IllegalArgumentException(\"Deck should be initialized with minimum 52 cards\");\n }\n if (providedCards.stream().distinct().count() != providedCards.size()) {\n throw new DuplicateCardFoundException();\n }\n this.cards = new ArrayList<>(providedCards.size());\n this.cards.addAll(providedCards);\n }", "public Hand() {\n }", "public Deck getDeck() {\n\t\treturn this.deck;\n\t}", "public SpoonsDeck() {\r\n\t deck = new ArrayList<SpoonsCard>();\r\n\t int cardCt = 0; // How many cards have been created so far.\r\n\t for ( int suit = 0; suit <= 3; suit++ ) {\r\n\t for ( int value = 2; value <= 14; value++ ) {\r\n\t \t deck.add(cardCt, new SpoonsCard(value,suit)); \r\n\t \t cardCt++;\r\n\t }\r\n\t \r\n\t }\r\n\t cardsUsed = 0;\r\n }", "Card(){\t \n}", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public void initChestDeck() {\n\t\tchestDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchestDeck.addCard(new Card(i + 16));\n\t\t}\n\t\t//makes cards random\n\t\tchestDeck.shuffle();\n\t}", "private void initializeDeck() {\n drawPile.clear();\n\n for (ICard.Color color : ICard.Color.values()) {\n // Numbered cards\n drawPile.add(new NumberedCard(color, 0));\n for (int value = 1; value < 10; value++) {\n drawPile.add(new NumberedCard(color, value));\n drawPile.add(new NumberedCard(color, value));\n }\n\n // Special cards\n drawPile.add(new SkipCard(color));\n drawPile.add(new SkipCard(color));\n\n drawPile.add(new ReverseCard(color));\n drawPile.add(new ReverseCard(color));\n\n drawPile.add(new DrawTwoCard(color));\n drawPile.add(new DrawTwoCard(color));\n }\n\n for (int i = 0; i < 4; i++) {\n drawPile.add(new WildCard());\n drawPile.add(new WildFourCard());\n }\n }", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public void makeDeck()\r\n\t{\r\n\t\tfor (int i = 1; i < 5; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 2; j < 15; j++)\r\n\t\t\t{\r\n\t\t\t\tdeck.add(new Card(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "@Test\r\n public void testDeck() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing Contructor\");\r\n assertNotNull(instance);\r\n }", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "public CardGame( int handSize, int copiesPerDeck ){\n this.handOne = new Hand(handSize);\n this.handTwo = new Hand(handSize);\n this.gameDeck = new Deck(copiesPerDeck);\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}" ]
[ "0.81980366", "0.8141029", "0.79472643", "0.7833748", "0.7792965", "0.7644585", "0.7578972", "0.73988134", "0.73321396", "0.72866696", "0.7274198", "0.7271141", "0.72197974", "0.71919966", "0.7117476", "0.71143293", "0.70079374", "0.6903259", "0.68891686", "0.6815698", "0.6771694", "0.67226714", "0.6689741", "0.6681299", "0.6644936", "0.66352224", "0.663019", "0.6547029", "0.6520786", "0.6499293", "0.649882", "0.6498036", "0.6487122", "0.6440541", "0.6431821", "0.6431309", "0.642805", "0.63922614", "0.63902277", "0.6386314", "0.63788766", "0.63690937", "0.6358674", "0.634767", "0.63409", "0.63194877", "0.6316924", "0.6313262", "0.6295882", "0.62918454", "0.6270149", "0.62447816", "0.62419915", "0.6235091", "0.62293696", "0.6225857", "0.62212485", "0.621463", "0.62137747", "0.619525", "0.61929035", "0.61883813", "0.61613894", "0.61535436", "0.6149381", "0.6146248", "0.6138923", "0.61373186", "0.61354905", "0.6124432", "0.6112028", "0.61100096", "0.60936564", "0.6085886", "0.6084345", "0.6073208", "0.60508734", "0.60468644", "0.6043059", "0.60406107", "0.6039869", "0.60361236", "0.6033636", "0.6030016", "0.60244304", "0.60237586", "0.60209876", "0.6002732", "0.5986688", "0.598255", "0.5973913", "0.5966505", "0.59661907", "0.59575367", "0.5943688", "0.5939702", "0.59244424", "0.59196216", "0.5918996", "0.59179497" ]
0.8034931
2
/ void init(int) In: An integer whose value is the number of packs to build the deck from. Out: Nothing Description: This will initialize the cards array data member to a complete deck built from the specified number of packs.
public void init(int numPacks) { //Initialize the cards array. this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK]; //Until the total number of cards are reached, keep adding cards from the //master pack. for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) { this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK]; } //Set the top card to the last card allocated. this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n // this was slightly sloppy: multiple packs point to same master cards\n // if something modified a card, we would be in trouble. fortunately,\n // we don't expect a card to ever be modified after instantiated\n // in the context of a deck.\n\n this.numPacks = numPacks;\n topCard = numPacks * 52;\n }", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void buildDeck(){\n\t\tfor(int i = 0; i < deckSize; i++){\n\t\t\tdeck[i] = i;\n\t\t}\n\t}", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "public Card[] initialize(Card[] deck, int decks) {\n counter = 0;\n\n //Initialize the deck\n for (int i = 0; i < decks; i++) {\n for (int suit = 0; suit < 4; suit++) {\n for (int rank = 0; rank < 13; rank++) {\n cards[counter] = new Card(suit, rank, resolvePNG(suit, rank));\n counter++;\n }\n }\n }\n\n return deck;\n }", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }", "public Deck(int numPacks) {\n //Build the master pack.\n this.allocateMasterPack();\n //If the user wants more packs than are available, give them the max.\n if (numPacks > Deck.MAX_PACKS)\n this.init(Deck.MAX_PACKS);\n //If the user wants 0 or less packs, give them one.\n else if (numPacks < 1)\n this.init(1);\n else\n //Otherwise, build the deck with the specified number of packs.\n this.init(numPacks);\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "public void initialize() {\r\n\t\tremoveAllCards();\r\n\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\tfor (int j = 0; j < 13; j++) {\r\n\t\t\t\tBigTwoCard card = new BigTwoCard(i, j);\r\n\t\t\t\taddCard(card);\r\n\t\t\t}\r\n\t\t}\t\r\n\t}", "private void initDecks() {\n\t\tDeck[] decks = new Deck[2];\n\t\tdecks[0] = charDeck;\n\t\tdecks[1] = mainDeck;\n\n\t\tfor (int i = 0; i < decks.length; i++) {\n\t\t\tDeck d = decks[i];\n\t\t\td.setNrOfShownCards(d.getDeckSize());\n\t\t\td.setShownLines(showLines);\n\t\t\td.setLineLength(lineLength);\n\t\t\td.setHandPosRelative(-21, -20);\n\t\t\td.reset();\n\t\t}\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "private void initCards() {\n for(int i = 0; i< noOfColumns; i++) {\n for (int j = 0; j < noOfRows; j++) {\n cards[i][j] = new Card(new Paint(), CardState.FACE_DOWN);\n }\n }\n setRandomColors();\n }", "public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void init() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor(Card card : Card.values()) {\r\n\t\t\tcards.add(card);\r\n\t\t}\r\n\t}", "public void initialize(int size);", "public void fill(){\n int i = 0;\n for (Suit suit:Suit.values()){\n for (Rank rank:Rank.values()) {\n deck[i] = new Card(rank, suit);\n numCards++;\n i++;\n }\n }\n }", "private void buildDeck(int numDecks) {\n for (int i = 0; i < numDecks; ++i) {\n for (int j = 1; j < 14; ++j) {\n deck.add(new Card(j, Suit.Clubs));\n deck.add(new Card(j, Suit.Hearts));\n deck.add(new Card(j, Suit.Diamonds));\n deck.add(new Card(j, Suit.Spades));\n }\n }\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public void initializeCards() {\n\t\tcardSet.clear();\n\t\tfor (Suit suit : Suit.values()) {\n\t\t\tfor (Rank rank : Rank.values()) {\n\t\t\t\tCard card = new Card(suit, rank);\n\t\t\t\tcardSet.add(card);\n\t\t\t}\n\t\t}\n\t}", "public CardGameFramework(int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand) {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers)\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public void initChestDeck() {\n\t\tchestDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchestDeck.addCard(new Card(i + 16));\n\t\t}\n\t\t//makes cards random\n\t\tchestDeck.shuffle();\n\t}", "private void createFullPackOfCards()\r\n {\r\n // Todo\r\n\r\n // Using a for-loop, add all the Card instances to cards.\r\n for ( int i = 0; i < NOOFCARDSINFULLPACK; i ++) {\r\n addTopCard( new Card(i));\r\n }\r\n }", "public Deck( ) {\r\n int ordinal;\r\n alalSets = new ArrayList<>();\r\n \r\n // load the cards\r\n for ( ordinal = 1; ordinal <= 13; ordinal++) {\r\n for( int iCount = 1; iCount <= 4; iCount++) {\r\n // the deck adds one set which contains one card\r\n \r\n ArrayList<Card> redCardSet = new ArrayList<>();\r\n Card redCard = new Card();\r\n redCard.value = ordinal;\r\n redCard.color = Enums.RED;\r\n redCardSet.add(redCard); // add card to set\r\n alalSets.add( redCardSet ); // add set to deck\r\n\r\n ArrayList<Card> blackCardSet = new ArrayList<>();\r\n Card blackCard = new Card();\r\n blackCard.value = ordinal;\r\n blackCard.color = Enums.BLACK;\r\n blackCardSet.add(blackCard);\r\n alalSets.add( blackCardSet );\r\n }\r\n }\r\n }", "private void initializeDeck() {\n drawPile.clear();\n\n for (ICard.Color color : ICard.Color.values()) {\n // Numbered cards\n drawPile.add(new NumberedCard(color, 0));\n for (int value = 1; value < 10; value++) {\n drawPile.add(new NumberedCard(color, value));\n drawPile.add(new NumberedCard(color, value));\n }\n\n // Special cards\n drawPile.add(new SkipCard(color));\n drawPile.add(new SkipCard(color));\n\n drawPile.add(new ReverseCard(color));\n drawPile.add(new ReverseCard(color));\n\n drawPile.add(new DrawTwoCard(color));\n drawPile.add(new DrawTwoCard(color));\n }\n\n for (int i = 0; i < 4; i++) {\n drawPile.add(new WildCard());\n drawPile.add(new WildFourCard());\n }\n }", "public void initChanceDeck() {\n\t\tchanceDeck = new Deck();\n\t\tfor (int i = 0; i < 16; i++) {\n\t\t\tchanceDeck.addCard(new Card(i));\n\t\t}\n\t\t//shuffled to make the order random\n\t\tchanceDeck.shuffle();\n\t}", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "public Shoe(int numDecks)\n {\n\n // this will construct the remaining decks.\n\n cardAry = new Card[numDecks*52];\n // create the cards ....\n for (int deckIdx=0; deckIdx<numDecks; deckIdx++)\n {\n for (int suit=0; suit<4; suit++) {\n for( int rank = 1; rank < 14; rank++) {\n cardAry[(deckIdx*52)+(suit*13+rank-1)] = new Card (Card.Suit.numToSuit(suit),\n rank);\n }\n }\n }\n this.numDecks = numDecks;\n this.numCards = 52*numDecks;\n }", "public void test(){\r\n int nCards = 52;\r\n Card deck[] = new Card[nCards];\r\n //for loop that iterates the size of nCards(52)\r\n for(int i = 0; i<nCards;i++){\r\n //create a new Card object, and set it equal to (i) print out the current card.\r\n deck[i] = new Card(i);\r\n System.out.print(deck[i].toString());\r\n }\r\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Shoe(Card.Suit suit, int numCards)\n \n { \n cardAry = new Card[numCards];\n\n int numSuits = numCards / 13;\n\n for(int deckIdx = 0; deckIdx<= numSuits; deckIdx++)\n {\n int cardsInSuit;\n if(deckIdx == numSuits)\n cardsInSuit = numCards % 13;\n else\n cardsInSuit = 13;\n for(int rankIdx = 1; rankIdx<=cardsInSuit; rankIdx++)\n {\n cardAry[deckIdx*13 + rankIdx-1] = new Card(suit, rankIdx);\n }\n }\n\n this.numDecks = 0;\n this.numCards = numCards;\n }", "public SpoonsDeck() {\r\n\t deck = new ArrayList<SpoonsCard>();\r\n\t int cardCt = 0; // How many cards have been created so far.\r\n\t for ( int suit = 0; suit <= 3; suit++ ) {\r\n\t for ( int value = 2; value <= 14; value++ ) {\r\n\t \t deck.add(cardCt, new SpoonsCard(value,suit)); \r\n\t \t cardCt++;\r\n\t }\r\n\t \r\n\t }\r\n\t cardsUsed = 0;\r\n }", "private void initCards() {\n\t\tArrayList<Card> cardsChart = new ArrayList<Card>();\n\t\tCard card = init_info_card(tmp.getFull(), tmp.getStatus(), tmp.getDue_date());\n\t\tcardsChart.add(card);\n\t\tcard = init_fulfilled_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_proof_card();\n\t\tcardsChart.add(card);\n\t\tcard = init_chart_detail_card();\n\t\tcardsChart.add(card);\n\t\t\n\t\t/*for (int i = 0; i < 5; i++) {\n\t\t\tcard = init_chart_card();\n\t\t\tcardsChart.add(card);\n\t\t}*/\n\t\tCardArrayAdapter mCardArrayAdapterGrades = new CardArrayAdapter(getActivity(), cardsChart);\n\n\t\tCardListView listView = (CardListView) getActivity().findViewById(R.id.card_list);\n\t\tif (listView != null) {\n\t\t\tlistView.setAdapter(mCardArrayAdapterGrades);\n\t\t}\n\t}", "public PileOfCards(int numCards) {\n descriptors = CardFactory.getDescriptorKeySet();\n pile = new ArrayList<Card>(numCards);\n for(int i = 0; i < numCards; i++)\n pile.add(CardFactory.drawCard());\n }", "public void createDeck() {\n\t\t// for loop that repeats 4 times - one for each suit\n\t\tfor (String suit : suits) {\n\t\t\t// for loop that repeats 13 times (2-14) - once for each value\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\t//create instance of new card createCard(value, name);\n\t\t\t\tCard card = new Card(i, suit);\n\t\t\t\t//add card to deck array\n\t\t\t\taddCardToDeck(card);\n\t\t\t}\t\n\t\t}\n\t}", "public void createDecks(){\r\n\t\tfor (int j = 10; j < 20; j++){\r\n\t\t\taddCard(new Card(cardNames[j]));\r\n\t\t}\r\n\t}", "public void populateStandardDeck() {\n\n int deckSize = 52; // Standard 52 card deck\n\n // Remove any cards currently in deck\n while (!this.isEmpty()) {\n cards.pop();\n }\n\n // Set suit names\n String[] allSuits = {\"Diamonds\",\"Spades\",\"Hearts\",\"Clubs\"};\n\n // Begin adding cards\n for (int i = 0; i < allSuits.length; ++i) {\n String suit = allSuits[i];\n\n for (int j = 1; j < (deckSize/allSuits.length) + 1; ++j) {\n // Iterate through values\n String value = Integer.toString(j);\n switch (value) {\n case \"1\": value = \"Ace\"; break;\n case \"11\": value = \"Jack\"; break;\n case \"12\": value = \"Queen\"; break;\n case \"13\": value = \"King\"; break;\n }\n\n // Create new card and add to deck\n Card card = new Card(suit,value);\n addCard(card);\n }\n\n }\n }", "public stdDeck(){\n super();\n for(int i=1; i<14; i++){\n stdCard card = new stdCard(Suit.CLUBS, i);\n deck.add(card);\n card = new stdCard(Suit.DIAMONDS, i);\n deck.add(card);\n card = new stdCard(Suit.HEARTS, i);\n deck.add(card);\n card = new stdCard(Suit.SPADES, i);\n deck.add(card);\n }\n }", "public Game() {\n //Create the deck of cards\n cards = new Card[52 * numDecks];\n cards = initialize(cards, numDecks);\n cards = shuffleDeck(cards, numDecks);\n }", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public Deck()\n {\n deck = new Stack<Card>();\n /* Increments through each suit, and then for each suit through each rank,\n * and pushes a\n * new card with the corresponding information onto the deck.\n */\n /* The above comment did not show up in the checkstyle. */\n for (Suit suit : Suit.values())\n {\n /* Increments through each card value. */\n for (CardValue value : CardValue.values())\n {\n deck.push(new Card(suit, value));\n }\n }\n Collections.shuffle(deck);\n }", "private void InitializeDeck(){\n //Spades\n\n deck.add(\"spadesace\");\n deck.add(\"spadesjack\");\n deck.add(\"spadesqueen\");\n deck.add(\"spadesking\");\n deck.add(\"spades2\");\n deck.add(\"spades3\");\n deck.add(\"spades4\");\n deck.add(\"spades5\");\n deck.add(\"spades6\");\n deck.add(\"spades7\");\n deck.add(\"spades8\");\n deck.add(\"spades9\");\n deck.add(\"spades10\");\n\n\n //Diamonds\n deck.add(\"diamondsace\");\n deck.add(\"diamondsjack\");\n deck.add(\"diamondsqueen\");\n deck.add(\"diamondsking\");\n deck.add(\"diamonds2\");\n deck.add(\"diamonds3\");\n deck.add(\"diamonds4\");\n deck.add(\"diamonds5\");\n deck.add(\"diamonds6\");\n deck.add(\"diamonds7\");\n deck.add(\"diamonds8\");\n deck.add(\"diamonds9\");\n deck.add(\"diamonds10\");\n\n //Clubs\n deck.add(\"clubsace\");\n deck.add(\"clubsjack\");\n deck.add(\"clubsqueen\");\n deck.add(\"clubsking\");\n deck.add(\"clubs2\");\n deck.add(\"clubs3\");\n deck.add(\"clubs4\");\n deck.add(\"clubs5\");\n deck.add(\"clubs6\");\n deck.add(\"clubs7\");\n deck.add(\"clubs8\");\n deck.add(\"clubs9\");\n deck.add(\"clubs10\");\n\n //Hearts\n deck.add(\"heartsace\");\n deck.add(\"heartsjack\");\n deck.add(\"heartsqueen\");\n deck.add(\"heartsking\");\n deck.add(\"hearts2\");\n deck.add(\"hearts3\");\n deck.add(\"hearts4\");\n deck.add(\"hearts5\");\n deck.add(\"hearts6\");\n deck.add(\"hearts7\");\n deck.add(\"hearts8\");\n deck.add(\"hearts9\");\n deck.add(\"hearts10\");\n\n Collections.shuffle(deck);\n\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public Pile(){\n //initializes the Card array\n pile = new Card[6];\n for(int i = 0; i < 6; i++){\n pile[i] = new Card(0,0); //loads empty cards.\n }\n\n pilePlace = 0;\n\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public void buildCards(){\n\t\tfor(Suit suit: Suit.values()){\n\t\t\tfor(Face face: Face.values()){\n\t\t\t\tcards.add(new Card(face, suit));\n\t\t\t}\n\t\t}\n\t}", "public Deck( int copiesPerCard ) {\n if (copiesPerCard <= 0) {\n throw new IllegalArgumentException();\n }\n this.cards = new Card[STANDARD_DECK_SIZE * copiesPerCard];\n this.topCardIndex = 0;\n int DeckLength = this.cards.length;\n int cardIndex = 0;\n for (int copy = 1; copy <= copiesPerCard ; copy++ ) {\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }\n }", "@Override\r\n public void fillDealerDeck(int numberOfCards, int deckPosition) {\r\n for (int i = 0; i < numberOfCards; i++) {\r\n this.dealer.addCard(deckPosition, new Card());\r\n }\r\n System.out.println(\"Deck filled\");\r\n }", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public static Stack<int[]> createDeck() {\n\t\t// Populate deck with 4 suits, 13 cards each [RANK, SUIT]\n\t\tStack<int[]> deck = new Stack<int[]>();\n\t\tfor (int j = HEARTS; j <= SPADES; j++) {\n\t\t\tfor (int i = 1; i <= 13; i++) {\n\t\t\t\tint[] card = new int[] {i, j};\n\t\t\t\tdeck.push(card);\n\t\t\t}\n\t\t}\n\t\tCollections.shuffle(deck);\n\t\treturn deck;\n\t}", "@Override\n public void createDeck(){\n for (char suit:standardSuits) {\n for (Map.Entry<Character, Integer> item:deckCards.entrySet()) {\n Card card = new Card(item.getKey(),item.getValue(),suit);\n deckOfCards.add(card);\n }\n }\n }", "public void makeDeck()\r\n\t{\r\n\t\tfor (int i = 1; i < 5; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 2; j < 15; j++)\r\n\t\t\t{\r\n\t\t\t\tdeck.add(new Card(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "public BigTwoDeck(){\r\n\t\tinitialize();\r\n\t}", "private void setGameCards() {\n if (noOfColumns < 1 || noOfRows < 1) {\n setNoOfColumns(4);\n setNoOfRows(4);\n }\n\n cardWidth = getWidth() / noOfColumns;\n cardHeight = getWidth() / noOfRows;\n\n cards = new Card[noOfColumns][noOfRows];\n\n initCards();\n invalidate();\n }", "private void initializeDecks()\n\t{\n\t\tdiscardRestrictedCards();\n\t\t\n\t\tboard.getRandomEventCardDeck().shuffleDeck();\n\t\tboard.getPersonalityCardDeck().shuffleDeck();\n\t\tDeck<Card> brownCards = new Deck<Card>();\n\t\tDeck<Card> greenCards = new Deck<Card>();\n\t\tfor(Card card : board.getPlayerCardDeck())\n\t\t{\n\t\t\tif(card.getType() == Card.CardType.GreenPlayerCard)\n\t\t\t{\n\t\t\t\tgreenCards.addCard(card);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbrownCards.addCard(card);\n\t\t\t}\n\t\t}\n\t\tbrownCards.shuffleDeck();\n\t\tgreenCards.shuffleDeck();\n\t\tboard.getPlayerCardDeck().clear();\n\t\tboard.getPlayerCardDeck().addAll(brownCards);\n\t\tboard.getPlayerCardDeck().addAll(greenCards);\n\t}", "public Deck(int numDecks) {\n\t\t// Loop through number of decks, suits, and rank\n\t\tfor (int k = 0; k<numDecks; k++) {\n\t\t\tfor (int i = 1; i <= 4; i++) {\n\t\t\t\tfor (int j = 1; j <= 13; j++) {\n\t\t\t\t\t// Add Card object to linked list\n\t\t\t\t\tdeck.add(new Card(i,j));\n\t\t\t\t\tsize++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Card() { this(12, 3); }", "public ProbIA5Board(int []init) {\n board = new int[init.length];\n\n for (int i = 0; i< init.length; i++) {\n board[i] = init[i];\n }\n }", "private void init() {\n colors = new int[] {Color.BLUE, Color.GREEN, Color.YELLOW, Color.MAGENTA};\n cardsClicked = new Card[clicksLimit];\n playerManager = new PlayerManager();\n freezeCardPaint = new Paint();\n linePaint = new Paint();\n freezeCardPaint.setColor(Color.GRAY);\n linePaint.setColor(Color.BLACK);\n setNoOfColumns(4);\n setNoOfRows(4);\n setGameCards();\n }", "public void initializeCards(){\n\n File dir = new File(\"Cards\");\n if(!dir.exists()){\n boolean success = dir.mkdir();\n System.out.println(\"Cards directory created!\");\n }\n if(dir.list() != null){\n for(String strng : dir.list()){\n cards.add(new BsbCard(strng));\n }\n }\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public void fillTreasureDeck() {\n\t\t// create 20 treasure cards\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tthis.addCard(new Card(\"The Earth Stone\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Ocean's Chalice\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Statue of the Wind\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Crystal of Fire\", CardType.TREASURE));\n\t\t}\n\n\t\t// create 3 helicopter lift cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Helicopter Lift\", CardType.HELI));\n\t\t}\n\n\t\t// create 2 sandbag cards\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tthis.addCard(new Card(\"Sandbag\", CardType.SANDBAG));\n\t\t}\n\n\t\t// create 3 water rise cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Water Rise\", CardType.WATER_RISE));\n\t\t}\n\t}", "public CardGame(int players, int myID) {\r\n s = new Scanner(System.in);\r\n this.players = players;\r\n this.cardPerPlayer = 52 / players;\r\n this.playerCard = new int[players][4][cardPerPlayer + 2];\r\n this.myID = myID;\r\n for (int i = 0; i < playerCard.length; i++) {\r\n for (int j = 0; j < playerCard[0].length; j++) {\r\n for (int j2 = 2; j2 < playerCard[0][0].length; j2++) {\r\n playerCard[i][j][j2] = 1;\r\n }\r\n }\r\n }\r\n\r\n }", "public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "public GroupOfCards(int givenSize)\r\n {\r\n size = givenSize;\r\n }", "public void init()\n {\n list = new int[k];\n\n // Initialise my list of integers\n for (int i = 0; i < k; i++) {\n int b = 1;\n while (CommonState.r.nextBoolean())\n b++;\n list[i] = b;\n }\n }", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "private static void allocateMasterPack() {\n //If Deck.masterPack is null, then it needs to be filled, otherwise, nothing needs to be done.\n if (Deck.masterPack != null) {\n //For each suit, fill the masterPack with each valid card value from that suit.\n for (int i = 0; i < Card.Suit.values().length; i++) {\n for (int j = 0; j < Card.validCardValues.length; j++) {\n Deck.masterPack[i * Card.validCardValues.length + j] = new Card(Card.validCardValues[j], Card.Suit.values()[i]);\n }\n }\n }\n }", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "void init(int n);", "void init(int n);", "public void setCards(Card[] cards) {\r\n this.cards = cards;\r\n }", "public Deck(int deckSize,Suit suits[]){\r\n this.suits = suits;\r\n this.deckSize = deckSize;\r\n this.fillDeck();\r\n this.shuffle();\r\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "@Override\r\n public void fillDealerDeckPlayingCards(int deckPosition){\r\n\r\n for(int i = 0; i < 4; i ++){\r\n for(int j = 0; j < 13; j ++){\r\n this.dealer.addCard(deckPosition, new PlayingCard(i,j)); \r\n }\r\n }\r\n System.out.println(\"Deck Filled\");\r\n }", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void createCards(int n) {\n mController.createCards(n);\n }", "public void resetDeck() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (Suit f : Suit.values())\r\n\t\t\tfor (int i = 2; i < 15; i++)\r\n\t\t\t\tcards.add(new Card(i, f));\r\n\r\n\t}", "public Dealer(int deckNum, HandCard handCard) {\n List<Deck> deckList = new ArrayList<>();\n for (int i = 0; i < deckNum; i++) {\n deckList.add(new Deck());\n }\n this.deckList = deckList;\n this.handCard = handCard;\n\n this.cardIterator = new CardIterator();\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }" ]
[ "0.7720376", "0.7265371", "0.7234178", "0.7206795", "0.71978", "0.71950877", "0.7181294", "0.70739025", "0.7006671", "0.68641835", "0.6804605", "0.67577064", "0.67416584", "0.6726601", "0.6719731", "0.6701483", "0.669166", "0.6678115", "0.6663122", "0.66154337", "0.65838605", "0.6550996", "0.65500975", "0.65484565", "0.652089", "0.6515433", "0.6465373", "0.6453079", "0.6444105", "0.64438444", "0.6443533", "0.6400333", "0.63783336", "0.6349806", "0.6346423", "0.6325083", "0.62832785", "0.6266483", "0.6244701", "0.62308013", "0.62080216", "0.61963016", "0.61832434", "0.61820155", "0.61680555", "0.61625725", "0.61572987", "0.6155291", "0.61005646", "0.60889393", "0.60606855", "0.6053353", "0.6044257", "0.60392946", "0.60265267", "0.6025555", "0.6020504", "0.601511", "0.60029435", "0.5990799", "0.59902745", "0.5988659", "0.59773874", "0.5974357", "0.59511906", "0.5929044", "0.5919878", "0.59087735", "0.58980215", "0.5881388", "0.58771867", "0.58747333", "0.58732903", "0.58700687", "0.5856583", "0.58555424", "0.5851558", "0.5850799", "0.5849916", "0.5849643", "0.58381385", "0.58377427", "0.5835067", "0.58277214", "0.5818495", "0.5803144", "0.5793502", "0.5789343", "0.57809156", "0.57809156", "0.5773149", "0.57709014", "0.5766217", "0.5757781", "0.5746611", "0.57425785", "0.5739058", "0.5729331", "0.5714848", "0.57134926" ]
0.8200314
0
/ void shuffle() In: Nothing Out: Nothing Description: This uses a FisherYates shuffle to shuffle all of the cards in the deck.
public void shuffle() { //Beginning with the top card, decrement i until i is 0. for (int i = this.topCard - 1; i >= 0; i--) { Card tmpCard = this.cards[i]; //Store the card at i, since it will be overwritten. //Choose a random card position from within the deck. int randomPosition = (int) (Math.random() * (this.topCard - 1)); //Take the card from the random position and store it in the ith position. this.cards[i] = this.cards[randomPosition]; //Take the card from the ith position, and put it into the randomly chosen position. this.cards[randomPosition] = tmpCard; //The cards have now been swapped. } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(deck);\n\t}", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t\t// : Shuffle with random seed each time, then we can save the seed\r\n\t\t// Collections.shuffle(cards, new Random(10));\r\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(this.deck);\n\t}", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "@Override\n public void shuffle() {\n System.out.println(\"shuffling the shoe...\");\n Collections.shuffle(this.cards);\n }", "public void shuffle();", "protected void shuffle(List<Card> deck) {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\n\t\tRandom randIndex = new Random();\n\t\tint size = cards.size();\n\t\t\n\t\tfor(int shuffles = 1; shuffles <= 20; ++shuffles)\n\t\t\tfor (int i = 0; i < size; i++) \n\t\t\t\tCollections.swap(cards, i, randIndex.nextInt(size));\n\t\t\n\t}", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "void shuffle();", "void shuffle();", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void shuffleDeck() {\n\t\tint numberOfShuffles = (int) ( Math.random() * 4 + 1 ) ;\n\t\tCard temp;\n\t\t\n\t\tfor( int j = 0; j < numberOfShuffles; j++ ) {\n\t\t\tfor( int i = 0; i < deck.length; i++ ) {\n\t\t\t\tint randSwitchNum = (int) (Math.random() * 52);\n\t\t\t\ttemp = deck[i];\n\t\t\t\tdeck[i] = deck[randSwitchNum];\n\t\t\t\tdeck[randSwitchNum] = temp;\n\t\t\t}\n\t\t}\t\n\t}", "public void shuffleCards() {\n Collections.shuffle(suspectCards);\n Collections.shuffle(weaponCards);\n Collections.shuffle(roomCards);\n\n }", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle() {\n\n\tcardsLeft = cards.length;\n\tfor (int i=cards.length-1; i>=0; --i) {\n\n\t int r = (int)(Math.random()*(i+1)); // pick a random pos <= i\n\n\t Card t = cards[i];\n\t cards[i] = cards[r];\n\t cards[r] = t;\n\n\t}\n }", "public void RefillDeck(boolean shuffle)\n\t{\n\t\tDeck newDeck = ((shuffle) ? new Deck(true) : new Deck(false));\n\t\t\n\t\tfor(int x=cardNumber; x < 52; x++)\n\t\t{\n\t\t\tthis.card[cardNumber] = newDeck.nextCard();\n\t\t\tthis.cardNumber++;\n\t\t}\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(inds);\n\t}", "public void shuffle()\r\n\t{\r\n\t\tRandom rand = ThreadLocalRandom.current();\r\n\t\t\r\n\t\tfor (int i = topCard; i > 0; i--)\r\n\t\t{\r\n\t\t\tint index = rand.nextInt(i + 1);\r\n\t\t\tString temp = cards[index];\r\n\t\t\tcards[index] = cards[i];\r\n\t\t\tcards[i] = temp;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Shoe);\n\t}", "public void spreadShuffle()\r\n {\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int i = 0; i < SHUFFLE_COUNT; i++) {\r\n while (cards.size() > 0)\r\n {\r\n shuffledDeck.add( drawRandom() );\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n tempDeck.clear();\r\n shuffledDeck = tempDeck;\r\n }\r\n }", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public static void shuffle(Card[] cards) {\n for (int i = 0; i < cards.length - 1; i++) {\n int j = i + (int)((cards.length - i) * Math.random());\n swap(i, j, cards);\n }\n }", "public void shuffle() {\n Collections.shuffle(this);\n }", "public void shuffle()\r\n {\r\n // We will start from the last element and swap the cards one by one. We actually\r\n // don't need to swap the last element.\r\n for (int i = valid - 1; i > 0; i --) { \r\n \r\n // By using Math.random, we will get a random integer from 0 to i\r\n int j = (int) ( (i+1) * Math.random()); \r\n \r\n // Swapping with the help of temp instance of Card Class.\r\n Card temp = cards[i]; \r\n cards[i] = cards[j]; \r\n cards[j] = temp; \r\n } \r\n // Prints the random array \r\n }", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public static void shuffle(int[] deck){\n //temporary variable for swapping the values\n int storage = 0;\n //random integer\n int randomInt;\n for(int i = 0; i < deck.length; i++){\n //set the variable equal to a random integer every time\n randomInt = (int) (Math.random() * (deck.length));\n //store the original deck[i] in storage\n //swap deck[i] and deck[randomInt]\n storage = deck[i];\n deck[i] = deck[randomInt];\n deck[randomInt] = storage;\n }\n }", "public void shuffle()\n {\n Collections.shuffle(artefacts);\n }", "public void shuffle() {\n for (int i = size - 1; i > 0; i--) {\n swap(i, (int)(Math.random() * (i + 1)));\n }\n }", "public static void shuffle(java.util.List arg0, java.util.Random arg1)\n { return; }", "public abstract void shuffled();", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "private void shuffleCards(final ICard[] myCards) {\r\n ICard tmp;\r\n int rand;\r\n for (int i = ZERO; i < myCards.length; i++) {\r\n rand = rmd.nextInt(myCards.length);\r\n tmp = myCards[i];\r\n myCards[i] = myCards[rand];\r\n myCards[rand] = tmp;\r\n }\r\n }", "public static int[] shuffle(int[] deck){\n\t\tRandom rnd = new Random();\n\t for (int i = deck.length - 1; i > 0; i--)\n\t {\n\t int index = rnd.nextInt(i + 1);\n\t int a = deck[index];\n\t deck[index] = deck[i];\n\t deck[i] = a;\n\t }\n\t return deck;\n\t}", "public void setShuffle(boolean shuffle)\n {\n this.shuffle = shuffle;\n }", "public Deck(boolean shuffle) {\n\t\t//52 cards\n\t\tthis.cardNumber = 52;\n\t\t//Total slots of 52 ARRAY\n\t\tthis.card = new Card[this.cardNumber];\n\t\t\n\t\t//location of the card\n\t\tint cardLocation= 0;\n\t\t\n\t\t// each suit\n\t\tfor(int suit = 0; suit < 4; suit++)\n\t\t{\n\t\t\t//each number in the deck\n\t\t\tfor(int num = 1; num <=13; num++)\n\t\t\t{\n\t\t\t\t// add a new card to the deck \n\t\t\t\tthis.card[cardLocation] = new Card(Suit.values()[suit],num);\n\t\t\t\tcardLocation++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Shuffling done\n\t\tif(shuffle == true)\n\t\t{\n\t\t\tthis.shuffle();\n\t\t}\n\t}", "public void shuffle()\r\n\t{\r\n\t\tCollections.shuffle(_tiles);\r\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(Arrays.asList(reel));\n\t}", "Vector<Card> shuffleDeck(Vector<Card> cards)\n\t{\n\t Collections.shuffle(cards);\n\t return cards;\n\t}", "public Deck randomShuffle(){\n\t\tshuffleOnceRandom();\n\t\tshuffleOnceRandom();\n\t\treturn ourDeck;\n\t}", "private void shuffleOnceRandom(){\n\t\t//You need to have a copy of the deck before you shuffled it so you can reference\n\t\t//It when you are trying to replace the new values\n\t\tList<Card> beforeShuffle = ourDeck.makeCopy().getCurrentDeck();\n\t\t//The topIndex tells us where we are in reference to the top half of the deck\n\t\t//Same with bottom this helps us reference the original deck to get whatever\n\t\t//Card we need and the deckIndex helps us put it in the correct spot\n\t\tint topIndex = 0, bottomIndex = ourDeck.getSize() / 2, deckIndex = 0;\n\t\t//These ints help us keep track of how many cards are left in each half\n\t\tint remainingTop = ourDeck.getSize() / 2, remainingBot = ourDeck.getSize() / 2;\n\t\tboolean shouldLoop = true;\n\t\t//This is the shuffling loop\n\t\twhile(shouldLoop){\n\t\t\t//This means the number coming from the specific deck which in this method is random\n\t\t\tint numTop = generator.nextInt(RAND_BOUND), numBot = generator.nextInt(RAND_BOUND);\n\t\t\t//After we determine the random number of cards we're using we have to do some checks\n\t\t\t//This means we wanted more than there was less therefore the stack is out\n\t\t\t//This is the stopping condition for the loop\n\t\t\tif(numTop >= remainingTop){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t\t\n\t\t\tif(numBot >= remainingBot){\n\t\t\t\tnumTop = remainingTop;\n\t\t\t\tnumBot = remainingBot;\n\t\t\t\tshouldLoop = false;\n\t\t\t}\n\t\t\t//This is where I replace the newCard into ourDeck\n\t\t\t//I iterate for the number of times we take from the top or bottom\n\t\t\tfor(int i = 1; i <= numTop; i++){\t\n\t\t\t\tCard newCard = beforeShuffle.get(topIndex);\t//I get the card we want to move\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\t\t//Then I move it to the new deckIndex\n\t\t\t\ttopIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tfor(int i = 1; i <= numBot; i++){\n\t\t\t\tCard newCard = beforeShuffle.get(bottomIndex);\n\t\t\t\tourDeck.setCard(newCard, deckIndex);\n\t\t\t\tbottomIndex++;\tdeckIndex++;\n\t\t\t}\n\t\t\tremainingTop = remainingTop - numTop;\n\t\t\tremainingBot = remainingBot - numBot;\n\t\t}\n\t}", "public static void shuffleCards(List<Cards> cardsList){\n\t\tCollections.shuffle(cardsList);\n\t}", "public void shuffle(Random rng, boolean gather) {\n if (gather) {\n gather();\n }\n Collections.shuffle(getCards(), rng);\n }", "public void shuffle() {\n\t\t\n\t\tRandom random = new Random();\n\t\tint position;\n\t\t\n\t\tfor(int i = 0; i < 200 * dimension; i++) {\n\t\t\tposition = random.nextInt(numTiles - 1);\n\t\t\tif(isValidMove(position)) {\n\t\t\t\tmakeMove(position);\n\t\t\t}\n\t\t}\n\t\t\n\t\tnumMoves = 0;\n\t}", "public static void shuffle(java.util.List arg0)\n { return; }", "@Test\n public void reshuffle() {\n for(int i=0;i<10;i++){\n Shoe s = new Shoe(i);\n\n //draw a part of the cards\n for(int j=0;j<i*30;j++){\n s.drawCard();\n }\n\n s.reshuffle();\n Assert.assertEquals(i*Deck.getNumCardsInDeck(),s.getShoe().size());//checks if amount of cards is correct\n //shuffle is allready tested\n }\n\n System.out.println(\"reshuffle() is working fine\");\n }", "public boolean shuffleNeeded();", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "@Test\n public void testShuffle() {\n System.out.println(\"shuffle\");\n Deck instance = new Deck();\n instance.shuffle(); \n }", "public void shuffle() {\n Collections.shuffle((List<Nummer>) this.albumNummers);\n }", "public void shuffle() {\n Collections.shuffle(this.plateau);\n }", "public CardStack shuffle() {\n Card[] arr = new Card[cards.size()];\n List<Card> cardsList = Arrays.asList(cards.toArray(arr));\n Collections.shuffle(cardsList);\n cards.removeAllElements();\n cards.addAll(cardsList);\n return this;\n }", "@Test\n public void testShuffleGood() {\n System.out.println(\"shuffleGood\");\n Deck deck = new Deck();\n boolean shuffled = false;\n deck.shuffle();\n //we take out one card from the deck\n Card lastCard = deck.nextCard();\n //we take out 58 more cards\n for (int i =0 ; i<57;i++)\n {\n deck.nextCard();\n }\n //we take out the last card from the deck\n Card firstCard = deck.nextCard();\n \n //if both cards = the same value they were before being shuffled, then test will fail.\n if (lastCard.getValue() != CardType.WILDCARD )\n shuffled = true;\n else if (firstCard.getValue()!=CardType.ZERO)\n shuffled = true;\n \n //if either of the cards are different, that means the deck was shuffled and the test will pass\n assertEquals(true, shuffled);\n }", "public void setChanceCardShuffle() {\n ChanceCardShuffle = true;\n }", "private void shuffle(ArrayList<Product> dataSet) {\n\t\tfor (int i = 0; i < dataSet.size(); i++) {\n\t\t\tint k = rand(0, i);\n\t\t\tProduct temp = dataSet.get(k);\n\t\t\tdataSet.set(k, dataSet.get(i));\n\t\t\tdataSet.set(i, temp);\n\t\t}\t\n\t}", "public void zipShuffle() {\r\n List<Card> half = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n List<Card> tempDeck = null;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n int h = cards.size()/2;\r\n for (int i = 0; i < h; i++) {\r\n half.add(draw());\r\n }\r\n int j = 0;\r\n while ((half.size() + cards.size()) > 0) {\r\n if (half.size() > 0 && cards.size() > 0) {\r\n if (j % 2 == 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else {\r\n shuffledDeck.add(draw());\r\n }\r\n } else if (half.size() > 0) {\r\n shuffledDeck.add(half.remove(0));\r\n } else if (cards.size() > 0) {\r\n shuffledDeck.add(draw());\r\n }\r\n j++;\r\n }\r\n tempDeck = cards;\r\n cards = shuffledDeck;\r\n half.clear();\r\n shuffledDeck = tempDeck;\r\n shuffledDeck.clear();\r\n }\r\n }", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "public void shuffle(int shuffleNum) {\n\t\tint lastPos = 0;\n\t\tint actualPos = 0;\n\t\tthis.shuffleNum = shuffleNum;\n\t\tfor (int i = 0; i < shuffleNum; i++) {\n\t\t\tshuffling = true;\n\t\t\tint[] aux = boardModel.getRandomMovement(lastPos, actualPos);\n\t\t\tnotifyObservers(aux[0], aux[1]);\n\n\t\t\tlastPos = aux[0];\n\t\t\tactualPos = aux[1];\n\t\t}\n\t\tshuffling = false;\n\t}", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public void setShuffle() {\n\t\tthis.shuffle = !this.shuffle;\n\t}", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "public Card[] shuffleDeck(Card[] deck, int decks) {\n Random rnd = new Random();\n Card temp;\n\n int numCards = 52 * decks;\n\n if (decks < 1)\n numCards = 52;\n\n //Iterate through the deck\n for (int i = 0; i < numCards; i++) {\n //Get a random index\n int random = rnd.nextInt(52);\n\n //Swap the current card with the random index\n temp = deck[random];\n deck[random] = deck[i];\n deck[i] = temp;\n }\n\n //Return the shuffled deck\n return deck;\n }", "public static void shuffle(int data[]) {\n\n }", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "@Override\n public <T> T[] shuffle(T[] elements) {\n return super.shuffle(elements);\n }", "public void shuffle(){\n\t\t\n\t\tArrayList<Boolean> used = new ArrayList<Boolean>();\n\t\tArrayList<Integer> copyStones = new ArrayList<Integer>();\n\t\tfor(int e = 0; e < gameStones.size(); e++){\n\t\t\tcopyStones.add(gameStones.get(e));\n\t\t\tused.add(false);\n\t\t}\n\t\tfor(int e : copyStones){\n\t\t\tchar l = stoneChars.get(e);\n\t\t\tboolean placed = false;\t\t\n\t\t\twhile(!placed){\n\t\t\t\tint randNumber = (int) (Math.random() * 7);\n\t\t\t\tif(!used.get(randNumber)){\n\t\t\t\t\tgameStones.set(randNumber, e);\n\t\t\t\t\tstoneLetters.set(randNumber, l);\n\t\t\t\t\tused.set(randNumber, true);\n\t\t\t\t\tplaced = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setChestCardShuffle() {\n ChanceCardShuffle = true;\n }", "public static void shuffleCards(String totalCards[]) throws Exception {\n\t\tRandom random = new Random();\n\n\t\tfor (int i = 0; i < totalCards.length; i++) {\n\t\t\tint randomIndex = i + random.nextInt(totalCards.length - i);\n\n\t\t\tString temp = totalCards[randomIndex];\n\t\t\ttotalCards[randomIndex] = totalCards[i];\n\t\t\ttotalCards[i] = temp;\n\t\t}\n\n\t\tString shuffleCards[][] = new String[4][13];\n\n\t\tint count = 0;\n\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 13; j++) {\n\t\t\t\tif (count == totalCards.length)\n\t\t\t\t\tbreak;\n\n\t\t\t\tshuffleCards[i][j] = totalCards[count];\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\n\t\tdistributePlayers(shuffleCards);\n\t}", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "public void shuffle()\r\n/* 18: */ {\r\n/* 19:41 */ for (int i = 0; i < this.pop.size(); i++)\r\n/* 20: */ {\r\n/* 21:43 */ Cluster c = (Cluster)this.pop.elementAt(i);\r\n/* 22:44 */ g.setClusters(c.getClusterVector());\r\n/* 23:45 */ g.shuffleClusters();\r\n/* 24:46 */ c.setClusterVector(g.getClusters());\r\n/* 25:47 */ c.setConverged(false);\r\n/* 26: */ }\r\n/* 27: */ }", "protected abstract void playShuffled();", "public Deck(final String fileName, boolean shuffle) {\r\n\t\tinitializeDeck(fileName);\r\n\t\t// No shuffle option for debugging purposes\r\n\t\tif (shuffle) {\r\n\t\t\tshuffle();\r\n\t\t}\r\n\t}" ]
[ "0.83366156", "0.8287674", "0.8287674", "0.8255228", "0.8243657", "0.81832135", "0.81549627", "0.81536454", "0.8117233", "0.811654", "0.80041337", "0.7916118", "0.7896074", "0.78396475", "0.78164893", "0.78108054", "0.7701708", "0.7698538", "0.7684625", "0.7663968", "0.76440996", "0.76426584", "0.7630519", "0.76111907", "0.7600626", "0.76004595", "0.7572724", "0.757024", "0.756206", "0.75322604", "0.75322604", "0.7517055", "0.7499367", "0.74899215", "0.74511725", "0.74278456", "0.7408775", "0.7345007", "0.73330766", "0.73194104", "0.72972715", "0.7251359", "0.7233225", "0.7165337", "0.71543944", "0.7145466", "0.71401453", "0.70647836", "0.7021917", "0.70077074", "0.6997277", "0.695573", "0.69184804", "0.6889174", "0.68740004", "0.68706656", "0.6832338", "0.68227696", "0.6766668", "0.67581546", "0.67560655", "0.6735471", "0.6725509", "0.6725085", "0.6723801", "0.6681648", "0.6681295", "0.6680886", "0.66558486", "0.6639936", "0.6622975", "0.657113", "0.6570644", "0.6538753", "0.65190965", "0.64884233", "0.64743936", "0.64430165", "0.6415932", "0.6383326", "0.63424796", "0.63411075", "0.6222634", "0.61748505", "0.61559385", "0.61088365", "0.6101506", "0.6100772", "0.60971", "0.60951936", "0.60509866", "0.60451883", "0.6044941", "0.60383415", "0.60092837", "0.59720695", "0.5955577", "0.5939167", "0.5913403", "0.5897386" ]
0.6843067
56
/ Card dealCard() In: Nothing Out: A copy of the Card object on the top of the deck. Description: This function makes a copy of the card on the top of the deck, removes that card from the deck, and returns the copy to the caller.
public Card dealCard() { //Return an invalid card if there are no cards in the deck. if (this.topCard < 0) return new Card('0', Card.Suit.spades); else { //Create a copy of the card on the top of the deck. Card card = new Card(this.cards[this.topCard - 1]); //Set the actual card on the top of the deck to null, to destroy it. this.cards[this.topCard - 1] = null; //The topCard is now one less than it was. this.topCard--; //return the copy. return card; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (int i = ONE; i < this.numOfCards; i++) {\r\n this.deck[i - ONE] = this.deck[i];\r\n }\r\n this.deck[this.numOfCards - ONE] = null;\r\n //decrement the number of cards currently in the deck \r\n this.numOfCards--;\r\n\r\n return top;\r\n }", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public Card deal()\n\t{\n\t\tif (cards.isEmpty())\n\t\t\treturn null;\n\t\t\n\t\t//Generate a random index to pull a random card from the ordered deck\n\t\tint rand = (int) (Math.random() * cards.size());\n\t\tCard dealt = cards.get(rand);\n\t\t//Remove the pulled card from the deck\n\t\tcards.remove(rand);\n\t\t\n\t\treturn dealt;\n\t}", "public Card takeCard() {\n return this.deck.pop();\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public Card deal() {\n\t\tif (cardsUsed == deck.length)\n\t\t\tthrow new IllegalStateException(\"No cards are left in the deck.\");\n\t\tcardsUsed++;\n\t\treturn deck[cardsUsed - 1];\n\n\t}", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public Card deal() {\r\n if (this.cardsLeft == 0) {\r\n return null;\r\n }\r\n \r\n// In the event that there are no cards left, a null value is returned\r\n \r\n Card topOfDeck = cardDeck[this.cardsLeft-1]; \r\n this.cardsLeft--;\r\n return topOfDeck;\r\n \r\n// The card off of the top of the deck is returned and the amount of cards remaining is deincremented\r\n \r\n }", "public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }", "public Card deal() {\n size--;\n return cards[size];\n }", "public int deal(){\n\t\tint topCard = deck[top];\n\t\ttop--;\n\t\treturn topCard;\n\t}", "public Card dealCard() {\n\t\tsize--;\n\t\t//return deck.pop();\n\t\tCard card = deck.pop();\n\t\tint rank = card.getRank();\n\t\t\n\t\t// Adjust total count accordingly\n\t\tif ((rank >= 2) && (rank <= 6)) {\n\t\t\ttotal_count++;\n\t\t}\n\t\telse if ((rank >= 10) || (rank == 1)) {\n\t\t\ttotal_count--;\n\t\t}\n\t\t\n\t\treturn card;\n\t}", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "public Card dealOne() {\r\n\t\tif (cards.isEmpty()) {\r\n\t\t\t// Make this and retrieve_one an exception instead?\r\n\t\t\tSystem.out.println(\"dealOne(): Deck is empty\");\r\n\t\t}\r\n\t\tCard topCard = top();\r\n\t\tcards.remove(cards.size() - 1);\r\n\t\treturn topCard;\r\n\t}", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public Cards deal() {\n if (!hasMoreCards()) {\n return null;\n } else {\n Cards temp = null;\n temp = deck[cardHold];\n cardHold = cardHold + 1;\n return temp;\n }\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public Optional<Card> dealOneCard() {\n if (cards.size() > 0) {\n return Optional.of(cards.remove(0));\n } else {\n return Optional.empty();\n }\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public Card dealCard(Player player) {\n\t\tCard card = null;\n\t\tif (dealtCards.get() < DECK_SIZE) { // Check if deck still has cards available. \n\t\t\tcard = cards.get(dealtCards.getAndIncrement());\n\t\t\tif (card != null) { // If card has been found.\n\t\t\t\tplayer.addCard(card);\n\t\t\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\t\t\tcardsBySuit.getAndIncrement(); // Update cards by suit counters.\n\t\t\t}\n\t\t}\n\t\treturn card;\n\t}", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public Card drawFromDeck() {\n\t\treturn cards.remove(0);\n\t}", "public Card drawCard() {\n return deck.pop();\n }", "Card dealOneCard();", "protected C deal() throws RomaEmptyDeckException {\n\n int s = cards.size();\n if(s == 0) {\n throw new RomaEmptyDeckException();\n }\n C c = cards.lastElement();\n cards.removeElementAt(s-1);\n return c;\n\n }", "public Card pop()\n\t{\n\t\tint last = size() - 1;\n\t\tCard tempCard = card.get(last);\n\t\tcard.remove(last);\n\t\treturn tempCard;\n\t}", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public Card pop(){\n\t\treturn super.pop();\n\t}", "public void returnCard(Card card) {\n\t\t// Update counters in the deck.\n\t\tdealtCards.getAndDecrement();\n\t\tAtomicInteger cardsBySuit = dealtCardsBySuit.get(card.getSuit());\n\t\tcardsBySuit.getAndDecrement();\n\t}", "public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }", "public Card drawCard() {\n return gameDeck.removeTopCard();\n }", "public Card removeFirstCard()\n {\n return cards.remove(0);\n }", "public synchronized PlayingCard dealNext() {\n\n\n try {\n PlayingCard temp = deck[nextCard];\n nextCard++;\n return temp;\n } catch (ArrayIndexOutOfBoundsException e) {\n PlayingCard temp = null;\n if(nextDiscardDeal < nextDiscardedPlace) {\n temp = discardPile[nextDiscardDeal];\n nextDiscardDeal++;\n }\n return temp;\n }\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "public Card drawCard(){\n if(size() == 0)\n throw new IndexOutOfBoundsException();\n Card card = cards.get(cards.size() - 1);\n cards.remove(card);\n return card;\n }", "void dealTheCards();", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "private Card drawCard() {\n return cardStack.pop();\n }", "public Card nextCard()\n\t{\n\t\tif (this.card[0] == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//get top card\n\t\t\tCard top = this.card[0];\n\t\t\t\t\t\n\t\t\t//Move the dealt card so it can be later deleted // -1\n\t\t\tfor (int i = 1; i < this.cardNumber; i++) \n\t\t\t{\n\t\t\t\tthis.card[i-1] = this.card[i]; \n\t\t\t}\n\t\t\t//To delete the last card to make sure its same position/ Set it to Null\n\t\t\tthis.card[this.cardNumber-1] = null;\n\t\t\t//After dealt the count of cards in deck goes down --\n\t\t\tthis.cardNumber--;\n\t\t\t\t\t\n\t\t\treturn top;\n\t\t}\n\t}", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }", "public Card flip() {\n\t\treturn hand.remove(0);\n\t}", "private void deal() {\n int index = 0;\n while (!deck.isEmpty()) {\n Card card = deck.get(0);\n players.get(index).receiveCard(card);\n deck.remove(0);\n if (index < players.size() - 1) {\n index++;\n } else {\n index = 0;\n }\n }\n }", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public Card drawCard() {\n\t\tCard c = cards.get(0);\n\t\tcards.remove(0);\n\n\t\treturn c;\n\t}", "public static Card deal(ArrayList<Card> deck) {\n\t\treturn deck.get(randomInt(0, 52));\n\n\t\t// return null; // delete this after writing the above\n\t}", "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "public void dealPlayer() {\n //Deal two cards to the player\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n\n playerStack.add(cards[talonStack]);\n playerScore += evaluateCardScore(playerScore, cards[talonStack].rank);\n talonStack++;\n }", "public TrainCard draw(){\n TrainCard card = cardDeck.get(0);\n cardDeck.remove(0);\n return card;\n }", "public T drawCard() {\n\t\treturn (T) this.deck.pop();\n\t}", "public Card draw() {\n\t\t\n\t\tCard topCard = deck.get(0);\n\t\tdeck.remove(0);\n\t\treturn topCard;\n\t\t\n\t}", "public Card hit() {\n Card drawn = deck.get(0);\n deck.remove(0);\n return drawn;\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public synchronized Card pop()\n {\n if (isEmpty())\n throw new EmptyStackException();\n \n Card card = peek();\n this.remove(card);\n cards.remove(cards.size() - 1);\n \n return card;\n }", "public Card pop()\n {\n if (firstLink == null)\n return null;\n\n Card result = firstLink.getCard();\n firstLink = firstLink.getNext();\n return result;\n }", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "public Card getCard(Card c){\n\t\tif(contains(c)){\n\t\t\tfor(int i = 0; i < hand.size(); i ++)\n\t\t\t{\n\t\t\t\tif(hand.get(i).getSuit().equals(c.getSuit()))\n\t\t\t\t{\n\t\t\t\t\thand.remove(i);\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//else\n\t\treturn null;\n\t}", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "public int pop() {\n Node popped = head;\n int temp = popped.card;\n head = popped.next;\n return temp;\n }", "public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}", "public void removePresentCard() {\n storageCards.remove();\n }", "public void dealCard(int id)\n\t{\n\t\tCard handSlot = deck.getTopCard();\n\t\thands[id].add(handSlot);\n\t\tdeck.removeTopCard();\n\t}", "public Card draw() {\n if (cards.size() == 0) {\n shuffleDiscardToCards();\n }\n return cards.remove(cards.size() - 1);\n }", "void popCard() throws IllegalStateException;", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public Card DrawCard() {\n\t\tCard card = mydeck.get(0);\r\n\t\tmydeck.remove(0);\r\n\t\t\r\n\t\t//TODO delete print line\r\n\t\tSystem.out.println(\"Print Card: \" + card);\r\n\t\tSystem.out.println(\" \");\r\n\t\t// print deck\r\n\t\tSystem.out.println(\"Printing Deck\");\r\n\t\tfor (int i = 0; i <= mydeck.size()-1; i++) {\r\n\t\t\tSystem.out.println(mydeck.get(i).getCardNbr());}\r\n\t\treturn card;\r\n\t}", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "public void deal()\n\t{\n\t Random generator = new Random();\n\t int thisCard = generator.nextInt(52);\n\n\t face = faces[thisCard % 13];\n\t suit = suits[thisCard / 13];\n\n\t faceValue = thisCard %13;\n\t}", "public boolean removeCard(Card card) {\n //Iterate through the deck to find the card.\n for (int i = 0; i < this.cards.length; i++)\n if (this.cards[i].equals(card)) {\n //If the card is found, then remove it from the deck.\n //replace it with the topCard\n this.cards[i] = new Card(this.cards[topCard - 1]);\n this.topCard--;\n return true;\n }\n return false;\n }", "ICard deal();", "private void resetDeck()\n {\n Stack<Card> temp = new Stack<Card>();\n while(!waste.isEmpty())\n temp.push(waste.pop()); \n while(!temp.isEmpty())\n deck.addCard((Card)temp.pop());\n }", "public Cards dealCards(List<Cards> cardsList) {\n\t\tif(!cardsList.isEmpty()) {\n\t\t\tCards card = cardsList.get(0);\n\t\t\tcardsList.remove(card);\n\t\t\treturn card;\n\t\t}else {\n\t\t\treturn null;\n\t\t}\n\t}", "public synchronized void returnCard(PlayingCard discarded) {\n\n if (discarded != null){\n try {\n discardPile[nextDiscardedPlace] = discarded;\n nextDiscardedPlace++;\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Discard pile is full!\");\n }\n }\n }", "public Card draw() {\r\n\t\t\r\n\t\tif(cards.size() > 0) {\r\n\t\t\treturn cards.remove(0);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}", "public void returnCard(Card newCard)\n {\n if(!isEmpty())\n {\n newCard.setNext(top);\n top = newCard;\n }\n else\n {\n top = newCard;\n }\n \n size++;\n }", "public void dealCards () {\t\n\n\t\tint numOfPlayers = players.size();\n\t\tint count = 0;\n\t\tCard[] cards = deck.getDeck();\n\t\tfor (int i=0; i<cards.length; i++) {\n\t\t\t\t// Go through all the cards, for each player deal 1 card at a time\n\t\t\t\t(players.get(count % numOfPlayers).getCards()).add(cards[i]); \n\t\t\t\tcount++;\n\t\t}\n\t}", "public void dealCardsToPile()\n {\n // Set the first initial computer card to display\n computerCard = highCardGame.getCardFromDeck();\n\n // Sets the first initial player card\n playerCard = highCardGame.getCardFromDeck();\n }", "public void addToDiscard(Card card) {\r\n\t\tthis.discard.add(card);\r\n\t}", "public void takeACard(Card card){\n hand.add(card);\n }", "public static void main(String[] args) {\n\n\n Deck deck = new Deck(new ArrayList<Card>(List.of(\n new Card(\"ten\", \"diamonds\", 10),\n new Card(\"two\", \"hearts\", 2),\n new Card(\"three\", \"clubs\", 3),\n new Card(\"four\", \"spades\", 4))));\n Deck fullDeck = new Deck();\n\n deck.add(new Card(\"king\", \"hearts\", 12));\n\n ArrayList<Card> noCards = new ArrayList<Card>();\n Deck none = new Deck(noCards);\n\n System.out.println(\"The deck has \" + deck.size() + \" cards\");\n System.out.println(\"The deck is empty: \" + none.isEmpty());\n\n System.out.println(\"Dealing specific card: \" + deck.deal(0).toString());\n\n System.out.println(\"Dealing last card added: \" + deck.deal(deck.size()-1).toString());\n\n deck.remove(3);\n\n System.out.println(deck.toString());\n\n System.out.println(\"Dealing card: \" + fullDeck.deal());\n\n System.out.println(\"\\n\" + fullDeck.toString());\n }", "public void removeCard(UnoCard cardToRemove){\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardToRemove.getName())){\n Log.d(\"Removed Card:\", c.getName());\n this.cards.remove(c);\n break;\n }\n }\n }", "public void remove(Card card)\n {\n deck.remove(card);\n //Add listener to check if the deck is empty (then refill it) or not\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public void discardCard(int player, Card card) {\r\n\t\tplayers.get(player).removeCard(card);\r\n\t\tdiscardPile.addCard(card);\r\n\t}", "public Card topDeckCard(){\n Preconditions.checkArgument(!isDeckEmpty());\n return deck.topCard();\n }", "private void deal()\n { \n for(int i = 1; i <= dealer.NUM_CARDS; i++)\n {\n dw.enqueue(((Card)dealer.dequeue())); \n i++;\n de.enqueue(((Card)dealer.dequeue())); \n i++;\n }\n }", "public int deleteCard() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.deleteCard(id);\r\n\t}", "public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}" ]
[ "0.82231253", "0.80255616", "0.7985539", "0.78385675", "0.77172154", "0.76667655", "0.7594622", "0.7578953", "0.750718", "0.74391115", "0.74277073", "0.7400945", "0.73846716", "0.7380068", "0.7378167", "0.72670907", "0.7264972", "0.7196671", "0.71542543", "0.71174306", "0.70942914", "0.70336634", "0.69728243", "0.69663274", "0.6930892", "0.68387574", "0.68229043", "0.6820071", "0.6766512", "0.67565894", "0.67376983", "0.6733596", "0.67316955", "0.66969043", "0.6682452", "0.66551006", "0.6635662", "0.65886873", "0.6582079", "0.6581527", "0.6572548", "0.6553285", "0.65258276", "0.6523934", "0.65157825", "0.65113485", "0.6492761", "0.64904475", "0.6472903", "0.6464428", "0.6412927", "0.6387965", "0.6381902", "0.6381221", "0.63411903", "0.6329802", "0.6300923", "0.6285591", "0.6285335", "0.62847203", "0.62408143", "0.6233799", "0.6232797", "0.62270135", "0.62168074", "0.6205658", "0.6191248", "0.6176643", "0.61475015", "0.60841", "0.60761046", "0.6075005", "0.6070797", "0.6060221", "0.60486", "0.60395825", "0.6038822", "0.6030521", "0.60109305", "0.5998521", "0.5985115", "0.5979105", "0.5975539", "0.59716475", "0.59674555", "0.59638375", "0.5958391", "0.5942595", "0.59380263", "0.59278303", "0.5910827", "0.5904342", "0.5891716", "0.5883093", "0.58765733", "0.5873489", "0.58710855", "0.58515275", "0.5848798", "0.5846418" ]
0.83310425
0
/ int getTopCard() In: Nothing Out: An integer whose value is the position of the top card in the deck. Description: This is a basic accessor function.
public int getTopCard() { return this.topCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public Card topDeckCard(){\n Preconditions.checkArgument(!isDeckEmpty());\n return deck.topCard();\n }", "public Card topCard() {\n Preconditions.checkArgument(!cardState.isDeckEmpty());\n return (cardState.topDeckCard());\n }", "public Card getTopCard() {\r\n\t\tthis.sort();\r\n\t\treturn this.getCard(2); //Center card will always be part of quad after sorting, so has to be highest card\r\n\t}", "public Card topCard() {\n return this.deck.peek();\n }", "public Card getTopCard()\r\n {\r\n Card tmp;\r\n\r\n if ( valid <= 0)\r\n return null;\r\n else\r\n {\r\n valid--;\r\n tmp = cards[valid];\r\n cards[valid] = null;\r\n return tmp;\r\n }\r\n }", "public Card top() {\n\t\treturn firstCard;\n\t}", "public Card top() {\r\n\t\treturn cards.get(cards.size() - 1);\r\n\t}", "ICard getTopCard() throws IllegalArgumentException;", "public UnoCard getTopCard() {\r\n return new UnoCard(validColor, validValue);\r\n }", "public int topCardVal(){\n if(pile.size() == 0)\n return 0;\n int val = pile.get(pile.size() - 1).getVal();\n return val;\n }", "public Card drawCardFromTop() {\n Card temp = this.cards [this.topCardIndex];\n this.topCardIndex++;\n return temp;\n }", "public int getHighCard() {\r\n return highCard;\r\n }", "public DevelopmentCard getTopCard(int pos) {\n int size = devStack.get(--pos).size();\n return this.devStack.get(pos).get(--size);\n }", "public String GetTopTrashCard(){\n //System.out.println(\"TOP: \" + topCard);\n return topCard;\n }", "public Card getTopCard(int i)\n {\n Card thisCard = null; \n if( i == P1)\n {\n thisCard = dw.dequeue();\n }\n if(i == P2)\n {\n thisCard = de.dequeue();\n }\n \n return thisCard; \n }", "public Card showTop() {\n\t\treturn hand.get(0);\n\t}", "public int getTop() {\n return top;\n }", "public Integer getTop() {\n return top;\n }", "public int getNumCards() {\n return this.topCard;\n }", "public CardView getTopCardView() {\n return cards.get(cards.size() - 1);\n }", "public int getTop() {\n\treturn top;\n }", "public int top() {\n return top;\n }", "public Card viewTopCardInPlay(){\n if(cardsInPlayStack.isEmpty()) {\n return null;\n }\n return cardsInPlayStack.peek();\n }", "public int top() {\r\n return top;\r\n }", "public int top() {\r\n return top;\r\n }", "public int top();", "public int top() {\n return top.value;\n }", "private int highCard() {\n\t\tint highCard = 0;\n\t\tfor (int counter = 0; counter < Constants.HAND_SIZE; counter++) {\n\t\t\tif (hand[counter].getValueIndex() > highCard) {\n\t\t\t\thighCard = hand[counter].getValueIndex();\n\t\t\t}\n\t\t}\n\t\tresult.setPrimaryValuePos(highCard);\n\t\treturn highCard;\n\t}", "public int top() {\n\t\treturn stack.peek();\n \n }", "public int top() { return 0; }", "public int getTop() {\n\t\treturn this.top;\n\t}", "public Card getTopCardDiscardPile() {\r\n return discardPile.get(discardPile.size() - 1);\r\n }", "public int top() {\n return stack1.peek();\n }", "public Disc top()\n\t{\n\t\tint poleSize = pole.size();\n\n\t\t// If the pole is empty, return nothing\n\t\tif(poleSize == 0)\n\t\t\treturn null;\n\n\t\t// Otherwise return the top disc\n\t\treturn pole.get(poleSize - 1);\n\t}", "public int top() {\n return (int) one.peek();\n \n }", "public int top() {\n return One.peek();\n }", "public int top() {\n return p.val;\n }", "public int top() {\n return topElem;\n }", "public int top() {\r\n int value = this.pop();\r\n this.stack.offer(value);\r\n return value;\r\n }", "int top();", "public List<Map<String, Integer>> getTopCards() {\n return topCards;\n }", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public Card.Face getHighestCard(){\n return uniqueFaces.getFirst();\n }", "public int stackTop() {\r\n\t return array[top];\r\n\t }", "public int getTop() {\n return position[0] - (size - 1) / 2;\n }", "int top() {\n if (data.size() > 0) {\r\n if (data.peek() < min)\r\n return min;\r\n return data.peek();\r\n }\r\n else {\r\n System.out.println(\"Stack underflow\");\r\n return -1;\r\n }\r\n }", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public T top() {\n \treturn stack.get(stack.size() - 1);\n }", "public int deal(){\n\t\tint topCard = deck[top];\n\t\ttop--;\n\t\treturn topCard;\n\t}", "public int top() {\n return list.peek();\n }", "public int top() {\n\t\treturn count == 0? -1 : st[count-1];\r\n\t}", "public int top() {\n if(!q1.isEmpty())return q1.peek();\n else return -1;\n }", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public String getTopnum() {\n return topnum;\n }", "public int getElementAtTopOfStack() {\n if (isEmpty()) throw new RuntimeException(\"Stack underflow\");\n return myarray[top];\n \n }", "public int top() {\n\t\tIterator<Integer> iter = queue.iterator();\n\t\tint temp = 0;\n\t\twhile (iter.hasNext())\n\t\t\ttemp = iter.next();\n\t\treturn temp;\n\t}", "public int top() {\n return queue.peek();\n }", "public int top() {\n return queue.peek();\n }", "public Integer getTopmoney() {\n return topmoney;\n }", "public Card getHighestCard() {\n Card rtrnCard = cardsPlayed[0];\n int i;\n int tempInt;\n int currentHighestRank = cardsPlayed[0].getIntValue();\n for(i = 0; i < cardsPlayed.length; i++){\n if(cardsPlayed[i].getSuit().equals(suit)){\n tempInt = cardsPlayed[i].getIntValue();\n if((currentHighestRank < tempInt)&&(!(cardsPlayed[i].equals(rtrnCard)))){\n rtrnCard = cardsPlayed[i];\n currentHighestRank = cardsPlayed[i].getIntValue();\n }\n }\n }\n return rtrnCard;\n }", "public T getTop( );", "public int top() {\r\n Queue<Integer> temp=new LinkedList<Integer>();\r\n int counter=0;\r\n while(!stack.isEmpty()){\r\n temp.add((Integer) stack.poll());\r\n counter++;\r\n \r\n }\r\n while(counter>1)\r\n {\r\n \r\n stack.add(temp.poll());\r\n counter--;\r\n }\r\n int topInteger=temp.poll();\r\n stack.add(topInteger);\r\n return topInteger;\r\n \r\n }", "public Card getBottom()\n {\n return cards.firstElement();\n }", "public int top() {\n\t return q.peek();\n\t }", "public int top() {\r\n int size = this.queueMain.size();\r\n if(size == 1) return this.queueMain.element();\r\n // 转移n-1\r\n while(size != 1){\r\n this.queueHelp.offer(this.queueMain.poll());\r\n size--;\r\n }\r\n // 然后取出第n个元素\r\n int res = this.queueHelp.element();\r\n // 转移到辅助队列\r\n this.queueHelp.offer(this.queueMain.poll());\r\n // 再调换\r\n Queue<Integer> temp = this.queueMain;\r\n this.queueMain = this.queueHelp;\r\n this.queueHelp = temp;\r\n\r\n return res;\r\n }", "public int queue_top() {\n\t\tif (isEmpty()) error(\"Queue is Empty!\");\n\t\treturn data[(front + 1) % MAX_QUEUE_SIZE];\n\t}", "public int top() {\n move();\n return reverseQueue.peek();\n }", "public int top() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n int value = q.peek();\n q.offer(q.poll());\n \n return value;\n }", "public int top() {\n return objects.peek();\n }", "public int top() {\n return q1.getFirst();\n }", "public int top(int stackNo){\n\t\tif(!isEmpty(stackNo)){\n\t\t\tint value = stacks[stackStarts[stackNo-1]+stackTops[stackNo-1] -1];\n\t\t\tstackTops[stackNo-1] = stackTops[stackNo-1]-1;\n\t\t\treturn value;\n\t\t}\n\t\treturn -1;\n\t}", "public int top() {\n return q.peek();\n }", "public int top() {\n if (data.size() != 0) {\n return data.get(data.size() - 1);\n }\n throw new RuntimeException(\"top: 栈为空,非法操作\");\n }", "public int top() {\n return queue.element();\n }", "public int top() {\n\t\treturn list.get(list.size() - 1);\n\t}", "public void ComputerUpdateTopCard(int value){\n topCard = handComputer.get(value);\n }", "public Card bestEight()\n {\n String mostSuit = \"\";\n int most = 0;\n Hashtable<String, Integer> cardSuit = new Hashtable<String, Integer>();\n //Count the number of cards in players hand for each suit\n for(Card cardInHand: this.hand)\n {\n String suit = cardInHand.getSuit();\n if(cardSuit.containsKey(suit))\n {\n cardSuit.put(suit, cardSuit.get(suit) + 1);\n }\n else\n {\n cardSuit.put(suit, 1);\n }\n }\n //find the highest one.\n for(String key: cardSuit.keySet())\n {\n if(cardSuit.get(key) > most) {\n mostSuit = key;\n most = cardSuit.get(key);\n }\n }\n return new Card(mostSuit, \"8\");\n }", "public Card getNextPlayerCard()\n\t{\n\t\tDeck<Card> playerCards = board.getPlayerCardDeck();\n\t\tif (playerCards.isEmpty())\n\t\t{\n\t\t\tsystemDataInput.printMessage(\"There is no player card to play the game.\");\n\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCard topCard = playerCards.pickTopCard();\n\t\t\tif (playerCards.size() == 1)\n\t\t\t{\n\t\t\t\tsystemDataInput.printMessage(\"The last player card \" + topCard.getName() + \" has been picked up. This is the end of the game.\");\n\t\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\t}\n\t\t\t\n\t\t\treturn topCard;\n\t\t}\n\t}", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int top() {\n Integer poll = q1.peek();\n return poll == null ? -1 : poll;\n }", "public int top() {\n return q1.peek();\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "int peek() \r\n {\n if(top <0){\r\n System.out.println(\"Stack Empty\");\r\n return -1;\r\n }\r\n return a[top];\r\n }", "public int top() {\n \treturn list.get(list.size()-1);\n }", "public int top() {\n return queue.peekLast();\n }", "public float getTop() {\n return internalGroup.getTop();\n }", "public int top() {\n if(!stack2.isEmpty()) {\n Integer k = stack2.pop();\n stack2.push(k);\n return k;\n }\n else {\n while(!stack1.isEmpty()) {\n stack2.push(stack1.pop());\n }\n Integer k = stack2.pop();\n stack2.push(k);\n return k;\n }\n }", "public int top(int index){\n if (!isEmpty() && index == 1)\n return this.oddArray[this.index1];\n else\n return this.evenArray[this.index2];\n }", "public T top();", "int peek() {\r\n\t\treturn stack[top-1];\r\n\t}", "public void SetTopTrashCard(String value){\n topCard = value;\n }", "public K topValue() {\n\t\tif(top!=null)\r\n\t\t\treturn top.data;\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public CardGao nextCard()\r\n {\r\n return cards.get(top--);\r\n }", "public T top() throws StackUnderflowException;", "public int pop() {\n int carNumber = -1;\n \n if(top > -1) {\n carNumber = carStack[top];\n top--;\n }\n else {\n System.out.println(\"The car stack is empty\");\n }\n return carNumber;\n }", "public int topElement() {\n\t\tif(isEmpty()){\n\t\t\tthrow new AssertionError();\n\t\t}\n\t\telse {\n\t\t\treturn heap.get(0).element;\n\t\t\n\t\t}\n\t}" ]
[ "0.86437345", "0.8453638", "0.8289435", "0.81855285", "0.816679", "0.81623834", "0.8137768", "0.7913212", "0.78357077", "0.77902", "0.75070167", "0.74834114", "0.73945856", "0.7389583", "0.7253993", "0.71812487", "0.7134428", "0.7133263", "0.7123681", "0.71199226", "0.7082367", "0.70807505", "0.707594", "0.70641565", "0.7061232", "0.69958884", "0.69958884", "0.6960079", "0.69448036", "0.69381046", "0.6929706", "0.6916496", "0.6909942", "0.6809041", "0.6780532", "0.67760116", "0.67692673", "0.67397124", "0.67238426", "0.67184025", "0.67037547", "0.6692911", "0.66923714", "0.6673352", "0.6628542", "0.65981394", "0.6578313", "0.65689766", "0.6548446", "0.6548446", "0.6541087", "0.6526133", "0.6523709", "0.6508412", "0.6504009", "0.6503071", "0.6498109", "0.64976746", "0.6485702", "0.64736676", "0.64736676", "0.64707613", "0.6464954", "0.64619553", "0.645179", "0.6446784", "0.64430285", "0.64410055", "0.6436857", "0.6436366", "0.64350957", "0.6428405", "0.64263964", "0.64083004", "0.64019823", "0.6399555", "0.6377907", "0.6375311", "0.63611895", "0.63516784", "0.63458955", "0.6341376", "0.6337397", "0.6335517", "0.6327961", "0.6325111", "0.6321786", "0.6312123", "0.6311374", "0.6280005", "0.6270059", "0.6261807", "0.6254812", "0.62493074", "0.6238497", "0.6234103", "0.6224103", "0.62203366", "0.6195655", "0.61827093" ]
0.86228305
1
/ Card inspectCard(int) In: An integer representing the position of the card to be inspected. Out: A copy of the card at the specified position, or an invalid card if there is no card in that position. Description: This function returns a Card object whose values are equal to the card in the specified position.
public Card inspectCard(int k) { //If k is invalid, return an invalid card. if (k >= this.topCard || k < 0) return new Card('0', Card.Suit.spades); else //Otherwise, return a copy of the card in position k. return new Card(this.cards[k]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ICard getCard(int cardIndex) throws IllegalArgumentException;", "public Card inspectCard(int k) {\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n return new Card(this.myCards[k]);\n }", "public Card inspectCard(int k)\r\n {\r\n if (0 <= k && k < numCards && myCards[k] != null && \r\n myCards[k].getErrorFlag() == true)\r\n {\r\n return myCards[k];\r\n }\r\n return new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n }", "public Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= topCard)\n return errorReturn;\n else\n return cards[k];\n }", "Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= numCards)\n return errorReturn;\n else\n return myCards[k];\n }", "Card getCard(UUID cardId);", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card getCardAt( int index ) {\n return this.cards[index];\n }", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "ICard getTopCard() throws IllegalArgumentException;", "public Card copy(){\n return new Card(Suits, Value);\n }", "public int getCard(List<Integer> hand2, int position) {\n\t\tif (position >= 0 && position < hand2.size()) {\n\t\t\treturn ((Integer) hand2.get(position)).intValue();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public Card getCard(int i) {\n\t\treturn cards.get(i);\n\t}", "public Card getCard() {\n return this.card;\n }", "public Card getCard() {\n return this.card;\n }", "public Card getCard(int idx) {\n return deck[idx];\n }", "public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}", "public DevelopmentCard getTopCard(int pos) {\n int size = devStack.get(--pos).size();\n return this.devStack.get(pos).get(--size);\n }", "public Card getCard( int cardNum ) {\n\t\treturn deck[ cardNum ];\n\t}", "public void testGetCard() {\n System.out.println(\"getCard\");\n Card expResult = new Card(Rank.QUEEN, Suit.SPADES);\n Play instance = new Play(\"Player1\", expResult);\n Card result = instance.getCard();\n assertEquals(expResult, result);\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public Card getCardAtLocation(int index)\n {\n if (index < cards.size())\n return cards.get(index);\n \n return null;\n }", "@Override\n public Card getCard(int i) {\n return this.cards.get(i);\n }", "CardDto getCustomerCardDetails(Long cardId) throws EOTException;", "public Card getCardAtIndex(int i)\n {\n return cards.get(i);\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "@Test\r\n public void testGetSpecificCard() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing getSpecificCard\");\r\n Card result = instance.getSpecificCard(51);\r\n System.out.println('\\t' + \"Card toString: \" + result.toString());\r\n assertNotNull(result);\r\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }", "public Cards get(int i) {\r\n\t\treturn seedCards.get(i);\r\n\t}", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public BlackjackCard getCardAtIndex(int index) {\n return (BlackjackCard)cards.get(index);\n }", "public Card getCard(int idx) {\r\n\t\tif (idx < 0 || idx >= cards.size()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn cards.get(idx);\r\n\t}", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "@Override\r\n public Card getCardFromDealer(int deckPosition) {\r\n return this.dealer.getCard(deckPosition);\r\n }", "public Card getCard(int index){\n return cards.get(index - 1);\n }", "public Card getPresentCard() {\n return storageCards.peek();\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "Symbol getActiveCard();", "public Card getCardInDeck(int i){\n\t\treturn deck[i];\n\t}", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public CardStack getStack(Card card)\n {\n CardStack temp = new CardStack();\n int index = search(card);\n \n for (int i = 0; i < index; i++)\n {\n temp.push(getCardAtLocation(cards.size() - i - 1).clone());\n getCardAtLocation(cards.size() - i - 1).highlight();\n }\n \n return temp;\n }", "public int getCardSlot() {\n return cardSlot;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(Card orig){\n this.cardType = orig.cardType;\n this.cardRank = orig.cardRank;\n this.cardSuit = orig.cardSuit;\n scaleCard(this.cardType);\n this.cardId = orig.cardId;\n this.isClick = false;\n this.inValidGroup = orig.inValidGroup;\n }", "public int getTopCard() {\n return this.topCard;\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "public Card getCard(ArrayList<Card> cards, int index);", "public UnoCard getTopCard() {\r\n return new UnoCard(validColor, validValue);\r\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "@Test\r\n\tpublic void testCardStack() {\r\n\t\t\r\n\t\t// create a card stack\r\n\t\tCardStack testStack = new CardStack();\r\n\t\t\r\n\t\t// test if we can place a non-king card onto the empty stack\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(1)));\r\n\t\t\r\n\t\t// test if we can place a king onto an empty stack\r\n\t\t// remember testStack starts at 0 not 1, so kings are at position 12\r\n\t\tassertTrue(testStack.isValidMove(deckCards.get(12)));\r\n\t\t\r\n\t\t// add the king to the stack\r\n\t\tassertEquals(deckCards.get(12), testStack.push(deckCards.get(12)));\r\n\t\t\r\n\t\t// now test can we add the same suit queen\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(12)));\r\n\t\t\r\n\t\t// now test if can add an off-suit different color queen\r\n\t\tassertTrue(testStack.isValidMove(deckCards.get(37)));\r\n\t\t\r\n\t\t// place the card to the stack\r\n\t\tassertEquals(deckCards.get(37), testStack.push(deckCards.get(37)));\r\n\t\t\r\n\t\t// add a card to the stack via add method as if being dealt\r\n\t\ttestStack.addCard(deckCards.get(40));\r\n\t\t\r\n\t\t// now check if that changes what will be accepted\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(41)));\r\n\t}", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public TACardInfo getCard(String referenceId) {\n synchronized (cardInfoListLock) {\n if (cardInfoListCache != null) {\n if (!cardInfoListCache.isEmpty()) {\n TACardInfo cardInfo = getCardFromCardListCache(referenceId);\n if (cardInfo == null) {\n return null;\n }\n TACardInfo clone = cardInfo.clone();\n return clone;\n }\n }\n }\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "public Card getPlayer2Card()\n {\n player2card = new Card(player2Hand.dequeue().toString());\n return player2card;\n \n }", "public int getCardValue()\n {\n return cardValue; \n }", "public Integer getIscard() {\n return iscard;\n }", "Card drawCard() {\n if (this.pointer >= this.cards.size()) {\n throw new NoMoreCardsAvailableException();\n }\n return cards.get(pointer++);\n }", "public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }", "public void victoryCardFind();", "public int getCardNumber() {\n return cardNumber;\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public Card takeCard() {\n return this.deck.pop();\n }", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public int getCardID() {\n return cardID;\n }", "public static Card summaryCard(String summary) {\n Card card = baseCard();\n card.setSummary(summary);\n return card;\n }", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "public Card playCard(int cardIndex)\r\n {\r\n if (numCards == 0) // error\r\n {\r\n // Creates a card that does not work\r\n return new Card('E', Card.Suit.SPADES);\r\n }\r\n // Save the current card\r\n Card card = myCards[cardIndex];\r\n // Decreases numCards.\r\n numCards--;\r\n for (int i = cardIndex; i < numCards; i++)\r\n {\r\n myCards[i] = myCards[i + 1];\r\n }\r\n\r\n myCards[numCards] = null;\r\n\r\n return card;\r\n }", "boolean similarCard(Card c);", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "public Integer getRoomcard() {\n return roomcard;\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card drawCard() {\n return deck.pop();\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public void getCard(Card card, Board board){\n card.action(this, board);\n }", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "private Card drawCard() {\n return cardStack.pop();\n }" ]
[ "0.6685246", "0.666091", "0.6295219", "0.6268143", "0.6113591", "0.59031713", "0.5895638", "0.58300775", "0.5792667", "0.577735", "0.576042", "0.5730506", "0.5724839", "0.57179636", "0.571217", "0.56940866", "0.56646645", "0.5618974", "0.5588994", "0.55750513", "0.55499786", "0.5532897", "0.5529593", "0.5511857", "0.55061144", "0.54908353", "0.54882574", "0.5478303", "0.54746157", "0.5466794", "0.5452105", "0.54311985", "0.542014", "0.5408589", "0.5397073", "0.53917116", "0.538851", "0.5371803", "0.53706664", "0.5369613", "0.5356517", "0.53564215", "0.53515357", "0.5342972", "0.5340826", "0.5335397", "0.53154254", "0.53081214", "0.52841675", "0.527637", "0.52709115", "0.5268806", "0.5260988", "0.52567345", "0.5245508", "0.5240087", "0.52347594", "0.52296704", "0.5222252", "0.5196045", "0.5189243", "0.51769793", "0.5171044", "0.5166881", "0.5164417", "0.51544666", "0.51525265", "0.5148351", "0.51428616", "0.5125804", "0.51167464", "0.511538", "0.5114673", "0.51137525", "0.51124233", "0.50948995", "0.5090937", "0.50851595", "0.50829595", "0.5076165", "0.50707537", "0.5070407", "0.5068948", "0.5068828", "0.50684375", "0.506636", "0.5065184", "0.506138", "0.5061355", "0.50494725", "0.5046232", "0.50428647", "0.5042604", "0.5040809", "0.50281304", "0.5027727", "0.5023448", "0.502205", "0.50208575", "0.5018944" ]
0.70188725
0
/ void allocateMasterPack() In: Nothing Out: Nothing Description: This function fills the masterPack if it is not already filled. It fills the pack with valid card values.
private static void allocateMasterPack() { //If Deck.masterPack is null, then it needs to be filled, otherwise, nothing needs to be done. if (Deck.masterPack != null) { //For each suit, fill the masterPack with each valid card value from that suit. for (int i = 0; i < Card.Suit.values().length; i++) { for (int j = 0; j < Card.validCardValues.length; j++) { Deck.masterPack[i * Card.validCardValues.length + j] = new Card(Card.validCardValues[j], Card.Suit.values()[i]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createFullPackOfCards()\r\n {\r\n // Todo\r\n\r\n // Using a for-loop, add all the Card instances to cards.\r\n for ( int i = 0; i < NOOFCARDSINFULLPACK; i ++) {\r\n addTopCard( new Card(i));\r\n }\r\n }", "public Cards( boolean fullPack)\r\n {\r\n cards = new Card[ NOOFCARDSINFULLPACK ];\r\n valid = 0;\r\n \r\n if ( fullPack)\r\n createFullPackOfCards();\r\n }", "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n // this was slightly sloppy: multiple packs point to same master cards\n // if something modified a card, we would be in trouble. fortunately,\n // we don't expect a card to ever be modified after instantiated\n // in the context of a deck.\n\n this.numPacks = numPacks;\n topCard = numPacks * 52;\n }", "public void init(int numPacks) {\n //Initialize the cards array.\n this.cards = new Card[numPacks * Deck.MAX_CARDS_IN_PACK];\n //Until the total number of cards are reached, keep adding cards from the\n //master pack.\n for (int i = 0; i < numPacks * Deck.MAX_CARDS_IN_PACK; i++) {\n this.cards[i] = this.masterPack[i % Deck.MAX_CARDS_IN_PACK];\n }\n //Set the top card to the last card allocated.\n this.topCard = numPacks * Deck.MAX_CARDS_IN_PACK;\n }", "public Deck() {\n this.allocateMasterPack();\n this.init(1);\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public Deck(int numPacks) {\n //Build the master pack.\n this.allocateMasterPack();\n //If the user wants more packs than are available, give them the max.\n if (numPacks > Deck.MAX_PACKS)\n this.init(Deck.MAX_PACKS);\n //If the user wants 0 or less packs, give them one.\n else if (numPacks < 1)\n this.init(1);\n else\n //Otherwise, build the deck with the specified number of packs.\n this.init(numPacks);\n }", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "public void doPack() {\n }", "private void generateNewCards()\n {\n // Set the card sets to be drafted from.\n setsForDraft = new ArrayList<>();\n setsForDraft.add(M19_CARD_TABLE);\n\n // Generates sealed pool and places in openedCardPool.\n drawPacksFromSets();\n\n // Initialize a selectedCardPool that is empty, for the user to move cards into when desired.\n selectedCardPool = new ArrayList<>();\n }", "public CardGameFramework(int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand) {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers)\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "private void rebuildCard() {\r\n \t// I originally had all the card building code here, but that turned out to\r\n \t// be too much for the poor Android emulator. While most devices are faster\r\n \t// than the emulator, that's a good indication that this is too much work to\r\n \t// be doing in the UI thread and it needs to be moved to a worker thread.\r\n \t// So this method is relatively simple: Launch the progress dialog, which in\r\n \t// turn will launch the worker thread and start the passcode generation\r\n \t// process.\r\n \t\tshowDialog(DIALOG_PROGRESS);\r\n }", "public void setMasterOfProposal(final MasterEntry masterEntry) {\n this.masterOfProposal = masterEntry;\n }", "public PackBuyer() {\n\t\tString[] curp = new String[16]; //This keeps the names of the cards in the most recent pack\n\t\tmoney = ClientNetwork.getPlayerCurrency(TitleScreen.UserID);\n\t\tButtonGroup group = new ButtonGroup();\n\t\tMainWindow.displayPanel(this, 700, 596, \"Absolute Conquest:Noobs, Big Daddies, and Dragons!\");\n\t\tsetSize(700, 596);\n\t\tthis.setLayout(null);\n\t\tImageIcon i3 = (ImageIcon)CreateUI.MakeUIObject(\"pics/3cards.png\", 0, 0, 0, 0, \"Icon\");\n\t\tImageIcon i7 = (ImageIcon)CreateUI.MakeUIObject(\"pics/7 cards.png\", 0, 0, 0,0, \"Icon\");\n\t\tImageIcon i16 = (ImageIcon)CreateUI.MakeUIObject(\"pics/16 cards.png\", 0,0,0,0, \"Icon\");\n\t\tJLabel title =(JLabel)CreateUI.MakeUIObject(\"Select the type of pack you would like to buy and press confirm\", 100, 25, 10000, 15, \"label\");\n\t\tJLabel title2 = (JLabel)CreateUI.MakeUIObject(\"You have \"+money+\" coins in your account.\", 100, 50, 10000, 15, \"label\");\n\t\tJLabel p3 = (JLabel)CreateUI.MakeUIObject(i3,10, 200, 200, 200,\"label\");\n\t\tJLabel p7 = (JLabel)CreateUI.MakeUIObject(i7,220, 200, 200, 200,\"label\");\n\t\tJLabel p16 = (JLabel)CreateUI.MakeUIObject(i16,430, 200, 200, 200,\"label\");\n\t\tJRadioButton m3 = (JRadioButton)CreateUI.MakeUIObject(\"100 coins for 3 cards\",10, 180, 200, 15,\"radio\");\n\t\tJRadioButton m7 = (JRadioButton)CreateUI.MakeUIObject(\"200 coins for 7 cards\",220, 180, 200, 15,\"radio\");\n\t\tJRadioButton m16 = (JRadioButton)CreateUI.MakeUIObject(\"400 coins for 16 cards\", 430, 180, 200, 15, \"radio\");\n\t\tJButton back = (JButton)CreateUI.MakeUIObject(\"Back\",250, 420, 100, 100,\"button\");\n\t\tJButton sub = (JButton)CreateUI.MakeUIObject(\"Purchase\",360, 420, 100, 100,\"button\");\n\t\tif(TitleScreen.UserProfile.getAccountType() == 1) {\n\t\t\tJButton deleteThisLater = new JButton(\":)\");\n\t\t\tdeleteThisLater.setBounds(10, 150, 50, 50);\n\t\t\tthis.add(deleteThisLater);\n\t\t\tdeleteThisLater.addActionListener((ActionEvent event) -> {\n\t\t\t\tmoney += 500;\n\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, money);\t\t\n\t\t\t\ttitle2.setText(\"You have \"+money+\" coins in your account.\");\n\t\t\t\tplayNeed();\n\t });\n\t\t\t\n\t\t}\n\t\tsetBackground(Color.decode(\"#3498db\"));\n\t\tgroup.add(m3);\n\t\tgroup.add(m7);\n\t\tgroup.add(m16);\n\t\t\n\t\tthis.add(title);\n\t\tthis.add(title2);\n\t\tthis.add(p3);\n\t\tthis.add(p7);\n\t\tthis.add(p16);\n\t\tthis.add(m3);\n\t\tthis.add(m7);\n\t\tthis.add(m16);\n\t\tthis.add(back);\n\t\tthis.add(sub);\n\t\t\n\t\t//add(panel);\n\t\t\n\t\tString[] args = new String[0];\n\t\t\n\t\tback.addActionListener((ActionEvent event) -> {\n\t\t\tCardCollection.main(args);\n\t\t\tremoveAll();\n\t\t\tthis.setVisible(false);\n });\n\t\tsub.addActionListener((ActionEvent event) -> {\n\t\t\tplayNeed();\n\t\t\tint n=0;\n\t\t\tif(m3.isSelected()) {\n\t\t\t\tif(money>=100) {\n\t\t\t\t\tmoney -= 100;\n\t\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, money);\t\t\n\t\t\t\t\tn=3;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You are \"+(100 - money)+\" gold short of buying that pack.\");\n\t\t\t}\n\t\t\telse if(m7.isSelected()) {\n\t\t\t\tif(money>=200) {\n\t\t\t\t\tmoney -= 200;\n\t\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, money);\n\t\t\t\t\tn=7;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You are \"+(200 - money)+\" gold short of buying that pack.\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(money>=400) {\n\t\t\t\t\tmoney -= 400;\n\t\t\t\t\tClientNetwork.setPlayerCurrency(TitleScreen.UserID, money);\n\t\t\t\t\tn=16;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You are \"+(400 - money)+\" gold short of buying that pack.\");\n\t\t\t}\n\t\t\tgetNewCards(n);\n\t\t\ttitle2.setText(\"You have \"+money+\" coins in your account.\");\n//\t\t\tint Admin = TitleScreen.UserProfile.getAccountType();\n\t\t\tTitleScreen.UserProfile = ClientNetwork.getPlayerProfile(TitleScreen.UserID);\n//\t\t\tTitleScreen.UserProfile.setAccountType(Admin);\n });\n\t}", "public MasterCard(String number) {\r\n\t\tsuper(CardType.MASTERCARD, validateNumber(number));\r\n\t}", "public int createPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n if(dbObj.packExists(name)!=-1)\n return -1;\n else\n {\n //no such pack exists ..creates a new pack and returns its packid\n return dbObj.addPack(name);\n \n }\n \n }", "void registerMaster(ZeroconfRosMasterInfo masterInfo);", "public RequirementPrepaidCard(TicketDBGateway cardMapper, HistoryDBGateway historyMapper) {\n\t\tthis.cardGateWay = cardMapper;\n\t\tthis.historyGW = historyMapper;\n\t}", "@Test\n\tpublic void testAllocate() {\n\t\tassertEquals(0, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(0, gateInfoDatabase.getStatus(1));\n\n\t\t// Now, allocate the gates to the planes. The mCodes are dummy values.\n\t\tgateInfoDatabase.allocate(0, 112);\n\t\tgateInfoDatabase.allocate(1, 332);\n\t\t\n\t\t/* Test if the allocations were successful. The returned status codes should be 1 (RESERVED)\n\t\tfor both gates. */\n\t\tassertEquals(1, gateInfoDatabase.getStatus(0));\n\t\tassertEquals(1, gateInfoDatabase.getStatus(1));\n\t}", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "@Override\n protected void initialCardGeneration() {\n Intent intent = getIntent();\n if(intent != null)\n {\n if(intent.getBooleanExtra(\"cardPoolIntent\", false))\n {\n // Store card pools loaded in from elsewhere.\n Bundle bundle = intent.getExtras();\n openedCardPool = bundle.getParcelableArrayList(\"openedCardPool\");\n selectedCardPool = bundle.getParcelableArrayList(\"selectedCardPool\");\n\n // Gets the deck ID and stores it in case this was passed from MyDeckActivity.\n deckId = bundle.getInt(\"deckId\");\n\n // Update card counter button according to passed in selected card pool (deck).\n btnCardsInDeck.setText(selectedCardPool.size() + SEALED_DECK_NUM);\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }\n else\n {\n // Generate new cards according to Sealed rules, using the database. (6 boosters.)\n generateNewCards();\n }\n }", "private void drawPacksFromSets()\n {\n // Database of cards and their appropriate images... This is all built-in and pre-created in the assets folder.\n // Retrieve information from database and create the card pool to draw cards from.\n CardDatabase cardDb = new CardDatabase(this);\n // Store card pool here.\n ArrayList<Card> cardPool;\n\n if (setsForDraft.size() == ONE_DRAFT_SET)\n {\n cardPool = cardDb.getCardPool(setsForDraft.get(0));\n // Make a card pack generator. This will use the cardPool passed in to make the packs that will be opened.\n CardPackGenerator packGenerator = new CardPackGenerator(cardPool);\n\n // Since this is a Sealed simulator, open 6 (SEALED_PACKS) packs.\n openedCardPool = packGenerator.generatePacks(SEALED_PACKS);\n }\n else if(setsForDraft.size() == TWO_DRAFT_SETS)\n {\n // Two sets are being drafted. First set is major one, second is minor one.\n cardPool = cardDb.getCardPool(setsForDraft.get(0));\n // Make a card pack generator. This will use the cardPool passed in to make the packs that will be opened.\n CardPackGenerator packGenerator = new CardPackGenerator(cardPool);\n // Major set opening.\n openedCardPool = packGenerator.generatePacks(MAJOR_SEALED);\n\n // Fetch minor set's cards.\n cardPool = cardDb.getCardPool(setsForDraft.get(1));\n // Make appropriate card pack generator.\n packGenerator = new CardPackGenerator(cardPool);\n // Minor set opening. Add to opened pool.\n openedCardPool.addAll(packGenerator.generatePacks(MINOR_SEALED));\n }\n else\n {\n // ERROR!\n }\n }", "public void setup() {\n\t\tsize(1300, 800);\n\t\tint seed = 4346;\n\t\tran = new Random(seed);\n\t\trandompolys = randomPolygons(210);// prepare the input polygons\n\n\t\tDouble segment_len = useAbey ? null : segment_max_length;\n\t\tPack pack = new Pack(randompolys, margin, segment_len, rotSteps, WID, HEI, preferX);\n\t\tpack.packOneSheet(useAbey);\n\t\tpacks.add(pack);\n\n\t\tfor (int i = 0; i < 100; i++) { // packing one sheet after another, 100 is estimated\n\t\t\tint size = packs.size();\n\t\t\tif (packs.get(size - 1).isEmpty()) {\n\t\t\t\tprintln(size + \" sheets\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpack = packs.get(size - 1).clone();\n\t\t\tpack.packOneSheet(useAbey);\n\t\t\tpacks.add(pack);\n\t\t}\n\t\treport();\n\t}", "ICpPack getPack();", "public void dmaRequest(DmaRequestMaster master) throws SIMException;", "public void setPushRecPack(Pack pack) {\n if (pack == null || pack.data == null || pack.data.length != 21) {\n super.setPushRecPack(pack);\n }\n }", "public void setPushRecPack(Pack pack) {\n if (pack == null || pack.data == null || pack.data.length != 21) {\n super.setPushRecPack(pack);\n }\n }", "public void setMasterData(final ProductCatalogData masterData);", "private void prepareCoinRacks() {\n\t\t\n\t}", "public MinStack() {\n this.capacity = CAPACITY;\n this.objects = new Object[capacity];\n }", "public void makeAvailable() {\n\t\tavailable = true;\n\t}", "public void doPack() {\n this._sendData = new byte[1];\n this._sendData[0] = 1;\n }", "public void allotCard(Player p_player) {\n Card l_Card = new Card();\n Random l_RandomNumber = new Random();\n l_Card.setD_CardType(l_Card.TYPES[l_RandomNumber.nextInt(l_Card.TYPES.length)]);\n p_player.addCard(l_Card);\n Console.displayMsg(\"Player \" + p_player.getD_Name() + \" has received \" + l_Card.getD_CardType() + \" card!\");\n }", "public flashCardPack viewPack(String name)\n {\n dbObj=new dbFlashCards(userId);\n int packId=dbObj.packExists(name);\n pack=new flashCardPack(userId,packId);\n \n return pack;\n \n }", "public void allocateNode(int processId){\n this.processId = processId;\n this.full = true;\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "private void assignCards(Pile wholeDeck, Player[] players) {\n ArrayList<Pile> setOfDecks = wholeDeck.split(players.length);\n for (int i = 0; i < players.length; i++) {\n Player player = players[i];\n Pile playerDeck = setOfDecks.get(i);\n player.addToDeck(playerDeck);\n\n // --- DEBUG LOG ---\n // The contents of the user’s deck and the computer’s deck(s) once they have been\n // allocated.\n String isAILabel = player instanceof AIPlayer ? \"AI\" : \"USER\";\n Logger.log(String.format(\"(%s) %s's DECK AFTER ALLOCATION:\", isAILabel, player),\n playerDeck.toString());\n\n }\n communalPile = setOfDecks.get(players.length);\n\n // --- DEBUG LOG ---\n // Initial communal deck contents.\n Logger.log(\"INITIAL COMMUNAL DECK CONTENTS\", communalPile.toString());\n }", "public static void setupResourcePack() {\n try {\n FileWriter writer = new FileWriter(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\", \"pack.mcmeta\").toFile());\n writer.write(\"{\\\"pack\\\":{\\\"pack_format\\\":6,\\\"description\\\":\\\"WingTech resource pack used for lang purposes for the user to add lang for teas.\\\"}}\");\n writer.close();\n }\n catch (Exception e){\n WingTech.LOGGER.error(\"Error creating pack.mcmeta\", e);\n }\n Minecraft.getInstance().getResourcePackRepository().addPackFinder((consumer, factory) -> {\n final ResourcePackInfo packInfo = ResourcePackInfo.create(\n WingTech.MODID,\n true,\n () -> new FolderPack(Paths.get(FMLPaths.CONFIGDIR.get().toAbsolutePath().toString(),WingTech.MODID, \"resources\").toFile()) {\n @Override\n public boolean isHidden() {\n return true;\n }\n },\n factory,\n ResourcePackInfo.Priority.TOP,\n IPackNameDecorator.BUILT_IN\n );\n if (packInfo == null) {\n WingTech.LOGGER.error(\"Failed to load tea resource pack!\");\n return;\n }\n consumer.accept(packInfo);\n });\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public void Draw(DrawMaster drawMaster, Canvas canvas) {\n if (mCardCount == 0) {\n //drawMaster.DrawEmptyAnchor(canvas, mX, mY, mDone);\n } else {\n drawMaster.DrawCard(canvas, mCard[mCardCount-1]);\n }\n }", "@Test\n\tpublic void freeCellInitiallyHoldTest() {\n\t\tFreeCell obj = new FreeCell();\n\t\t// Assert homeCell pile1 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(1).getSize());\n\t\t// Assert homeCell pile2 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(2).getSize());\n\t\t// Assert homeCell pile3 initially holds 0 cards\n\t\tassertEquals(0, obj.getHomeCellPile(3).getSize());\n\t\t\n\t}", "@Test\n void fillContainerTest() {\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n assertEquals(Resource.SHIELD,container.takeResource());\n }", "public void addPack(NBpack pack) throws ListFullException {\n synchronized (control) {\n if (write_point - read_point == COUNT_MAXPACKS) {\n throw new ListFullException();\n }\n if (write_point >= COUNT_MAXPACKS) {\n packs[write_point - COUNT_MAXPACKS] = pack;\n } else {\n packs[write_point] = pack;\n }\n write_point++;\n if (write_point + 1 == COUNT_MAXPACKS * 2) {\n write_point = 0;\n }\n control.notifyAll();\n }\n }", "public void ensureCapacity(int minCapacity);", "public void resetPacks() {\n user.resetPacks();\n saveData();\n }", "@Override\r\n\tpublic String allocateShipment(String referenceNumbers, String shipmentNumber) {\n\t\tsenderDataRepository.updateAirwayBill(referenceNumbers.split(\",\"), shipmentNumber,D2ZCommonUtil.getAETCurrentTimestamp());\r\n\t\tsenderDataRepository.allocateShipment(referenceNumbers, shipmentNumber);\r\n\t\treturn \"Shipment Allocated Successfully\";\r\n\t}", "public void init(String master)\n throws DataOrderingException;", "public void doPack() {\n if (this._sendData == null) {\n this._sendData = new byte[26];\n }\n System.arraycopy(BytesUtil.getBytes(this.mLongtitue), 0, this._sendData, 0, 8);\n System.arraycopy(BytesUtil.getBytes(this.mLantitue), 0, this._sendData, 8, 8);\n System.arraycopy(BytesUtil.getBytes(this.mNorthSpeed), 0, this._sendData, 16, 4);\n System.arraycopy(BytesUtil.getBytes(this.mEastSpeed), 0, this._sendData, 20, 4);\n System.arraycopy(BytesUtil.getBytes(this.mAccuracy), 0, this._sendData, 24, 2);\n }", "@Override\n\tpublic boolean reserve() {\n\t\treturn false;\n\t}", "@Test\n void refillingContainerTest(){\n Container container = new Container();\n container.fillContainer(Resource.SHIELD);\n container.takeResource();\n container.fillContainer(Resource.COIN);\n assertEquals(Resource.COIN,container.takeResource());\n }", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "public void setMaster(final PartitionMaster master) {\n\t\tValidate.notNull(master);\n\t\tfinal DependencyPlaceholder holder = getDepPlaceholder();\n\t\tValidate.isTrue(holder==null || (holder.getMaster() instanceof AwaitingDelegate), \n\t\t\t\t\"You're overwriting previous delegate or event's consumer: \" + master.getClass().getSimpleName());\n\t\tlogger.info(\"{}: {} Using new PartitionMaster: {}\", name, tenant.getConnectReference(),\n\t\t\t\tmaster.getClass().getSimpleName());\n\t\tgetDepPlaceholder().setMaster(master);\n\t}", "private void translate()\r\n {\r\n for(int x = 0;x<14;x++)\r\n {\r\n pack.add(new Card(sPack.get(x)));\r\n }\r\n \r\n }", "public void setIsMaster(boolean isMaster) {\n this.isMaster = isMaster;\n }", "public void createCard(Player p) {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tGridBagLayout layout = new GridBagLayout();\r\n\t\tpanel.setLayout(layout);\r\n\r\n\t\tGridBagConstraints lim = new GridBagConstraints();\r\n\t\tlim.fill = GridBagConstraints.BOTH;// grandezza componenti nei riquadri\r\n\t\t\t\t\t\t\t\t\t\t\t// (both= tutto pieno)\r\n\t\tlim.anchor = GridBagConstraints.CENTER;// posizione componenti nei\r\n\t\t\t\t\t\t\t\t\t\t\t\t// riquadri\r\n\r\n\t\tList<BusinessPermitTile> bpt = p.getUsedBusinessPermit();// carte\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// permesso\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// costrucione\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// giocatore\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usate\r\n\t\tif (bpt.isEmpty()) {// non ci sono carte permesso usate\r\n\r\n\t\t\t// ----------no card----------\r\n\t\t\tJLabel noCardLabel = new JLabel(\"No used business permit tiles\");// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\t\t\tnoCardLabel.setFont(new Font(\"Calibre\", Font.PLAIN, 20));\r\n\r\n\t\t\tlim.gridx = 0;// posizione componenti nella griglia\r\n\t\t\tlim.gridy = 0;\r\n\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\tlim.weighty = 1;\r\n\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\tlim.gridwidth = 1;\r\n\r\n\t\t\tlayout.setConstraints(noCardLabel, lim);\r\n\t\t\tpanel.add(noCardLabel);\r\n\r\n\t\t} else {// ci sono carte permesso usate\r\n\r\n\t\t\t// ----------costruction card usate disponibili----------\r\n\t\t\tJLabel yesCardLabel = new JLabel(\"Used business permit tiles\");// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\t\t\tyesCardLabel.setFont(new Font(\"Calibre\", Font.PLAIN, 20));\r\n\r\n\t\t\tlim.gridx = 0;// posizione componenti nella griglia\r\n\t\t\tlim.gridy = 0;\r\n\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\tlim.weighty = 1;\r\n\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\tlim.gridwidth = 5;\r\n\r\n\t\t\tlayout.setConstraints(yesCardLabel, lim);\r\n\t\t\tpanel.add(yesCardLabel);\r\n\r\n\t\t\tint q = 0;// posizione griglia orizzonatale (larghezza)\r\n\t\t\tint r = 1;// posizione griglia verticale (altezza)\r\n\t\t\tfor (int i = 0; i < bpt.size(); i++) {\r\n\t\t\t\tJLabel costructionCard = ccp.oldCostructionWB(bpt.get(i));// aggiungo\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// l'immagine\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// alla\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// label\r\n\r\n\t\t\t\tlim.gridx = q;// posizione componenti nella griglia\r\n\t\t\t\tlim.gridy = r;\r\n\t\t\t\tlim.weightx = 1;// espansione in verticale e orizzontale\r\n\t\t\t\tlim.weighty = 1;\r\n\t\t\t\tlim.gridheight = 1;// grandezza del riquadro\r\n\t\t\t\tlim.gridwidth = 1;\r\n\r\n\t\t\t\tlayout.setConstraints(costructionCard, lim);\r\n\t\t\t\tpanel.add(costructionCard);\r\n\t\t\t\tfinal int k = i;\r\n\t\t\t\tcostructionCard.addMouseListener(new MouseListener() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mousePressed(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseEntered(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\r\n\t\t\t\t\t\tccp.writeArea(bpt.get(k));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseExited(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void mouseReleased(MouseEvent e) {\r\n\t\t\t\t\t\t/** empty, not erasable */\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tq++;\r\n\t\t\t\tif (q % 5 == 0) {// metto al massino 5 carte costruzione per\r\n\t\t\t\t\t\t\t\t\t// riga\r\n\t\t\t\t\tq = 0;\r\n\t\t\t\t\tr++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tcontentPane.add(panel);\r\n\t}", "@Override\n public SortedBag<Card> initialClaimCards() {\n sendInstruction(MessageId.CARDS);\n return Serdes.CARD_BAG_SERDE.deserialize(receiveInstruction());\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public MAVLinkPacket pack(){\n MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH);\n packet.sysid = 255;\n packet.compid = 190;\n packet.msgid = MAVLINK_MSG_ID_GIMBAL_DEVICE_INFORMATION;\n \n packet.payload.putUnsignedInt(time_boot_ms);\n \n packet.payload.putUnsignedInt(firmware_version);\n \n packet.payload.putFloat(tilt_max);\n \n packet.payload.putFloat(tilt_min);\n \n packet.payload.putFloat(tilt_rate_max);\n \n packet.payload.putFloat(pan_max);\n \n packet.payload.putFloat(pan_min);\n \n packet.payload.putFloat(pan_rate_max);\n \n packet.payload.putUnsignedShort(cap_flags);\n \n \n for (int i = 0; i < vendor_name.length; i++) {\n packet.payload.putUnsignedByte(vendor_name[i]);\n }\n \n \n \n for (int i = 0; i < model_name.length; i++) {\n packet.payload.putUnsignedByte(model_name[i]);\n }\n \n \n return packet;\n }", "public ArrayList<card> displayPack()\n {\n dbObj=new dbFlashCards(uid);\n return dbObj.fetchAllCards(packId);\n \n \n \n }", "public void enterMasterInfo(DiscoveredService discovered_service) {\n String newMasterUri = null;\n if ( discovered_service.ipv4_addresses.size() != 0 ) {\n newMasterUri = \"http://\" + discovered_service.ipv4_addresses.get(0) + \":\"\n + discovered_service.port + \"/\";\n }\n if (newMasterUri != null && newMasterUri.length() > 0) {\n android.util.Log.i(\"Remocon\", newMasterUri);\n Map<String, Object> data = new HashMap<String, Object>();\n data.put(\"URL\", newMasterUri);\n try {\n addMaster(new MasterId(data));\n } catch (Exception e) {\n Toast.makeText(MasterChooser.this, \"Invalid Parameters.\",\n Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(MasterChooser.this, \"No valid resolvable master URI.\",\n Toast.LENGTH_SHORT).show();\n }\n\t}", "protected abstract void allocateBlocks(int numBlocks);", "private void initialiseBags() {\r\n\t\t//Player one bag\r\n\t\taddToBag1(GridSquare.Type.a, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.b, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.c, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.d, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.e, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.f, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.g, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.h, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.i, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.j, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.k, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.l, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.m, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.n, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.o, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.p, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.r, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.s, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.t, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.u, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag1(GridSquare.Type.v, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag1(GridSquare.Type.w, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag1(GridSquare.Type.x, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\t\r\n\t\t//Player two bag\r\n\t\taddToBag2(GridSquare.Type.A, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.B, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.C, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.D, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.E, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.F, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.G, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.H, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.I, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.J, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.K, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.L, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.M, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.N, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.O, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.P, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.Q, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.R, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.S, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.T, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.U, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY, GridSquare.Type.HORIZONTAL_SWORD);\r\n\t\taddToBag2(GridSquare.Type.V, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.EMPTY, GridSquare.Type.EMPTY);\r\n\t\taddToBag2(GridSquare.Type.W, GridSquare.Type.VERTICAL_SWORD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t\taddToBag2(GridSquare.Type.X, GridSquare.Type.EMPTY, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD, GridSquare.Type.SHIELD);\r\n\t}", "protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_cards);\n\n buyButtonListener = new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n BuyCardPack(v.getId());\n }\n };\n\n mHelper = new IabHelper(this, \"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhUad8+LQPImoIHj\" +\n \"gxDBbMKP2ikTU9avilAdgKeW6Ri8AgrmyEbLEZWOpXJcOQ1rPVOLLDzHz/vuwT5ybvlvYBmOW5jtW9k3I\" +\n \"R/bG9uVlxYsj2j2vXBSvKGj93eB7W8CG1qqHfGJ4kn9H6r2zPJe+PRkIzRsG2DazHAyoIsQyo7mKfJs/Z\" +\n \"unHdNKkT1ARoBSka2bJpDY9AqZOMqe6uNJbcbEelwV5mzV/5s8uuioNyVEqnd5xmAmRPspheUi1AZIZEU\" +\n \"dpkoYr4HhXlgHkdwGmOk1hcLYUKNeod+ekWA218QDuCKXRvAO4r2sAc2MW1dXpCntOAmNuXlb5GYJo7Oc\" +\n \"QnwIDAQAB\");\n\n //callback when billing is finished setting up\n mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {\n public void onIabSetupFinished(IabResult result) {\n if (!result.isSuccess()) {\n System.err.println(\"Problem setting up In-app Billing: \" + result);\n } else {\n billingFinished = true;\n QueryInventory();\n }\n }\n });\n\n //callback when purchase is finished\n mPurchaseFinishedListener = new IabHelper.OnIabPurchaseFinishedListener(){\n public void onIabPurchaseFinished(IabResult result, Purchase purchase) {\n\n try{\n\n if (result.isFailure()) {\n return;\n }\n\n //consume the purchase immediately\n else if (purchase.getSku().equals(SKU_CARDS_PACK1)) {\n UnhidePack(1);\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n //Add the view elements for each pack\n cardPacks = (ListView) findViewById(R.id.card_list_view);\n final ArrayList<CardPack> packList = LibraryDB.getCardPacks();\n adapter = new CardPackAdapter(this, packList);\n cardPacks.setAdapter(adapter);\n\n cardPacks.addOnLayoutChangeListener(new View.OnLayoutChangeListener() {\n @Override\n public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {\n cardPacks.removeOnLayoutChangeListener(this);\n adapterFinished = true;\n QueryInventory();\n }\n });\n adapter.notifyDataSetChanged();\n }", "public String[] fetchPackList()\n {\n dbObj=new dbFlashCards(userId);\n return dbObj.fetchAllPacks();\n \n }", "public void fillCardInventoryDetail() throws UserManagementException {\n \n CardInventoryDataBean cardInventory = cardInventoryTransformerBean.retrieveCardInventoryDetail(id);\n cardInventoryDataBean.setId(cardInventory.getId());\n cardInventoryDataBean.setAssigneUserId(cardInventory.getAssigneUserId());\n cardInventoryDataBean.setCardEnrollNo(cardInventory.getCardEnrollNo());\n cardInventoryDataBean.setCardId(cardInventory.getCardId());\n cardInventoryDataBean.setName(cardInventory.getName());\n cardInventoryDataBean.setReason(cardInventory.getReason());\n cardInventoryDataBean.setVendor(cardInventory.getVendor());\n cardInventoryDataBean.setTempCardEnrollNo(id);\n\n }", "public void loadMegaPlayersPack(Context context) {\n PlayerDAO playerDAO = new PlayerDAO(context);\n ArrayList<PackOpenerPlayer> players = playerDAO.getRarePlayers();\n\n Collections.shuffle(players);\n ArrayList<PackOpenerPlayer> tempPlayers = new ArrayList<>();\n int counter = 0;\n boolean higherRatedPlayerIncluded = false;\n while (tempPlayers.size() < 44) {\n if (players.get(counter).getRating() > 85) {\n if (!higherRatedPlayerIncluded) {\n tempPlayers.add(players.get(counter));\n higherRatedPlayerIncluded = true;\n }\n } else {\n tempPlayers.add(players.get(counter));\n }\n counter++;\n }\n Collections.sort(tempPlayers);\n packPlayers = new ArrayList<>(tempPlayers);\n }", "public void loadPremiumPlayersPack(Context context) {\n PlayerDAO playerDAO = new PlayerDAO(context);\n ArrayList<PackOpenerPlayer> players = playerDAO.get81PlusRatedPlayers();\n\n Collections.shuffle(players);\n ArrayList<PackOpenerPlayer> tempPlayers = new ArrayList<>();\n int counter = 0;\n boolean higherRatedPlayerIncluded = false;\n while (tempPlayers.size() < 8) {\n if (players.get(counter).getRating() > 83) {\n if (!higherRatedPlayerIncluded) {\n tempPlayers.add(players.get(counter));\n higherRatedPlayerIncluded = true;\n }\n } else {\n tempPlayers.add(players.get(counter));\n }\n counter++;\n }\n Collections.sort(tempPlayers);\n packPlayers = new ArrayList<>(tempPlayers);\n }", "public Boolean allocateResources(@SuppressWarnings(\"unchecked\") R... resources)\r\n\t{\r\n\t\tthis.resources.addAll(Arrays.asList(resources));\r\n\t\tthis.ORIGIN=0;\r\n\t\tthis.LENGTH=this.resources.size();\r\n\t\tthis.TERMINAL=this.resources.size()-1;\r\n\t\treturn this.state.setNewState(strPlanningEntryType, \"Allocated\");\r\n\t}", "public void initializeCards(){\n\n File dir = new File(\"Cards\");\n if(!dir.exists()){\n boolean success = dir.mkdir();\n System.out.println(\"Cards directory created!\");\n }\n if(dir.list() != null){\n for(String strng : dir.list()){\n cards.add(new BsbCard(strng));\n }\n }\n }", "public boolean isSetBlockMasterInfo() {\n return this.blockMasterInfo != null;\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public void createCardInventory() {\n try {\n if (cardInventoryDataBean != null) {\n String response = cardInventoryTransformerBean.createCardInventory(cardInventoryDataBean);\n if (SystemConstantUtil.SUCCESS.equals(response)) {\n System.out.println(\"Create CardInventory Successfully\");\n messageDataBean.setMessage(\"CardInventory added successfully.\");\n messageDataBean.setIsSuccess(Boolean.TRUE);\n cardInventoryDataBean.setNull();\n this.retrieveCardInventoryList();\n } else {\n System.out.println(\"CardInventory not created\");\n messageDataBean.setMessage(response);\n messageDataBean.setIsSuccess(Boolean.FALSE);\n }\n }\n } catch (Exception e) {\n messageDataBean.setMessage(e.toString());\n messageDataBean.setIsSuccess(Boolean.FALSE);\n System.out.println(e);\n }\n }", "private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }", "public void prepareForSerialNumberAllocation(final Listener listener) {\n mTbSrnHelper = new TbSrnHelper(mAppContext);\n String email = getEmail();\n mTbSrnHelper.prepareForAllocation(email, new Listener() {\n @Override\n public void onSuccess() {\n String tbcd = mTbSrnHelper.getTbLoaderIdHex();\n if (!mUserPrefs.getString(TBCDID_PROP, \"\").equalsIgnoreCase(tbcd)) {\n SharedPreferences.Editor prefsEditor = mUserPrefs.edit();\n prefsEditor.putString(TBCDID_PROP, tbcd);\n prefsEditor.apply();\n }\n listener.onSuccess();\n }\n\n @Override\n public void onError() {\n listener.onError();\n }\n });\n }", "@Override\n public List<ResourceAllocation> allocate(ResourceConsumer consumer, List<? extends Resource> resources) {\n return null;\n }", "public boolean ready() {\n pos = new Pos(\"200001\", \"0123456789\", \"75621477\");\n //todo card = read CardData;\n saveStatus = \"1\";\n NetworkServer.getInstance().connect();\n return true;\n }", "public void prepare_local() throws Exception {\r\n\t\tvendorMaster = new VendorMaster();\r\n\t\tvendorMaster.setMenuCode(639);\r\n\r\n\t}", "public void packBags() {\r\n GroceryBag[] packedBags = new GroceryBag[numItems];\r\n int bagCount = 0;\r\n\r\n GroceryBag currentBag = new GroceryBag();\r\n for (int i=0; i<numItems; i++) {\r\n GroceryItem item = (GroceryItem) cart[i];\r\n if (item.getWeight() <= GroceryBag.MAX_WEIGHT) {\r\n if (!currentBag.canHold(item)) {\r\n packedBags[bagCount++] = currentBag;\r\n currentBag = new GroceryBag();\r\n }\r\n currentBag.addItem(item);\r\n removeItem(item);\r\n i--;\r\n }\r\n }\r\n // Check this in case there were no bagged items\r\n if (currentBag.getWeight() > 0)\r\n packedBags[bagCount++] = currentBag;\r\n\r\n // Now create a new bag array which is just the right size\r\n pBags = new GroceryBag[bagCount];\r\n for (int i=0; i<bagCount; i++) {\r\n pBags[i] = packedBags[i];\r\n }\r\n\r\n // Add all grocery bags bag into cart\r\n for (int i = 0; i < bagCount; i++) {\r\n addItem(pBags[i]);\r\n }\r\n }", "public void allocateSpace(long space, long millis)\n throws InterruptedException, MissingResourceException\n {\n \t_logSpaceAllocation.debug(\"ALLOC: <UNKNOWN> : \" + space );\n if (millis == SpaceMonitor.NONBLOCKING) {\n synchronized (_spaceMonitor) {\n if ((_spaceMonitor.getTotalSpace() -\n getPreciousSpace() - _reservedSpace ) < ( 3 * space ) )\n throw new\n\t MissingResourceException(\"Not enough Space Left\",\n this.getClass().getName(),\n \"Space\");\n _spaceMonitor.allocateSpace(space);\n }\n } else if (millis == SpaceMonitor.BLOCKING) {\n _spaceMonitor.allocateSpace(space);\n } else {\n _spaceMonitor.allocateSpace(space, millis);\n }\n }", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[topCard++] = card;\n return true;\n }", "byte[] allocateArray(int initialCapacity)\r\n/* 53: */ {\r\n/* 54: 87 */ return new byte[initialCapacity];\r\n/* 55: */ }", "private Card init_fulfilled_card() {\n\t\t\n\t\tFulfilledCard card = new FulfilledCard(getActivity());\n\t\t\n\t\tCardExpand expand = new CardExpand(getActivity());\n\t\tcard.addCardExpand(expand);\n\t\tcard.setBackgroundResource(getResources().getDrawable(R.drawable.card_back));\n\t\treturn card;\n\t}", "public void setMasterSigned(int masterSigned) {\n\t\t_tempNoTiceShipMessage.setMasterSigned(masterSigned);\n\t}", "public void populateStandardDeck() {\n\n int deckSize = 52; // Standard 52 card deck\n\n // Remove any cards currently in deck\n while (!this.isEmpty()) {\n cards.pop();\n }\n\n // Set suit names\n String[] allSuits = {\"Diamonds\",\"Spades\",\"Hearts\",\"Clubs\"};\n\n // Begin adding cards\n for (int i = 0; i < allSuits.length; ++i) {\n String suit = allSuits[i];\n\n for (int j = 1; j < (deckSize/allSuits.length) + 1; ++j) {\n // Iterate through values\n String value = Integer.toString(j);\n switch (value) {\n case \"1\": value = \"Ace\"; break;\n case \"11\": value = \"Jack\"; break;\n case \"12\": value = \"Queen\"; break;\n case \"13\": value = \"King\"; break;\n }\n\n // Create new card and add to deck\n Card card = new Card(suit,value);\n addCard(card);\n }\n\n }\n }", "private void growMap() {\n\t\tshort chunkId;\n\n\t\t// Fill until full\n\t\twhile (end % STORED_CHUNKS != currChunk % STORED_CHUNKS || end == 0) {\n\t\t\tchunkId = (short) random.nextInt(chunks.length);\n\t\t\tmap[end % STORED_CHUNKS] = chunkId;\n\t\t\tchunks[chunkId].setupToStage(stage, end * MapChunk.WIDTH * tileSize, 0);\n\t\t\tend++;\n\t\t}\n\t}", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void addCard() { \n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tString titleHolder; // declares titleHolder\n\t\tString authorHolder; // declares authorHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\tint quantityHolder; // declares quantityHolder\n\t\t\n\t\t\n\t\tSystem.out.println(\"Making a new card:\\nPlease enter the new SIC-ID: \");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input the ID\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder) != true) {\n\t\t\tSystem.out.println(\"Please enter the title of the book: \");\n\t\t\ttitleHolder = scan.next(); // prompts user to input the title\n\t\t\tscan.nextLine();\n\t\t\tSystem.out.println(\"Please enter the author of the book\");\n\t\t\tauthorHolder = scan.next(); // prompts user to input the author\n\t\t\tscan.nextLine();\n\t\t\tSystem.out.println(\"Please enter the price of the book\");\n\t\t\tpriceHolder = scan.nextDouble(); // prompts user to input the price\n\t\t\tscan.nextLine();\n\t\t\n\t\t\tif(priceHolder < 0) { // checks to make sure priceHolder is positive\n\t\t\t\tSystem.out.println(\"ERROR! Price must be greater than or equal to 0:\");\n\t\t\t\tgetUserInfo();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Please enter the number of books in invetory\");\n\t\tquantityHolder = scan.nextInt(); // prompts user to input the quantity\n\t\tscan.nextLine();\n\t\t\n\t\tif(quantityHolder <= 0) { // checks to make sure quantity isn't less than 1\n\t\t\tSystem.out.println(\"Error! Quantity must be greater than 0\\n\"); \n\t\t\tgetUserInfo();\n\t\t}\n\t\tinventoryObject.addStockIndexCard(sic_idHolder, titleHolder, authorHolder, priceHolder, quantityHolder); // calls addStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR: The ID you entered is already in the system\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "@Override\r\n public void fillDealerDeckPlayingCards(int deckPosition){\r\n\r\n for(int i = 0; i < 4; i ++){\r\n for(int j = 0; j < 13; j ++){\r\n this.dealer.addCard(deckPosition, new PlayingCard(i,j)); \r\n }\r\n }\r\n System.out.println(\"Deck Filled\");\r\n }", "public void allocateGroupId(){\n\t\trecords.add(new pair(this.groupname,currentId));\n\t\tthis.groupid = currentId;\n\t\tcurrentId++;\n\t\tConnection c = null;\n\t\tStatement stmt = null;\n\t\ttry{\n\t\t\tSystem.out.println(\"group setup\");\n\t\t\tSystem.out.println(this.groupid);\n\t\t\tClass.forName(\"org.postgresql.Driver\");\n\t\t\tc = DriverManager.getConnection(\"jdbc:postgresql://localhost:5432/ifoundclassmate\");\n\t\t\tc.setAutoCommit(false);\n\t\t\tstmt = c.createStatement();\n\t\t\tString sql = \"INSERT INTO GROUPS (GROUPID,GROUPNAME,DESCRIPTION) \"+\n\t\t\t\t\t\"VALUES (\" + this.groupid + \", \" + \"'\" +this.groupname + \"'\"\n\t\t\t\t\t+\" , \" + \"'\" + this.description + \"' \" + \");\" ;\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t\t\tstmt.close();\n\t\t\tc.commit();\n\t\t\tc.close();\n\t\t} catch (Exception e ){\n\t\t\tSystem.out.println(e.getClass().getName() + e.getMessage() );\n\t\t\treturn;\n\t\t}\n\t\treturn;\n\t}", "@Override\n\tpublic void build() {\n\t\tif(this.getContainer().isEmpty()){\n\t\t\tthis.addBuilding(new Building(BuildingType.CABSTAND, 150));\n\t\t\tMonopolyTheGame.getInstance().getActivePlayer().decBalance(150);\n\t\t\tsetEnabler(false);\n\t\t\t//currentSquare.setRent(currentSquare.getRent()*2);\n\t\t}else {\n\t\t\tSystem.out.println(\"You cannot bould multiple cab stands on a cab company\");\n\t\t}\n\t\t\n\t}", "protected MapResourcePack() {\n this.baseResourcePack = null;\n this.archive = null;\n }", "public void fillTreasureDeck() {\n\t\t// create 20 treasure cards\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tthis.addCard(new Card(\"The Earth Stone\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Ocean's Chalice\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Statue of the Wind\", CardType.TREASURE));\n\t\t\tthis.addCard(new Card(\"The Crystal of Fire\", CardType.TREASURE));\n\t\t}\n\n\t\t// create 3 helicopter lift cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Helicopter Lift\", CardType.HELI));\n\t\t}\n\n\t\t// create 2 sandbag cards\n\t\tfor (int i = 0; i < 2; i++) {\n\t\t\tthis.addCard(new Card(\"Sandbag\", CardType.SANDBAG));\n\t\t}\n\n\t\t// create 3 water rise cards\n\t\tfor (int i = 0; i < 3; i++) {\n\t\t\tthis.addCard(new Card(\"Water Rise\", CardType.WATER_RISE));\n\t\t}\n\t}", "public static void waitForMasterDone() {\r\n try {\r\n master_done_semaphore.acquire();\r\n } catch (InterruptedException e) {\r\n }\r\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }" ]
[ "0.60052973", "0.58810246", "0.5561061", "0.5518775", "0.54215336", "0.52922416", "0.50832605", "0.5050006", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.5002565", "0.49722216", "0.4921204", "0.48973444", "0.4894606", "0.4892527", "0.48766658", "0.48218998", "0.48157758", "0.48139948", "0.47905928", "0.47205997", "0.46896026", "0.46848914", "0.4683742", "0.4643263", "0.46312907", "0.46292767", "0.46292767", "0.46147516", "0.4611434", "0.4606835", "0.46059614", "0.45886913", "0.45873678", "0.45782003", "0.45638317", "0.45624655", "0.45492303", "0.45416158", "0.4528044", "0.4525203", "0.45234466", "0.45071882", "0.45044026", "0.4485916", "0.44820368", "0.44818527", "0.44734567", "0.44709298", "0.44709072", "0.44686815", "0.44657278", "0.4438855", "0.44358686", "0.44260353", "0.44132173", "0.44121692", "0.44084448", "0.4403282", "0.4397285", "0.43929976", "0.43895656", "0.43890306", "0.43810335", "0.43653017", "0.43635374", "0.43592897", "0.43504536", "0.4347541", "0.43331522", "0.43258882", "0.43245983", "0.4323668", "0.43080392", "0.43054327", "0.43029392", "0.42982987", "0.42978245", "0.4292428", "0.42889157", "0.42835847", "0.42727023", "0.4269098", "0.42641336", "0.42592877", "0.42562452", "0.42486787", "0.42442235", "0.42365155", "0.42328146", "0.42262125", "0.42261314", "0.4217116", "0.4214762", "0.42124483", "0.42102006" ]
0.8778677
0
/ In: A card object to add to the deck Out: A boolean value indicating whether the card was able to be added to the deck
public boolean addCard(Card card) { int cardCount = 0; //Check to see if the deck already has the maximum number of cards //of this type. for (Card cardInDeck : this.cards) if (cardInDeck.equals(card)) cardCount++; //Return false is the card will not fit, or if it is invalid. if (cardCount >= this.numPacks || this.topCard >= this.MAX_CARDS || card.errorFlag) return false; this.topCard++; //Add the card object to the deck. this.cards[topCard - 1] = new Card(card); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canBeAdded(ICard toBeAddedCard);", "abstract boolean allowedToAdd(Card card);", "@Override\n\tpublic boolean addCard(UnoCard card){\n\t\treturn this.cardList.add(card);\n\t}", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[topCard++] = card;\n return true;\n }", "public boolean rulesForAddingCard(Card card)\n\t{\n\t\treturn true;\n\t}", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public boolean addCard(VentraCard card){\n \tboolean isExist = true;\n \t\n \tfor(int i=0; i<allCards.size(); i++ ) {\n \t\tif(card.getCardNumber() == allCards.get(i).getCardNumber()\n \t \t&& card.getPhoneNumber().equals(allCards.get(i).getPhoneNumber())) {\n \t\t\tisExist = false;\n \t\t}\t\n \t}\n \tif(isExist == true) { // if(isExist)\n \t\tallCards.add(card);\t\n \t\treturn true;\n \t}\n \t\n return false;\n }", "public void addCard(String cardName) {\n if(isInDeck(cardName)==false){\n cards.add(new Card(cardName));\n System.out.println(\"Added\");\n }else{\n System.out.println(\"Its already in deck\");\n }\n }", "public boolean addCard(Card hit) {\n if (numOfCards == 10) {\r\n System.err.println(\"You already have 5 cards. \"\r\n + \"Cannot add another. \\n\");\r\n }\r\n //actually adding cards\r\n hand[numOfCards] = hit;\r\n numOfCards++;\r\n\r\n return (getHandSum() <= 21);\r\n }", "public boolean addPlayerCard(GreenPlayerCard card) {\r\n\t\tthis.playerCards.add(card);\r\n\t\treturn true;\r\n\t}", "public boolean canAdd(Card c)\r\n {\r\n int val;\r\n int v;\r\n if(c.getSuit() != suit)\r\n return false;\r\n \r\n v = c.getValue();\r\n if(pile.isEmpty() && v == 12)\r\n return true;\r\n \r\n if(!pile.isEmpty())\r\n {\r\n card = pile.peek();\r\n val = card.getValue();\r\n if (val == 12)\r\n val = -1;\r\n if(v == (val+1))\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public boolean put(Card card) {\n if (this.isEmpty() && card.value() != 13) {\n return false;\n }\n if (!this.isEmpty()) {\n// System.out.println(\"chci polozit: \" + card + \" na \" + this.deck[this.top]);\n Card tmp = this.deck[this.top];\n// System.out.println(\"Rozdil karet je: \"+ tmp.compareValue(card) + \" Jsou si podobne?\" + tmp.similarColorTo(card));\n if (tmp.compareValue(card) != 1 || tmp.similarColorTo(card)) {\n// System.out.println(\"Nepolozeno - chyba\");\n return false;\n }\n }\n\n if (this.top+1 < this.size) {\n this.deck[++this.top] = card;\n return true;\n }\n else {\n return false;\n }\n }", "@Test\n public void testAddCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BLOCKADE);\n assertEquals(true, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BLOCKADE));\n }", "private void addCardToDeck(Card card) {\n\t\tdeck.add(card);\n\t}", "public void addCard(Cards card, boolean canUse) {\n \t\tif (canUse) {\n \t\t\tcards[card.ordinal()] += 1;\n \t\t\tusedCard = false;\n \t\t} else {\n \t\t\tnewCards.add(card);\n \t\t}\n \t}", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "public void add(Card card){\n if (numCards < deckSize - 1) {\n this.deck[numCards] = card;\n numCards++;\n }else {\n System.out.println(\"Deck is full!\");\n }\n }", "private boolean addRestrictedCard2Player(Card card)\n\t{\n\t\treturn restrictedCard2PlayerList.add(card);\n\t}", "@Override\n\tpublic void addCard(PlayingCard card) {\n\t\t\n\t\t\n\t\tif(card == null)return;\n\t\tif(!(card instanceof SkatCard))return;\n\t\tif(!(card.getSuit().equals(SkatCard.suitHerz)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKaro) \n\t\t\t\t|| card.getSuit().equals(SkatCard.suitPik)\n\t\t\t\t|| card.getSuit().equals(SkatCard.suitKreuz)))return;\n\t\tif(!(card.getRank() == SkatCard.rank7\n\t\t\t\t|| card.getRank() == SkatCard.rank8\n\t\t\t\t|| card.getRank() == SkatCard.rank9\n\t\t\t\t|| card.getRank() == SkatCard.rank10\n\t\t\t\t|| card.getRank() == SkatCard.rankBube\n\t\t\t\t|| card.getRank() == SkatCard.rankDame\n\t\t\t\t|| card.getRank() == SkatCard.rankKoenig\n\t\t\t\t|| card.getRank() == SkatCard.rankAss))return;\n\t\tif(getCount() >= kartenAnzahl)return;\n\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\tif(card.compareTo(aktuellesDeck[i]) == 0)return;\n\t\t}\n\t\t\n\t\t/*\n\t\t * eigentliches addCard\n\t\t */\n\t\taktuellesDeck[getCount()] = card;\n\t\tcount++;\n\t}", "public void addCard(Card card) {\n this.deck.push(card);\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "void addCard(Card card) {\n\t\t_hand.addCard(card);\n\t}", "public void addCard(Card e) {\n\t\tthis.deck.add((T) e);\n\t}", "public void addToDeck(Card card) {\n\t\tcards.add(card);\n\t}", "public void add(Card card) {\n this.cards.add(card);\n }", "public void addCard(Card card) {\r\n\t\tcards.add(card);\r\n\t}", "public void addCard(PlayingCard aCard);", "protected abstract boolean isCardActivatable(Card card);", "public void addCard(Card card) {\n personHand.add(card);\n }", "public void addCard(Deck deck, Card card) {\n deck.cards.add(card);\n }", "public boolean addDeck(String token, String name) throws RemoteException {\n return mainScreenProvider.addDeck(token, name);\n }", "public void addCard(Card card) {\r\n\t\tthis.cards.add(card);\r\n\t}", "public CardView addCard(Card card) {\n return addCard(card, false);\n\n }", "public boolean addTopCard( Card c)\r\n {\r\n if ( valid < cards.length)\r\n {\r\n cards[valid] = c; // should this be cloned?\r\n valid++;\r\n return true;\r\n }\r\n return false;\r\n }", "public abstract void addCard();", "public boolean addDeck(long idGame, Deck deck) {\n Game game = this.getGameById(idGame);\n\n if(game == null) {\n return false;\n }\n\n game.getShoe().addAll(deck.getCards());\n this.save(game);\n\n return true;\n }", "public void addCard(Card card) {\n myCards.add(card);\n cardNumber = myCards.size();// reset the number of cards\n }", "public boolean isAddable(Card card, Card middle)\n {\n //ensure that the stack does not include cards of different rank\n if (stack.size() == 0)\n {\n //when a suit is manually picked by a previous draw of a queen\n if (!setOfCards.middle.get(0).firstCard && (setOfCards.middle.get(0).getRank() == \"Q\"))\n {\n if (card.suit == manualSuit)\n {\n return true;\n }\n else if (card.getRank() == \"Q\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n if (middle.sameRank(card) || middle.sameSuit(card))\n {\n\n return true;\n }\n else if (card.getRank() == \"Q\")\n {\n return true;\n }\n else\n return false;\n }\n else if (stack.get(0).sameRank(card))\n {\n return true;\n }\n else\n return false;\n }", "public boolean createDeck(String name)\n {\n if(deckStore.isValidName(name) == false)\n {\n return false;\n }\n \n CardDeck deck = new CardDeck();\n return deckStore.put(name, deck);\n }", "public void addCard(Card c){\n cards.add(c);\n }", "public void addCard(Card card)\n {\n if (card1 == null)\n {\n card1 = card;\n }\n else if (card2 == null)\n {\n card2 = card;\n }\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "boolean hasCardType();", "public boolean addToTable(Card cardInPlay) {\n\t\tArrayList<Card> cardsInPlay = new ArrayList<Card>();\n\t\tcardsInPlay.add(cardInPlay);\n\t\treturn addToTable(cardsInPlay);\n\t}", "public boolean isPossibleToadd() {\n if (capacity == storage) {\n return false;\n } else {\n return true;\n }\n }", "public void addCard(Card card){\n\t\tthis.pile.add(0, card);\n\t}", "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "boolean CheckAndAddCardInBuild(Card_Model cardToBeAdded, Card_Model cardInBuild, int currentPlayer, Vector<Card_Model> playerHand) {\n\n boolean isCardInBuild = false;\n Vector<Card_Model> tempBuild = buildOfCards;\n int aceAs1 = 0;\n int aceAs14 = 0;\n Card_Model cardAdded;\n\n // Cycling through the cards in the build and see if the card the user selected is actually in the build\n for(int i = 0; i < buildOfCards.size(); i++) {\n if(buildOfCards.get(i).GetCard().equals(cardInBuild.GetCard())) {\n isCardInBuild = true;\n }\n }\n\n // If the card the user wants to add to a build exists and they are not the owner...\n if(isCardInBuild && owner != currentPlayer) {\n\n // Push the card the player wants to add to the build onto a temporary copy of the build to\n // be added if the numbers correctly add up to a card in their hand\n tempBuild.add(cardToBeAdded);\n cardAdded = cardToBeAdded;\n\n // Iterate through the build with the card added and see what number it adds up to\n for (int i = 0; i < tempBuild.size(); i++) {\n if (tempBuild.get(i).GetNumber() != 'A') {\n aceAs1 += playerModel.CardNumber(tempBuild.get(i).GetNumber());\n aceAs14 += playerModel.CardNumber(tempBuild.get(i).GetNumber());\n } else {\n aceAs1++;\n aceAs14 += 14;\n }\n }\n\n // Then iterate through the players hand and check and see with the card they want to add being added,\n // Does it equal one of the cards in their hand\n for (int i = 0; i < playerHand.size(); i++) {\n\n if(cardToBeAdded.GetCard().equals(playerHand.get(i).GetCard())) {\n continue;\n }\n\n // If it does equal, update the build with the added card and return true\n if (playerModel.CardNumber(playerHand.get(i).GetNumber()) == aceAs1 ||\n playerModel.CardNumber(playerHand.get(i).GetNumber()) == aceAs14 ||\n playerHand.get(i).GetNumber() == 'A' && aceAs1 == 14) {\n buildOfCards = tempBuild;\n owner = currentPlayer;\n\n if (playerHand.get(i).GetNumber() != 'A') {\n cardValueOfBuild = playerModel.CardNumber(playerHand.get(i).GetNumber());\n } else {\n cardValueOfBuild = 14;\n }\n\n return true;\n }\n }\n\n // If we get out of the for loop then that means that it never added up to a card in the player's hand\n tempBuild.remove(tempBuild.lastElement());\n return false;\n }\n\n // You can not add to the existing build\n else {\n return false;\n }\n }", "public void addToDeck(Card c)\r\n\t{\r\n\t\tdeck.add(c);\r\n\t}", "public void addCard(Card c)\n {\n cards.add(c);\n }", "public void addPartnerCard(Card card);", "boolean add(Object object) ;", "public void addCard(Card cardToAdd) {\n storageCards.add(cardToAdd);\n }", "public boolean hit() {\r\n add(deck.deal());\r\n return getHandValue() <= 21;\r\n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "public int addCard(Card card) {\n\t\thand.add(card);\n\t\tif(!isDealer) {\n\t\t\tSystem.out.println(\"Dealt a \" + card);\n\t\t}\n\t\treturn handValue();\n\t}", "public void takeACard(Card card){\n hand.add(card);\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public void addCard(Card card, GamePlayer GP){\n for(int i=0; i<4; i++){\n if(cardsPlayed[i] == null){\n cardsPlayed[i]=card;\n if(i == 0){\n suit = card.getSuit();\n }\n break;\n }\n }\n }", "public boolean addHand(Hand hand) {\n\t\treturn hands.add(hand);\n\t}", "public boolean canCapture(Card otherCard) {\n return this.getRank().equals(Rank.JACK) || this.compareRank(otherCard);\n }", "public void addCard(Card c)\n {\n hand.add(c);\n }", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "public boolean push(Card card) {\n if (this.size() == 0) {\n if (card.get_value() != 1) {\n return false;\n }\n else {\n this.color = card.get_color();\n this.force_push(card);\n return true;\n }\n }\n else if (card.get_color() == this.color && card.get_value() == (1 + this.top().get_value())) {\n this.force_push(card);\n return true;\n }\n else {\n return false;\n }\n }", "public void addCard(Card card) {\n\t\tthis.content.add(card);\n\t}", "public boolean addPlayer(Player player){\n\t\tif(this.canAdd){\n\t\t\tthis.players.add(player);\n\t\t\t\n\t\t\tif(this.players.size() == 2)\n\t\t\t\tthis.nextElem = 1;\n\t\t}\n\t\t\t\n\t\treturn this.canAdd;\n\t}", "public void addCard(Card c) {\r\n\t\thand.add(c);\r\n\t}", "private static boolean handOutCards(Player player){\r\n\t\t/* \r\n\t\t * Seleccionamos una de las cartas restantes\r\n\t\t * en la baraja de forma aleatoria y se la \r\n\t\t * pasamos a la mano del jugador\r\n\t\t */\r\n\t\tint index;\r\n\r\n\t\t// Comprobamos las cartas restantes en la baraja\r\n\t\tif(deckOfCards.size() <= 0 || deckOfCards == null){\r\n\t\t\tSystem.err.println(\"No hay cartas para repartir.\");\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t// Seleccionamos una de las cartas de la baraja\r\n\t\t\tindex = (int) (Math.random()*deckOfCards.size());\r\n\t\t\tplayer.addCard(deckOfCards.get(index)); // Agregamos la carta a la mano del jugador\r\n\t\t\t// Eliminamos la carta de la baraja y lo mostramos en la consola\r\n\t\t\tSystem.out.println(player.getName() + \" recibió una carta con valor de \" + deckOfCards.remove(index).getValue() + \" puntos\"); \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void addCard(Card card) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n \r\n ContentValues values = new ContentValues();\r\n values.put(COL_ACCOUNT, card.getAccount()); \r\n values.put(COL_USERNAME, card.getUsername()); \r\n values.put(COL_PASSWORD, card.getPassword()); \r\n values.put(COL_URL, card.getUrl()); \r\n values.put(COL_DELETED, card.getDeleted()); \r\n values.put(COL_HIDE_PWD, card.getHidePwd()); \r\n values.put(COL_REMIND_ME, card.getRemindMe()); \r\n values.put(COL_UPDATED_ON, card.getUpdatedOn()); \r\n values.put(COL_COLOR, String.valueOf(card.getColor()));\r\n values.put(COL_REMIND_ME_DAYS, card.getRemindMeDays());\r\n \r\n db.insert(TABLE_CARDS, null, values);\r\n db.close(); \r\n }", "@Override\n public boolean canUseCard(){\n return false;\n }", "public String addCards(ArrayList<Card> cards){\n if(!check(cards))\n return \"false\";\n for(Card c : cards){\n pile.add(c);\n //tens are special\n if (c.getVal() == 10){\n pile = new ArrayList<Card>();\n return \"goAgain\";\n }\n }\n if(checkForCodek()){\n System.out.println(\"CODEK\");\n pile.clear();\n return \"goAgain\";\n }\n return \"true\";\n }", "boolean contains(Card c);", "public boolean hit()\n\t{\n\t\taddCardToHand(new BlackJackCard());\n\t\treturn getHandValue() <= 21;\n\t}", "public boolean canPutCD(){\n if(seesSlot() && !seesCD() && stackHasCD())\n return true;\n else\n return false;\n }", "public void AddCard(Card card) {\n mCard[mCardCount++] = card;\n SetCardPosition(mCardCount - 1);\n }", "public void addCard(Card card)\n\t{\n\t\t\n\t\t// Add the new Card to the list\n\t\tcards.add(card);\n\t\t\n\t\t// Remove and re-add all cards\n\t\tsyncCardsWithViews();\n\t\t\n\t}", "public boolean addCityCard(AnkhMorporkArea a) {\r\n\t\treturn cityCards.add(new CityAreaCard(a));\r\n\t}", "public void addToDiscard(Card card) {\r\n\t\tthis.discard.add(card);\r\n\t}", "public boolean canOfferInsurance() {\n\t\treturn this.hand.getCards().get(0) == Card.ACE;\n\t}", "public void add(Card card) throws DeckSizeException\n {\n deck.add(card);\n if (deck.size()>108)\n {\n throw new DeckSizeException(deck.size());\n }\n }", "private CardView addCard(Card card, boolean silent) {\n CardView cardView = new CardView(card);\n getChildren().add(cardView);\n\n cardViews.add(cardView);\n\n cardView.setParentSet(this);\n\n cardSet.addCard(card);\n\n if (!silent) {\n fireEvent(cardView, CardEvent.CARD_ADDED);\n }\n\n if (interactive) {\n assignEvents(cardView);\n if (!silent) {\n markValidity();\n cardView.setNewcomer(true);\n sort();\n }\n }\n return cardView;\n }", "public boolean canAddEPC(ItemStack stack, int amountOfEPC);", "public boolean isValidMove(Card card)\n {\n return false;\n }", "boolean hasAlreadShowCard();", "public void addDealerCard() {\r\n dealerHand.addCard(cardDeck.rCard());\r\n }", "public boolean addItem( GameItem gameItem , boolean stack )\n {\n int slot = -1;\n for( int i = 0 ; i < size ; i++ ) {\n GameItem item = items[ i ];\n if( stack ) {\n if( item != null ) {\n if( item.getId() == gameItem.getId() ) {\n item.add( gameItem.getAmount() );\n return true;\n }\n } else {\n if( slot == -1 ) {\n slot = i;\n }\n }\n } else {\n if( item == null ) {\n items[ i ] = gameItem;\n return true;\n }\n }\n }\n \n if( slot != -1 ) {\n items[ slot ] = gameItem;\n return true;\n }\n \n return false;\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public boolean hasCard(Cards card) {\n \t\treturn (cards[card.ordinal()] > 0);\n \t}", "public boolean pickCard(String codename)\n {\n // Does the structure actually keep track of this Card?\n // Better check just to be sure\n Card card;\n if (this.cards.containsKey(codename))\n {\n card = this.cards.get(codename);\n }\n else\n {\n return false;\n }\n\n // Update the bookkeeping information for each clue that was associated with the picked card\n for (String relatedClue : card.getClues())\n {\n Clue clue = clues.get(relatedClue);\n if (clue != null)\n {\n // This clue can now be used!\n if (clue.word.equals(codename)) { clue.isActiveCodename = false; }\n\n // No longer associate a clue with a card that is not in play\n clue.removeCard(card);\n\n // If a clue only suggests the assassin or civilians or suggests nothing it is useless\n if (!clue.suggestsSomeCard() || clue.onlySuggestsAssassinOrCivilian())\n {\n clues.remove(clue.word);\n }\n }\n }\n return true;\n }", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void addToHand(PlayingCard card){\n\t\thand.add(card);\n\t}", "private void addCard() { \n\t\tint sic_idHolder; // declares sic_idHolder\n\t\tString titleHolder; // declares titleHolder\n\t\tString authorHolder; // declares authorHolder\n\t\tdouble priceHolder; // declares priceHolder\n\t\tint quantityHolder; // declares quantityHolder\n\t\t\n\t\t\n\t\tSystem.out.println(\"Making a new card:\\nPlease enter the new SIC-ID: \");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input the ID\n\t\tscan.nextLine();\n\t\t\n\t\tif(inventoryObject.cardExists(sic_idHolder) != true) {\n\t\t\tSystem.out.println(\"Please enter the title of the book: \");\n\t\t\ttitleHolder = scan.next(); // prompts user to input the title\n\t\t\tscan.nextLine();\n\t\t\tSystem.out.println(\"Please enter the author of the book\");\n\t\t\tauthorHolder = scan.next(); // prompts user to input the author\n\t\t\tscan.nextLine();\n\t\t\tSystem.out.println(\"Please enter the price of the book\");\n\t\t\tpriceHolder = scan.nextDouble(); // prompts user to input the price\n\t\t\tscan.nextLine();\n\t\t\n\t\t\tif(priceHolder < 0) { // checks to make sure priceHolder is positive\n\t\t\t\tSystem.out.println(\"ERROR! Price must be greater than or equal to 0:\");\n\t\t\t\tgetUserInfo();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Please enter the number of books in invetory\");\n\t\tquantityHolder = scan.nextInt(); // prompts user to input the quantity\n\t\tscan.nextLine();\n\t\t\n\t\tif(quantityHolder <= 0) { // checks to make sure quantity isn't less than 1\n\t\t\tSystem.out.println(\"Error! Quantity must be greater than 0\\n\"); \n\t\t\tgetUserInfo();\n\t\t}\n\t\tinventoryObject.addStockIndexCard(sic_idHolder, titleHolder, authorHolder, priceHolder, quantityHolder); // calls addStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"ERROR: The ID you entered is already in the system\\n\");\n\t\t\tgetUserInfo();\n\t\t}\n\t}", "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should yield false on the method\n assertFalse(redDraw2.canPlayOn(card1));\n assertFalse(redDraw2.canPlayOn(card2));\n \n Card card3 = new Card(Card.COLOUR_RED, 5);\n Card card4 = new Card(Card.COLOUR_RED,2);\n \n // card 3 and card 4 should gives true\n \n assertTrue(redDraw2.canPlayOn(card3));\n assertTrue(redDraw2.canPlayOn(card4));\n \n }", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "public void addToCollected(PlayingCard card){\n\t\tcollected.add(card);\t\t\n\t}", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public boolean takeCardReward(int i){\n if(!isGameOver() || character.getHp() <= 0 )return false;\n if( cardRewardGiven )return false;\n Pile cPile = character.getDeck();\n Card c = reward.getCards().get(i);\n System.out.println(\"**IN takeCardReward, card name is : \" + c.getName());\n character.getDeck().addCard(c);\n cardRewardGiven=true;\n return true;\n }", "@Override\n\tpublic boolean addCart(Cart cart) {\n\t\treturn cartRepository.save(cart)==cart;\n\t}" ]
[ "0.809137", "0.8072958", "0.78914535", "0.7620349", "0.7585922", "0.7543948", "0.74453586", "0.7322955", "0.71963656", "0.70973384", "0.70742875", "0.70655245", "0.69818914", "0.6968876", "0.6911325", "0.68889755", "0.68009007", "0.6777918", "0.6737587", "0.67046255", "0.66341305", "0.662821", "0.6531852", "0.6501667", "0.6489894", "0.64779615", "0.64699334", "0.64427", "0.6434366", "0.6430888", "0.64204115", "0.6416078", "0.64152265", "0.6412506", "0.6405668", "0.6378173", "0.63641614", "0.63616115", "0.634989", "0.6347377", "0.63436264", "0.6329559", "0.6324336", "0.63061076", "0.6298684", "0.62860703", "0.6256169", "0.6253791", "0.62468606", "0.62232316", "0.6221535", "0.62032306", "0.61984074", "0.61962897", "0.618151", "0.61782074", "0.6165681", "0.61650306", "0.6164079", "0.6163846", "0.6136362", "0.6124688", "0.61205506", "0.61164373", "0.6099654", "0.60701054", "0.60516775", "0.60377663", "0.6032433", "0.6028989", "0.60288036", "0.6018332", "0.6008386", "0.60040337", "0.59965", "0.5992903", "0.59911054", "0.598371", "0.59753966", "0.59615546", "0.59486794", "0.59431034", "0.5937416", "0.5925052", "0.59196925", "0.5911206", "0.5909484", "0.5908149", "0.5897101", "0.5891194", "0.58854496", "0.5884798", "0.588124", "0.58737504", "0.5868668", "0.58640045", "0.5850021", "0.5848618", "0.58435184", "0.5839983" ]
0.78867936
3
/ In: Nothing Out: An itneger indicating the number of cards in the deck.
public int getNumCards() { return this.topCard; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size()\r\n\t{\r\n\t\treturn deck.size();\r\n\t}", "public int size() {\n return deck.size();\n }", "public int GetDeckSize(){\n System.out.println(\"DECK \" + deck.size());\n\n return deck.size();\n }", "public int getSizeOfDeck(){\n return cardDeck.size();\n }", "public int getNumberOfCards()\n\t{\n\t\treturn numCards;\n\t}", "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public int getDeckSize()\n\t{\n\t\treturn deck.size();\n\t}", "public int numOfCards() {\n return cards.size();\n }", "public int getNumCards() {\n return this.numCards;\n }", "public int getNumberOfCards() {\r\n\t\treturn numberOfCards;\r\n\t}", "public int deckSize() {\n\t\treturn size;\n\t}", "public int getAmountOfCards() {\n\t\t\n\t\treturn myCards.size();\n\t\t\n\t}", "public int getCardCount() {\n\t\treturn this.cardsInhand.size();\n\t}", "public int getCardCount() {\n return cardSet.totalCount();\n }", "public int size() {\n return this.deck.size();\n }", "public int deckLength() {\n\t\treturn this.deck.size();\n\t}", "public int cardsLeft() {\n return deck.size();\n }", "public int getTotalCards() {\n\t\treturn cards.size();\n\t}", "public int size() {\r\n\t\treturn cards.size();\r\n\t}", "public int getCardCount() {\r\n\t\treturn this.cards;\r\n\t}", "int getNumCards();", "public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}", "public int size()\n\t{\n\t\treturn card.size();\n\t}", "public int getCardCount() {\r\n return cardCount;\r\n\t}", "public int cardsRemaining() {\n return deck.cardsRemaining();\n }", "public int getSize(){\r\n\t\treturn cards.size();\r\n\t}", "public int size() {\r\n\t\treturn seedCards.size();\r\n\t}", "public int length()\n {\n return cards.size();\n }", "public int leaderDeckSize(){\n return deckLeaderCard.size();\n }", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "public int receiveNumCards() {\n try {\n return dIn.readInt();\n } catch (IOException e) {\n System.out.println(\"Number of cards not received\");\n e.printStackTrace();\n }\n return 0;\n }", "public int getNumDevCards() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < cards.length; i++)\n \t\t\tcount += cards[i];\n \n \t\treturn count + newCards.size();\n \t}", "public int getCountTradeCards() {\r\n\t\treturn countTradeCards;\r\n\t}", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "public static int getNumCardsPerHand()\n {\n return NUM_CARDS_PER_HAND;\n }", "public static int getDeckSize() {\n return DECK_SIZE;\n }", "public int getCardsRemaining() {\n\n\treturn cardsLeft;\n\n }", "public int getCardCount() {\n \t\treturn dupCount;\n \t}", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "public int remainingCards() {\n return this.cards.length - this.topCardIndex ;\n }", "int getAcksCount();", "int getAcksCount();", "@Test\n public void getDeckTest2() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n for (int i = 2; i < 15; i++) {\n int counter = 0;\n for (Card c : deck) {\n if (c.getValue() == i) {\n counter++;\n }\n }\n assertEquals(counter, 4);\n }\n }", "public int getSize() {\n return pokerList.size();\n }", "@Test\r\n\tpublic void TestDeckSuitCount() {\n\t\ttry {\r\n\t\t\tDeck AKDeck = new Deck();\r\n\t\t\tfor (int i = 13; i >= 0; i--) {\r\n\t\t\t\tassertEquals(i, AKDeck.Count(eSuit.HEARTS));\r\n\t\t\t\tAKDeck.Draw(eSuit.HEARTS);\r\n\t\t\t}\r\n\t\t} catch (DeckException ex) {\r\n\t\t\tSystem.out.println(\"The deck is empty. No more cards can be drawn.\");\r\n\t\t}\r\n\t}", "public int getHandSize() {\r\n\t\treturn playerCards.size();\r\n\t}", "public int getNumDevCardType(Cards card) {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < newCards.size(); i++) {\n \t\t\tif (newCards.get(i) == card)\n \t\t\t\tcount += 1;\n \t\t}\n \n \t\treturn cards[card.ordinal()] + count;\n \t}", "public int getHandKarteCount(){\n return getHandKarte().size();\n }", "public void checkDeck(){\n\t\tfor(int i: deck)\n\t\t\tSystem.out.println(Integer.toString(i));\n\t}", "int getCardsRemaining(int player) {\n return players[player].getHand().size();\n }", "Pinochle(){\n createDeck();\n createDeck();\n this.originalSizeOfDeck = this.deckOfCards.size();\n }", "@Test\r\n\tpublic void TestDeckRankCount() {\n\t\ttry {\r\n\t\t\tDeck AKDeck = new Deck();\r\n\t\t\tfor (int i = 4; i >= 0; i--) {\r\n\t\t\t\tassertEquals(i, AKDeck.Count(eRank.ACE));\r\n\t\t\t\tAKDeck.Draw(eRank.ACE);\r\n\t\t\t}\r\n\t\t} catch (DeckException ex) {\r\n\t\t\tSystem.out.println(\"The deck is empty. No more cards can be drawn.\");\r\n\t\t}\r\n\t}", "public int getPlayer1DeckSize()\n\t{\n\t\treturn player1.getDeck().size();\n\t}", "public int officialSize()\n {\n return this.originalSizeOfDeck;\n }", "@Test\n public void getDeckTest3() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n String s = \"♣♦♥♠\";\n for (char ch : s.toCharArray()) {\n int counter = 0;\n for (Card c : deck) {\n if (c.getSuit().getValue() == ch) {\n counter++;\n }\n }\n assertEquals(counter, 13);\n }\n }", "@Override\n public int getShoeSize() {\n return this.cards.size();\n }", "public static double getCardCounter() {\n\t\treturn cardCounter;\n\t}", "public int packed() {\n return this.nbCard;\n }", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "short getNumberOfCardsInArgument(UUID argumentId);", "public int getHandSize()\n {\n return hand.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "public interface CardCounts {\n\n int[] FULL_SETS_CARD_COUNTS = {324, 162, 162, 180, 180, 180, 324, 180, 182, 54, 99, 189, 100, 129};\n\n int[] PREMIUM_SETS_CARD_COUNTS = {6, 11, 2, 7, 6, 18, 6, 6, 12, 12, 6, 20};\n\n int[] VIRTUAL_SETS_CARD_COUNTS = {146, 42, 15, 36, 58, 23, 14, 30, 59, 56, 47, 61, 6, 59, 22, 27, 49, 52, 32, 48, 10, 75};\n\n int[] VIRTUAL_PREMIUM_SETS_CARD_COUNTS = {8};\n\n int[] DREAM_CARD_SETS_CARD_COUNTS = {0};\n\n int[] PLAYTESTING_SETS_CARD_COUNTS = {200};\n\n int[] LEGACY_SETS_CARD_COUNTS = {999};\n}", "int getInCount();", "public Integer getRedCards() {\n return this.redCards;\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "public Integer getYellowCards() {\n return this.yellowCards;\n }", "public int size(){\n\t\treturn howMany; \n\t}", "public int getAcksCount() {\n return acks_.size();\n }", "public int getAcksCount() {\n return acks_.size();\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public int size() \r\n\t{\r\n\t\treturn getCounter();\r\n\t}", "public CardDeck cardDeck(){\r\n\t\treturn deck;\r\n\t}", "public int count() {\n\t\treturn sizeC;\n\t}", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public int GetSizeOfComputerHand(){\n return handComputer.size();\n }", "@Test\n public void getDeckTest1() {\n GenericStandardDeckGame g = new GenericStandardDeckGame();\n List<Card> deck = g.getDeck();\n assertEquals(deck.size(), 52);\n }", "public int getSize() {\r\n return dice.size();\r\n }", "private Map<Card, Integer> tally() {\n Map<Card, Integer> result = new HashMap<Card, Integer>();\n for (Card card: this.cards) {\n Integer value = result.get(card);\n if (value == null) {\n result.put(card, 1);\n } else {\n result.put(card, value + 1);\n }\n }\n return result;\n }", "public int discCount() {\n\t\tint countBLACK = discBlackCount();\n\t\tint countWHITE = discWhiteCount();\n\n\t\treturn countBLACK + countWHITE;\n\t\t\n\t}", "@Test\n public void getNumDraw() {\n this.reset();\n assertEquals(-1, this.bps.getNumDraw());\n // max # of visible cards in the draw pile\n this.reset();\n this.bps.startGame(this.fullDeck, false, 7, 1);\n assertEquals(1, this.bps.getNumDraw());\n }", "public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }", "@Override\n\tpublic int countBySeatIdAndCardNum(DgCard card) {\n\t\treturn dgCardMapper.countBySeatIdAndCardNum(card);\n\t}", "public int getCardsToDeal() {\r\n\t\treturn cardsToDeal;\r\n\t}", "public Deck getDeck(){\r\n\t\t return cards;\r\n\t }", "public int getNumberOfDifferentCards(ArrayList<CardModel> playerCardsList) {\n System.out.println(\"different card method\") ;\n int numberOfUnits = 0;\n int infantryCardNumber = 0;\n int artilaryCardNumber = 0;\n int cavalaryCardNumber = 0;\n\n ArrayList<CardModel> playerCards = playerCardsList;\n\n infantryCardNumber = getNumberCardTypeByCardType(playerCards, EnumHandler.CardType.INFANTRY);\n artilaryCardNumber = getNumberCardTypeByCardType(playerCards , EnumHandler.CardType.ARTILLERY);\n cavalaryCardNumber = getNumberCardTypeByCardType(playerCards , EnumHandler.CardType.CAVALRY);\n\n numberOfUnits = Math.min(infantryCardNumber, Math.min(artilaryCardNumber, cavalaryCardNumber));\n\n if (numberOfUnits > 0 && isUpdatePlayerDeck()) {\n setPlayerDeckByCardType(playerCards, EnumHandler.CardType.INFANTRY, numberOfUnits);\n setPlayerDeckByCardType(playerCards, EnumHandler.CardType.ARTILLERY, numberOfUnits);\n setPlayerDeckByCardType(playerCards, EnumHandler.CardType.CAVALRY, numberOfUnits);\n }\n\n return numberOfUnits;\n\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "@Test\n public void testGetDecksFromPlayer() {\n System.out.println(\"TestgetDecksFromPlayer\");\n int playerID = 1;\n int expResult = 1;\n ArrayList<Deck> result = cardDeckController.getDecksFromPlayer(playerID);\n assertEquals(expResult, result.size());\n fail(\"The expected result did not match the output expected number of decks : \" + expResult + \" Actual : \" + result.size());\n }", "public int numberUnplayedDevCards(DevCardType devCardType) {\n\t\treturn developmentCardHand.numberUnplayedDevCards(devCardType);\n\t}", "public static int face(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) % 13 + 1;\n }", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int howManyCardsUp() {\r\n return undoStack.size();\r\n }", "public int size() { return count; }", "public Map<Suit, Integer> getDealtCardsBySuit() {\n\t\tMap<Suit, Integer> dealtCardsCount = new HashMap<Suit, Integer>();\n\t\tfor (Entry<Suit, AtomicInteger> entry : dealtCardsBySuit.entrySet()) {\n\t\t\tdealtCardsCount.put(entry.getKey(), entry.getValue().get());\n\t\t}\n\t\treturn dealtCardsCount;\n\t}", "public int receiveHandCount() {\n try {\n return dIn.readInt();\n } catch (IOException e) {\n System.out.println(\"Hand count not received\");\n e.printStackTrace();\n }\n return 0;\n }", "public Card dealCard() {\n\t\tsize--;\n\t\t//return deck.pop();\n\t\tCard card = deck.pop();\n\t\tint rank = card.getRank();\n\t\t\n\t\t// Adjust total count accordingly\n\t\tif ((rank >= 2) && (rank <= 6)) {\n\t\t\ttotal_count++;\n\t\t}\n\t\telse if ((rank >= 10) || (rank == 1)) {\n\t\t\ttotal_count--;\n\t\t}\n\t\t\n\t\treturn card;\n\t}", "public int suitNum() {\r\n return this.i;\r\n }", "public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}", "public static int getMaxInDeck(Card c) {\n \t\tif (c.getID().equals(\"FZ/SE13-24 C\") || c.getID().equals(\"FZ/SE13-26 C\") || c.getID().equals(\"MF/S13-034 U\") || c.getID().equals(\"MF/S13-040 C\") || c.getID().equals(\"ID/W10-014 C\")\n \t\t\t\t|| c.getID().equals(\"SG/W19-038 C\"))\n \t\t\treturn 50;\n \t\telse if (c.getID().contains(\"FT/SE10-29\"))\n \t\t\treturn 6;\n \t\telse\n \t\t\treturn 4;\n \t}" ]
[ "0.80978525", "0.80034184", "0.78531677", "0.7844213", "0.78410214", "0.78107435", "0.7750234", "0.7728256", "0.76746553", "0.76579785", "0.764295", "0.7631809", "0.7630788", "0.76044595", "0.75918865", "0.7564725", "0.7562073", "0.75481755", "0.7542975", "0.7495451", "0.749074", "0.7480766", "0.74723375", "0.7396603", "0.73871267", "0.72572", "0.72466236", "0.72164863", "0.72135556", "0.7205725", "0.715806", "0.7137948", "0.708432", "0.7083745", "0.7034304", "0.70286864", "0.68787724", "0.68197465", "0.6803115", "0.66940206", "0.6691364", "0.6691364", "0.66901445", "0.66589653", "0.6591431", "0.6561564", "0.64928263", "0.64046603", "0.6390186", "0.6384621", "0.63806987", "0.63792396", "0.63434124", "0.63268435", "0.63171643", "0.63011867", "0.6288364", "0.62871593", "0.62470764", "0.62295854", "0.6228495", "0.6222639", "0.6222639", "0.62115145", "0.62000126", "0.6193829", "0.6175381", "0.61723703", "0.61706215", "0.6165512", "0.6165512", "0.6161496", "0.6149237", "0.6125185", "0.6124791", "0.6112201", "0.6109463", "0.6108162", "0.60886675", "0.6083534", "0.60764366", "0.60714465", "0.6043807", "0.60387194", "0.60378844", "0.6012737", "0.6008022", "0.6007076", "0.6005922", "0.60021055", "0.5995125", "0.597657", "0.5975535", "0.59739214", "0.59656864", "0.5959673", "0.59595215", "0.5955963", "0.59492886", "0.59475595" ]
0.70613724
34
/ In: A card object to remove from the deck Out: A boolean value indicating if the card was able to be removed from the deck.
public boolean removeCard(Card card) { //Iterate through the deck to find the card. for (int i = 0; i < this.cards.length; i++) if (this.cards[i].equals(card)) { //If the card is found, then remove it from the deck. //replace it with the topCard this.cards[i] = new Card(this.cards[topCard - 1]); this.topCard--; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canBeRemoved(int cardIndex);", "public boolean removePlayerCard(GreenPlayerCard card) {\r\n\t\treturn playerCards.remove(card);\r\n\t}", "public boolean remove(Card c) {\n if (cards.remove(c)) {\n orginalOrder.remove(c);\n cardsPerSuit[c.getSuit().ordinal()]--;\n calculateValue();\n return true;\n }\n return false;\n }", "@Test\n public void testRemoveCard() {\n d_gameData.getD_playerList().get(1).addCard(GameCard.BOMB);\n d_gameData.getD_playerList().get(1).removeCard(GameCard.BOMB);\n assertEquals(false, d_gameData.getD_playerList().get(1).getD_cards().contains(GameCard.BOMB));\n }", "protected boolean canRemove(int row, int card) {\r\n return super.canRemove(row, card);\r\n }", "public void remove(Card card)\n {\n deck.remove(card);\n //Add listener to check if the deck is empty (then refill it) or not\n }", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "public static boolean can_remove(Card a, Card b){\n int asuit = a.getSuit();\n int bsuit = b.getSuit();\n int aface = a.getRank();\n int bface = b.getRank();\n\n if (same_int(asuit,bsuit)){\n if (compare_face(aface,bface,\"l\")){\n return true;\n }\n }\n return false;\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "public void removeCard(UnoCard cardToRemove){\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardToRemove.getName())){\n Log.d(\"Removed Card:\", c.getName());\n this.cards.remove(c);\n break;\n }\n }\n }", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "for (Card ca : deck) {\n\t\tif (ca.suit == 'c') {\n\t\t\tdeck.remove(ca);\n\t\t}\n\t}", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "public boolean removeDeck(String token, int id) throws RemoteException {\n return mainScreenProvider.removeDeck(token, id);\n }", "public boolean deleteDeck(String name)\n {\n return deckStore.delete(name);\n }", "public boolean delete(String cardid);", "public boolean remove(Card x) {\n if (head == null)\n return false;\n \n // Remove the first element, if necessary.\n if (head.data.ValueIn == x.ValueIn && !(head.data.suit.compareTo(\"x.suit\") == 0)) {\n head = head.next;\n return true;\n }\n\n // Set up helper reference to refer to the Node right before the Node\n // to be deleted would be stored.\n Node helper = head; \n while ((helper.next != null) && (helper.next.data.ValueIn < x.ValueIn)) \n helper = helper.next;\n\n // If x was too big to be on the list, simply return false.\n if (helper.next == null)\n return false;\n\n // Only if the appropriate Node stores x should it be deleted.\n if (helper.next.data.ValueIn == x.ValueIn) {\n helper.next = helper.next.next;\n return true;\n } \n\n return false; // Case where x is not found.\n }", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "private static boolean handOutCards(Player player){\r\n\t\t/* \r\n\t\t * Seleccionamos una de las cartas restantes\r\n\t\t * en la baraja de forma aleatoria y se la \r\n\t\t * pasamos a la mano del jugador\r\n\t\t */\r\n\t\tint index;\r\n\r\n\t\t// Comprobamos las cartas restantes en la baraja\r\n\t\tif(deckOfCards.size() <= 0 || deckOfCards == null){\r\n\t\t\tSystem.err.println(\"No hay cartas para repartir.\");\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t// Seleccionamos una de las cartas de la baraja\r\n\t\t\tindex = (int) (Math.random()*deckOfCards.size());\r\n\t\t\tplayer.addCard(deckOfCards.get(index)); // Agregamos la carta a la mano del jugador\r\n\t\t\t// Eliminamos la carta de la baraja y lo mostramos en la consola\r\n\t\t\tSystem.out.println(player.getName() + \" recibió una carta con valor de \" + deckOfCards.remove(index).getValue() + \" puntos\"); \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean removeCard(HomeCellSpider x, Card top) {\n \tpiles= x.piles;\n \tif(piles.get(piles.size()-1) == top) {//check to see if top is really the top card of the homecellpile\n \t\tpiles.remove(piles.size()-1);//if so remove it and decrease the overall cardCounter\n \tcardCounter--;\n \treturn true;\n \t}else {\n \t\treturn false; // only top card can be removed\n \t}\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "Set<Card> remove();", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public static boolean validateItemCardUsage(Model model, ItemCard card) {\n\n if (model.getCurrentPlayerReference().getCharacter() instanceof Alien) {\n return false;\n }\n\n Human player = (Human) model.getCurrentPlayerReference().getCharacter();\n if (card instanceof AdrenalineCard\n && player.getMaxAllowedMovement() == 2) {\n return false;\n }\n if (card instanceof AttackCard && player.isAttackAllowed()) {\n return false;\n }\n if (card instanceof SedativesCard && !player.hasToDrawSectorCard()) {\n return false;\n }\n Sector playerPosition = model.getMap().getSectors()\n .get(model.getCurrentPlayerReference().getLastPosition());\n if (card instanceof TeleportCard\n && playerPosition instanceof SpawnSector) {\n return false;\n }\n\n List<ItemCard> heldCards = model.getCurrentPlayerReference().getHand()\n .getHeldCards();\n for (ItemCard i : heldCards) {\n if ((card.getClass()).equals(i.getClass())) {\n heldCards.remove(i);\n return true;\n }\n }\n return false;\n\n }", "@Override\n public boolean remove() {\n if(this.getSize() == 0){\n return false;\n } else{\n bankArrays[this.numBanks-1] = null;\n numBanks--;\n return true;\n }\n\n }", "@Test\r\n public void testRemoveFromHand() {\r\n Player player = new Player();\r\n boolean expResult = false;\r\n boolean result = player.removeFromHand(0);\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(2));\r\n player.removeFromHand(0);\r\n ArrayList <Tile> temp=player.getHand();\r\n Tile tile=new Tile(0,1);\r\n \r\n boolean expResult2=true;\r\n boolean result2=(player.getHand().get(0).getHead()==0 && player.getHand().get(0).getTail()==1);\r\n assertEquals(expResult2, result2);\r\n \r\n \r\n \r\n \r\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "protected boolean excludeCardFromMixing(Card card) {\n Stack stack = card.getStack();\n\n if (!card.isUp()) {\n return false;\n }\n\n if (foundationStacksContain(stack.getId()) || stack == getDiscardStack()) {\n return true;\n }\n\n return stack.getId() < 24 && !stack.isEmpty() && validOrder(stack);\n }", "public boolean remove() {\n\t\tboolean result = false;\n\n\t\tif (this.id > 0) {\n\n\t\t\ttry {\n\n\t\t\t\tmanager = Connection.connectToMysql();\n\t\t\t\tmanager.getTransaction().begin();\n\n\t\t\t\tif (manager.createQuery(\"DELETE FROM Cancion WHERE id = \" + this.id).executeUpdate() == 1) {\n\t\t\t\t\tresult = true;\n\t\t\t\t}\n\n\t\t\t\tmanager.getTransaction().commit();\n\n\t\t\t} catch (Exception ex) {\n\t\t\t\tSystem.out.println(ex);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "public boolean removeCityCard(AnkhMorporkArea a) {\r\n\t\treturn cityCards.remove(new CityAreaCard(a));\r\n\t}", "public Boolean emptyDeck(){\n return this.deckOfCards.isEmpty();\n }", "public boolean canRemoveEPC(ItemStack stack, int amountOfEPC);", "boolean canBeAdded(ICard toBeAddedCard);", "@Override\r\n\tpublic boolean removeOffersForCard(OfferCard offerCard) {\n\t\tgetOfferOfferCardAssocDAO().removeOffersForCard(offerCard);\r\n\t\tgetOfferDAO().removeOffersForCard(offerCard);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean isEffectOnCardPrevented(PhysicalCard card) {\n return _preventedCards.contains(card);\n }", "public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}", "public boolean remove()\n {\n return false;\n }", "boolean remove(Object obj);", "boolean remove(Object obj);", "public void RemoveCardFromDeck(int value){\n deck.remove(value);\n }", "public boolean checkOff(Card card){\n\t\t//if checklist contains key then sets mapping too true, ie checks it off.\n\t\tif(checklist.containsKey(card.getName())){\n\t\t\tchecklist.put(card.getName(), true);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean remove(Object obj);", "public boolean remove(Object value) {\n\t\treturn false;\n\t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "public boolean remove(@NonNull T object) {\n final int location = getLocation(object);\n final boolean removed = data.remove(object);\n notifyItemRemoved(location);\n return removed;\n }", "public boolean isStandardDeck() {\n Deck jeff = new Deck () ;\n if (this.cards.length == jeff.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(jeff.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "boolean canRemove();", "public <T> boolean removeObject(T entity) throws DataAccessException {\n\t\tboolean flag = false;\n try {\n mapper.removeDept((DeptVO) entity);\n flag = true;\n } catch (DataAccessException e) {\n flag = false;\n throw e;\n }\n return flag;\n\t}", "boolean CanDiscardCards(Resources resources);", "public boolean shouldRemove() {\r\n\t\treturn death;\r\n\t}", "@Override\n public boolean canUseCard(){\n return false;\n }", "boolean isRemove();", "public boolean deleteTreeBidCardForKey(String treeKey) {\n\t\tTreeBidCard t = cacheTree.removeTreeBidCard(treeKey);\n\t\tif (t != null) {\n\t\t\tt = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public int deleteCard() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn CreditCardDA.deleteCard(id);\r\n\t}", "@Test\n public void testBombCard() {\n Player l_player = d_gameData.getD_playerList().get(0);\n l_player.getD_cards().add(GameCard.BOMB);\n l_player.getD_cards().add(GameCard.BOMB);\n// assertEquals(get.getD_cards().size(), 2);\n l_player.getD_cards().remove(GameCard.BOMB);\n boolean l_removed = l_player.getD_cards().remove(GameCard.AIRLIFT);\n assertEquals(l_removed, false);\n }", "public boolean isValidMove(Card card)\n {\n return false;\n }", "private void removeCard(CardView cardView, boolean silent) {\n cardSet.removeCard(cardView.getCard());\n getChildren().remove(cardView);\n cardViews.remove(cardView);\n\n if (!silent) {\n fireEvent(cardView, CardEvent.CARD_REMOVED);\n }\n\n markValidity();\n }", "public boolean hasCard(Cards card) {\n \t\treturn (cards[card.ordinal()] > 0);\n \t}", "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "@Override\n\tpublic boolean remove(Object o) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean remove(Object o) {\n\t\treturn false;\n\t}", "@Override\n public boolean remove(Object o) {\n return gameCollection.remove(o);\n }", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "abstract boolean allowedToAdd(Card card);", "public boolean outOfCards() {\n return (this.gameDeck.isEmpty() && this.wonDeck.isEmpty());\n }", "@Override\n\t\tpublic boolean remove(Object o) {\n\t\t\treturn false;\n\t\t}", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public boolean pickCard(String codename)\n {\n // Does the structure actually keep track of this Card?\n // Better check just to be sure\n Card card;\n if (this.cards.containsKey(codename))\n {\n card = this.cards.get(codename);\n }\n else\n {\n return false;\n }\n\n // Update the bookkeeping information for each clue that was associated with the picked card\n for (String relatedClue : card.getClues())\n {\n Clue clue = clues.get(relatedClue);\n if (clue != null)\n {\n // This clue can now be used!\n if (clue.word.equals(codename)) { clue.isActiveCodename = false; }\n\n // No longer associate a clue with a card that is not in play\n clue.removeCard(card);\n\n // If a clue only suggests the assassin or civilians or suggests nothing it is useless\n if (!clue.suggestsSomeCard() || clue.onlySuggestsAssassinOrCivilian())\n {\n clues.remove(clue.word);\n }\n }\n }\n return true;\n }", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public boolean buyCard ( DevCard cardToBuy) {\n for(int i=0;i<4;i++){\n for(int j=0; j<3;j++){\n if(!devDecksOnTable[i][j].littleDevDeck.isEmpty())\n if((devDecksOnTable[i][j].littleDevDeck.get(0)).equals(cardToBuy)){\n devDecksOnTable[i][j].littleDevDeck.remove(0);\n return true;\n }\n }\n }\n return false;\n }", "public boolean remove(Object o);", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "boolean remove(Object o);", "public void removeCard(int index) {\n cards.remove(index);\n }", "@Override\r\n\tpublic boolean remove(T element) {\n\t\treturn this._list.remove(element);\r\n\t}", "public boolean cardsDealt(int players){\n\t\tif(deck.size()==0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t\t//TODO:\n\t\t//Implement for a variable # of players\n\t}", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "boolean contains(Card c);", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "private void removeCard() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC ID number you'd like to remove:\");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input sic_idHolder\n\t\tscan.nextLine();\n\t\t\n\t\tinventoryObject.removeStockIndexCard(sic_idHolder); //calls removeStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t}", "public boolean remove(New object);", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "@Override\n public boolean remove(BankAccount anEntry) {\n for(int i=0; i<numBanks; i++){\n if(bankArrays[i].compare(anEntry) == 0){\n bankArrays[i] = bankArrays[numBanks-1]; //set the \"last\" bank in this array to the current\n bankArrays[numBanks-1] = null; //delete the last bank.\n numBanks --;\n return true; //this return will terminate the method so the final return doesn't run\n }\n }\n return false;\n //NOTE: even if the bank is found at the last entry, this method will still work,\n // the line before the null will simply do nothing.\n }", "public void removeCard(Player player, AbstractCard card) { //throws exception\n\n for (Hand hand : hands)\n if (hand.getHandOwner().equals(player))\n hand.removeCard(card);\n\n }", "@Override\n public boolean remove(Object o) {\n for (int i = 0; i < currentSize; i++) {\n if (container[i] == o) {\n System.arraycopy(container, i + 1, container, i, currentSize - i - 1);\n currentSize--;\n return true;\n }\n }\n return false;\n }", "public abstract boolean remove(KitComponent component);", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public boolean removeElement(Object obj);", "public void removeCard(Card rCard, int id)\n\t{\n\t\tfor (int x = 0; x < hands[id].size(); x++) //look at each card in hand\n\t\t{\n\t\t\tCard cCard = hands[id].getCardAtSlot(x);\n\t\t\tif (rCard.getCardID() == cCard.getCardID())\n\t\t\t{\n\t\t\t\thands[id].remove(cCard);\n\t\t\t}\n\t\t}\n\t}", "public boolean removeVehicle(){\r\n veh = null;\r\n return true;\r\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public final boolean isRemovable(CatalogReader provider) {\n return mountedCatalogs.contains(provider);\n }", "public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }", "private boolean isRemoved() {\r\n\t\t\treturn removed;\r\n\t\t}" ]
[ "0.8007521", "0.7359825", "0.7223539", "0.70988977", "0.7027925", "0.696867", "0.68102944", "0.66676056", "0.6666845", "0.66516876", "0.6645475", "0.66368884", "0.6621351", "0.6465813", "0.64374954", "0.6410874", "0.6410577", "0.631593", "0.63143784", "0.6314293", "0.62414086", "0.6239119", "0.62304485", "0.6219949", "0.620619", "0.6205516", "0.6198257", "0.61887366", "0.6173788", "0.61533624", "0.61460036", "0.6142306", "0.6132315", "0.6100335", "0.6089354", "0.6085578", "0.6078773", "0.60727715", "0.6048299", "0.60054636", "0.5998031", "0.5998031", "0.5995159", "0.5988708", "0.5983359", "0.59735775", "0.59690034", "0.5956274", "0.5950823", "0.594515", "0.59434557", "0.5928967", "0.5916714", "0.5912292", "0.5910439", "0.5910134", "0.5897883", "0.58906084", "0.5884358", "0.58631736", "0.5859073", "0.58528864", "0.5848346", "0.5837766", "0.58359534", "0.58359534", "0.58249784", "0.5814396", "0.58140016", "0.58110076", "0.58059126", "0.5797339", "0.5795986", "0.5795629", "0.5780095", "0.57792944", "0.5776543", "0.57736975", "0.577262", "0.5756874", "0.5752621", "0.57434565", "0.5741772", "0.57414174", "0.5735473", "0.57351166", "0.5705654", "0.5701094", "0.56906265", "0.56886274", "0.5682812", "0.5677825", "0.56702286", "0.56688845", "0.56679744", "0.5657757", "0.5655191", "0.5651721", "0.56473845", "0.564675" ]
0.7639033
1
/ In: Nothing Out: Nothing Sorts the cards in the deck
public void sort() { Card.arraySort(this.cards, this.topCard); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }", "void sort() {\n Card.arraySort(this.myCards, numCards);\n }", "public void sort()\r\n {\r\n Card.arraySort(myCards, myCards.length);\r\n }", "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0] = iMinValue;\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tcard = mCard[i];\n \t\tiValue = card.GetSuit()*13 + card.GetValue();\n \t\tiCount = 0;\n \t\t// See where the card value comes in the pecking order\n \t\twhile (iValue > iOrder[iCount]){\n \t\t\tiCount++;\n \t\t}\n \t\t// It goes here, so move everything else along one\n \t\tfor (int j = mCardCount-1; j > iCount; j--)\n \t\t\tiOrder[j] = iOrder[j-1];\n \t\tiOrder[iCount] = iValue;\n \t}\n \t\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tfor (int j = 0; j < mCardCount; j++){\n \t\tcard = mCard[j];\n \t\tiValue = card.GetSuit()*13 + card.GetValue(); \t\t\t\n \t\t\tif (iValue == iOrder[i]){\n \t\t\t\torderedCards[i] = mCard[j];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tmCard[i] = orderedCards[i];\n \t} \t\n }\n }", "void sort()\n {\n Card.arraySort(myCards, numCards);\n }", "void sort()\n {\n Card.arraySort(cards, topCard);\n }", "@Override\n\t\n\tpublic void sortHand(PlayingCard[][] cards) {\n\t\tfor(int k = 0; k < cards.length; k++) {\n\t\t\tPlayingCard [] hand = cards[k];\n\t\t\t\n\t\t\tfor(int i = hand.length - 1; i > 0; i--) {\n\t\t\t\tfor(int j = i - 1; j > -1; j--) {\n\t\t\t\t\tif(hand[j].compareTo(hand[i]) == 1) {\n\t\t\t\t\t\tSkatCard speicherCard = new SkatCard(hand[i].getSuit(), hand[i].getRank());\n\t\t\t\t\t\thand[i] = null;\n\t\t\t\t\t\thand[i] = new SkatCard(hand[j].getSuit(), hand[j].getRank());\n\t\t\t\t\t\thand[j] = null;\n\t\t\t\t\t\thand[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "void shuffleDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tint randomNumber = index + (int)(Math.random() * (this.getNumberOfCards() - index));\n\t\t\tCard temp = this.cardsInDeck[randomNumber];\n\t\t\tthis.cardsInDeck[randomNumber] = this.cardsInDeck[index];\n\t\t\tthis.cardsInDeck[index] = temp;\n\t\t}\n\t}", "public void shuffle(){\n Collections.shuffle(this.deckOfCards);\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public void sort(){\n ArrayList<Card> sortedCards = new ArrayList<Card>();\n ArrayList<Card> reds = new ArrayList<Card>();\n ArrayList<Card> yellows = new ArrayList<Card>();\n ArrayList<Card> greens = new ArrayList<Card>();\n ArrayList<Card> blues = new ArrayList<Card>();\n ArrayList<Card> specials = new ArrayList<Card>();\n for(int i = 0; i < cards.size(); i++){\n if(cards.get(i).getColor() == RED){\n reds.add(cards.get(i));\n }else if(cards.get(i).getColor() == YELLOW){\n yellows.add(cards.get(i));\n }else if(cards.get(i).getColor() == GREEN){\n greens.add(cards.get(i));\n }else if(cards.get(i).getColor() == BLUE){\n blues.add(cards.get(i));\n }else if(cards.get(i).getColor() == ALL){\n specials.add(cards.get(i));\n }\n }\n cards = new ArrayList<Card>();\n for(Card c: reds){\n sortedCards.add(c);\n }\n for(Card c: yellows){\n sortedCards.add(c);\n }\n for(Card c: greens){\n sortedCards.add(c);\n }\n for(Card c: blues){\n sortedCards.add(c);\n }\n for(Card c: specials){\n sortedCards.add(c);\n }\n for(Card c: sortedCards){\n cards.add(c);\n }\n }", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "private void shuffleDeck()\r\n {\n cardList = new ArrayList<Card>(deck);\r\n // shuffle the deck of cards using the ArrayList\r\n Collections.shuffle(getCardList());\r\n // convert it back to a HashSet\r\n deck = new HashSet<Card>(getCardList());\r\n }", "public void resetDeck() {\n cards.addAll(removedCards);\n removedCards.clear();\n }", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "void getArrangedDeck() {\n\t\t\t\t\n\t\tint strength = 1;\n\t\t\n\t\tfor(int index = 0; index < this.numberOfCards; index++) {\n\n\t\t\tif((index+1)%4==0) {\n\t\t\t\tthis.cardsInDeck[index].setColor('\\u2660');\n\t\t\t} else {\n\t\t\t\tif((index+2)%4==0) {\n\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2665');\n\t\t\t\t} else {\n\t\t\t\t\tif((index+3)%4==0) {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2666');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2663');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.cardsInDeck[index].setStrength(strength);\n\t\t\tif((index+1) % 4 == 0){\n\t\t\t\tstrength++;\n\t\t\t}\n\t\t\t\n\t\t\tif (index >= 0 && index <= 3) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"2\");\n\t\t\t}\n\t\t\tif (index >= 4 && index <= 7) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"3\");\n\t\t\t}\n\t\t\tif (index >= 8 && index <= 11) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"4\");\n\t\t\t}\n\t\t\tif (index >= 12 && index <= 15) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"5\");\n\t\t\t}\n\t\t\tif (index >= 16 && index <= 19) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"6\");\n\t\t\t}\n\t\t\tif (index >= 20 && index <= 23) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"7\");\n\t\t\t}\n\t\t\tif (index >= 24 && index <= 27) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"8\");\n\t\t\t}\n\t\t\tif (index >= 28 && index <= 31) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"9\");\n\t\t\t}\n\t\t\tif (index >= 32 && index <= 35) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"10\");\n\t\t\t}\n\t\t\tif (index >= 36 && index <= 39) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"J\");\n\t\t\t}\n\t\t\tif (index >= 40 && index <= 43) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"Q\");\n\t\t\t}\n\t\t\tif (index >= 44 && index <= 47) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"K\");\n\t\t\t}\n\t\t\tif (index >= 48 && index <= 51) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"A\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "public void shuffle() {\n\t\tfor (int i = deck.length - 1; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tCard temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcardsUsed = 0;\n\t}", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void sortHand(){\n\t\thand.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public void shuffle(){\n Collections.shuffle(Arrays.asList(this.deck));\n }", "Deque<PokerCard> getShuffledHalfDeck();", "public void sortHand(){\n Arrays.sort(Hand);\n }", "public void shuffle(){\r\n int randomPos;\r\n //for each card in the deck\r\n for(int i=0; i<52; i++){\r\n randomPos = getRandomPos(i);\r\n exchangeCards(i, randomPos);\r\n }\r\n topCardIndex = 0;\r\n\t}", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "public void resetDeck() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (Suit f : Suit.values())\r\n\t\t\tfor (int i = 2; i < 15; i++)\r\n\t\t\t\tcards.add(new Card(i, f));\r\n\r\n\t}", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "Vector<Card> shuffleDeck(Vector<Card> cards)\n\t{\n\t Collections.shuffle(cards);\n\t return cards;\n\t}", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "public void shuffle(){ \n \n Collections.shuffle(cardDeck);\n /*Random rand = new Random();\n for(int i = 0 ; i < 110 ; i++){\n int firstCard = rand.nextInt(110);\n int secondCard = rand.nextInt(110);\n Collections.swap(cardDeck,firstCard,secondCard);\n }*/\n }", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle() {\n\t\tRandom random = new Random();\n\t\tint dealtCards = this.dealtCards.get();\n\t\tfor (int i = dealtCards; i < Deck.DECK_SIZE; i++) {\n\t\t\t// Obtain random position for available cards.\n\t\t\tint randomNumber = dealtCards + random.nextInt((Deck.DECK_SIZE - dealtCards));\n Card tempCard = cards.get(i);\n // Swap cards position.\n cards.set(i, cards.get(randomNumber));\n cards.set(randomNumber, tempCard);\n }\n\t}", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(deck);\n\t}", "void shuffle() {\r\n cards.addAll(dealtCards);\r\n dealtCards.removeAll(dealtCards);\r\n Collections.shuffle(cards);\r\n System.out.println(\"Shuffled cards\" + cards);\r\n }", "public void Shuffle() {\n int i = 0;\n while (i < 52) {\n int rando = (int) (5.0 * (Math.random()));\n Cards temp = deck[rando];\n deck[rando] = deck[i];\n deck[i] = temp;\n i++;\n }\n\n Arrays.stream(deck).forEach(c -> System.out.format(\"%s,\",c));\n }", "public ArrayList<Card> getCardsInHand(){\n\t\tCollections.sort(CardsInHand, Card.CardRank);\r\n\t\treturn CardsInHand;\r\n\t}", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "@Override\r\n public void dealerShuffleDeck(){\r\n this.dealer.shuffleDecks();\r\n }", "public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "public void sortByValue() {\n\t\tArrayList<Card> newHand = new ArrayList<Card>();\n\t\twhile (this.cardsInhand.size() > 0) {\n\t\t\tint pos = 0; // Position of minimal card.\n\t\t\tCard c = this.cardsInhand.get(0); // Minimal card.\n\t\t\tfor (int i = 1; i < this.cardsInhand.size(); i++) {\n\t\t\t\tCard c1 = this.cardsInhand.get(i);\n\t\t\t\tif (c1.getValue() < c.getValue() || (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit())) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tc = c1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.cardsInhand.remove(pos);\n\t\t\tnewHand.add(c);\n\t\t}\n\t\tthis.cardsInhand = newHand;\n\t}", "public void shuffleDeck() {\n\t\tCollections.shuffle(this.deck);\n\t}", "public void shuffle() {\n\t\tfor (int i = 0; i < cards.size(); i++){\n\t\t\t//exchange card i with the random card from i to cards.size() - 1\n\t\t\tint j = Randoms.randomIntInRange(i, cards.size() - 1);\n\t\t\tT c1 = cards.get(i);\n\t\t\tT c2 = cards.get(j);\n\t\t\tcards.set(i, c2);\n\t\t\tcards.set(j, c1);\n\t\t}\n\t}", "public void shuffle() {\n deck.clear();\n deck.addAll(allCards);\n Collections.shuffle(deck, new Random(System.nanoTime()));\n }", "public void shuffleDeck() {\n for (int i = 0; i < TOTAL_NUMBER_OF_CARDS - 1; i++) {\n Random r = new Random();\n int x = r.nextInt(TOTAL_NUMBER_OF_CARDS);\n Card y = deck.get(x);\n deck.set(x, deck.get(i));\n deck.set(i, y);\n }\n }", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }", "public void shuffle() {\n for (int i = 0; i < this.cards.length ; i++ ) {\n double x = Math.floor(Math.random() * ((double)this.cards.length - (double)0)) + (double)0;\n Card temp = this.cards[i];\n this.cards[i]= this.cards[(int)x];\n this.cards[(int)x]= temp;\n }\n }", "public void buildDeck () {\n this.deck = new ArrayList();\n for (ValueType value: ValueType.values()) {\n for(SuitType suit: SuitType.values()) {\n deck.add(new Card(value, suit));\n }\n }\n shuffleDeck();\n }", "public void shuffle() {\r\n\t\tCollections.shuffle(cards);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tCard c1 = new Card(\"H\", \"7\");\r\n\t\tCard c2 = new Card(\"D\", \"7\");\r\n\t\tCard c3 = new Card(\"H\", \"A\");\r\n\t\tCard c4 = new Card(\"D\", \"7\");\r\n\t\tCard c5 = new Card(\"S\", \"K\");\r\n\t\tCard c6 = new Card(\"C\", \"10\");\r\n\t\t\r\n\t\tArrayOrderedList<Card> arr = new ArrayOrderedList<Card>();\r\n\t\t\r\n\t\tarr.add(c1);\r\n\t\tarr.add(c2);\r\n\t\tarr.add(c3);\r\n\t\tarr.add(c4);\r\n\t\tarr.add(c5);\r\n\t\tarr.add(c6);\r\n\r\n\t\tSystem.out.println(arr);\r\n\t\t\r\n\t\t// Example 2 (full deck)\r\n\t\t\r\n\t\tArrayOrderedList<Card> deck = new ArrayOrderedList<Card>();\r\n\t\t\r\n\t\tString[] suits = new String[] {\"H\", \"D\", \"C\", \"S\"};\r\n\t\tString[] ranks = new String[] {\"A\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\r\n\t\tCard card;\r\n\t\tfor (int s = 0; s < 4; s++) {\r\n\t\t\tfor (int r = 0; r < 13; r++) {\r\n\t\t\t\tcard = new Card(suits[s], ranks[r]);\r\n\t\t\t\tdeck.add(card);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(deck);\r\n\t}", "@Override\n\tpublic void shuffleDeck() {\n\t\tfor(int i = 0; i < 1000000; i++) {\n\t\t\tint randomStelle1 = (int) (Math.random() * 32);\n\t\t\tint randomStelle2 = (int) (Math.random() * 32);\n\t\t\tPlayingCard copy = aktuellesDeck[randomStelle1];\n\t\t\taktuellesDeck[randomStelle1] = aktuellesDeck[randomStelle2];\n\t\t\taktuellesDeck[randomStelle2] = copy;\n\t\t}\n\t}", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public void shuffle()\n\t{\n\t\tCollections.shuffle(card);\n\t}", "public void shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public void shuffle()\r\n {\r\n Collections.shuffle(cards);\r\n top = NUMCARDS - 1;\r\n }", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "protected void shuffle(List<Card> deck) {\n Collections.shuffle(deck);\n }", "public void dealCards () {\t\n\n\t\tint numOfPlayers = players.size();\n\t\tint count = 0;\n\t\tCard[] cards = deck.getDeck();\n\t\tfor (int i=0; i<cards.length; i++) {\n\t\t\t\t// Go through all the cards, for each player deal 1 card at a time\n\t\t\t\t(players.get(count % numOfPlayers).getCards()).add(cards[i]); \n\t\t\t\tcount++;\n\t\t}\n\t}", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public void shuffle() {\r\n for ( int i = deck.size()-1; i > 0; i-- ) {\r\n int rand = (int)(Math.random()*(i+1));\r\n SpoonsCard temp = deck.get(i);\r\n deck.set(i, deck.get(rand));\r\n deck.set(rand, temp);\r\n }\r\n cardsUsed = 0;\r\n }", "public void initialDeck()\t{\n\t\tdeck1 = new Deck();\n\t\tdeck2 = new Deck();\n\t\tdeck1.shuffle();\n\t\tdeck2.shuffle();\n\t\tdeck1 = deck1.combine(deck2);\n\t\tdeck1.shuffle();\n\t}", "private void mixDeck() {\n Random rnd = new Random();\n ArrayList<UnoCard> mixed = new ArrayList<UnoCard>();\n\n // mix it!\n for(int i = cards.size()-1; i>0;i--) {\n int index = rnd.nextInt(i+1);\n UnoCard helper = cards.get(index);\n cards.remove(index);\n mixed.add(helper);\n }\n\n // delete current arrayList\n cards = null;\n // set mixed cards to original carddeck\n cards = mixed;\n\n // paint cards again because order has changed\n for(UnoCard c : cards) {\n c.setContainer(deckPos);\n }\n\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "public Deck()\n {\n deck = new ArrayList<>();\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\n Collections.shuffle(deck);\n }", "public void shuffle() {\r\n for (int i = 0; i < this.numCards; i++) {\r\n int spot = (int) (Math.random() * ((this.numCards - 1) - i + 1) + i);\r\n Card temp = cards[i];\r\n cards[i] = cards[spot];\r\n cards[spot] = temp;\r\n\r\n\r\n }\r\n }", "@Test\r\n\tpublic void testPlayableCards2()\r\n\t{\n\t\t\r\n\t\tCardList clubList = new CardList();\r\n\t\tclubList.add(AllCards.a6C);\r\n\t\tclubList.add(AllCards.aTC);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.CLUBS, null).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tCardList diamondsList = new CardList();\r\n\t\tdiamondsList.add(AllCards.a7D);\r\n\t\tdiamondsList.add(AllCards.aQD);\r\n\t\tdiamondsList.add(AllCards.aKD);\r\n//\t\tassertTrue( h.playableCards(Suit.DIAMONDS, null).toString().equals(diamondsList.toString()));\r\n\t\t\r\n\t\tCardList heartsList = new CardList();\r\n\t\theartsList.add(AllCards.a9H);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.HEARTS, null).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tCardList spadesList = new CardList();\r\n\t\tspadesList.add(AllCards.aTS);\r\n\t\tspadesList.add(AllCards.a7S);\r\n\t\tspadesList.add(AllCards.aJS);\r\n\t\tspadesList.add(AllCards.aKS);\r\n//\t\tassertTrue( h.playableCards(Suit.SPADES, null).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\tCardList joker = new CardList();\t\t\t\r\n\t\tjoker.add(AllCards.aLJo);\t\t\r\n\t\tjoker.add(AllCards.aHJo);\r\n//\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, null).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\t\r\n\t\t// Trump\r\n\t\tclubList.add(AllCards.aJS);\r\n\t\tclubList.add(AllCards.aLJo);\r\n\t\tclubList = clubList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.CLUBS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tdiamondsList.add(AllCards.aLJo);\r\n\t\tdiamondsList = diamondsList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(diamondsList.toString()));\r\n\r\n\t\theartsList = heartsList.sort(new Card.ByRankComparator());\t\t\r\n\t\tassertTrue( h.playableCards(Suit.HEARTS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tspadesList.remove(AllCards.aJS);\r\n\t\tspadesList = spadesList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.SPADES, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\t// no Trump in hand\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\tCardList jackList = new CardList();\r\n\t\tjackList.add(AllCards.aJS);\r\n\t\tjackList.add(AllCards.aJC);\r\n\t\tassertTrue(jackHand.playableCards(Suit.CLUBS, Suit.SPADES).sort(new Card.ByRankComparator()).toString().equals(jackList.toString()));\r\n\t\t\r\n\t}", "public void shuffle() {\n\t\tfor (int i = 51; i > 0; i--) {\n\t\t\tint rand = (int) (Math.random() * (i + 1));\n\t\t\tint temp = deck[i];\n\t\t\tdeck[i] = deck[rand];\n\t\t\tdeck[rand] = temp;\n\t\t}\n\t\tcurrentPosition = 0;\n\t}", "private void createShuffleAndAddCards() {\n //Creating all 108 cards and saving them into an arraylist\n ArrayList<Card> cards = new ArrayList<>();\n String[] colors = {\"red\", \"blue\", \"yellow\", \"green\"};\n for (String color : colors) {\n for (int i = 1; i < 10; i++) {\n for (int j = 0; j < 2; j++) {\n cards.add(new Card(\"Numeric\", color, i));\n }\n }\n cards.add(new Card(\"Numeric\", color, 0));\n for (int i = 0; i < 2; i++) {\n cards.add(new Card(\"Skip\", color, 20));\n cards.add(new Card(\"Draw2\", color, 20));\n cards.add(new Card(\"Reverse\", color, 20));\n }\n }\n for (int i = 0; i < 4; i++) {\n cards.add(new Card(\"WildDraw4\", \"none\", 50));\n cards.add(new Card(\"WildColorChanger\", \"none\", 50));\n }\n //shuffling cards and adding them into the storageCards main list\n Collections.shuffle(cards);\n for (Card card : cards) {\n storageCards.add(card);\n }\n cards.clear();\n }", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "public void hinduShuffle()\r\n {\r\n List<Card> cut = new ArrayList<Card>();\r\n List<Card> cut2 = new ArrayList<Card>();\r\n List<Card> shuffledDeck = new ArrayList<Card>();\r\n int cutPoint = 0;\r\n int cutPoint2 = 0;\r\n for (int x = 0; x < SHUFFLE_COUNT; x++) {\r\n cutPoint = rand.nextInt( cards.size()-1 );\r\n cutPoint2 = rand.nextInt( cards.size() - cutPoint ) + cutPoint;\r\n for (int i = 0; i < cutPoint; i++) {\r\n cut.add(draw());\r\n }\r\n for (int i = cutPoint2; i < cards.size(); i++) {\r\n cut2.add(draw());\r\n }\r\n for (int i = 0; i < cut.size(); i++) {\r\n shuffledDeck.add(cut.remove(0));\r\n }\r\n for (int i = 0; i < cards.size(); i++) {\r\n shuffledDeck.add(cards.remove(0));\r\n }\r\n for (int i = 0; i < cut2.size(); i++) {\r\n shuffledDeck.add(cut2.remove(0));\r\n }\r\n cut = cards;\r\n cut.clear();\r\n cut2.clear();\r\n cards = shuffledDeck;\r\n }\r\n }", "private void resetDeck()\n {\n Stack<Card> temp = new Stack<Card>();\n while(!waste.isEmpty())\n temp.push(waste.pop()); \n while(!temp.isEmpty())\n deck.addCard((Card)temp.pop());\n }", "public void shuffle() {\n Random rand = new Random();\n for(int i = 0; i < deck.length; i++) {\n // get random index past current index\n int randomVal = i + rand.nextInt(deck.length - i);\n // swaps randomly selected card with card at index i\n Card swap = deck[randomVal];\n deck[randomVal] = deck[i];\n deck[i] = swap;\n }\n }", "public void shuffle(){\n //After shuffling dealing starts at deck[0] again\n currentCard = 0;\n //for each card , pick another random card and swap them\n for(int first = 0; first < deck.length; first++){\n int second = randomNumbers.nextInt(NUMBER_OF_CARDS);\n\n //Swap Method to swap current card with randomly selected card\n Card temp = deck[first];\n deck[first] = deck[second];\n deck[second] = temp;\n }\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }", "private void initAndSortAllHands() {\n\t\tArrayList<Card> sevenCards;\n\t\tPlayer player;\n\n\t\t// initalize the seven cards hand\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tsevenCards = new ArrayList<Card>(7);\n\t\t\tplayer = table.getTablePlayers().get(i);\n\n\t\t\tsevenCards.add(player.getHoleCard1());\n\t\t\tsevenCards.add(player.getHoleCard2());\n\t\t\tsevenCards.add(dealer.getFlop()[0]);\n\t\t\tsevenCards.add(dealer.getFlop()[1]);\n\t\t\tsevenCards.add(dealer.getFlop()[2]);\n\t\t\tsevenCards.add(dealer.getTurn());\n\t\t\tsevenCards.add(dealer.getRiver());\n\n\t\t\ttable.getTablePlayers().get(i).setSevenCardsTempHand(sevenCards);\n\t\t}\n\n\t\t// sort the hand\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++)\n\t\t\ttable.getTablePlayers().get(i).sortHandByRank(table.getTablePlayers().get(i).getSevenCardsTempHand());\n\t}", "void makeDeck() {\n\t\t// start with an array of 1..28 for easy shuffling\n\t\tint[] cardValues = new int[28];\n\t\t// assign values from 1 to 28\n\t\tfor (int i=0; i < cardValues.length; i++) {\n\t\t\tcardValues[i] = i+1;\n\t\t}\n\n\t\t// shuffle the cards\n\t\tRandom randgen = new Random();\n\t\tfor (int i = 0; i < cardValues.length; i++) {\n\t\t\tint other = randgen.nextInt(28);\n\t\t\tint temp = cardValues[i];\n\t\t\tcardValues[i] = cardValues[other];\n\t\t\tcardValues[other] = temp;\n\t\t}\n\n\t\t// create a circular linked list from this deck and make deckRear point to its last node\n\t\tCardNode cn = new CardNode();\n\t\tcn.cardValue = cardValues[0];\n\t\tcn.next = cn;\n\t\tdeckRear = cn;\n\t\tfor (int i=1; i < cardValues.length; i++) {\n\t\t\tcn = new CardNode();\n\t\t\tcn.cardValue = cardValues[i];\n\t\t\tcn.next = deckRear.next;\n\t\t\tdeckRear.next = cn;\n\t\t\tdeckRear = cn;\n\t\t}\n\t}", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "@Override\n\tpublic int compareTo(Card arg0) {\n\t\treturn 0;\n\t}", "public void print_Deck() {\n for(int i = 0; i<52; i++) {\n System.out.println(deck.get(i));\n }\n }", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (int i = ONE; i < this.numOfCards; i++) {\r\n this.deck[i - ONE] = this.deck[i];\r\n }\r\n this.deck[this.numOfCards - ONE] = null;\r\n //decrement the number of cards currently in the deck \r\n this.numOfCards--;\r\n\r\n return top;\r\n }", "public void shuffleThePresentCardToTheEnd() {\n storageCards.add(storageCards.remove());\n }", "public void shuffle()\n\t{\n\t\tHashSet<Integer> usedRandoms = new HashSet<Integer>();\n\t\tthis.currentCard = 0;\n\t\tint i= 0;\n\t\twhile (i < deck.length)\n\t\t{\n\t\t\tint another = this.rand.nextInt(NUMBER_OF_CARDS);\n\t\t\tif(!usedRandoms.contains(another))\n\t\t\t{\n\t\t\t\tCard temp = this.deck[i];\n\t\t\t\tthis.deck[i] = this.deck[another];\n\t\t\t\tthis.deck[another] = temp;\n\t\t\t\ti++;\n\t\t\t\tusedRandoms.add(another);\n\t\t\t}\n\t\t}\n\t}", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "private void dealCards(){\n\t\tfor(int k = 0; k <2;k++){\n\t\t\tfor(int i = 0; i < Players.size();i++){\n\t\t\t\tPlayers.get(i).addCardToHand(gameDeck.dealCard());\n\t\t\t}\n\t\t}\n\t\t\n\t setChanged();\n\t notifyObservers(\"CardsDealed\");\n\t}", "public void startOrder() {\n\t\tDeck tempDeck = new Deck();\n\t\tArrayList<Player> highPlayerList = new ArrayList<Player>();\n\t\tStrategy3 testPlayer = new Strategy3();\n\t\tint temp = 0;\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.hand.add(tempDeck.dealTile());\n\t\t}\n\t\t\n\t\twhile (playerList.isEmpty() == false) {\t\n\t\t\tPlayer min = playerList.get(0);\n\t\t\tfor(Player i : playerList) {\n\t\t\t\tif (i.getHandValue() > min.getHandValue()) {min = i;}\n\t\t\t}\n\t\t\thighPlayerList.add(min);\n\t\t\tplayerList.remove(min);\n\t\t}\n\t\tthis.playerList = highPlayerList;\t\n\t\ttemp = 0; \n\t\tfor(Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t}\n\t\t\n\t\tfor (Player p : playerList) {\n\t\t\tp.hand.clear();\n\t\t}\t\t\n\t}" ]
[ "0.79624015", "0.70584756", "0.70002025", "0.69680345", "0.69117165", "0.68548816", "0.6849615", "0.68272465", "0.6815935", "0.6762261", "0.66790026", "0.6655873", "0.66402763", "0.6582242", "0.65807754", "0.6524183", "0.6495335", "0.6494394", "0.64909464", "0.6490516", "0.6474524", "0.6460316", "0.6451535", "0.6435062", "0.64110184", "0.6408975", "0.64033186", "0.6399792", "0.6393289", "0.63743055", "0.63737756", "0.6360851", "0.6344485", "0.6326956", "0.6326166", "0.6320435", "0.6317027", "0.63167137", "0.6316489", "0.6297945", "0.62373656", "0.6234618", "0.62341946", "0.62233603", "0.621853", "0.6218138", "0.6217682", "0.6194999", "0.6191706", "0.6185266", "0.6177067", "0.617691", "0.6169638", "0.61612326", "0.6157557", "0.6144079", "0.6140662", "0.61351615", "0.61340964", "0.61247957", "0.6124355", "0.61195123", "0.61175114", "0.611399", "0.61084366", "0.6097346", "0.60970664", "0.6077002", "0.6070535", "0.60686535", "0.6060728", "0.6058648", "0.60579103", "0.60557795", "0.60557795", "0.6043253", "0.6039375", "0.6034572", "0.6030415", "0.60263413", "0.60260916", "0.60258764", "0.602327", "0.6022715", "0.6014903", "0.6008677", "0.60011476", "0.5998359", "0.5992985", "0.59871614", "0.5986578", "0.5981541", "0.59767777", "0.5966546", "0.59664637", "0.5962593", "0.5957151", "0.59535366", "0.59528714", "0.5951694" ]
0.65897924
13
/ In: An object Out: An int indicating if the object is less than, greater than, or equal to the object performing the comparison.
public int compareTo(Object t) { if (t.getClass() != this.getClass()) return 1; Card c = (Card) t; String strRanks = new String(valueRanks); if (strRanks.indexOf(c.getValue()) < 0) return 1; if (strRanks.indexOf(c.getValue()) < strRanks.indexOf(this.getValue())) return 1; if (strRanks.indexOf(c.getValue()) == strRanks.indexOf(this.getValue())) return 0; if (strRanks.indexOf(c.getValue()) > strRanks.indexOf(this.getValue())) return -1; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testObjCompare()\n {\n assertEquals( Comparator.EQUAL, Util.objCompare(null,null) );\n assertEquals( Comparator.LESS, Util.objCompare(new Integer(10), new Integer(20)) );\n assertEquals( Comparator.GREATER, Util.objCompare(new Integer(25), new Integer(20)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(null,new Integer(1)) );\n assertEquals( Comparator.UNDECIDABLE,Util.objCompare(new Integer(1),null) );\n }", "private boolean iflt(PyObject x, PyObject y) {\n \n if (this.compare == null) {\n /* NOTE: we rely on the fact here that the sorting algorithm\n only ever checks whether k<0, i.e., whether x<y. So we\n invoke the rich comparison function with _lt ('<'), and\n return -1 when it returns true and 0 when it returns\n false. */\n return x._lt(y).__nonzero__();\n }\n \n PyObject ret = this.compare.__call__(x, y);\n \n if (ret instanceof PyInteger) {\n int v = ((PyInteger)ret).getValue();\n return v < 0;\n }\n throw Py.TypeError(\"comparision function must return int\");\n }", "@Override\n public boolean lessThan(Object o1, Object o2) {\n return ((MI)o1).value < ((MI)o2).value;\n }", "public int compareTo( Comparable rhs )\n {\n return value < ((MyInteger)rhs).value ? -1 :\n value == ((MyInteger)rhs).value ? 0 : 1;\n }", "boolean compare(Object targetOne, Object targetTwo);", "private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }", "public static int compare(final int previousResult, final Comparable object, final Comparable other)\n {\n return previousResult == 0 ? compare(object, other) : previousResult;\n }", "public boolean lessThanOrEqual(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.greaterThanOrEqual(this);\n return this.num()<=obj2.num();\n }", "List<Object> lessThanOrEqualsTo(Object value);", "@Override\n public InterpreterValue bigger_equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() >= ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is bigger than\n // or equal to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() >= ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '>=' is not defined for type integer and \" + v.getName());\n\n }", "public static int compare(int obj1,int obj2){\n\t\tif(obj1 == obj2) { return 0;}\n\t\telse if(obj1>obj2){ return 1;}\n\t\telse { return -1;}\n\t}", "@Override\n public InterpreterValue smaller_equals(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is smaller than\n // or equal to the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() <= ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is smaller than\n // or equal to the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() <= ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '<=' is not defined for type integer and \" + v.getName());\n\n }", "int compareTo(Object obj);", "public boolean lessThan(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.greaterThan(this);\n return this.num()<obj2.num();\n }", "@Override\n\t\t\tpublic int compare(MyInteger arg0, MyInteger arg1) {\n\t\t\t\treturn arg0.getValue() - arg1.getValue();\n\t\t\t}", "default boolean gt(int lhs, int rhs) {\r\n return lt(rhs,lhs);\r\n }", "List<Object> greaterThanOrEqualsTo(Object value);", "@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1 > o2 ? -1: (o1==o2) ? 0 : 1;\r\n\t\t\t}", "public int compareTo(Object o)\n\t{\n\tif (getNumber() > ((Employee)o).getNumber())\n\t\t\treturn 1;\t//greater than\n\t\telse if (getNumber() < ((Employee)o).getNumber())\n\t\t\treturn -1;\t// less than\n\t\telse\n\t\t\treturn 0;\t//equal\n\t}", "int compare(T o1, T o2);", "int compareTo(Object o);", "private static boolean lt(Comparable lhs, Comparable rhs) \n {\n return lhs.compareTo(rhs) < 0;\n }", "public static int compare(Object input1, Object input2) {\n\t\tif (input1.getClass().equals(Integer.class) && input2.getClass().equals(Integer.class)) {\n\t\t\treturn compareInt((Integer) input1, (Integer) input2);\n\n\t\t\t// if object is string\n\t\t} else if (input1.getClass().equals(String.class) && input2.getClass().equals(String.class)) {\n\t\t\treturn compareString((String) input1, (String) input2);\n\n\t\t\t// if object is date\n\t\t} else if (input1.getClass().equals(Date.class) && input2.getClass().equals(Date.class)) {\n\t\t\treturn compareDate((Date) input1, (Date) input2);\n\n\t\t\t// if object is big decimal\n\t\t} else if (input1.getClass().equals(BigDecimal.class) && input2.getClass().equals(BigDecimal.class)) {\n\t\t\treturn compareBigDecimal((BigDecimal) input1, (BigDecimal) input2);\n\t\t\t\n\t\t} else {\n\t\t\tSystem.err.println(\"no object match\");\n\t\t\treturn 0;\n\t\t}\n\n\t}", "public int compareTo(Object obj)\n {\n if (obj instanceof AbsTime) {\n if (((AbsTime) obj).getValue() < itsValue) {\n return 1;\n }\n if (((AbsTime) obj).getValue() > itsValue) {\n return -1;\n }\n return 0;\n } else {\n System.err.println(\"AbsTime: compareTo: UNKNOWN TYPE!\");\n return -1;\n }\n }", "public int compare(\r\n final Object objectA,\r\n final Object objectB)\r\n {\r\n final Date aAsDate = (Date)objectA;\r\n final Date bAsDate = (Date)objectB;\r\n int result = 0;\r\n\r\n if (bAsDate.after(aAsDate))\r\n {\r\n // set result to a negative integer if the first argument of this \r\n // method is less than the second\r\n result = -1;\r\n }\r\n else if (aAsDate.after(bAsDate))\r\n {\r\n // set result to a positive integer if the first argument of this \r\n // method is greater than the second\r\n result = 1;\r\n }\r\n return result;\r\n }", "protected int compareForNulls(Object o1, Object o2) {\r\n if(o1 == null && o2 == null) return 0;\r\n if(o1 == null) {\r\n if(nullIsGreater) return 1;\r\n else return -1;\r\n }\r\n else if(o2 == null) {\r\n if(nullIsGreater) return -1;\r\n else return 1;\r\n }\r\n else {\r\n return 0; // both are non-null;\r\n }\r\n }", "protected abstract int compareOnAttribute( U obj );", "@Test\n public void testCompareToLess() {\n assertTrue(o1.compareTo(o_test) < 0);\n }", "@Test\n\tpublic void testCompareTo() {\n\t\t// Positive integer - this > other\n\t\tCoordinate farther = new Coordinate(10,10);\n\t\tassertTrue(\"Must be greater than 0\", farther.compareTo(basic) > 0);\n\t\t\n\t\t// Negative integer\n\t\tassertTrue(\"Must be less than 0\", basic.compareTo(farther) < 0);\n\t\t\n\t\t// 0 for equals\n\t\tassertEquals(\"Expecting 0\", basic.compareTo(equalsBasic), 0);\n\t}", "@Override\n public int compareTo(ObjectScore arg0) {\n if (this.getScore() > arg0.getScore()) {\n return 1;\n } else if (this.getScore() < arg0.getScore()) {\n return -1;\n } else {\n return 0;\n }\n }", "@Override\n public InterpreterValue smaller(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is smaller than\n // the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() < ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is smaller than\n // the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() < ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '<' is not defined for type integer and \" + v.getName());\n\n }", "@Override\n\tpublic int compareTo(Object arg0) {\n\t\treturn this.start - ((liveRange) arg0).start;\n\t}", "default int compareTo(Interval o) {\n if (getStart() > o.getStart()) {\n return 1;\n } else if (getStart() < o.getStart()) {\n return -1;\n } else if (getEnd() > o.getEnd()) {\n return 1;\n } else if (getEnd() < o.getEnd()) {\n return -1;\n } else {\n return 0;\n }\n }", "public int compareTo(Cut<C> cut) {\n if (cut == d()) {\n return 1;\n }\n if (cut == e()) {\n return -1;\n }\n int a2 = Range.a((Comparable) this.a, (Comparable) cut.a);\n if (a2 != 0) {\n return a2;\n }\n return Booleans.compare(this instanceof AboveValue, cut instanceof AboveValue);\n }", "@Override\n\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\treturn o2 - o1;\n\t\t}", "public interface Strategy {\n\n //判断两个数据元素是否相等\n boolean equal(Object obj1, Object obj2);\n\n /**\n * 比较两个数据元素的大小\n * 如果obj1 < obj2 返回-1\n * 如果obj1 = obj2 返回0\n * 35\n * 如果obj1 > obj2 返回1\n */\n int compare(Object obj1, Object obj2);\n\n}", "@Override\n\tpublic int compareTo(Object o) {\n\t\tInterval i = (Interval) o;\n\t\tif (i.end < this.end)\n\t\t\treturn 1;\n\t\telse if (i.end > this.end)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn 0;\n\t}", "private boolean less(Comparable a, Comparable b) {\n return a.compareTo(b) < 0;\n }", "@Test\n\tpublic void lessThanTest() {\n\t\tassertTrue(x.less(y));\n\t\tassertFalse(y.less(x));\n\t}", "public int compareTo(Object compared)\n\t{\n\t\tint comparedValue = Integer.MIN_VALUE;\n\t\t\n\t\tif( compared instanceof Wallet)\n\t\t{\n\t\t\tif(this.amountOfMoney() > ((Wallet) compared).getMoney())\n\t\t\t{\n\t\t\t\tcomparedValue = 1;\n\t\t\t}\n\t\t\telse if(this.amountOfMoney() < ((Wallet) compared).getMoney())\n\t\t\t{\n\t\t\t\tcomparedValue = -1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcomparedValue = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn comparedValue;\n\t}", "@Override\n\t\tpublic int compareTo(MyInteger o) {\n\t\t\treturn -1*(this.num - o.num);\n\t\t}", "public AbstractBoolean greater(Interval other){\n\t\ttry {\n\t\t\t// If this.max > this.min then True\n\t\t\tif ((!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min < other.max then False\n\t\t\tif ((!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& (!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2)\n\t\t\t{\n\t\t\t\treturn (o2-o1);\n\t\t\t}", "private boolean CompareValues(int oldValue, int value)\n {\n if (playerType == PlayerType.White)\n {\n if (turn == 1)\n return oldValue > value;\n else\n return oldValue < value;\n }\n else\n if (turn == 1)\n return oldValue < value;\n else\n return oldValue > value;\n }", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2 - o1;\n\t\t\t}", "public static int compare(double obj1,double obj2){\n\t\tif(obj1 == obj2) { return 0; }\n\t\telse if(obj1 > obj2){\n\t\t\treturn 1;\n\t\t} else{ return -1; }\n\t}", "public boolean greaterThanOrEqual(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.lessThanOrEqual(this);\n return this.num()>=obj2.num();\n }", "@Override\n\tpublic int compare(Object o1, Object o2) {\n\t\tint a1=((TestBig)o1).a;\n\t\tint a2=((TestBig)o2).a;\n\t\tif(a1<a2)\n\t\t\treturn 1;\n\t\treturn -1;\n\t}", "@Override\n public int compare(Integer o1, Integer o2) {\n return Integer.compare(o1, o2);\n }", "@Override\r\n\tpublic int compareTo(StudentCollection o) {\n\t\treturn this.marks>o.marks?-1:(this.marks<o.marks?1:0);\r\n\t}", "@Override\n\tpublic int compare(Integer i1, Integer i2) {\n\t\treturn (i1>i2)?-1:(i1<i2)?+1:0;\n\t}", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2-o1;\n\t\t\t}", "@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\n\t\t\t\t}", "public int compare(Object o1,Object o2) {\n\t\t\r\n\t\tString str1=o1.toString();\r\n\t\tString str2=o2.toString();\r\n\t\t/*if(int1<int2) {\r\n\t\t\treturn +10000;\r\n\t\t}else if(int1>int2) {\r\n\t\t\treturn -10000;\r\n\t\t}*/\r\n\t\t\r\n\t\treturn -str1.compareTo(str2);\r\n\t\t//return int1.compareTo(int2);\r\n\t}", "@Override\n public int compareTo (AgeData o) {\n if (this.age==o.getAge ())\n return 0;\n else if (this.age>o.getAge ())\n return 1;\n else\n return -1;\n }", "public boolean valueLargerThan(Money other);", "@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o2-o1;\r\n\t\t\t}", "public int compare(Visit<Integer,Integer> arg0, Visit<Integer,Integer> arg1) {\n\t\tDate d1 = arg0.getVisitDate();\r\n\t\tDate d2 = arg1.getVisitDate();\r\n\t\treturn d1.after(d2) ? 1 : -1; //if d1 is after d2, return 1, else return -1 (d2 is after d1). \r\n\t}", "public boolean greaterThan(XObject obj2)\n throws javax.xml.transform.TransformerException{\n if(obj2.getType()==XObject.CLASS_NODESET)\n return obj2.lessThan(this);\n return this.num()>obj2.num();\n }", "public static int cmp(Object a, Object b)\n\t{\n\t\tint c = (int)a;\n//C++ TO JAVA CONVERTER TODO TASK: Java does not have an equivalent to pointers to value types:\n//ORIGINAL LINE: int *d = (int *)b;\n\t\tint d = (int)b;\n\t\treturn c - d;\n\t}", "@Override\r\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1-o2;\r\n\t\t\t}", "public T caseGreaterThan(GreaterThan object) {\n\t\treturn null;\n\t}", "private static boolean less(Comparable p, Comparable q) {\n return p.compareTo(q) < 0;\n }", "boolean isComparable();", "@Override\n public InterpreterValue bigger(InterpreterValue v) {\n\n // If the given value is a IntegerValue then check if the value is bigger than\n // the own value and return a BooleanValue\n if(v instanceof IntegerValue) return BooleanValue.from(getValue() > ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue then check if the value is bigger than\n // the own value and return a BooleanValue\n if(v instanceof DoubleValue) return BooleanValue.from(getValue() > ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '>' is not defined for type integer and \" + v.getName());\n\n }", "@Override\n\t\t\tpublic int compare(Object o1, Object o2) {\n\t\t\t\tint result = ((Student)o2).getAge() - ((Student)o1).getAge();\n\t\t\t\tif (result == 0 ) result = 1;\n\t\t\t\treturn result;\n\t\t\t}", "int compare(T t1, T t2);", "@Override\r\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o2-o1;\r\n\t\t\t\t}", "static int compar(int d1,int m1, int y1,int d2,int m2, int y2 )\n{\n if(y1>y2)\n return 1;\n if(y1<y2)\n return -1;\n \n if(m1>m2)\n return 1;\n if(m1<m2)\n return -1;\n \n if(d1>d2)\n return 1;\n if(d1<d2)\n return -1;\n \n \n \n return 0;\n \n \n}", "public int numCompare(Object withValue) {\r\n\t\t\r\n\t\tNumberOperation operator = new NumberOperation(this.value, withValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\treturn Double.compare(getO1().doubleValue(), getO2().doubleValue());\r\n\t\t\t}\r\n\t\t};\r\n\t\treturn operator.doAnOperation().intValue();\r\n\t}", "public static int compare(Object obj1, Object obj2) throws UnsupportedException{\n\t\tint result = EQUAL;\n\t\tboolean isResultSet = false;\n\t\tif(obj1 == null && obj2!= null){\n\t\t\tif(obj2 instanceof String){\n\t\t\t\tobj1 = EMPTY;\n\t\t\t} else {\n\t\t\t\tisResultSet = true;\n\t\t\t\tresult = LESS;\n\t\t\t}\n\t\t} else if(obj1!=null && obj2== null){\n\t\t\tif(obj1 instanceof String){\n\t\t\t\tobj2 = EMPTY;\n\t\t\t} else {\n\t\t\t\tisResultSet = true;\n\t\t\t\tresult = GREATER;\n\t\t\t}\n\t\t}\n\t\tif(isResultSet){\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\t//Check that 2 objects are the same class\n\t\tif(obj1.getClass() != obj2.getClass()){\n\t\t\tthrow new ClassCastException(\"Objects to compare are not the same class\");\n\t\t}\n\t\t\n\t\tif(obj1 instanceof String){\n\t\t\tresult = ((String)obj1).compareTo((String)obj2);\n\t\t} else if(obj1 instanceof DateUtil){\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}else if(obj1 instanceof BigDecimal){\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}else{\n\t\t\tthrow new UnsupportedException(\"Comparison method is not implemeted for this class\" + obj1.getClass().getName());\n\t\t}\n\t\treturn result;\n\t}", "public int compareTo(Object o){\r\n\t\tStudent x = (Student) o;\r\n\t\tif (studentID < x.studentID){\r\n\t\t\treturn -1;\r\n\t\t} else if (studentID > x.studentID){\r\n\t\t\treturn 1;\r\n\t\t} else{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "protected abstract int doCompare(Object o1, Object o2);", "public static boolean WithinRange(GameObject obj, int compX, int compY)\n\t{\n\t\t//Checks heigh/width and x/y to determine if the value is\n\t\t//over the object.\n\t\tif (compX >= obj.x && //is it too far to the right?\n\t\t\tcompX <= obj.texture.image.getWidth() + obj.x && //is it too far to the left?\n\t\t\tcompY >= obj.y && //is it too low?\n\t\t\tcompY <= obj.texture.image.getHeight() + obj.y ) //is it too high?\n\t\t\t\treturn true; //if none of those, return true.\n\t\treturn false; //else return false.\n\t\t\n\t}", "boolean test(int number, int comparisonPoint) {\n return operator.test(number, comparisonPoint);\n }", "public boolean smallerThan(ChromosomeFitness obj)\n {\n if( this.fitness <= obj.fitness) \n {\n return true;\n }\n \n return false;\n }", "public AbstractBoolean less(Interval other){\n\t\ttry {\n\t\t\t// If this.max < this.min then True\n\t\t\tif ((!this.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!other.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.high) < Integer.parseInt(other.low))\n\t\t\t\treturn AbstractBoolean.True();\n\n\t\t\t// If this.min > other.max then False\n\t\t\tif ((!other.high.equals(\"+Inf\"))\n\t\t\t\t\t&& (!this.low.equals(\"-Inf\"))\n\t\t\t\t\t&& Integer.parseInt(this.low) > Integer.parseInt(other.high))\n\t\t\t\treturn AbstractBoolean.False();\n\n\t\t} catch (NumberFormatException e){\n\t\t\treturn AbstractBoolean.TopBool();\n\t\t}\n\n\t\treturn AbstractBoolean.TopBool();\n\t}", "public interface Comparable {\r\n\t/**\r\n\t * Compare this object with rhs.\r\n\t * \r\n\t * @param rhs\r\n\t * the second Comparable.\r\n\t * @return 0 if two objects are equal; less than zero if this object is\r\n\t * smaller; greater than zero if this object is larger.\r\n\t */\r\n\tint compareTo(Comparable rhs);\r\n}", "@Override\n\t\tprotected boolean lessThan(final Entry hitA, final Entry hitB) {\n\t\t\tassert hitA != hitB;\n\t\t\tassert hitA.mSlot != hitB.mSlot;\n\n\t\t\tfinal int c = mOneReverseMul * mFirstComparator.compare(hitA.mSlot, hitB.mSlot);\n\t\t\tif (c != 0) \n\t\t\t\treturn c > 0;\n\n\t\t\t\t// avoid random sort order that could lead to duplicates (bug #31241):\n\t\t\t\treturn hitA.getDoc() > hitB.getDoc();\n\t\t}", "@Override\r\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\treturn arg1.compareTo(arg0);\r\n\t\t\t}", "private int Compare(ResultsClass lhs, ResultsClass rhs) {\n if (lhs.bodyPart > rhs.bodyPart) {\n return 1;\n } else if (lhs.bodyPart > rhs.bodyPart) {\n return -1;\n } else {\n return 0;\n }\n }", "@Override\n\tpublic int compareTo(Element o) {\n\t\treturn Integer.compare(val, o.val);\n\t}", "private Expr comparison() {\n Expr expr = addition();\n\n while(match(GREATER, GREATER_EQUAL, LESS, LESS_EQUAL)) { // These variable length arguments are real convenient\n Token operator = previous();\n Expr right = addition();\n expr = new Expr.Binary(expr, operator, right);\n }\n\n return expr;\n }", "public Comparison compare(int left, int right) {\n int result = EQUAL;\n if (left < right) {\n result = LESS;\n } else if (left > right) {\n result = GREATER;\n }\n return checkResult(result);\n }", "@Override\n public int compareTo(Record o) {\n if (this.result - o.result > 0) {\n return 1;\n } else if (this.result - o.result < 0) {\n return -1;\n } else {\n // press time: the less, the better.\n if (this.pressTime < o.pressTime) {\n return 1;\n } else if (this.pressTime > o.pressTime) {\n return -1;\n } else {\n // total times: the more, the better.\n if (this.totalTimes > o.totalTimes) {\n return 1;\n } else if (this.totalTimes < o.totalTimes) {\n return -1;\n }\n return 0;\n }\n }\n }", "@Override\n\t\t\tpublic int compare(Integer arg0, Integer arg1) {\n\t\t\t\treturn arg1.compareTo(arg0);\n\t\t\t}", "public int compareTo(Object o) {\n\t\treturn 1;\n\t}", "@Override\n public int compare(Object arg0, Object arg1) {\n int a = arg0.hashCode();\n int b = arg1.hashCode();\n int accum;\n if (a == b) {\n accum = 0;\n } else if (a > b) {\n accum = 1;\n } else {\n accum = -1;\n }\n return accum;\n }", "@Test\n public void compareFunctionalBigger() {\n HighScoreComparator comparator2 = new HighScoreComparator();\n int a;\n a = comparator2.compare(p1, p2);\n \n assertEquals(-1, a);\n\n }", "@Override\n public int compare(Integer o1, Integer o2) {\n return o2.compareTo(o1);\n }", "@Override\n public int compareTo(MetalNode arg0) {\n\n int iResult=0;\n\n if (this.getDate()==arg0.getDate())\n {\n iResult=0;\n }\n else if (this.getDate()>arg0.getDate())\n {\n iResult=1;\n }\n else if (this.getDate()<arg0.getDate())\n {\n iResult=-1;\n }\n\n\n return iResult;\n }", "@Override\r\n\tpublic int compare(BBEntity arg0, BBEntity arg1) {\n\t\treturn arg0.getStart()-arg1.getStart();\r\n\t}", "public int compareTo(UnitObject<T> o) {\r\n if (interval.start < o.interval.start) return -1;\r\n else if (interval.start > o.interval.start) return 1;\r\n else return 0;\r\n }", "@Override\r\n public int compareTo(Object obj) {\r\n if (!(obj instanceof Data)) {\r\n return 1; //??? return arbitary value saying that not equal\r\n }\r\n Data other = (Data) obj;\r\n if (this.distanz > other.distanz) {\r\n return 1;\r\n }\r\n if (this.distanz < other.distanz) {\r\n return -1;\r\n }\r\n return 0;\r\n }", "public boolean Mayor(Object obj1, Object obj2){\n return (Double.parseDouble(obj1.toString()) > Double.parseDouble(obj2.toString()));\n }", "@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t}", "@Override\n public int compare(Integer o1, Integer o2) {\n return o2.compareTo(o1);\n }", "@Override\r\n\tpublic int compare(Map.Entry<Integer, Integer> o1,\r\n\t\t\tMap.Entry<Integer, Integer> o2) {\n\t\treturn o2.getValue() - o1.getValue();\r\n\t}", "@Override\n\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\treturn o1.compareTo(o2);\n\t\t\t}", "@Override\n public int compare(Integer o1, Integer o2) {\n return o2 .compareTo(o1);\n }" ]
[ "0.65292716", "0.6297877", "0.6267485", "0.6261624", "0.6260348", "0.6205341", "0.61652577", "0.6133865", "0.6121487", "0.61148846", "0.60772884", "0.60738164", "0.6070496", "0.605957", "0.60564536", "0.6052482", "0.6016914", "0.5979752", "0.5953252", "0.59520644", "0.59467983", "0.5933572", "0.5902439", "0.5888871", "0.58644164", "0.58580315", "0.5839602", "0.58285326", "0.58243", "0.5816926", "0.57963455", "0.5794128", "0.5784346", "0.5776024", "0.5769422", "0.576835", "0.5761949", "0.57618564", "0.57601374", "0.57562935", "0.5752183", "0.57513446", "0.5750501", "0.57474303", "0.5719736", "0.5711629", "0.57040966", "0.570259", "0.5696771", "0.56916404", "0.56905013", "0.5688661", "0.5688657", "0.56882584", "0.5684264", "0.56696993", "0.5666128", "0.5663596", "0.5660358", "0.56582195", "0.5657711", "0.5655295", "0.564325", "0.5636332", "0.56355643", "0.563151", "0.5628649", "0.5623561", "0.56226707", "0.5620736", "0.56191766", "0.5618843", "0.56038815", "0.5600665", "0.55962956", "0.55941194", "0.5590381", "0.5586442", "0.55802286", "0.5569335", "0.5569335", "0.55656624", "0.55630076", "0.5562257", "0.5562111", "0.5558481", "0.55548483", "0.555381", "0.55528474", "0.5550334", "0.5543298", "0.55406034", "0.5539883", "0.55396736", "0.5537351", "0.55326325", "0.55277425", "0.55274355", "0.5518363", "0.5517407", "0.5515853" ]
0.0
-1
/ In: [1] An array of card objects to be sorted [2] The number of objects in parameter 1 This uses a bubble sort to sort the cards in the cards array.
static void arraySort(Card[] cards, int arraySize) { //Swapped will change to true if any swapping occurs in the //loop below. boolean swapped = false; do { swapped = false; //Go through each element in the array for (int i = 1; i < arraySize; i++) { //If an element is larger thant he one after it, if (cards[i - 1].compareTo(cards[i]) > 0) { //Swap those elements. Card tmpCard = new Card(cards[i - 1]); cards[i - 1] = new Card(cards[i]); cards[i] = new Card(tmpCard); swapped = true; } } } while (swapped); //Continue until this loop runs with no swapping. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort() {\n Card.arraySort(this.myCards, numCards);\n }", "void sort()\n {\n Card.arraySort(myCards, numCards);\n }", "public void sort()\r\n {\r\n Card.arraySort(myCards, myCards.length);\r\n }", "void sort()\n {\n Card.arraySort(cards, topCard);\n }", "public void sort() {\n Card.arraySort(this.cards, this.topCard);\n }", "public void sort(){\n ArrayList<Card> sortedCards = new ArrayList<Card>();\n ArrayList<Card> reds = new ArrayList<Card>();\n ArrayList<Card> yellows = new ArrayList<Card>();\n ArrayList<Card> greens = new ArrayList<Card>();\n ArrayList<Card> blues = new ArrayList<Card>();\n ArrayList<Card> specials = new ArrayList<Card>();\n for(int i = 0; i < cards.size(); i++){\n if(cards.get(i).getColor() == RED){\n reds.add(cards.get(i));\n }else if(cards.get(i).getColor() == YELLOW){\n yellows.add(cards.get(i));\n }else if(cards.get(i).getColor() == GREEN){\n greens.add(cards.get(i));\n }else if(cards.get(i).getColor() == BLUE){\n blues.add(cards.get(i));\n }else if(cards.get(i).getColor() == ALL){\n specials.add(cards.get(i));\n }\n }\n cards = new ArrayList<Card>();\n for(Card c: reds){\n sortedCards.add(c);\n }\n for(Card c: yellows){\n sortedCards.add(c);\n }\n for(Card c: greens){\n sortedCards.add(c);\n }\n for(Card c: blues){\n sortedCards.add(c);\n }\n for(Card c: specials){\n sortedCards.add(c);\n }\n for(Card c: sortedCards){\n cards.add(c);\n }\n }", "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\t\n\tpublic void sortHand(PlayingCard[][] cards) {\n\t\tfor(int k = 0; k < cards.length; k++) {\n\t\t\tPlayingCard [] hand = cards[k];\n\t\t\t\n\t\t\tfor(int i = hand.length - 1; i > 0; i--) {\n\t\t\t\tfor(int j = i - 1; j > -1; j--) {\n\t\t\t\t\tif(hand[j].compareTo(hand[i]) == 1) {\n\t\t\t\t\t\tSkatCard speicherCard = new SkatCard(hand[i].getSuit(), hand[i].getRank());\n\t\t\t\t\t\thand[i] = null;\n\t\t\t\t\t\thand[i] = new SkatCard(hand[j].getSuit(), hand[j].getRank());\n\t\t\t\t\t\thand[j] = null;\n\t\t\t\t\t\thand[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "public static void SortPlayers () {\r\n boolean sorted = false;\r\n Player temp;\r\n\r\n while (!sorted) {\r\n sorted = true;\r\n for (int i = 0; i < player.length - 1; i++) {\r\n if (player[i].score > player[i + 1].score) {\r\n\r\n // SWAP THE OBJECTS' POSITION IN THE ARRAY\r\n temp = player[i];\r\n player[i] = player[i + 1];\r\n player[i + 1] = temp;\r\n\r\n sorted = false;\r\n }\r\n\r\n }\r\n }\r\n\r\n }", "public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}", "@Override\n public <T extends Comparable<T>> T[] sort(T[] arr) {\n for (int i=1 ; i<arr.length ; i++) {\n\n T card = arr[i];\n int j = i - 1;\n \n //Kucuk degeri sola kaydirma\n while (j >= 0 && Sort.less(card, arr[j])) {\n arr[j + 1] = arr[j];\n j--;\n }\n arr[j + 1] = card;\n }\n return arr;\n }", "static ArrayList<Card> sortCardArray(ArrayList<Card> c)\n {\n \n \n Collections.sort(c, new CardComparator());\n \n return c;\n }", "public void sortHand(){\n Arrays.sort(Hand);\n }", "public void bubbleSort() {\n\t\tint n = data.size();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tfor (int j = 1; j < n - i; j++) {\n\t\t\t\tif (data.get(j - 1) > data.get(j)) {\n\t\t\t\t\tswap(j, j - 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "private void bubbleSort() {\r\n\r\n int n = leaderboardScores.size();\r\n int intChange;\r\n String stringChange;\r\n\r\n for (int i = 0 ; i < n - 1 ; i ++ ) {\r\n for (int j = 0 ; j < n - i - 1 ; j ++ ) {\r\n\r\n if (leaderboardScores.get(j) > leaderboardScores.get(j + 1)) {\r\n // swap arr[j+1] and arr[i]\r\n intChange = leaderboardScores.get(j);\r\n leaderboardScores.set(j, leaderboardScores.get(j + 1));\r\n leaderboardScores.set(j + 1, intChange);\r\n\r\n stringChange = leaderboardUsers.get(j);\r\n leaderboardUsers.set(j, leaderboardUsers.get(j + 1));\r\n leaderboardUsers.set(j + 1, stringChange);\r\n }\r\n\r\n }\r\n }\r\n }", "public void sort() {\n }", "void sort();", "void sort();", "private static Artist[] sortAllPaintersBasedOnTheirCharge(Artist[] painterObject, int arrayCount) {\n\t\tif (arrayCount > 0) {\n\n\t\t\tSystem.out.println(\"sorting based on charges\");\n\t\t\tSystem.out.println(\"................................................\");\n\t\t\tfor (int i = 0; i < arrayCount; i++) {\n\t\t\t\tfor (int j = 0; j < arrayCount - i - 1; j++) {\n\t\t\t\t\tif (painterObject[j].getSqFeetCharge() > painterObject[j + 1].getSqFeetCharge()) {\n\t\t\t\t\t\tArtist temp = painterObject[j];\n\t\t\t\t\t\tpainterObject[j] = painterObject[j + 1];\n\t\t\t\t\t\tpainterObject[j + 1] = temp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//display the data after sorting\n\t\t\tdisplay(painterObject, arrayCount);\n\n\t\t} else {\n\t\t\tSystem.out.println(\"There is no data in the database\");\n\t\t}\n\t\treturn painterObject;\n\t}", "public void sort() {\n\t\tif (data.size() < 10) {\n\t\t\tbubbleSort();\n\t\t\tSystem.out.println(\"Bubble Sort\");\n\t\t} else {\n\t\t\tquickSort();\n\t\t\tSystem.out.println(\"Quick Sort\");\n\t\t}\n\t}", "public void sortObjectList(){\n\t\tint counter = gameObjectsList.size() - 1;\n\t\tif (gameObjectsList == null || gameObjectsList.size() == 0){\n\t\t\treturn;\n\t\t}\n\t\tquicksort(0, counter);\n\t}", "public void bubbleSort(ArrayList<Pokemon> p);", "public static void main(String[] args) {\n\t\t\n\t\tList<Card> listOfCards = new ArrayList<Card>();\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.ACE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.FIVE));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.HEART, SuitValue.FOUR));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.SPADE, SuitValue.THREE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.TWO));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.JACK));\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ColorComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.TypeComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ValueComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.CardComparator);\n\t\tSystem.out.println(listOfCards);\n\t}", "@Override\n public void sort() {\n for (int i = 0; i < size; i++) {\n for (int j = i + 1; j < size; j++) {\n if (((Comparable) data[i]).compareTo(data[j]) > 0) {\n E c = data[i];\n data[i] = data[j];\n data[j] = c;\n\n }\n }\n }\n }", "public void sortScores(){\r\n // TODO: Use a single round of bubble sort to bubble the last entry\r\n // TODO: in the high scores up to the correct location.\r\n \tcount=0;\r\n \tfor(int i=Settings.numScores-1; i>0;i--){\r\n \t\tif(scores[i]>scores[i-1]){\r\n \t\t\tint tempS;\r\n \t\t\ttempS=scores[i];\r\n \t\t\tscores[i]=scores[i-1];\r\n \t\t\tscores[i-1]=tempS;\r\n \t\t\t\r\n \t\t\tString tempN;\r\n \t\t\ttempN=names[i];\r\n \t\t\tnames[i]=names[i-1];\r\n \t\t\tnames[i-1]=tempN;\r\n \t\t\tcount++;\r\n \t\t}\r\n \t}\r\n }", "private void sortByAmount(){\n int stopPos = 0;\n while(colours.size()-stopPos > 0){\n int inARow = 1;\n for(int i = colours.size() - 1; i > stopPos; i--){\n if(colours.get(i-1).getAmount() < colours.get(i).getAmount()){\n rgb temp = new rgb(colours.get(i-1));\n colours.set(i-1, colours.get(i));\n colours.set(i, temp);\n }else{\n inARow++;\n }\n }\n stopPos++;\n if(inARow == colours.size()){\n break;\n }\n }\n }", "public void sort(String sortBy){\n SortUtils sortClassObj = new SortUtils();\n this.deckOfCards = sortClassObj.sort(sortBy, this.deckOfCards);\n }", "@Override\n public void sort() {\n int cont = 0;\n int mov = 0;\n for (int i = 0; i < (100 - 1); i++) {\n int menor = i;\n for (int j = (i + 1); j < 100; j++){\n if (array[menor] > array[j]){\n cont= cont + 1;\n menor = j;\n mov = mov + 1;\n }\n }\n swap(menor, i);\n mov = mov + 3;\n }\n System.out.println(cont + \" comparações\");\n System.out.println(mov + \" Movimenteções\");\n }", "public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}", "public void sort()\n\t{\n\t\tfor(int i=0;i<bowlers.size()-1;i++)\n\t\t{\n\t\t\tfor(int j=i+1;j<bowlers.size();j++)\n\t\t\t{\n\t\t\t\tif(bowlers.get(i).getBall()<bowlers.get(j).getBall())\n\t\t\t\t{\n\t\t\t\t\tBowler bowler=bowlers.get(i);\n\t\t\t\t\tbowlers.set(i,bowlers.get(j));\n\t\t\t\t\tbowlers.set(j,bowler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<bowlers.size();i++)\n\t\t{\n\t\tSystem.out.println(bowlers.get(i).getBall());\n\t\t}\n\t}", "public void sortGivenArray_popularity() { \n int i, j, k; \n for(i = movieList.size()/2; i > 0; i /= 2) {\n for(j = i; j < movieList.size(); j++) {\n Movie key = movieList.get(j);\n for(k = j; k >= i; k -= i) {\n if(key.rents > movieList.get(k-i).rents) {\n movieList.set(k, movieList.get(k-i));\n } else {\n break; \n }\n }\n movieList.set(k, key);\n }\n } \n }", "public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "private void sort() {\n ScoreComparator comparator = new ScoreComparator();\n Collections.sort(scores, comparator);\n }", "public void bubbleSort() {\n \tfor (int i = 0; i < contarElementos()-1; i++) {\n\t\t\tboolean intercambiado= false;\n\t\t\tfor (int j = 0; j < contarElementos()-1; j++) {\n\t\t\t\tif (encontrarNodoEnElndice(j).getElemento().compareTo(encontrarNodoEnElndice(j+1).getElemento())>0) {\n\t\t\t\t\tintercambiar(j, j+1);\n\t\t\t\t\tintercambiado=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!intercambiado) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n }", "public void bubbleSort() {\n boolean unordered = false;\n do {\n unordered = false;\n for (int i = 0; i < array.length - 1; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n T temp = array[i + 1];\n array[i + 1] = array[i];\n array[i] = temp;\n unordered = true;\n }\n }\n } while (unordered);\n }", "public void bubbleSort(int [] intArray)\n {\n int n = intArray.length;\n int temp = 0;\n try\n {\n for(int i=0; i < n; i++)\n {\n thread.sleep(100); //sleep the thread to particular to view the results in panel\n this.setThreadState();\n for(int j=1; j < (n-i); j++)\n { \n if(!orderPanel) //check for Descending order\n {\n if(intArray[j-1] > intArray[j])\n {\n //swap the elements!\n temp = intArray[j-1];\n intArray[j-1] = intArray[j];\n intArray[j] = temp;\n repaint();\n \n \n }\n }\n else if(intArray[j-1] < intArray[j]) //check for Ascending order\n {\n temp = intArray[j-1]; \n intArray[j-1] = intArray[j];\n intArray[j] = temp;\n repaint();\n \n }\n \n }\n }\n }\n catch(Exception e)\n {\n System.out.println(\"Exception occured\" + e);\n }\n }", "public int insertionSort()\n {\n // initialize the number of sort checks to 0\n int numSortChecks = 0;\n\n /** FOR INSERTION SORT, EPUT YOUR CODE HERE **/\n\n // Loop through the array of cards ... put each one in the heap\n // add to the heap ... increase the number of sort checks based\n // on the number returned from myCardHeap.add( )\n\n // Loop over all the card in the heap, keep a counter as to which card \n // number we are on\n // use extractMin() to remove a card from the heap\n // place this card into the array at the appropriate position.\n // iuncrement the numChecks variable\n\n return numSortChecks;\n }", "public void sortBySize() {\n\t\tCollections.sort(animals);\n\t}", "private void sortByRank(Card[] hand) {\n\t\tfor (int i = 0; i < hand.length; i++) {\n\t\t\tfor (int j = i + 1; j < hand.length; j++) {\n\t\t\t\tif (hand[i].getRank().getValue() > hand[j].getRank().getValue()) {\n\t\t\t\t\tCard temp = hand[i];\n\t\t\t\t\thand[i] = hand[j];\n\t\t\t\t\thand[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testBubbleSort() {\n BubbleSort<Integer> testing = new BubbleSort<>();\n\n testing.sort(array, new Comparator<Integer>() {\n @Override\n public int compare(Integer i1, Integer i2) {\n return i1.compareTo(i2);\n }\n });\n\n checkArray(\"Bubble sort doesn't work!\", array);\n }", "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0] = iMinValue;\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tcard = mCard[i];\n \t\tiValue = card.GetSuit()*13 + card.GetValue();\n \t\tiCount = 0;\n \t\t// See where the card value comes in the pecking order\n \t\twhile (iValue > iOrder[iCount]){\n \t\t\tiCount++;\n \t\t}\n \t\t// It goes here, so move everything else along one\n \t\tfor (int j = mCardCount-1; j > iCount; j--)\n \t\t\tiOrder[j] = iOrder[j-1];\n \t\tiOrder[iCount] = iValue;\n \t}\n \t\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tfor (int j = 0; j < mCardCount; j++){\n \t\tcard = mCard[j];\n \t\tiValue = card.GetSuit()*13 + card.GetValue(); \t\t\t\n \t\t\tif (iValue == iOrder[i]){\n \t\t\t\torderedCards[i] = mCard[j];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tmCard[i] = orderedCards[i];\n \t} \t\n }\n }", "public void sort(){\n for(int i = array.length-1;i >= 0;i--){\n sink(i);\n }\n while(size > 0){\n swap(0, size-1);\n size -= 1;\n sink(0);\n }\n }", "public String doSort();", "public void sort(Movie[] movies, int size)\r\n\t{\r\n\r\n\t\tMovie temp;\r\n\r\n\t\tfor (int i = 0; i < size; i++) // I will not change until it gets out of th second loop\r\n\t\t{\r\n\r\n\t\t\tfor (int j = i + 1; j < size; j++) // Goes through the movie array and checks if 1 + i(the spot after the last one\r\n\t\t\t\t\t\t\t\t\t\t\t\t// that was moved)\r\n\t\t\t{\r\n\t\t\t\tif (movies[j].getScore() > movies[i].getScore())\r\n\t\t\t\t{\r\n\t\t\t\t\ttemp = movies[j];\r\n\t\t\t\t\tmovies[j] = movies[i];\r\n\t\t\t\t\tmovies[i] = temp;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void shuffle(int numShuffles)\n { \n Card tempCard;\n int switchOne, switchTwo;\n\n for (int i=0; i<numCards; i++){\n switchOne = rand.nextInt(numCards);\n switchTwo = rand.nextInt(numCards);\n\n tempCard = cardAry[switchOne];\n cardAry[switchOne] = cardAry[switchTwo];\n cardAry[switchTwo] = tempCard; \n }\n\n if(cardAry.length > 1 && cardAry.length <=5 && isSorted()==true)\n shuffle(2);\n }", "public void sort() {\n\t\tArrays.sort(contactList, 0, contactCounter);\n\t}", "private void sort() {\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(\n this.getChildren()\n );\n\n Collections.sort(workingCollection, new Comparator<Node>() {\n @Override\n public int compare(Node o1, Node o2) {\n CardView c1 = (CardView) o1;\n CardView c2 = (CardView) o2;\n return c1.getCard().compareTo(c2.getCard());\n }\n });\n\n this.getChildren().setAll(workingCollection);\n }", "void arrangeCards(List<Card> cards, String title, Consumer<List<Card>> callback);", "public void sort() {\n\n // Fill in the blank here.\n\tfor(int i = 0; i < size; i++){\n\t\tint currentLowest, cLIndex, temp;\n\t\tcurrentLowest = elements[i];\n\t\tcLIndex = i; \n\t\tfor(int c = i+1; c < size; c++){\n\t\t\tif(currentLowest > elements[c]){\n\t\t\t\tcurrentLowest = elements[c];\n\t\t\t\tcLIndex = c;\n\t\t\t} \n\t\t}\n\t\ttemp = elements[i];\n\t\telements[i] = elements[cLIndex];\n\t\telements[cLIndex] = temp;\n\t\t\n\t}\n System.out.println(\"Sorting...\");\n }", "public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}", "public void sortByValue() {\n\t\tArrayList<Card> newHand = new ArrayList<Card>();\n\t\twhile (this.cardsInhand.size() > 0) {\n\t\t\tint pos = 0; // Position of minimal card.\n\t\t\tCard c = this.cardsInhand.get(0); // Minimal card.\n\t\t\tfor (int i = 1; i < this.cardsInhand.size(); i++) {\n\t\t\t\tCard c1 = this.cardsInhand.get(i);\n\t\t\t\tif (c1.getValue() < c.getValue() || (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit())) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tc = c1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.cardsInhand.remove(pos);\n\t\t\tnewHand.add(c);\n\t\t}\n\t\tthis.cardsInhand = newHand;\n\t}", "public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}", "@Override\n\tpublic void sort(int[] array) {\n\n\t}", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void testbubbleSort_Sorted() {\r\n\t\tItem[] input = new Item[]{new Item(2),new Item(9),new Item(12),new Item(41),new Item(55)};\r\n\t\tobj.bubbleSort(input);\r\n\t\tassertTrue(expected[1].key == input[1].key);\r\n\t\tassertTrue(expected[2].key == input[2].key);\r\n\t\tassertTrue(expected[3].key == input[3].key);\r\n\t\tassertTrue(expected[4].key == input[4].key);\r\n\t}", "void sort(int[] sort);", "static int[] bubbleSort(int[] a) {\n int n = a.length;\n while(n > 0) {\n int newLastN = 0; // if no swap occurred in last step we won't need to run next iteration\n for (int i = 1; i < n; i++) {\n comparisonCount++;\n if (a[i - 1] > a[i]) {\n swapCount++;\n swap(a, i - 1, i);\n newLastN = i;\n }\n }\n n = newLastN;\n }\n return a;\n }", "@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}", "public void setBubbleSort() \n\t{\n\t\tint last = recordCount + NOT_FOUND; //array.length() - 1\n\n\t\twhile(last > RESET_VALUE) //last > 0\n\t\t{\n\t\t\tint localIndex = RESET_VALUE; \n\t\t\tboolean swap = false;\n\n\t\t\twhile(localIndex < last) \n\t\t\t{\n\t\t\t\tif(itemIDs[localIndex] > itemIDs[localIndex + 1]) \n\t\t\t\t{\n\t\t\t\t\tsetSwapArrayElements(localIndex);\n\t\t\t\t\tswap = true;\n\t\t\t\t}\n\t\t\t\tlocalIndex++;\n\t\t\t}\n\n\t\t\tif(swap == false) \n\t\t\t{\n\t\t\t\tlast = RESET_VALUE;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tlast = last + NOT_FOUND;\n\t\t\t}\n\n\t\t}//END while(last > RESET_VALUE)\n\t\treturn;\n\t}", "public void bubbleSort(){\n for(int i = arraySize -1; i > 1; i--){\n for(int j = 0; j < i; j++){\n // Use < to change it to Descending order\n if(theArray[j] > theArray[j+1]){\n swapValues(j, j+1);\n printHorizontalArray(i, j);\n }\n printHorizontalArray(i, j);\n }\n }\n }", "private void bubbleSort(T[] arr) {\n boolean swaps;\n for (int i = 0; i < n - 1; i++) { // since we always compare two elements, we will need to iterate up to (n - 1) times\n swaps = false;\n for (int j = 1; j < n - i; j++) // we reduce the inspected area by one element at each loop, because the largest element will already be pushed to the right\n if (arr[j].compareTo(arr[j - 1]) < 0) {\n swap(arr, j, j - 1); // the swap method is implemented further\n swaps = true;\n }\n if (!swaps) break; // we stop if there were no swaps during the last iteration\n }\n }", "public static void main(String[] args) {\n\t\tint maxSize = 100;\n\t\tArray array = new Array(maxSize);\n\t\tarray.insert(77);\n\t\tarray.insert(99);\n\t\tarray.insert(44);\n\t\tarray.insert(55);\n\t\tarray.insert(22);\n\t\tarray.insert(88);\n\t\tarray.insert(11);\n\t\tarray.insert(00);\n\t\tarray.insert(66);\n\t\tarray.insert(33);\n\t\t\n\t\tarray.display();\n\t\tSystem.out.println();\n\t\tarray.bubblesort();\n\t\tarray.display();\n\t}", "public void sort(Comparable[] a) {\n Comparable[] aux = new Comparable[a.length];\n sort(a, aux, 0, a.length - 1);\n System.out.println(\"count \" + cnt);\n\n }", "public static void main(String[] args) {\n\t\tCars[] arr = new Cars[5];\n\t\tarr[0] = new Cars(200, 10, \"White\");\n\t\tarr[1] = new Cars(1000, 20, \"Black\");\n\t\tarr[2] = new Cars(345, 3, \"Yellow\");\n\t\tarr[3] = new Cars(34, 89, \"Grey\");\n\t\tarr[4] = new Cars(8907, 6, \"Red\");\n//\t\t// Arrays.sort(arr);\n//\t\tSort(arr, new CarCompareterSpeed());\n//\t\tDisplay(arr);\n//\t\tSystem.out.println(\"*************\");\n//\t\tSort(arr, new CarCOmparaterPrice());\n//\t\t\n//\t\tDisplay(arr);\n//\t\tSystem.out.println(\"*************\");\n//\t\tSort(arr, new CarComparaterColor());\n//\t\tDisplay(arr);\n\n\t\tArrays.sort(arr, new Comparator<Cars>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Cars o1, Cars o2) {\n\t\t\t\t return o1.speed - o2.speed;\n\t\t\t\t//return o2.price - o1.price;\n\t\t\t}\n\t\t});\n\t\tDisplay(arr);\n\t}", "@Override\r\n\tpublic void sort() {\r\n\t\tint minpos;\r\n\t\tfor (int i = 0; i < elements.length-1; i++) {\r\n\t\t\tminpos=AuxMethods.minPos(elements, i);\r\n\t\t\telements=AuxMethods.swapElements(elements, i, minpos);\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Override\n public void sort(int[] input) {\n }", "public abstract void sort(int[] sortMe);", "private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}", "public void sort()\n {\n\tstrack.sort((Node n1, Node n2) ->\n\t{\n\t if (n1.getCost() < n2.getCost()) return -1;\n\t if (n1.getCost() > n2.getCost()) return 1;\n\t return 0;\n\t});\n }", "public void SortByPrice() {\n for (int i = 1; i < LastIndex; i++) {\n int x = i;\n while (x >= 1) {\n if (ForChild[x - 1].getPrice() > ForChild[x].getPrice()) {\n Confectionery sweets = ForChild[x - 1];\n ForChild[x - 1] = ForChild[x];\n ForChild[x] = sweets;\n\n }\n x -= 1;\n }\n }\n }", "public void sort() {\n ListNode start = head;\n ListNode position1;\n ListNode position2;\n\n // Going through each element of the array from the second element to the end\n while (start.next != null) {\n start = start.next;\n position1 = start;\n position2 = position1.previous;\n // Checks if previous is null and keeps swapping elements backwards till there\n // is an element that is bigger than the original element\n while (position2 != null && (position1.data < position2.data)) {\n swap(position1, position2);\n numberComparisons++;\n position1 = position2;\n position2 = position1.previous;\n }\n }\n }", "public static void main(String[] args) {\n Circle[] circles = new Circle[3];\n circles[0] = new Circle(3.6);\n circles[1] = new Circle();\n circles[2] = new Circle(3.5, \"indigo\", false);\n System.out.println(\"Pre-sorted: \");\n for (Circle circle:circles){\n System.out.println(circle);\n }\n\n Comparator circleComparator = new CircleComparator();\n Arrays.sort(circles,circleComparator);\n\n System.out.println(\"After-sorted: \");\n for (Circle circle:circles){\n System.out.println(circle);\n }\n /*ComparableCircle[] circles= new ComparableCircle[3];\n circles[0]= new ComparableCircle(3.6);\n circles[1]=new ComparableCircle();\n circles[2]=new ComparableCircle(\"blue\",true,3.4);\n System.out.println(\"Pre-sorted:\");\n for(ComparableCircle circle:circles) {\n System.out.println(circle);\n }\n System.out.println(circles[0].compareTo(circles[1]));\n System.out.println(circles[1].compareTo(circles[2]));\n System.out.println(circles[0].compareTo(circles[2]));\n\n Arrays.sort(circles);\n\n System.out.println(\"After-sorted: \");\n for(ComparableCircle circle:circles){\n System.out.println(circle);\n }*/\n }", "@Override\r\n\tpublic int compareTo(Card card) {\r\n\t\t\r\n\t\treturn this.getPoints()-card.getPoints();\r\n\t}", "@Override\n public int compareTo(Card c) {\n // TODO Auto-generated method stub\n return Integer.valueOf(this.getNum()).compareTo(c.getNum());\n }", "public static void BubbleSort(int[] a) {\n\t int n = a.length;\n\t int temp = 0;\n\n\t for(int i = 0; i < n; i++) {\n\t for(int j=1; j < (n-i); j++) {\n\t if(a[j-1] > a[j]) {\n\t temp = a[j-1];\n\t a[j-1] = a[j];\n\t a[j] = temp;\n\t }\n\t }\n\t }\n\t}", "public void bubbleSort(ArrayList <Integer> list){\n System.out.println();\n System.out.println(\"Bubble Sort\");\n System.out.println();\n\n steps = 0;\n for (int outer = 0; outer < list.size() - 1; outer++){\n for (int inner = 0; inner < list.size()-outer-1; inner++){\n steps += 3;//count one compare and 2 gets\n if (list.get(inner)>(list.get(inner + 1))){\n steps += 4;//count 2 gets and 2 sets\n int temp = list.get(inner);\n list.set(inner,list.get(inner + 1));\n list.set(inner + 1,temp);\n }\n }\n }\n }", "public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveCocktailShakerSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[0] = new IntPlus(7);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [7, 2, 4, 6, 8, 10]\n Forward pass: [ 2, 4, 6, *7, *8, *10]. 5 comparisons. Last swap at\n index 2, so starred items in order\n Backward pass: [ 2, 4, 6, *7, *8, *10]. 2 comparisons. Search ends\n */\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public static void main(String[] args) {\r\n int[] numbers = {25, 43, 29, 50, -6, 32, -20, 43, 8, -6};\r\n\t\r\n\tSystem.out.print(\"before sorting: \");\r\n\toutputArray(numbers);\r\n \r\n\tbubbleSort(numbers);\r\n\t\r\n\tSystem.out.print(\"after sorting: \");\r\n\toutputArray(numbers);\r\n }", "public void sortByLength()\n {\n boolean swapMade;//has a swap been made in the most recent pass?\n \n //repeat looking for swaps\n do\n {\n swapMade=false;//just starting this pass, so no swap yet\n \n //go through entire array. looking for swaps that need to be done\n for(int i = 0; i<currentRide-1; i++)\n {\n //if the other RideLines has less people\n if(rides[i].getCurrentPeople()<rides[i+1].getCurrentPeople())\n {\n // standard swap, using a temporary. swap with less people\n RideLines temp = rides[i];\n rides[i]=rides[i+1];\n rides[i+1]=temp;\n \n swapMade=true;//remember this pass made at least one swap\n }\n \n } \n }while(swapMade);//until no swaps were found in the most recent past\n \n redrawLines();//redraw the image\n \n }", "public void bubbleSort(ArrayList <Comparable> list){\r\n\t\tsteps += 2; //init, check condition\r\n\t\tfor (int i = list.size() - 1; i >= 0; i --){\r\n\t\t\tsteps += 2; //init, check condition\r\n\t\t\tfor (int j = 0; j < i ; j ++){\r\n\t\t\t\tsteps += 5;\r\n\t\t\t\tif (list.get(j).compareTo(list.get(j + 1)) < 0){\r\n\t\t\t\t\tsteps += 2;\r\n\t\t\t\t\tswap(list, j, j + 1);\r\n\t\t\t\t\tsteps += 5;\r\n\t\t\t\t}\r\n\t\t\t\tsteps += 2;\r\n\t\t\t}\r\n\t\t\tsteps += 2;\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Bubble Sort\");\r\n\t\tSystem.out.println();\r\n\t}", "public static void bubbleSortNumberList(long[] list) {\n /*make N passes through the list (N is length of the list) */\n for(int i=0;i<list.length-1;i++) {\n /* for index from 0 to N-1, compare item[index] to next item, swap if needed */\n for(int j=0; j<list.length-1-i;j++) {\n if(list[j]>list[j+1]){\n long tmp = list[j];\n list[j] = list[j+1];\n list[j+1] = tmp;\n }\n }\n }\n }", "@Test(timeout = SHORT_TIMEOUT)\n public void testTinyCocktailShakerSort() {\n //size-0 arr\n toSort = new IntPlus[0];\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n\n //size-1 arr\n toSort = new IntPlus[1];\n toSort[0] = new IntPlus(42);\n sortedInts = cloneArr(toSort);\n Sorting.cocktailSort(sortedInts, comp);\n\n assertArrayEquals(toSort, sortedInts); //Sort can't rearrange anything\n }", "public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}", "void sort(int a[]) throws Exception {\n\n // Make the input into a heap\n for (int i = a.length-1; i >= 0; i--)\n reheap (a, a.length, i);\n\n // Sort the heap\n for (int i = a.length-1; i > 0; i--) {\n int T = a[i];\n a[i] = a[0];\n a[0] = T;\n pause();\n reheap (a, i, 0);\n }\n }", "public abstract void sort(int[] array);", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }", "public int Sort(){\n\tint nt ;\n\tint i ;\n\tint aux02 ;\n\tint aux04 ;\n\tint aux05 ;\n\tint aux06 ;\n\tint aux07 ;\n\tint j ;\n\tint t ;\n\ti = size - 1 ;\n\taux02 = 0 - 1 ;\n\twhile (aux02 < i) {\n\t j = 1 ;\n\t //aux03 = i+1 ;\n\t while (j < (i+1)){\n\t\taux07 = j - 1 ;\n\t\taux04 = number[aux07] ;\n\t\taux05 = number[j] ;\n\t\tif (aux05 < aux04) {\n\t\t aux06 = j - 1 ;\n\t\t t = number[aux06] ;\n\t\t number[aux06] = number[j] ;\n\t\t number[j] = t;\n\t\t}\n\t\telse nt = 0 ;\n\t\tj = j + 1 ;\n\t }\n\t i = i - 1 ;\n\t}\n\treturn 0 ;\n }" ]
[ "0.7676851", "0.754212", "0.7466925", "0.7446523", "0.7089897", "0.6888639", "0.6716242", "0.65134865", "0.6433839", "0.6383947", "0.6371299", "0.630868", "0.629394", "0.6286171", "0.61696273", "0.6130802", "0.6128282", "0.61053646", "0.60689086", "0.60689086", "0.60156065", "0.60131747", "0.5998002", "0.59828866", "0.59715086", "0.59643364", "0.594845", "0.5944968", "0.59425163", "0.5920627", "0.5894977", "0.58910817", "0.588877", "0.58497924", "0.5839899", "0.58392143", "0.582421", "0.5823969", "0.58082235", "0.5807364", "0.58007044", "0.5781079", "0.57666", "0.5757048", "0.5755621", "0.5751973", "0.57463914", "0.57261026", "0.57219696", "0.5721923", "0.5720572", "0.5705262", "0.570441", "0.56920797", "0.56776893", "0.5677462", "0.5676315", "0.56640285", "0.56620634", "0.56599003", "0.5659339", "0.5649902", "0.56437564", "0.5638085", "0.5633379", "0.56331974", "0.56323045", "0.56251967", "0.56215304", "0.5609649", "0.56030303", "0.5601449", "0.5600623", "0.5599309", "0.55965114", "0.55907285", "0.5588029", "0.5586586", "0.55787164", "0.5570122", "0.55688244", "0.55675375", "0.55655915", "0.55653113", "0.5563583", "0.55602133", "0.55587465", "0.55545026", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294", "0.5551294" ]
0.7091985
4
/ Card(char, Suit) In: A char representing the card's value, and a Suit representing the card's suit. Out: Nothing Description: This is a constructor that takes a value and a suit for a card. This will create a card of the specified value and suit.
public Card(char value, Suit suit) { this.set(value, suit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(Suit suit, int number) {\n\t\tthis.suit = suit;\n\t\tthis.number = number;\n\t\tswitch(number) {\n\t\t\t//place in CardType\n\t\t\tcase 1:\n\t\t\t\ttype = \"Ace\";\n\t\t\t\tsetNumber(14);\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\tmagic = Magic.startAgain;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tmagic = Magic.seeThrough;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmagic = Magic.missAGo;\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\tmagic = Magic.playBelow;\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tmagic = Magic.burn;\n\t\t\tcase 11:\n\t\t\t\ttype = \"Jack\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttype = \"Queen\";\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttype = \"King\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(number > 1 && number < 11) {\n\t\t\ttype = Integer.toString(number);\n\t\t}\n\t}", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public Card(Rank rank, Suit suit)\n\t{\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public Card(String faceName, String suit) {\n setFaceName(faceName);\n setSuit(suit);\n }", "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public Card(int v, Suit s, String special) {\n this.value = v;\n this.suit = s;\n this.specialTypeOfCard = special;\n\n }", "public Card(int deckValue){\n\t\t\n\t\t//Guard against an invalid state:\n\t\tif((deckValue < 1) || (deckValue > 52))\n\t\t{\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t\n\t\tthis.deckValue = deckValue;\n\t\tfaceValue = toFaceValue(deckValue);\n\t\tsuitValue = toSuitValue(deckValue);\n\t}", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public Card(int suitInt, int valueA)\r\n {\r\n \r\n if( suitInt == 1)\r\n suit = \"SPADE\";\r\n if(suitInt == 2)\r\n suit = \"CLUB\";\r\n if(suitInt == 3)\r\n suit = \"HEART\";\r\n if(suitInt == 4)\r\n suit = \"DIAMOND\";\r\n \r\n card = CARDS[valueA-1];\r\n try{\r\n image = ImageIO.read(new File(card+\"_\"+suit+\".jpg\"));\r\n }\r\n catch(Exception e){}\r\n \r\n if(valueA >= 11)\r\n value = 10;\r\n else\r\n value = valueA;\r\n if(valueA == 1)\r\n value = 11;\r\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card(String faceName, String suit, int faceValue) {\n\n setFaceName(faceName);\n setSuit(suit);\n setFaceValue(faceValue);\n }", "public Card(Rank rank, Suit suit) {\r\n\t\tthis.rank = rank;\r\n\t\tthis.suit = suit;\r\n\t\tfaceUp = true;\r\n\t}", "public Card(char s, int r) {\n this.suit = s;\n this.rank = r;\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "public Card(String cardRank, String cardSuit, int cardPointValue) {\r\n\t\t/* *** TO BE IMPLEMENTED IN ACTIVITY 1 *** */\r\n rank = cardRank;\r\n suit = cardSuit;\r\n pointValue = cardPointValue;\r\n \r\n\t}", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card(String name) {\n setValue(name);\n }", "public Card(Rank r, Suit s){\n\t\tthis.rank = r;\n\t\tthis.suit = s;\t\t\n\t}", "public Card(String theSuite, int theValue){\r\n value = theValue;\r\n suite = theSuite;\r\n used = false;\r\n }", "public Card(String value, int numericval, Cardtype type, Cardcolor color) {\n this.value = value;\n this.numericval = numericval;\n this.type = type;\n this.color = color;\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }", "public Card(Suit suit, Face face) {\n\t\tthis.suit = suit;\n\t\tthis.face = face;\n\t}", "public Card(CardRank rank, CardSuit suit) {\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card(int rank, int suit)\r\n throws InvalidRankException,\r\n InvalidSuitException {\r\n if (!isValidRank(rank)) {\r\n throw new InvalidRankException(rank);\r\n }\r\n\r\n if (!isValidSuit(suit)) {\r\n throw new InvalidSuitException(suit);\r\n }\r\n\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public Card() { this(12, 3); }", "static Card generateRandomCard()\n {\n Card.Suit suit;\n char val;\n\n int suitSelector, valSelector;\n\n // get random suit and value\n suitSelector = (int) (Math.random() * 4);\n valSelector = (int) (Math.random() * 14);\n\n // pick suit\n suit = Card.Suit.values()[suitSelector];\n\n // pick value\n valSelector++; // put in range 1-14\n switch(valSelector)\n {\n case 1:\n val = 'A';\n break;\n case 10:\n val = 'T';\n break;\n case 11:\n val = 'J';\n break;\n case 12:\n val = 'Q';\n break;\n case 13:\n val = 'K';\n break;\n case 14:\n val = 'X';\n break;\n default:\n val = (char)('0' + valSelector); // simple way to turn n into 'n' \n }\n return new Card(val, suit);\n }", "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public Card(Rank pRank, Suit pSuit)\n {\n assert pRank != null && pSuit != null;\n aRank = pRank;\n aSuit = pSuit;\n }", "public DebitCard(String n, int c, int p, Date e, Customer h, Provider p) {}", "public Card(int value2, int suit2, String path2) {\r\n\t\tif (suit2 != SPADES && suit2 != HEARTS && suit2 != DIAMONDS && suit2 != CLUBS)\r\n\t\t\tthrow new IllegalArgumentException(\"Illegal playing card suit\");\r\n\t\tif (value2 < 1 || value2 > 13)\r\n\t\t\tthrow new IllegalArgumentException(\"Illegal playing card value\");\r\n\t\tvalue = value2;\r\n\t\tsuit = suit2;\r\n\t\tpath = path2;\r\n\t}", "public InvalidCardSuitException(char suit) {\n super();\n this.suit = suit;\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card(String s, String r) {\n\t\tsuit=s;\n\t\trank=r;\n\t\n\t\tif(rank.equalsIgnoreCase(\"Jack\")||rank.equalsIgnoreCase(\"Queen\")||rank.equalsIgnoreCase(\"King\")||rank.equalsIgnoreCase(\"10\")) {\n\t\t\tscore=10;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"2\")){\n\t\t\tscore=2;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"3\")) {\n\t\t\tscore=3;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"4\")) {\n\t\t\tscore=4;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"5\")) {\n\t\t\tscore=5;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"6\")){\n\t\t\tscore=6;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"7\")) {\n\t\t\tscore=7;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"8\")){\n\t\t\tscore=8;\n\t\t}\n\t\telse if(rank.equalsIgnoreCase(\"9\")) {\n\t\t\tscore=9;\n\t\t}\n\t\telse {\n\t\t\tscore=1;\n\t\t\t}\n\t\t\t\n\t}", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public Card(Color color, int value) throws UnoException {\r\n this.color = color;\r\n if (value < 0 || value > 9) {\r\n throw new UnoException(\"Veuillez entrer une valeur comprise entre 0\"\r\n + \" et 9\");\r\n } else {\r\n this.value = value;\r\n }\r\n }", "public Card(int order) {\n if (order <= 13) {\n this.suit = \"Clubs\";\n } else if (order > 13 && order <= 26) {\n this.suit = \"Diamonds\";\n } else if (order > 26 && order <= 39) {\n this.suit = \"Hearts\";\n } else if (order > 39 && order <= 52) {\n this.suit = \"Spades\";\n } else {\n System.out.println(\"Not a valid input\");\n return;\n }\n\n this.value = FACECARDS[(order) % 13];\n }", "public Card () {}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "Card(){\t \n}", "public Card()\n {}", "public Card (int cardNumber, String cardSuit, Image cardFront, Image cardBack) \r\n\t{\r\n\t\t//Updating Global Card Number\r\n\t\tthis.cardNumber = cardNumber;\r\n\t\t\r\n\t\t//Updating Global Card Suit\r\n\t\tthis.cardSuit = cardSuit;\r\n\t\t\r\n\t\t//Updating Global Card Front\r\n\t\tthis.cardFront = cardFront;\r\n\t\t\r\n\t\t//Updating Global Card Back\r\n\t\tthis.cardBack = cardBack;\r\n\t}", "public Card(String s, int r) {\n\t\tif (s.equals(\"S\") || s.equals(\"D\")) {\n\t\t\tsuit = s;\n\t\t}\n\t\tif (1 <= r && r <= 12) {\n\t\t\trank = r;\n\t\t}\n\t\tshow[0] = false;\n\t\tshow[1] = false;\n\t\tshow[2] = false;\n\t\tshow[3] = false;\n\t}", "public boolean set(char value, Suit suit) {\n if (Card.isValid(value, suit)) {\n this.errorFlag = false;\n this.value = value;\n this.suit = suit;\n return true;\n } else {\n this.errorFlag = true;\n return false;\n }\n }", "public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }", "public CardSwitch(Rank r, Suit s){\n\t\t// constructor to create card for the game Switch\n\n\t}", "public Card(boolean vis, int suit, Integer... vals) {\r\n\t\tvalues = Arrays.asList(vals);\r\n\t\tthis.suit = suit;\r\n\t\tthis.visible = vis;\r\n\t}", "public Shoe(Card.Suit suit, int numCards)\n \n { \n cardAry = new Card[numCards];\n\n int numSuits = numCards / 13;\n\n for(int deckIdx = 0; deckIdx<= numSuits; deckIdx++)\n {\n int cardsInSuit;\n if(deckIdx == numSuits)\n cardsInSuit = numCards % 13;\n else\n cardsInSuit = 13;\n for(int rankIdx = 1; rankIdx<=cardsInSuit; rankIdx++)\n {\n cardAry[deckIdx*13 + rankIdx-1] = new Card(suit, rankIdx);\n }\n }\n\n this.numDecks = 0;\n this.numCards = numCards;\n }", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public Card(int rank, int suit) {\n this.rank = rank;\n this.suit = suit;\n\n String fName = \"images\" + File.separator + this.toString().toLowerCase() + \".gif\";\n try {\n this.img = javax.imageio.ImageIO.read(new File(fName));\n }\n catch (java.io.IOException ioe) {\n System.out.println(fName + \" not found.\");\n }\n }", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "public void setSuitOfCard(int suitOfCard) {\n this.suitOfCard = suitOfCard;\n }", "public Card(int x) {\n\t\tid = x;\n\t}", "public NumericalCard(final Color color, final Value value) {\n this.color = color;\n this.value = value;\n }", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public Card(String name, String description, String flavorText,\n Boolean scorable, int cost) {\n this.name = name;\n this.description = description;\n this.flavorText = flavorText;\n this.scorable = scorable;\n this.cost = cost;\n }", "public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }" ]
[ "0.8432872", "0.83356154", "0.82767296", "0.8250045", "0.82058215", "0.81192964", "0.78494835", "0.7819709", "0.78012484", "0.77987427", "0.76975363", "0.76293296", "0.7612589", "0.7579837", "0.75326246", "0.7528765", "0.74874", "0.7459573", "0.74167913", "0.72875106", "0.72186184", "0.7203514", "0.71788365", "0.716266", "0.71411437", "0.7127172", "0.712541", "0.7074425", "0.7069685", "0.7028251", "0.70138514", "0.6998541", "0.6953416", "0.6876622", "0.6866982", "0.6864541", "0.6863481", "0.68441474", "0.6820051", "0.67970294", "0.6787691", "0.678451", "0.67778885", "0.67751515", "0.6766323", "0.67545146", "0.6749818", "0.6742024", "0.6724449", "0.67096096", "0.6703431", "0.6685864", "0.6681798", "0.6678377", "0.6676421", "0.6644016", "0.66290414", "0.6607591", "0.66040885", "0.65971726", "0.6596167", "0.6588109", "0.6568722", "0.65458804", "0.650601", "0.64137685", "0.64101183", "0.6390318", "0.6367922", "0.63385147", "0.63301307", "0.63269687", "0.62904817", "0.62854373", "0.62849003", "0.6281068", "0.6220166", "0.6216257", "0.6196093", "0.61420053", "0.6136232", "0.6084499", "0.6037169", "0.60217685", "0.60048693", "0.59574854", "0.59187794", "0.5916324", "0.5912392", "0.5901007", "0.5885796", "0.5868124", "0.58503795", "0.5842722", "0.58390945", "0.5808583", "0.5799615", "0.579415", "0.57449454", "0.5735001" ]
0.8885586
0
/ Card() In: Nothing Out: Nothing Description: This is a default constructor that takes no values. It will create an Ace of Spades.
public Card() { this.set('A', Suit.spades); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card () {}", "public Card()\n {}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "Card(){\t \n}", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "public Card() { this(12, 3); }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Card(String name) {\n setValue(name);\n }", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public BaseballCard(){\r\n\r\n\t}", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "public LaundryCard() {\n\t}", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public PaymentCard() {\n\t}", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "public CluedCard(GameMode mode) {\n\t\tthis(null, null, mode);\n\t}", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Deck() {\n generateDeckOfCards();\n }", "public MageTowerCard() {\n\t\tsuper(cardName, cardId, cardCost);\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card()\n {\n // initialise instance variables\n message = new ArrayList<String>();\n message.add(\"Sorry!\");\n message.add(\"One\");\n message.add(\"Two\");\n message.add(\"Three\");\n message.add(\"Four\");\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Card() {\n this(new VCard());\n vcard.getProperties().add(Version.VERSION_4_0);\n\n version = 4;\n }", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "public Card(String faceName, String suit) {\n setFaceName(faceName);\n setSuit(suit);\n }", "public CareerCard (String name)\r\n {\r\n super (name);\r\n setDegreeRequired ();\r\n setMaxPayRaise ();\r\n }", "public Card(int x) {\n\t\tid = x;\n\t}", "public backCard() {\n\t\tsuper(null,null);\n\t}", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Card(FrontFace frontFace, BackFace backFace) {\n this.frontFace = frontFace;\n this.backFace = backFace;\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "public Card(Suit suit, Face face) {\n\t\tthis.suit = suit;\n\t\tthis.face = face;\n\t}", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public SpadeCard(int value)\n\t{\n\t\tsuper(value);\n\t\tweight = 0;\n\t\t\n\t\tswitch(value)\n\t\t{\n\t\tcase 0:\n\t\t\tpicPath = \"pictures/cards_PNG/3_of_spades.png\";\n\t\t\tbreak;\t\t\n\t\tcase 1:\n\t\t\tpicPath = \"pictures/cards_PNG/4_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpicPath = \"pictures/cards_PNG/5_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpicPath = \"pictures/cards_PNG/6_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpicPath = \"pictures/cards_PNG/7_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tpicPath = \"pictures/cards_PNG/8_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tpicPath = \"pictures/cards_PNG/9_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tpicPath = \"pictures/cards_PNG/10_of_spades.png\";\n\t\t\tbreak;\n\t\t\n\t\t\t\n\t\tcase 8:\n\t\t\tpicPath = \"pictures/cards_PNG/jack_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tpicPath = \"pictures/cards_PNG/queen_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 10:\n\t\t\tpicPath = \"pictures/cards_PNG/king_of_spades.png\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tpicPath = \"pictures/cards_PNG/ace_of_spades.png\";\n\t\t\tbreak;\n\t\t\t\n\t\tcase 12:\n\t\t\tpicPath = \"pictures/cards_PNG/2_of_spades.png\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpicPath = \"pictures/cards_PNG/black_joker.png\";\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(picPath));\n\t\t}catch (IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public UserCard() {\n this(DSL.name(\"b2c_user_card\"), null);\n }", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public Deck(String name){\r\n\t\tthis(name, new ArrayList<Card>());\r\n\t}", "public Hand() {\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public CardCollection() {\n cards = new ArrayList<>();\n }", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public Card(String name, String description) {\n\t\tthis.name = name;\n\t\tthis.description = description;\n\t}", "protected CardCommandAPDU() {\n }", "public Deck(){\n\t\tcards = new ArrayList<>(deckSize);\n\t\tdeck = new int[deckSize];\n\t}", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Card()\r\n {\r\n rand = new Random();\r\n value = rand.nextInt(28); \r\n // Assigning value\r\n if (value >= 14) // Check if value is greater than 14 then value = value - 14;\r\n value -= 14;\r\n // Assigning color\r\n rand = new Random();\r\n // Switch statement for assigning different colors\r\n switch(rand.nextInt(4) )\r\n {\r\n case 0: color = \"Red\"; \r\n break;\r\n case 1: color = \"Green\"; \r\n break;\r\n case 2: color = \"Blue\"; \r\n break;\r\n case 3: color = \"Yellow\"; \r\n break;\r\n }\r\n // If the card is a wild card and value is greater than or equal to 13 then none value is assigned to color variable\r\n if (value >= 13)\r\n color = \"none\";\r\n }", "public Builder setCards(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cards_ = value;\n onChanged();\n return this;\n }", "public Card(int s, int v){\n\t\t//make a card with suit s and value v\n\t\tsuit = s;\n\t\tvalue = v; \n\t\t\n\t}", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Deck()\n {\n this(1);\n }", "public Card(short rank, short suit){\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public CardTrackKey() {\n\tsuper();\n}" ]
[ "0.8083181", "0.78388685", "0.7741092", "0.7693176", "0.7386531", "0.73556036", "0.7325361", "0.7291956", "0.72799057", "0.7235718", "0.7225177", "0.7198685", "0.7107009", "0.70863193", "0.7056683", "0.705652", "0.69922423", "0.69753164", "0.6928167", "0.68986636", "0.68932253", "0.68879825", "0.6873187", "0.68650454", "0.68437934", "0.68207514", "0.6814455", "0.679518", "0.6781729", "0.6767577", "0.66977656", "0.6686663", "0.6659036", "0.6657391", "0.66394687", "0.66383094", "0.6636647", "0.6626616", "0.65873027", "0.658366", "0.6580232", "0.65490353", "0.65458494", "0.65394086", "0.6528967", "0.65243334", "0.65112346", "0.64733124", "0.6453837", "0.645207", "0.6436471", "0.6435081", "0.6434495", "0.6421159", "0.64207053", "0.640942", "0.6406348", "0.6396124", "0.63811594", "0.63800603", "0.63675624", "0.6358237", "0.6357023", "0.6354182", "0.6322468", "0.6307701", "0.6284561", "0.6284547", "0.6280628", "0.62791145", "0.6276925", "0.62764746", "0.626479", "0.62518215", "0.6251386", "0.62358", "0.6208345", "0.62006205", "0.6191704", "0.618498", "0.6174568", "0.6173633", "0.61715263", "0.61714697", "0.61698544", "0.61672527", "0.6159574", "0.61590093", "0.6152862", "0.6141417", "0.61373854", "0.6131886", "0.611808", "0.6114273", "0.61046857", "0.6096482", "0.60929567", "0.60833025", "0.60658205", "0.6062695" ]
0.66517246
34
/ Card(Card) In: A Card object Out: Nothing Description: This is a copy constructor that returns a NEW card with the same values as the card passed into it.
public Card(Card card) { this.set(card.value, card.suit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card copy(){\n return new Card(Suits, Value);\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "public Card(Card orig){\n this.cardType = orig.cardType;\n this.cardRank = orig.cardRank;\n this.cardSuit = orig.cardSuit;\n scaleCard(this.cardType);\n this.cardId = orig.cardId;\n this.isClick = false;\n this.inValidGroup = orig.inValidGroup;\n }", "public Object clone(){ \r\n\t\tBaseballCard cloned = new BaseballCard();\r\n\t\tcloned.name = this.getName();\r\n\t\tcloned.manufacturer=this.getManufacturer();\r\n\t\tcloned.year = this.getYear();\r\n\t\tcloned.price = this.getPrice();\r\n\t\tcloned.size[0]= this.getSizeX();\r\n\t\tcloned.size[1]= this.getSizeY();\r\n\t\treturn cloned;\r\n\t}", "public Card () {}", "public Hand(Hand toCopy) {\n if (toCopy.hole1 instanceof BlankCard) {\n hole1 = new BlankCard();\n hole2 = new BlankCard();\n } else {\n hole1 = new Card((Card)toCopy.hole1);\n hole2 = new Card((Card)toCopy.hole2);\n }\n showCards = toCopy.showCards;\n }", "public Card()\n {}", "Card(){\t \n}", "public Card() { this(12, 3); }", "public Card(String name) {\n setValue(name);\n }", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Collection<Card> getCopyOfCardsList() {\n\t\treturn new ArrayList<>(cards);\n\t}", "public Card(final VCard vcard) {\n this.vcard = vcard;\n prevLastmod = getLastmod();\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public UserIdCardCopy() {\n this(DSL.name(\"user_id_card_copy\"), null);\n }", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public Card(){\n this.name = \"\";\n this.description = \"\";\n this.element = null;\n this.img = \"\";\n }", "public Card(int x) {\n\t\tid = x;\n\t}", "Card(Color color) {\n this.color = color;\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "public Card(String[] card) {\r\n\t\tthis.deckIndex = Integer.parseInt(card[0]);\r\n\t\tthis.suit = (char) Integer.parseInt(card[1]);\r\n\t\tthis.name = (char) Integer.parseInt(card[2]);\r\n\t\tthis.ordinal = Integer.parseInt(card[3]);\r\n\t\tthis.value = Integer.parseInt(card[4]);\r\n\t}", "public Card() {\n var random = new SecureRandom();\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[random.nextInt(10)];\n this.suit = allSuits[random.nextInt(4)];\n }", "public Card(User user) {\n\t\tsuper();\n\t\tthis.user=user;\n\t\tuser.setCard(this);\n\t}", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "@Override\r\n\tpublic Card createCard(Color color, Value label) {\r\n\t\tCard newCard = new Card(color, label);\r\n\t\treturn newCard;\r\n\t}", "public CardRequest() {\r\n card = new MSRData(); // an empty one\r\n }", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public CMObject copyOf();", "public Pair(Card firstCard, Card secondCard){\r\n this.firstCard = firstCard;\r\n this.secondCard = secondCard;\r\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "void setCard(Card card) {\n this.card = card;\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public Card push(Card card)\n {\n if (card != null)\n {\n cards.add(card);\n card.setBounds(0, 0, CARD_WIDTH, CARD_HEIGHT);\n add(card, 0);\n }\n \n return card;\n }", "public void testClone() {\n System.out.println(\"clone\");\n Play instance = new Play(\"Player1\", new Card(Rank.QUEEN, Suit.SPADES));\n Play expResult = instance;\n Play result = instance.clone();\n assertNotSame(expResult, result);\n }", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "Cards(String cardName, String cardDes, int ataque, int defensa) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = ataque;\n this.def = defensa;\n }", "Cards(String cardName, String cardDes, int puntosHabilidad) {\n this.nombre = cardName;\n this.descripcion = cardDes;\n this.puntos = puntosHabilidad;\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public void duplicateCard(Card originalCard)\n\t{\n\t\tint index = cards.indexOf(originalCard);\n\t\t\n\t\t// If it's found, add it again at that index\n\t\tif(index >= 0) {\n\t\t\t\n\t\t\taddCard(index, new Card(originalCard));\n\t\t\t\n\t\t\t// Remove and re-add all cards\n\t\t\tsyncCardsWithViews();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public Card()\n {\n suite = \"\";\n number = \"\";\n value = 0;\n aceValue = 1;\n hasBeenPicked = false;\n }", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "public BaseballCard(){\r\n\r\n\t}", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public Card build() {\n return new Card(frontFace, backFace);\n }", "private Card(Color c, Rank r) {\n this.nbCard = pack(c,r);\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public Card getCard() {\n return this.card;\n }", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "public CardMessage(Player toPlayer, Player fromPlayer, List<Card> cards)\n {\n this.toPlayer = toPlayer;\n this.fromPlayer = fromPlayer;\n this.cards = cards;\n }", "public Card getPlayer2Card()\n {\n player2card = new Card(player2Hand.dequeue().toString());\n return player2card;\n \n }", "public CardMessage(Player toPlayer, Player fromPlayer, Card card)\n {\n this.toPlayer = toPlayer;\n this.fromPlayer = fromPlayer;\n this.cards = new ArrayList<Card>();\n this.cards.add(card);\n }", "public Deck(ArrayList<Card> providedCards) {\n if (null == providedCards || (providedCards.size() != DECK_SIZE)) {\n throw new IllegalArgumentException(\"Deck should be initialized with minimum 52 cards\");\n }\n if (providedCards.stream().distinct().count() != providedCards.size()) {\n throw new DuplicateCardFoundException();\n }\n this.cards = new ArrayList<>(providedCards.size());\n this.cards.addAll(providedCards);\n }", "public Card(String id, String name) {\n \t\tsameID = new String[MINILEN];\n \t\tfor (int i = 0; i < sameID.length; i++) {\n \t\t\tsameID[i] = \"\";\n \t\t}\n \t\tsetID(id);\n \t\t// setName(id);\n \t\tsetCardName(name);\n \n \t\trealCardName = name;\n \n \t\teffects = new ArrayList<String>();\n \t\teffects_e = new ArrayList<String>();\n \t\tflavorText = \"\";\n \t\tflavorText_e = \"\";\n \t\tsetCurrentState(State.NONE);\n \t\t// imageFile = new File(\"FieldImages/cardBack-s.jpg\");\n \t\timageResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tbackResource = \"/resources/FieldImages/cardBack-s.jpg\";\n \t\tsetAssociatedCards(new ArrayList<Card>());\n \t\tsetAttributes(new ArrayList<Attribute>());\n \t\t// addMouseListener(this);\n \t}", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Card(int cType){\n this.cardType = cType;\n scaleCard(this.cardType);\n this.isClick = false;\n }", "public CreditCard(int pin, String number, String holder, Date expiryDate, int cvc){\r\n this.pin = pin;\r\n this.number = number;\r\n this.holder = holder;\r\n this.expiryDate = expiryDate;\r\n this.cvc = cvc;\r\n}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public Deck( int copiesPerCard ) {\n if (copiesPerCard <= 0) {\n throw new IllegalArgumentException();\n }\n this.cards = new Card[STANDARD_DECK_SIZE * copiesPerCard];\n this.topCardIndex = 0;\n int DeckLength = this.cards.length;\n int cardIndex = 0;\n for (int copy = 1; copy <= copiesPerCard ; copy++ ) {\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }\n }", "public Card getCard() {\n return this.card;\n }", "@PostMapping(\"/cards\")\n StarbucksCard newCard() {\n StarbucksCard newcard = new StarbucksCard();\n\n Random random = new Random();\n int num = random.nextInt(900000000) + 100000000;\n int code = random.nextInt(900) + 100;\n\n newcard.setCardNumber(String.valueOf(num));\n newcard.setCardCode(String.valueOf(code));\n newcard.setBalance(20.00);\n newcard.setActivated(false);\n newcard.setStatus(\"New Card\");\n return repository.save(newcard);\n }", "public Card(String name, String description) {\n\t\tthis.name = name;\n\t\tthis.description = description;\n\t}", "public PaymentCard() {\n\t}", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public Card(String type,String value)\n {\n this.type = type;\n this.value = value;\n }", "public CardCollection() {\n cards = new ArrayList<>();\n }", "public Pair(CardGamePlayer player, CardList cards) {\n\t\tsuper(player, cards);\n\t}", "public Pair(CardGamePlayer player, CardList cards) {\n\t\tsuper(player, cards);\n\t}", "public CardStack()\n {\n cards = new Vector<Card>();\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public UserIdCardCopy(Name alias) {\n this(alias, USER_ID_CARD_COPY);\n }", "@Override\n protected Currency clone() {\n final Currency currency = new Currency();\n if (data != null) {\n currency.data = data.clone();\n }\n return currency;\n\n }", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "Prototype makeCopy();", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public void takeACard(Card card){\n hand.add(card);\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "public Card(int cardNumber, JButton jButton) {//upon creation;\n this.cardNumber = cardNumber;//set the card number of this card;\n this.jButton = jButton;//set the JButton of this card;\n// System.out.println(cardNumber);//SOUT the card numbers;\n }", "public Card(Rank rank, Suit suit)\n\t{\n\t\tthis.rank = rank;\n\t\tthis.suit = suit;\n\t}", "Person(Card card1, Card card2) {\n\t\t_money = 50; // Start with 50 dollars\n\t\t_bet = 0;\n\t\t_hand = new Hand(card1, card2); // for now a person starts with an empty deck this way everyone can get a card\n\t\t\t\t\t\t\t// at the same time\n\t\t_wins = 0;\n\t\t_pushes = 0;\n\t\t_loses = 0;\n\t}", "public Deck(Deck other){\r\n this.cards = other.getCards();\r\n this.deckSize = other.getDeckSize();\r\n }", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }" ]
[ "0.81357294", "0.7956693", "0.74072963", "0.71553856", "0.6979305", "0.69130486", "0.6894668", "0.6815094", "0.6785218", "0.67056096", "0.664809", "0.6509977", "0.65088975", "0.6507339", "0.6478945", "0.6432499", "0.6426862", "0.64100784", "0.6401489", "0.6398346", "0.6380537", "0.63460904", "0.63409954", "0.6334399", "0.63157636", "0.63065434", "0.6291209", "0.6263119", "0.62626445", "0.62469023", "0.6242778", "0.6202757", "0.62015545", "0.61978996", "0.6196359", "0.61902696", "0.6188044", "0.61777395", "0.61770374", "0.61516106", "0.61296177", "0.6125376", "0.61244017", "0.6114588", "0.6111035", "0.6100684", "0.60990113", "0.60961527", "0.60958844", "0.6093739", "0.6091755", "0.6090873", "0.60902166", "0.6083787", "0.60674316", "0.60662985", "0.6058665", "0.60549575", "0.6049769", "0.60479975", "0.60339093", "0.6030215", "0.6009836", "0.59936935", "0.59788734", "0.5975066", "0.5974273", "0.5969874", "0.5963947", "0.59581226", "0.5942506", "0.59367573", "0.593456", "0.5930021", "0.5914494", "0.5912023", "0.5910094", "0.59098476", "0.5904785", "0.5885504", "0.5885376", "0.5876211", "0.58638513", "0.58638513", "0.58544916", "0.5852252", "0.58488786", "0.5847289", "0.58447516", "0.5842724", "0.5826572", "0.5822603", "0.58141494", "0.5810668", "0.57983685", "0.5792057", "0.578488", "0.57766414", "0.5772311", "0.5770654" ]
0.77016807
2
/ boolean set(char, Suit) In: A char representing the card's value and a Suit representing the card's suit. Out: True if the value and suit are valid, false if otherwise. Description: This set's the card's suit and value, if they are valid. Otherwise, it sets the card's errorFlag to true.
public boolean set(char value, Suit suit) { if (Card.isValid(value, suit)) { this.errorFlag = false; this.value = value; this.suit = suit; return true; } else { this.errorFlag = true; return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean setSuit(char inSuit) {\r\n\t\tinSuit = Character.toUpperCase(inSuit);\r\n\t\tboolean status = false;\r\n\t\t\r\n\t\tswitch (inSuit) {\r\n\t\tcase 'S':\r\n\t\tcase 'H':\r\n\t\tcase 'C':\r\n\t\tcase 'D':\r\n\t\tcase 'T':\r\n\t\tcase '1':\r\n\t\tcase '2':\r\n\t\tcase '3':\r\n\t\t\tsuit = inSuit;\r\n\t\t\tstatus = true;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tsuit = DEFAULT_SUIT;\r\n\t\t\tstatus = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn status;\r\n\t}", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "public void setSuit(String suit)\r\n {\r\n this.suit = suit;\r\n }", "private static boolean isValid(char value, Suit suit) {\n for (char validValue : Card.validCardValues)\n if (String.valueOf(validValue).toLowerCase().equals(String.valueOf(value).toLowerCase()))\n return true;\n return false;\n }", "public void setSuit(Suit suit) {\n this.suit = suit;\n }", "public void setSuit(String value) {\n suit = value;\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "private boolean isValidSuit(char suit) {\n return (suit != 'H' && suit != 'D' && suit != 'S' && suit != 'C');\n }", "public void setSuit(int suit) throws Exception{\n\t\tif (suit < 0 || suit > 3)\n\t\t\tthrow new Exception();\n\t\tthis.suit = suit;\n\t}", "public void setSuit(String suit) {\n\t\tthis.suit = suit;\n\t}", "private boolean isValidSuit(int suit) {\r\n if (suit < 0 || suit > 3) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void setSuit(Suit suit) {\r\n\t\tthis.suit = suit;\r\n\t}", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public void setSuitOfCard(int suitOfCard) {\n this.suitOfCard = suitOfCard;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "public Card (char inSuit, int inFace) {\r\n\t\tif (!setSuit(inSuit)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect suit: \" + inSuit);\r\n\t\t\tSystem.out.println(\"Setting suit to: \" + DEFAULT_SUIT);\r\n\t\t}\r\n\t\t\r\n\t\tif (!setFace(inFace)) {\r\n\t\t\tSystem.out.println(\"Card class reports incorrect face: \" + inFace);\r\n\t\t\tSystem.out.println(\"Setting face to: \" + DEFAULT_FACE);\r\n\t\t}\r\n\t\t\r\n\t\t// not a wildcard by default\r\n\t\twildcard = false;\r\n\t}", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "public void setSuit (int aSuit)\n {\n this.suits = aSuit;\n }", "public String getCardSuit() {\n return Csuit;\n }", "public InvalidCardSuitException(char suit) {\n super();\n this.suit = suit;\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public boolean put(Card card) {\n if (this.isEmpty() && card.value() != 13) {\n return false;\n }\n if (!this.isEmpty()) {\n// System.out.println(\"chci polozit: \" + card + \" na \" + this.deck[this.top]);\n Card tmp = this.deck[this.top];\n// System.out.println(\"Rozdil karet je: \"+ tmp.compareValue(card) + \" Jsou si podobne?\" + tmp.similarColorTo(card));\n if (tmp.compareValue(card) != 1 || tmp.similarColorTo(card)) {\n// System.out.println(\"Nepolozeno - chyba\");\n return false;\n }\n }\n\n if (this.top+1 < this.size) {\n this.deck[++this.top] = card;\n return true;\n }\n else {\n return false;\n }\n }", "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public Suit getSuit() {\n return cardSuit;\n }", "public String suit() {\r\n return suit;\r\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public void setAceValue()\n {\n Scanner scanner = new Scanner(System.in); // Create a Scanner object\n System.out.print(\"Do you want the value of the Ace cards to be 1 or 11? \");\n aceValue = scanner.nextInt(); // Read user input\n }", "public Card (Suit s, int v) {\n suit = s;\n val = v;\n }", "public void setSuitArr(char[] suitArr) {\r\n this.suitArr = suitArr;\r\n }", "public Card(String s, int c)\r\n { suit = s;\r\n count = c;\r\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Cards(String cardFace, String cardSuit) {\n\t\t// face of the card\n\t\tface = cardFace;\n\t\t// suit of the card\n\t\tsuit = cardSuit;\n\t}", "public boolean set(Position pos, String s){\n\t\t// set the cell at the specified position pos to be the specified string s\n\t\t// do not change the board if invalid position: return false\n\t\t// do not change the board if invalid symbol: return false\n\t\t// do not change the board if the position is already occupied (not empty): return false\n\t\t// return true if board changed successfully\n\t\t// assuming HashMap overhead constant, O(1)\n\t\t\n\t\tif(isValidPosition(pos) == false) { //If the position is not valid then it will return false\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(isValidSymbol(s) == false) { //If the symbol is not valid then it will return false \n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!grid.contains(pos)) { //If the element is not in the table\n\t\t\t\n\t\t\tif(grid.getValue(pos) == null) { //If no value exists\n\t\t\t\t\n\t\t\t\tgrid.add(pos, s); //the value will be added\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\n\t\t\tif(grid.getValue(pos) != null) { //If value exists\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public BJCard(Suit s, Value gVal)\r\n {\r\n suit = s;\r\n value= gVal;\r\n }", "public void aceChanger() {\n\t\t// Two aces in hand before move has been made\n\t\tif (hand.numOfCards() == 2 && isBusted()) {\n\t\t\thandIterator = new HandIterator(hand.getCards());\n\t\t\tCard c = hand.getCards().get(0);\n\t\t\tCard newAce = new Card(1, \"A\", c.getCardSuit());\n\t\t\thand.addCard(newAce);\n\t\t\thand.remove(c);\n\t\t// Ace in hand and set to 11, and hand has busted\n\t\t} else if (checkForAce() && isBusted() && hand.numOfCards() > 2) {\n\t\t\thandIterator = new HandIterator(hand.getCards());\n\t\t\twhile (handIterator.hasNext()) {\n\t\t\t\tCard c = (Card) handIterator.next();\n\t\t\t\tif (c.getCardValue() == 11) {\n\t\t\t\t\thand.addCard(new Card(1, \"A\", c.getCardSuit()));\n\t\t\t\t\thand.remove(c);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t// Ace in hand and total hand value is < 21\n//\t\t} else if (checkForAce() && !isBusted()) {\n//\t\t\tprintHand();\n//\t\t\tif (hand.numOfAces() == 1) {\n//\t\t\t\thandIterator = new HandIterator(hand.getCards());\n//\t\t\t\tSystem.out.println(\"You have an Ace card in your hand. Do you \"\n//\t\t\t\t\t\t+ \"want to set the value to 1 or 11?\");\n//\t\t\t\tint ans = scan.nextInt();\n//\t\t\t\twhile (handIterator.hasNext()) {\n//\t\t\t\t\tCard c = (Card) handIterator.next();\n//\t\t\t\t\tif (c.getCardName().equals(\"A\")) {\n//\t\t\t\t\t\twhile (ans != 1 && ans != 11) {\n//\t\t\t\t\t\t\tSystem.out.println(\"Invalid input. Try again.\");\n//\t\t\t\t\t\t\tans = scan.nextInt();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\thand.addCard(new Card(ans, \"A\", c.getCardSuit()));\n//\t\t\t\t\t\thand.remove(c);\n//\t\t\t\t\t\treturn;\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} else {\n//\t\t\t\thandIterator = new HandIterator(hand.getCards());\n//\t\t\t\tSystem.out.println(\"You have multiple Ace cards in your hand.\"\n//\t\t\t\t\t\t+ \" Which card do you want to set the value for?\"\n//\t\t\t\t\t\t+ \" (Select by appropriate card suit.) Type exit to\"\n//\t\t\t\t\t\t+ \" make no changes.\");\n//\t\t\t\tString suit = scan.next();\n//\t\t\t\tif (suit.equalsIgnoreCase(\"exit\")) {\n//\t\t\t\t\treturn;\n//\t\t\t\t}\n//\t\t\t\twhile (handIterator.hasNext()) {\n//\t\t\t\t\tCard c = (Card) handIterator.next();\n//\t\t\t\t\tif (c.getCardName().equals(\"A\") && \n//\t\t\t\t\t\t\tc.getCardSuit().equalsIgnoreCase(suit)) {\n//\t\t\t\t\t\tSystem.out.println(\"Do you want to set the value to 1\"\n//\t\t\t\t\t\t\t\t+ \" or 11?\");\n//\t\t\t\t\t\tint ans = scan.nextInt();\n//\t\t\t\t\t\thand.addCard(new Card(ans, \"A\", c.getCardSuit()));\n//\t\t\t\t\t\thand.remove(c);\n//\t\t\t\t\t\treturn;\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t}\n\t\t}\n\t}", "public boolean validMove(int playerID, Card selectedCard){\n // turn == playerID\n if(gameStage == 3){\n if(numPlays == 0){\n if(playerID == 0){\n player1Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player1Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player2Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player3Play.getSuit();\n }\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n // card goes to middle\n //checks suit of the jack if played first and sets first played suit to the correct suit\n //according to which suit is trump\n if(selectedCard.getValue() == Card.NUMBER.JACK){\n if(currentTrumpSuit == Card.SUIT.DIAMONDS && selectedCard.getSuit() == Card.SUIT.HEARTS){\n firstPlayedSuit = Card.SUIT.DIAMONDS;\n }\n if(currentTrumpSuit == Card.SUIT.HEARTS && selectedCard.getSuit() == Card.SUIT.DIAMONDS){\n firstPlayedSuit = Card.SUIT.HEARTS;\n }\n if(currentTrumpSuit == Card.SUIT.CLUBS && selectedCard.getSuit() == Card.SUIT.SPADES){\n firstPlayedSuit = Card.SUIT.CLUBS;\n }\n if(currentTrumpSuit == Card.SUIT.SPADES && selectedCard.getSuit() == Card.SUIT.CLUBS){\n firstPlayedSuit = Card.SUIT.SPADES;\n }\n }\n else{\n firstPlayedSuit = player4Play.getSuit();\n }\n numPlays++;\n turn = 0;\n return true;\n }\n }\n else if(numPlays < 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n turn++;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n turn = 0;\n return true;\n }\n }\n // if three cards have been played this is the last card\n else if(numPlays == 3){\n if(playerID == 0){\n player1Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 1){\n player2Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 2){\n player3Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n else if(playerID == 3){\n player4Play = selectedCard;\n numPlays++;\n firstPlayedSuit = null;\n return true;\n }\n }\n }\n return false;\n }", "public String getSuit()\r\n { return suit; }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "private void suitRule(Player p){\n if(((p.getPlayCard().getSuit() == trump.getSuit()) && (winner.getPlayCard().getSuit() == trump.getSuit()) )|| (winner.getPlayCard().getSuit() == p.getPlayCard().getSuit())){\n numberRule(p);\n }\nif(p.getPlayCard().getSuit() == trump.getSuit() && winner.getPlayCard().getSuit() != p.getPlayCard().getSuit()){\n setWinner(p);\n }\n\n }", "public String getSuit() {\r\n return suit;\r\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card(String cardFace, String cardSuit) {\r\n this.face = cardFace; // initialize face of card\r\n this.suit = cardSuit; // initialize suit of card\r\n }", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit()\r\n {\r\n return suit;\r\n }", "public String toString() {\n if (this.errorFlag == true)\n return \"[INVALID CARD]\";\n else\n return this.value + \" of \" + suit.toString();\n }", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public String getSuit() {\n return suit;\n }", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "void setCard(Card card) {\n this.card = card;\n }", "public String getSuit() {\n return this.suit;\n }", "public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}", "public boolean checksuits(Card cardsuits){\n Boolean flag;\n if(cardsuits.suits == this.suits){ flag = true; }\n else{flag = false;}\n return flag;}", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public void SetcharacteristicTest()\r\n\t{\r\n\t\tCharacteristic chara = new Characteristic(\"skill\", 20);\r\n\t\tchara.Setcharacteristic(\"attaque\", 10);\r\n\t\tassertNotSame(chara.getcharacteristicValue(), 20);\r\n\t\tassertNotSame(chara.getcharacteristicName(), \"skill\");\r\n\t\tCharacteristic cha = new Characteristic(\"skill\", 20);\r\n\t\tcha.Setcharacteristic(\"attaque\", 10);\r\n\t\tassertNotSame(cha.getcharacteristicValue(), \"attaque\");\r\n\t\tassertNotSame(cha.getcharacteristicName(), 10);\r\n\t\tCharacteristic charac = new Characteristic(\"skill\", 20);\r\n\t\tcharac.Setcharacteristic(\"attaque\", 10);\r\n\t\tassertSame(charac.getcharacteristicValue(), 10);\r\n\t\tassertSame(charac.getcharacteristicName(), \"attaque\");\r\n\t\t\r\n\t}", "public Card(int tempNum, int tempSuit)\n {\n num = tempNum;\n suit = tempSuit;\n }", "public Card(Suit suit, int number) {\n\t\tthis.suit = suit;\n\t\tthis.number = number;\n\t\tswitch(number) {\n\t\t\t//place in CardType\n\t\t\tcase 1:\n\t\t\t\ttype = \"Ace\";\n\t\t\t\tsetNumber(14);\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\tmagic = Magic.startAgain;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tmagic = Magic.seeThrough;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmagic = Magic.missAGo;\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\tmagic = Magic.playBelow;\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tmagic = Magic.burn;\n\t\t\tcase 11:\n\t\t\t\ttype = \"Jack\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttype = \"Queen\";\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttype = \"King\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(number > 1 && number < 11) {\n\t\t\ttype = Integer.toString(number);\n\t\t}\n\t}", "public Card(int suitInt, int valueA)\r\n {\r\n \r\n if( suitInt == 1)\r\n suit = \"SPADE\";\r\n if(suitInt == 2)\r\n suit = \"CLUB\";\r\n if(suitInt == 3)\r\n suit = \"HEART\";\r\n if(suitInt == 4)\r\n suit = \"DIAMOND\";\r\n \r\n card = CARDS[valueA-1];\r\n try{\r\n image = ImageIO.read(new File(card+\"_\"+suit+\".jpg\"));\r\n }\r\n catch(Exception e){}\r\n \r\n if(valueA >= 11)\r\n value = 10;\r\n else\r\n value = valueA;\r\n if(valueA == 1)\r\n value = 11;\r\n }", "public int getSuit(){\n\t\treturn suit; \n\t}", "public String getSuit() {\r\n return suitStr;\r\n }", "public Card() {\n this.set('A', Suit.spades);\n }", "public String getSuit()\n\t{\n\t\treturn suit;\n\t}", "public boolean VerifyHumanChoice(int value){\n String card = handHuman.get(value);\n System.out.print(\"CARD IN VERIFY HUMAN\" + card);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Can play any card ontop to determine suite\n topCard = card;\n return true;\n }\n\n if(card.contains(\"8\")){\n //valid because 8s are wild cards, human can place it\n topCard = card;\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if(firstLetter.equals(topFirstLetter)){\n topCard = card;\n return true;\n }\n\n else{\n if(topFirstLetter.equals(\"c\")){\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"h\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"d\")){\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"s\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n }\n\n //You can't play this card\n return false;\n }", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "public void errors_comm_SET(char src)\n { set_bytes((char)(src) & -1L, 2, data, 6); }", "public void setTrueValue(int newValue)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start setTrueValue Method ***************/\n\n\t// Set true value of card\n trueValue = newValue;\n\n }", "public String getSuit(){ return this.suit; }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) / 13 + 1;\n }", "public Suit getSuit() {\n\t\treturn suit;\n\t}", "boolean canSet(String key);", "public int getSuit() {\r\n return suit;\r\n }", "public void cards() {\n System.out.print(\"Enter a card: \");\n in.nextLine();\n String cardName = in.nextLine().toUpperCase();\n String cardSuit = cardName.substring(1);\n String cardRank = cardName.substring(0, 1);\n\n switch (cardRank) {\n case \"2\":\n cardRank = \"Two\";\n break;\n case \"3\":\n cardRank = \"Three\";\n break;\n case \"4\":\n cardRank = \"Four\";\n break;\n case \"5\":\n cardRank = \"Five\";\n break;\n case \"6\":\n cardRank = \"Six\";\n break;\n case \"7\":\n cardRank = \"Seven\";\n break;\n case \"8\":\n cardRank = \"Eight\";\n break;\n case \"9\":\n cardRank = \"Nine\";\n break;\n case \"T\":\n cardRank = \"Ten\";\n break;\n case \"J\":\n cardRank = \"Jack\";\n break;\n case \"Q\":\n cardRank = \"Queen\";\n break;\n case \"K\":\n cardRank = \"Kind\";\n break;\n case \"A\":\n cardRank = \"Ace\";\n break;\n default:\n cardRank = \"Invalid\";\n break;\n }\n\n switch (cardSuit) {\n case \"C\":\n cardSuit = \"Clubs\";\n break;\n case \"H\":\n cardSuit = \"Hearts\";\n break;\n case \"D\":\n cardSuit = \"Diamonds\";\n break;\n case \"S\":\n cardSuit = \"Spades\";\n break;\n default:\n cardSuit = \"Invalid\";\n break;\n }\n\n if (cardRank == \"Invalid\") {\n System.out.println(\"\\nThat's not a valid rank.\\n\");\n } else if (cardSuit == \"Invalid\" || cardName.length() != 2) {\n System.out.println(\"\\nThat's not a valid suit.\\n\");\n } else {\n System.out.println(\"\\n\" + cardRank + \" of \" + cardSuit + \".\");\n }\n }", "public Suits getSuit() {\n\t\treturn suit;\n\t}", "boolean haveJ(char suit){\n for (int i=0; i<6; i++)\n if ((hand.get(i).suit == suit) && (hand.get(i).rank == 11))\n return true;\n return false;\n }", "public Card(String inFaceValue, int inTrueValue, String inSuit, ImageIcon inPicture)\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value\n\tfaceValue = inFaceValue;\n\n\t// Set true value\n\ttrueValue = inTrueValue;\n\n\t// Set suit\n\tsuit = inSuit;\n\n\t// Set picture\n\tpicture = inPicture;\n\n }", "public char getSuit(){\n return Suits;\n }", "public Suit getSuit() {\n return suit;\n }", "public Card(String theSuite, int theValue){\r\n value = theValue;\r\n suite = theSuite;\r\n used = false;\r\n }", "public int getSuit() {\n\t\treturn suit;\n\t}", "public int getSuit() {\n return suit;\n }", "public int getSuit() {\n return suit;\n }", "private boolean testSexSecol() {\n switch (S) {\n case \"1\":\n // 1,2 1900-1999\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"2\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"3\":\n // 3,4 1800-1899\n secol = \"18\";\n Sex = \"M\";\n break;\n case \"4\":\n secol = \"18\";\n Sex = \"F\";\n break;\n case \"5\":\n // 5,6 2000-2099\n secol = \"20\";\n Sex = \"M\";\n break;\n case \"6\":\n secol = \"20\";\n Sex = \"F\";\n break;\n case \"7\":\n // 7,8 straini rezidenti 1900+\n secol = \"19\";\n Sex = \"M\";\n break;\n case \"8\":\n secol = \"19\";\n Sex = \"F\";\n break;\n case \"9\":\n // 9 straini 1900+\n secol = \"19\";\n break;\n default:\n // Sexul nu poate fi \"0\"\n return false;\n }\n return true;\n }", "public Card(int rank, int suit)\r\n throws InvalidRankException,\r\n InvalidSuitException {\r\n if (!isValidRank(rank)) {\r\n throw new InvalidRankException(rank);\r\n }\r\n\r\n if (!isValidSuit(suit)) {\r\n throw new InvalidSuitException(suit);\r\n }\r\n\r\n this.rank = rank;\r\n this.suit = suit;\r\n }", "public void setCardValue(String value) {\n this.Cvalue = value;\n }", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public boolean canAdd(Card c)\r\n {\r\n int val;\r\n int v;\r\n if(c.getSuit() != suit)\r\n return false;\r\n \r\n v = c.getValue();\r\n if(pile.isEmpty() && v == 12)\r\n return true;\r\n \r\n if(!pile.isEmpty())\r\n {\r\n card = pile.peek();\r\n val = card.getValue();\r\n if (val == 12)\r\n val = -1;\r\n if(v == (val+1))\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean characterInput(char c);", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "protected boolean sendSet(char[] key, byte[] msg, final int len, byte[] val) {\n return (Comm.getResult(pool, key, msg, len, val))[0] == 'S';\n }", "public int getSuit()\n {\n return suit;\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }" ]
[ "0.7162835", "0.6860577", "0.64396065", "0.6414689", "0.6374922", "0.63528794", "0.62139255", "0.6165588", "0.6156942", "0.61393034", "0.6121284", "0.6074872", "0.6030928", "0.5999517", "0.5886699", "0.57635945", "0.5734741", "0.5650587", "0.56468314", "0.5615969", "0.5557574", "0.5481252", "0.5448201", "0.5447175", "0.54428667", "0.5369582", "0.5338982", "0.531749", "0.53114736", "0.5279553", "0.5222809", "0.51979846", "0.5195786", "0.51916456", "0.5171787", "0.5155094", "0.5129582", "0.51053107", "0.5100583", "0.50814176", "0.5079755", "0.5078354", "0.5060458", "0.50580895", "0.5050004", "0.50442016", "0.50296396", "0.50283974", "0.49989697", "0.4988162", "0.4988162", "0.49723032", "0.49688238", "0.49680704", "0.49674198", "0.4961007", "0.49482733", "0.4943983", "0.49384096", "0.49379212", "0.49291292", "0.49237657", "0.49233624", "0.49176753", "0.49012342", "0.48974425", "0.48962897", "0.48877144", "0.4884883", "0.48821893", "0.4873123", "0.48702148", "0.48674753", "0.48648736", "0.48636922", "0.48520258", "0.4843382", "0.48376253", "0.48255053", "0.482434", "0.48164582", "0.48151428", "0.48101598", "0.48033753", "0.4802609", "0.4802179", "0.48007622", "0.4786223", "0.4786223", "0.4774986", "0.47652143", "0.47643313", "0.47620896", "0.47607815", "0.47568992", "0.4749555", "0.4744985", "0.47444353", "0.47236216", "0.47173232" ]
0.86791205
0
/ boolean isValid(char, Suit) In: A char representing the card's value and a Suit representing its suit. Out: True if the value is valid, false if otherwise. Description: This function determines whether the value passed to it is a valid value for a card. It checks the value against the valid values stored in Card.validCardValues.
private static boolean isValid(char value, Suit suit) { for (char validValue : Card.validCardValues) if (String.valueOf(validValue).toLowerCase().equals(String.valueOf(value).toLowerCase())) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean set(char value, Suit suit) {\n if (Card.isValid(value, suit)) {\n this.errorFlag = false;\n this.value = value;\n this.suit = suit;\n return true;\n } else {\n this.errorFlag = true;\n return false;\n }\n }", "private boolean isValidSuit(char suit) {\n return (suit != 'H' && suit != 'D' && suit != 'S' && suit != 'C');\n }", "public static boolean isValid(String _card){\r\n\t\t//communication with sumOfDoubleEvenPlace() and sumOfOddPlace()\r\n\t\tsumOfDoubleEvenPlace(_card);\r\n\t\tsumOfOddPlace(_card);\r\n\t\tgetCompany(_card);\r\n\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\r\n\t\t//condition for valid credit card.\r\n\t\tif((getCompany(_card) != _errorInvalid) && (getCompany(_card) != _errorLength)){\r\n\t\t\tif((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card) != 0)){\t//if user enters all zeroes\r\n\t\t\t\tif ((sumOfDoubleEvenPlace(_card) + sumOfOddPlace(_card)) % 10 == 0 ){\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\t\r\n\t}", "public boolean isCValueValid();", "public boolean validCardPlay(UnoCard card) {\r\n return card.getColor() == validColor || card.getValue() == validValue;\r\n }", "private boolean isValidSuit(int suit) {\r\n if (suit < 0 || suit > 3) {\r\n return false;\r\n }\r\n return true;\r\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public static boolean isValidCard(String card) {\n if (card == null || \"\".equals(card)) return false;\n if (card.length() == 10 || card.length() == 15) {\n return true;\n } else if (card.length() == 18) {\n return isValidChinaCard(card);\n }\n return false;\n\n }", "public Card(int value, int suit) {\n if (value <= 13 && value >= 1 && suit <= 4 && suit >= 1) {\n this.faceUp = false;\n this.value = value;\n this.suit = suit;\n if (suit == 1 || suit == 4) {\n this.color = CardColor.BLACK;\n } else {\n this.color = CardColor.RED;\n }\n } else {\n throw new IllegalArgumentException(\"Invalid Card\");\n }\n }", "public boolean isValidCard(String card) {\n\t\t// check if given card name is in deck\n\t\tfor(int i = 0; i < cards.size(); ++i) {\n\t\t\tif(cards.elementAt(i).getName().equals(card))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public boolean canAdd(Card c)\r\n {\r\n int val;\r\n int v;\r\n if(c.getSuit() != suit)\r\n return false;\r\n \r\n v = c.getValue();\r\n if(pile.isEmpty() && v == 12)\r\n return true;\r\n \r\n if(!pile.isEmpty())\r\n {\r\n card = pile.peek();\r\n val = card.getValue();\r\n if (val == 12)\r\n val = -1;\r\n if(v == (val+1))\r\n return true;\r\n }\r\n return false;\r\n }", "private boolean validateCard() {\n Card card = new Card(\n editTextCreditCardNumber.getText().toString(),\n selectedMonth,\n selectedYear,\n editTextCCV.getText().toString()\n );\n boolean validation = card.validateCard();\n if (validation) {\n return true;\n } else if (!card.validateNumber()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorNumber), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateExpiryDate()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorExpiryDate), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateCVC()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorCCV), Toast.LENGTH_SHORT).show();\n return false;\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardError), Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "protected final boolean isValidValueImpl(String value) {\n if (value.length() != 8) {\n return false;\n }\n\n // Convert all 3 components of the string to integers\n int y, m, d;\n try {\n y = Integer.parseInt(value.substring(0, 4));\n m = Integer.parseInt(value.substring(4, 6));\n d = Integer.parseInt(value.substring(6, 8));\n } catch (NumberFormatException nfe) {\n return false;\n }\n\n // Check that the values are in the correct range\n return (y >= 0) && (m >= 1) && (m <= 12) && (d >= 1) && (d <= 31);\n }", "boolean isValidValue(String value);", "public boolean isValid() {\n\t\tif (this.size() != 5) return false;\n\t\tif (!((this.getCard(0).getSuit() == this.getCard(1).getSuit()) && (this.getCard(1).getSuit() == this.getCard(2).getSuit()) && (this.getCard(2).getSuit() == this.getCard(3).getSuit()) && (this.getCard(3).getSuit() == this.getCard(4).getSuit()))) return false;\n\t\t\n\t\tint[] cardsInHand= {this.getCard(0).getRank(), this.getCard(1).getRank(), this.getCard(2).getRank(), this.getCard(3).getRank(), this.getCard(4).getRank()};\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif (cardsInHand[i]==0) cardsInHand[i]=13;\n\t\t\telse if (cardsInHand[i]==1) cardsInHand[i]=14;\n\t\t}\n\t\t\n\t\tArrays.sort(cardsInHand);\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tif(cardsInHand[i]!=cardsInHand[i+1]-1) return false;\n\t\t}\n\t\treturn true;\n\t}", "public Card(int value, int suit) {\n if (value < 2 || value > 14 || suit < 0 || suit > 3) {\n throw new IllegalArgumentException(\"invalid card\");\n }\n this.value = value;\n this.suit = suit;\n }", "public boolean EvaluaSucesor(char Valor, char Sucesor) {\n if (Valor == Sucesor) {\n return true;\n } else {\n return false;\n }\n }", "public void validateCreditNumber(FacesContext ctx, UIComponent component,\r\n\t\t\tObject value) throws ValidatorException {\n\t\tCreditCardType ccType = (CreditCardType)creditCardTypeInput.getValue();\r\n\t\tBoolean useCC = customer.getUseCreditCard();\r\n if (useCC != null && useCC && ccType != null) {\r\n\t\t\t// Check credit card number\r\n\t\t\tint length;\r\n\t\t\tif (ccType == CreditCardType.CARD_A) {\r\n\t\t\t\tlength = 4;\r\n\t\t\t} else {\r\n\t\t\t\tlength = 5;\r\n\t\t\t}\r\n String ccNumber = (String)value;\r\n\t\t\tif (ccNumber != null && !ccNumber.matches(\"\\\\d{\" + length + \"}\")) {\r\n FacesMessage msg = GuiUtil.getFacesMessage(\r\n ctx, FacesMessage.SEVERITY_ERROR, \"validateCreditCardNumber.NUMBER\", length);\r\n\t\t\t\tthrow new ValidatorException(msg);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "@Override\r\n\tpublic boolean isValid(String ccNumber) \r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tvalidate(ccNumber);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private boolean isValid(char c) {\n if (c == 'A' || c == 'T' || c == 'G' || c == 'C' || c == 'N'\n || c == 'a' || c == 't' || c == 'g' || c == 'c') {\n return true;\n }\n return false;\n }", "public boolean validateNumber() {\r\n\t\tif (creditCardNumber == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// Just to check that the given number is in numerical form\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tlong intForm;\r\n\t\ttry {\r\n\t\t\tintForm = Long.parseUnsignedLong(creditCardNumber);\r\n\t\t} catch (NumberFormatException nfe) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tswitch (creditCardName) {\r\n\t\tcase CreditCardData.VISA: {\r\n\r\n\t\t\treturn validateVisa();\r\n\t\t}\r\n\t\tcase CreditCardData.MASTERCARD: {\r\n\r\n\t\t\treturn validateMasterCard();\r\n\t\t}\r\n\t\tcase CreditCardData.AMERICAN_EXPRESS: {\r\n\r\n\t\t\treturn validateAmericanExpress();\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t}\r\n\t}", "public static boolean Character(char a)\n {\n boolean valid = false;\n int convert;\n \n //converts the character a to its equivalent decimal value\n convert = (int)a;\n \n // checks if the character is within range\n // a-z or A-Z\n if (((convert >= 65) && (convert <= 90))||((convert >= 97) && (convert <= 122)))\n {\n valid = true;\n }\n else\n {\n //displays the error to the user by calling the displayError method in UserInterface class\n UserInterface.displayError(\"You have not entered a character. Enter again: \");\n }\n return valid;\n }", "public boolean setSuit(char inSuit) {\r\n\t\tinSuit = Character.toUpperCase(inSuit);\r\n\t\tboolean status = false;\r\n\t\t\r\n\t\tswitch (inSuit) {\r\n\t\tcase 'S':\r\n\t\tcase 'H':\r\n\t\tcase 'C':\r\n\t\tcase 'D':\r\n\t\tcase 'T':\r\n\t\tcase '1':\r\n\t\tcase '2':\r\n\t\tcase '3':\r\n\t\t\tsuit = inSuit;\r\n\t\t\tstatus = true;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tsuit = DEFAULT_SUIT;\r\n\t\t\tstatus = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn status;\r\n\t}", "public abstract boolean isValidValue(String input);", "public boolean sameValue(Card card) {\r\n boolean isSameValue = false;\r\n if (card.getValue() == (value)) {\r\n isSameValue = true;\r\n }\r\n return isSameValue;\r\n }", "public boolean validateCard(int accountNum) {\n\t\tint index; //loop control variable\n\t\tboolean found; //flag indicating search results\n\t\t\n\t\t//element 0 is the starting point of the search\n\t\tindex = 0;\n\t\t\n\t\t//if the charge number is never found, this value will not be changed\n\t\tfound = false;\n\t\t\n\t\t//now we'll search the array\n\t\twhile(!found && index < chargeCard.length) {\n\t\t\tif(chargeCard[index] == accountNum) {\n\t\t\t\tfound = true;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn found;\n\t}", "private boolean isValidValue(String val) {\n for (int i = 2; i <= 10; i++) {\n if (val.equals(i + \"\")) {\n return true;\n }\n }\n return (val.equals(\"J\") || val.equals(\"Q\") || val.equals(\"K\") || val.equals(\"A\"));\n }", "private boolean isCardValid(Card data) {\n // Check card if it valid to save isValid == true\n boolean isValid = (StringUtils.isEmpty(data.getName()) == false &&\n StringUtils.isEmpty(data.getAddress()) == false &&\n StringUtils.isEmpty(data.getPosition()) == false &&\n StringUtils.isEmpty(data.getGender()) == false);\n\n return isValid;\n }", "public static boolean validateCreditCard (long creditCardNumber) {\n\t\n\t\t// Sum and credit card number variables\n\t\tint sumOfOdds = 0;\n\t\tint sumOfEvens = 0;\n\t\tint checkSum = 0;\n\t\tlong creditCardNumberForOdds = creditCardNumber;\n\t\tlong creditCardNumberForEvens = creditCardNumber;\n\n\t\t// for loop to get the sum of odd values in credit card number\n\t\tfor (int i = 0; i < 8; i++) {\n\n\t\t\t// Add the first digit from the right to sumOfOdds\n\t\t\tsumOfOdds += creditCardNumberForOdds % 10;\n\n\t\t\t// Divide by 100 to move the decimal place to get access to the next odd number location\n\t\t\tcreditCardNumberForOdds = creditCardNumberForOdds / 100;\n\t\n\t\t}\n\n\t\t// for loop to get the sum of 2 times the remainder of the values in the even locations \n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\n\t\t\t// Divide by 10 to get access the the initial even number location\n\t\t\tcreditCardNumberForEvens = creditCardNumberForEvens / 10;\n\n\t\t\t// Add 2 times the remainder of the value in the even location \n\t\t\tsumOfEvens += (2 * (creditCardNumberForEvens % 10)) % 9;\n\n\t\t\t// Move to the next location by dividing by 10\n\t\t\tcreditCardNumberForEvens = creditCardNumberForEvens / 10;\n\n\t\t}\n\n\t\t// Add the sumOfOdds and sumOfEvens\n\t\tcheckSum = sumOfOdds + sumOfEvens;\n\n\t\t// Validating if checkSum is a multiple of 10\n\t\tif (checkSum % 10 == 0) {\n\n\t\t\treturn true;\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "public boolean isValid(int row, int column, int value) {\n\t\tfor (int k = 0; k < 9; k++) { // Check row.\n\t\t\tif (value == player[k][column]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (int k = 0; k < 9; k++) { // Check column.\n\t\t\tif (value == player[row][k]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tint boxRowOffset = (row / 3) * 3; // Set offset to determine box.\n\t\tint boxColOffset = (column / 3) * 3;\n\t\tfor (int k = 0; k < 3; k++) { // Check box.\n\t\t\tfor (int m = 0; m < 3; m++) {\n\t\t\t\tif (value == player[boxRowOffset + k][boxColOffset + m]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true; // no violations, so it's legal\n\t}", "public boolean isValidMove(UnoCard playedCard) {\n\t\tUnoCard topCard = getTopCard();\n\n\t\tif (playedCard.getColor().equals(topCard.getColor())\n\t\t\t\t|| playedCard.getValue().equals(topCard.getValue())) {\n\t\t\treturn true;\n\t\t}\n\n\t\telse if (playedCard instanceof WildCard) {\n\t\t\treturn true;\n\t\t} else if (topCard instanceof WildCard) {\n\t\t\tColor color = ((WildCard) topCard).getWildColor();\n\t\t\tif (color.equals(playedCard.getColor()))\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isValid() {\n\t\t\n\t\tif(this.size()!=2)\n\t\t\treturn false;\n\t\telse {\n\t\t\tint rank1=this.getCard(0).getRank();\n\t\t\tint rank2=this.getCard(1).getRank();\n\t\t\t\n\t\t\tif(rank1==rank2)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}", "public boolean isValid() {\n\t\tif (isPlayer1() && currentPit < 7 && currentPit != 6) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true; // check appropriate side of board, excluding scoring\n\t\t}\n\t\t// pit\n\t\telse if (!isPlayer1() && currentPit >= 7 && currentPit != 13) {\n\t\t\tif (board[currentPit] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected boolean isValid(List<Card> deck) {\r\n //Assume true\r\n boolean isValid = true;\r\n\r\n if (deck == null) {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < deck.size(); i++) {\r\n for (int j = i + 1; j < deck.size(); j++) {\r\n for (int k = j + 1; k < deck.size(); k++) {\r\n if (deck.get(i).equals(deck.get(j)) && deck.get(i).equals(deck.get(k))) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n //if deck is valid, return true\r\n if (deck.size() != 104) {\r\n return false;\r\n }\r\n return isValid;\r\n }", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public boolean equals(Card c) {\n if (this.getValue() == c.getValue() && this.getSuit() == c.getSuit())\n return true;\n return false;\n }", "public boolean valueEquals(Card c) {\n return this.cardNum == c.cardNum;\n }", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "public boolean CheckIfCardPlayedIsValid(UNOCard aCard) {\n\t\t\n\t\tif (discardPile.size() == 0) {\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse if (discardPile.get(discardPile.size() - 1).getName() == aCard.getName()) { // If card has the same value as last card played it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tcurrentTurnColor = aCard.getColor();\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (currentTurnColor == aCard.getColor()) { // if card is the same color as last card played's color it is valid\n\t\t\tdiscardPile.add(aCard);\n\t\t\tif (aCard.getName() == \"Skip\" || aCard.getName() == \"Reverse\" || aCard.getName() == \"Draw Two\") { //if it is a special card it needs to have the action performed\n\t\t\t\tSpecialCardAction(aCard);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse if (aCard.getName() == \"Wild\" || aCard.getName() == \"Wild Draw Four\") { // if it is a wild or wild draw four card it is valid and performs its special action\n\t\t\tSpecialCardAction(aCard);\n\t\t\tdiscardPile.add(aCard);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean isValid(char input) {\n if (this.isLetter(input) || this.isDigit(input) || this.isOperator(input)\n || this.isIgnored(input)) {\n return true;\n } else return false;\n }", "public boolean isValid (String c)\n {\n\tif (c.equals (\"f\") || c.equals (\"F\") || c.equals (\"Fire\") || c.equals (\"FIRE\") || c.equals (\"fire\") || c.equals (\"Water\") || c.equals (\"water\") || c.equals (\"WATER\") || c.equals (\"W\") || c.equals (\"w\") || c.equals (\"GRASS\") || c.equals (\"grass\") || c.equals (\"Grass\") || c.equals (\"G\") || c.equals (\"g\"))\n\t return true;\n\telse\n\t return false;\n }", "@Override\n public boolean match(Card card) {\n if (card.getColor().equals(\"BLACK\"))\n return true;\n\n return (card.getColor().equals(this.getColor())\n || card.getValue().equals(this.getValue()));\n }", "public boolean equals(Card card){\n return (this.getCardValue() == card.getCardValue());\n }", "public boolean isValidMove(Card card)\n {\n return false;\n }", "public static boolean validateCard(String[] args) {\n return true;\n }", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean VerifyHumanChoice(int value){\n String card = handHuman.get(value);\n System.out.print(\"CARD IN VERIFY HUMAN\" + card);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if(topCard.contains(\"8\")){\n //Can play any card ontop to determine suite\n topCard = card;\n return true;\n }\n\n if(card.contains(\"8\")){\n //valid because 8s are wild cards, human can place it\n topCard = card;\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if(firstLetter.equals(topFirstLetter)){\n topCard = card;\n return true;\n }\n\n else{\n if(topFirstLetter.equals(\"c\")){\n String temp = topCard.substring(5, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"h\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"d\")){\n String temp = topCard.substring(8, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n\n else if(topFirstLetter.equals(\"s\")){\n String temp = topCard.substring(6, topCard.length());\n System.out.println(\"TEMP \" + temp);\n\n if(card.contains(temp)){\n topCard = card;\n return true;\n }\n\n }\n }\n\n //You can't play this card\n return false;\n }", "public static boolean isValid(int c) {\n return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) ||\n (0x10000 <= c && c <= 0x10FFFF);\n }", "public boolean validateValue(Object value) {\n return true;\n }", "@Override\r\n\tpublic boolean equals(Object card) {\r\n\t\tBlackjackCard c = (BlackjackCard)card;\r\n\t\treturn (this.suit == c.getSuit() && this.value == c.getValue());\r\n\t}", "private static boolean checkChar(char c) {\n\t\tif (Character.isDigit(c)) {\n\t\t\treturn true;\n\t\t} else if (Character.isLetter(c)) {\n\t\t\tif (Character.toUpperCase(c) >= 'A' && Character.toUpperCase(c) <= 'F') {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public Card(Suit suit, CardValue value) {\n this.suit = suit;\n this.cardValue = value;\n isFaceDown = true;\n }", "public boolean put(Card card) {\n if (this.isEmpty() && card.value() != 13) {\n return false;\n }\n if (!this.isEmpty()) {\n// System.out.println(\"chci polozit: \" + card + \" na \" + this.deck[this.top]);\n Card tmp = this.deck[this.top];\n// System.out.println(\"Rozdil karet je: \"+ tmp.compareValue(card) + \" Jsou si podobne?\" + tmp.similarColorTo(card));\n if (tmp.compareValue(card) != 1 || tmp.similarColorTo(card)) {\n// System.out.println(\"Nepolozeno - chyba\");\n return false;\n }\n }\n\n if (this.top+1 < this.size) {\n this.deck[++this.top] = card;\n return true;\n }\n else {\n return false;\n }\n }", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public boolean isValid() {\n\t\tif (this.size()!=5) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.sort();\n\t\tif (this.getCard(2).getRank()==this.getCard(0).getRank() && this.getCard(3).getRank()==this.getCard(4).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (this.getCard(2).getRank()==this.getCard(4).getRank() && this.getCard(1).getRank()==this.getCard(0).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public BlackjackCard(Suit suit, int value){\r\n\t\tthis.suit = suit;\r\n\t\tthis.value = value;\r\n\t}", "private boolean checkValue(){\n\t\tfor (int i = 0; i <binary.length();i++){\n\t\t\tif(Character.getNumericValue(binary.charAt(i))>'1' || binary.length()>32 || binary.length()\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t%4 != 0){\n\t\t\t\tSystem.out.println(\"Invalid Input\");\n\t\t\t\tpw.println(\"Invalid Input\");\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\t\n\t}", "private boolean isValid() {\n return Character.isLetter(c);\n }", "public boolean isValid(int value){\n\t\tif(value<1 || value>size*size)\n\t\t\treturn false;\n\t\tint x = (value-1)/size;\n\t\tint y = (value-1)%size;\n\t\tif(board[x][y] == '\\u0000')\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isValid() {\n\t\t\n\t\tif (this.size() == 2)\n\t\t\tif (this.getCard(0).getRank() == this.getCard(1).getRank())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "public boolean canPlace(Card o, String c)\r\n {\r\n if (this.color == c)\r\n return true;\r\n else if (this.value == o.value)\r\n return true;\r\n else if (this.color == \"none\") // Wild cards\r\n return true;\r\n return false;\r\n }", "boolean allowsValue (final String str, final ValidationContext vc)\n {\n try\n {\n getValue (str, vc);\n return true;\n }\n catch (final DatatypeException e)\n {\n return false;\n }\n }", "public boolean characterInput(char c);", "public boolean checkValid(int[] board, int value, int row, int col) {\n\t\t\n\t\t// check if valid for row\n\t\tfor (int j = 0; j < 9; j++) {\n\t\t\tif ((board[j + row*9]) == value) return false;\n\t\t}\n\n\t\t// check if valid for col\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tif ((board[col + i*9]) == value) return false;\n\t\t}\n\t\t\n\t\t// check if valid for block\n\t\tint startRow = (row/3) * 3;\n\t\tint startCol = (col/3) * 3;\n\n\t\tfor (int i = startRow; i < startRow + 3; i++) {\n\t\t\tfor (int j = startCol; j < startCol + 3; j++) {\n\t\t\t\tif ((board[j + i*9]) == value) return false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// all valid so return true\n\t\treturn true;\n\t}", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "private boolean validateAmericanExpress() {\n\t\tString creditCardNumber = getCreditCardNumber();\r\n\t\tif (creditCardNumber.length() != 15)\r\n\t\t\treturn false;\r\n\t\tint firstTwo = Integer.parseInt(creditCardNumber.substring(0, 2));\r\n\t\t// Checking the validity of the number\r\n\t\tif (!(34 <= firstTwo && firstTwo <= 37))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\r\n\t}", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public boolean playerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(playerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public boolean isValidForString(String str, char charCode, int position);", "public static boolean isValid(long num) {\r\n\t\tint sum = sumOfDoubleEvenPlace(num) + sumOfOddPlace(num);\r\n\t\tif (getSize(num) < 13 || getSize(num) > 16) {\t\t\t// duzina broja ne smije biti manja od 13 i veca od 16\r\n\t\t\talert(\"Your credit card number is not long enough!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (prefixMatched(num) == false) {\t\t\t\t\t// ako uslov ne zadovoljava, odnosno ako je false, ispisi poruku\r\n\t\t\talert(\"Your credit card does not start with suitable prefix!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (sum % 10 != 0) {\t\t\t\t\t\t// uslov sume parnih i neparnih brojeva koji mora biti djeljiv sa 10\r\n\t\t\talert(\"Your credit card is invalid!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "public void setCardValue(String value) {\n this.Cvalue = value;\n }", "protected boolean testCC(String cc) {\n\t\tswitch (cc) {\n\t\t\tcase \"O\":\n\t\t\t\treturn dataspace.fOverflow;\n\t\t\tcase \"NO\":\n\t\t\t\treturn !dataspace.fOverflow;\n\t\t\tcase \"C\":\n\t\t\tcase \"B\":\n\t\t\tcase \"NAE\":\n\t\t\t\treturn dataspace.fCarry;\n\t\t\tcase \"NC\":\n\t\t\tcase \"NB\":\n\t\t\tcase \"AE\":\n\t\t\t\treturn !dataspace.fCarry;\n\t\t\tcase \"E\":\n\t\t\tcase \"Z\":\n\t\t\t\treturn dataspace.fZero;\n\t\t\tcase \"NE\":\n\t\t\tcase \"NZ\":\n\t\t\t\treturn !dataspace.fZero;\n\t\t\tcase \"BE\":\n\t\t\tcase \"NA\":\n\t\t\t\treturn (dataspace.fCarry || dataspace.fZero);\n\t\t\tcase \"NBE\":\n\t\t\tcase \"A\":\n\t\t\t\treturn !(dataspace.fCarry || dataspace.fZero);\n\t\t\tcase \"S\":\n\t\t\t\treturn dataspace.fSign;\n\t\t\tcase \"NS\":\n\t\t\t\treturn !dataspace.fSign;\n\t\t\tcase \"P\":\n\t\t\tcase \"PE\":\n\t\t\t\treturn dataspace.fParity;\n\t\t\tcase \"NP\":\n\t\t\tcase \"PO\":\n\t\t\t\treturn !dataspace.fParity;\n\t\t\tcase \"L\":\n\t\t\tcase \"NGE\":\n\t\t\t\t// \"^\" = \"xor\" ( \"!=\" would work as well)\n\t\t\t\treturn (dataspace.fSign ^ dataspace.fOverflow);\n\t\t\tcase \"NL\":\n\t\t\tcase \"GE\":\n\t\t\t\treturn dataspace.fSign == dataspace.fOverflow;\n\t\t\tcase \"LE\":\n\t\t\tcase \"NG\":\n\t\t\t\treturn ((dataspace.fSign ^ dataspace.fOverflow) || dataspace.fZero);\n\t\t\tcase \"NLE\":\n\t\t\tcase \"G\":\n\t\t\t\treturn !((dataspace.fSign ^ dataspace.fOverflow) || dataspace.fZero);\n\t\t\tcase \"CXZ\":\n\t\t\t\treturn (dataspace.CX.getShortcut() == 0);\n\t\t\tcase \"ECXZ\":\n\t\t\t\treturn (dataspace.ECX.getShortcut() == 0);\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public static boolean validatenum(String str) {\n\t\tchar[] s=str.toCharArray();\n\t\tfor(int i=0;i<str.length();i++) {\n\t\t\tchar temp=s[i];\n\t\t\ts[i]=temp; \n\t\t}\n\t\tchar ch;\n\t\tboolean capital=false;\n\t\tboolean lower=false;\n\t\tboolean num=false;\n\t\tboolean spc=false;\n\t\tfor(int i=0; i<s.length; i++) {\n\t\t\tch=s[i];\n\t\t\tif(s.length>9) {\n\t\t\t\tif(Character.isDigit(ch)) {\n\t\t\t\t\tSystem.out.println(\"digit char: \"+ch);\n\t\t\t\t\tnum=true;\n\t\t\t\t}\n\t\t\t\telse if(Character.isUpperCase(ch)) {\n\t\t\t\t\tSystem.out.println(\"upper char: \"+ch);\n\t\t\t\t\tcapital=true;\n\t\t\t\t}\n\t\t\t\telse if(Character.isLowerCase(ch)) {\n\t\t\t\t\tSystem.out.println(\"lower char: \"+ch);\n\t\t\t\t\tlower=true;\n\t\t\t\t}\n\t\t\t\telse if((int)ch==(int)'$'|| (int)ch==(int)'#') {\n\t\t\t\t\tSystem.out.println(\"special char: \"+ch);\n\t\t\t\t\tspc=true;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Extra :\"+ch);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t}\n\t\tif(num && spc && lower && capital) {\n\t\t\tSystem.out.println(\"String is valid :\" + \"num: \"+num+\" spc: \"+spc+\" lower: \"+lower+\" capital: \"+capital);\n\t\t\treturn true;\n\t\t}\n\t\t//System.out.println(\"String is valid :\" + \"num: \"+num+\" spc: \"+spc+\" lower: \"+lower+\" capital: \"+capital);\n\t\treturn false;\n\t}", "public boolean isValid(int number)", "private boolean validInput(Player player, int choice) {\n if (0 <= choice && choice < player.getCards().size()) {\n if(state.getWildDrawPenalty() != 1 && player.getCards().get(choice) instanceof WildDrawCard) {\n return true;\n }\n if( state.getWildDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof WildDrawCard)) {\n System.out.println(\"You should put WildDraw card.\");\n return false;\n }\n if( player.getCards().get(choice) instanceof WildDrawCard){\n boolean validWildDraw = true;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard)) {\n validWildDraw = false;\n }\n }\n if (validWildDraw) {\n return true;\n }\n else {\n System.out.println(\"You can't put WildDraw card.\");\n return false;\n }\n }\n if(state.getDrawPenalty() != 1 && player.getCards().get(choice) instanceof Draw2Card) {\n return true;\n }\n if (state.getDrawPenalty() != 1 && !(player.getCards().get(choice) instanceof Draw2Card)) {\n System.out.println(\"You should put Draw2 card.\");\n return false;\n }\n if ( player.getCards().get(choice).isValidCard(currentCard)) {\n return true;\n }\n System.out.println(\"Enter valid card.\");\n return false;\n }\n System.out.println(\"Enter a number between 1-\" + player.getCards().size() );\n return false;\n }", "private void validateCharValueForCharType(CharacteristicType charType, String charValue) {\n\t\tif (charType.getCharacteristicType().isPredefinedValue()) {\n\t\t\t\n\t\t\tCharacteristicValue_Id charValId = new CharacteristicValue_Id(charType, charValue);\n\t\t\tif (isNull(charValId.getEntity())) {\n\n\t\t\t\taddError(MessageRepository.charValueIsInvalidForCharType(charType.getId(), charValue));\n\t\t\t}\n\t\t}\n\t}", "public boolean validate() {\n if (value == null || currencyCode == null) {\n return false;\n }\n return true;\n }", "public Card(Suit suit, CardValue value,boolean isFaceDown) {\n this.suit = suit;\n this.cardValue = value;\n this.isFaceDown = isFaceDown;\n }", "public Card(int cType, char suit, int value){\n this.cardType = cType;\n this.cardRank = value;\n this.cardSuit = suit;\n scaleCard(this.cardType);\n if(cType == 1) {\n cardId = getId(suit, value);\n }\n this.isClick = false;\n this.inValidGroup = false;\n }", "private boolean containsValidCharacters(String inputString)\r\n {\r\n boolean validityFlag = true;\r\n int inputStringLength = inputString.trim().length();\r\n for (int i = 0 ; i < inputStringLength ; i++)\r\n {\r\n char digit = inputString.charAt(i);\r\n if (!((digit >= 'A' && digit <= 'Z') || (digit >= 'a' && digit <= 'z') || (digit >= '0' && digit <= '9')))\r\n {\r\n validityFlag = false;\r\n break;\r\n }\r\n }\r\n return validityFlag;\r\n }", "public boolean CheckForBlackjack(Player player) {\n\n if (CalcHandSum(player, player.getHand()) == 21 && player.hasAnAce(player.getHand())) {\n return true;\n }\n else{\n return false;\n }\n }", "public boolean isValid() {\r\n\t\tif (this.size() == 5) {\r\n\t\t\tthis.sort();\r\n\t\t\tif ((this.getCard(0).getRank() == this.getCard(1).getRank()) && (this.getCard(0).getRank() == this.getCard(2).getRank()) && (this.getCard(0).getRank() == this.getCard(3).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if ((this.getCard(1).getRank() == this.getCard(2).getRank()) && (this.getCard(1).getRank() == this.getCard(3).getRank()) && (this.getCard(1).getRank() == this.getCard(4).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isValid(Grid tablero, Cell cell, int value) {\n for (int i = 0; i < 10; i++) { // check for repeated values in the row\n if (i != cell.col) {\n if (tablero.getCell(cell.row, i) == value) {\n return false;\n }\n }\n }\n\n for (int j = 0; j < 10; j++) { // check for repeated values in the column\n if (j != cell.row) {\n if (tablero.getCell(j, cell.col) == value) {\n return false;\n }\n }\n }\n\n\n return true;\n }", "@Override\n public boolean isValid(String value, ConstraintValidatorContext context) {\n if (value == null || value == \"\") {\n return this.optional ? true : false;\n }\n\n // custom password logic here with PCI compliance.\n /**\n * this might be null if the user does not want to update password (e.g.,\n * optional).\n *\n * password policy: - at least 8 chars - must include lower/upper case - no\n * space (leading/trailing/middle)\n * \n **/\n if (value.length() < 8) {\n return false;\n }\n\n if (value.equals(value.toLowerCase()) || value.equals(value.toUpperCase())) {\n return false;\n }\n\n if (value.contains(\" \")) {\n return false;\n }\n\n // if pass all of them,\n return true;\n }", "@Override\n public boolean equals(Object c)\n {\n boolean retVal = false;\n if( c instanceof Card) {\n Card temp = (Card) c;\n if ( temp.getValue().equals(this.value))\n retVal = true;\n }\n return retVal;\n }", "public boolean validate(int value) {\n return (Integer.toString(value).length() == 4) ? true : false;\n }", "boolean checkchars(String str,String validchars, boolean casesensitive) {\n\n // If not case sensitive then convert both value and valid\n // characters to upper case\n if (casesensitive) {\n str.toUpperCase();\n validchars.toUpperCase();\n }\n\n // Go through each character in value until either end or hit an invalid char\n int charposn=0;\n while ((charposn<str.length())&&(validchars.indexOf(str.charAt(charposn))!=-1)) {\n charposn++;\n }\n\n // Check if stop was due to end of input string or invalid char and set return code\n // accordingly\n if (charposn==str.length())\n return(true);\n else\n return(false);\n }", "@Test\r\n\tpublic void testCheckCharacter() throws ConfuserException {\r\n\t\t// Check to make sure unknowns work by checking against basic ASCII\r\n\t\tfor (char ndx = 0x021; ndx < 0x007E; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Unknown, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure Hiragana pass\r\n\t\tfor (char ndx = 0x3041; ndx < 0x3096; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Hiragana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the katakana pass\r\n\t\tfor (char ndx = 0x30A1; ndx < 0x30FC; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Katakana, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t\t// Check to make sure the kanji pass, note that we are checking the \r\n\t\t// full CJK range so this includes kanji that are not used in Japanese\r\n\t\tfor (char ndx = 0x4E00; ndx < 0x9FAF; ndx++) {\r\n\t\t\tassertEquals(Confuser.CharacterType.Kanji, Confuser.checkCharacter(String.valueOf(ndx)));\r\n\t\t}\r\n\t}", "public static boolean checkSequence(String cards){\r\n //split all the cards and store in card array\r\n String[] cardArray = cards.split(\",\");\r\n //convert card array into card object arrayList\r\n ArrayList<Card> cardList = new ArrayList<Card>();\r\n int numCards = cardArray.length;\r\n //if there is less than 3 cards eliminate deck\r\n if(numCards < 3) return false;\r\n //store suit and face value in card object\r\n for(int i=0;i<numCards;i++){\r\n Card c = new Card(cardArray[i].split(\"#\")[0].trim(),cardArray[i].split(\"#\")[1].trim());\r\n cardList.add(c);\r\n }\r\n int i=0;\r\n String cardSuit=\"\",nextCardSuit=\"\";\r\n int cardValue=-1,nextCardValue=-1,prevCardValue = -1;\r\n \r\n //loop till penultimate card\r\n for(i=0; i<numCards-1 ;i++){ \r\n \r\n cardValue = cardList.get(i).value;\r\n nextCardValue = cardList.get(i+1).value;\r\n cardSuit = cardList.get(i).suit;\r\n nextCardSuit = cardList.get(i+1).suit;\r\n \r\n //suit check\r\n if(!cardSuit.equals(nextCardSuit)) return false;\r\n \r\n //card check\r\n if(cardValue != nextCardValue-1){\r\n \r\n //exception only for queen followed by king followed by ace\r\n if(!(prevCardValue==11 && cardValue == 12 && nextCardValue ==0)){\r\n return false;\r\n }\r\n }\r\n //execption for king followed by ace followed by 2\r\n if(prevCardValue == 12 && cardValue == 0 && nextCardValue==1) return false;\r\n prevCardValue = cardValue;\r\n }\r\n \r\n return true;\r\n }" ]
[ "0.7382155", "0.6446689", "0.63586426", "0.61521864", "0.611632", "0.6106851", "0.60365224", "0.59559727", "0.5844722", "0.5755784", "0.57509726", "0.57420695", "0.5724269", "0.56948334", "0.56683546", "0.5637216", "0.56152344", "0.56008995", "0.55958503", "0.55825245", "0.5575197", "0.5566273", "0.5537901", "0.55321383", "0.552272", "0.5502298", "0.5454605", "0.54507065", "0.54443944", "0.5443213", "0.54292756", "0.5426953", "0.5422853", "0.5411995", "0.53956455", "0.538585", "0.5371611", "0.5361617", "0.5359246", "0.53511786", "0.5346523", "0.5345456", "0.5335969", "0.53202224", "0.53162897", "0.53072083", "0.530598", "0.5288764", "0.5288293", "0.5278608", "0.5274451", "0.52743936", "0.5263231", "0.52580404", "0.5248021", "0.52344346", "0.5232158", "0.52255565", "0.5219733", "0.521968", "0.52193147", "0.52165353", "0.5211407", "0.52075374", "0.5199202", "0.5197052", "0.51946026", "0.51875645", "0.5173341", "0.5127582", "0.5109905", "0.5105376", "0.51009065", "0.50985885", "0.5098237", "0.50967705", "0.5092841", "0.50834584", "0.5081707", "0.50815225", "0.5078521", "0.50738317", "0.5063403", "0.5060963", "0.5047414", "0.50366056", "0.5036261", "0.50356996", "0.50315374", "0.50284046", "0.5001809", "0.49946868", "0.49909186", "0.4985651", "0.49805075", "0.49767977", "0.4976742", "0.49655432", "0.49609992", "0.49607986" ]
0.80211437
0
/ char getValue() In: Nothing Out: A char holding the card's value. Description: This is an accessor for the card's value.
public char getValue() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char getValue()\n\t{\n\t\treturn value;\n\t}", "public char charValue() {\n return value;\n }", "public String getCardValue() {\n return Cvalue;\n }", "public char Get() {\n\t\treturn myChar;\n\t}", "private byte getValue() {\n\t\treturn value;\n\t}", "public byte getValue() {\n return value;\n }", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public int getCardValue()\n {\n return cardValue; \n }", "public int getValue() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id % 13 != 0)\n\t\t\treturn id % 13;\n\t\telse\n\t\t\treturn 13;\n\t}", "public void setCardValue(String value) {\n this.Cvalue = value;\n }", "public void generateCardValue() {\r\n\t\tswitch (cardNumber) {\r\n\t\tcase 1:\r\n\t\t\tcardValue = \"Ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardValue = \"Two\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tcardValue = \"Three\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardValue = \"Four\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardValue = \"Five\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardValue = \"Six\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardValue = \"Seven\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardValue = \"Eight\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardValue = \"Nine\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardValue = \"Ten\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardValue = \"Jack\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardValue = \"Queen\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardValue = \"King\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public String getValue()\n {\n return this.value;\n }", "public String getValue(){\n\t\treturn _value;\n\t}", "public String getValue()\r\n\t{\r\n\t\treturn value;\r\n\t}", "public char getChar();", "public String getValue () { return value; }", "public String getValue(){\n\t\treturn this.value;\n\t}", "public String getValue() {\n\n return this.value;\n\n }", "public byte value() {\n return value;\n }", "public String getValue()\n {\n return value;\n }", "public char getChar() {\n return this.s;\n }", "public String getValue() { return value; }", "public String getValue()\n {\n return mValue;\n }", "public String getValue( )\n {\n return _strValue;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n return this.value;\n }", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue() {\n\t\treturn this.value;\n\t}", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue()\n {\n return value;\n }", "public String getValue()\n {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\r\n\t\treturn value;\r\n\t}", "byte toStringValue() {\n return (byte) String.valueOf(value).charAt(0);\n }", "public String getValue() {\n\t\t\treturn this.val; // to be replaced by student code\n\t\t}", "public String getValue(){\n return this.value;\n }", "public String getValue() {\r\n return value;\r\n }", "public String getValue()\n {\n return value;\n }", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "public String getValue() {\n\t\treturn value;\n\t}", "String getValue() {\n return mValue;\n }", "public String getValue() {\n/* 99 */ return this.value;\n/* */ }", "public String getValue() {\n\t\treturn mValue;\n\t}", "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public String getValue()\n {\n return fValue;\n }", "public String getValue() {\r\n\t\t\treturn mValue;\r\n\t\t}", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getValue() {\n return value;\n }", "public String getCharacter() {\n return this.state.getCharacter();\n }", "public HiveChar getHiveChar() {\n return new HiveChar(value.toString(), -1);\n }", "public String getValue() {\n return value;\n }", "@Override\n public byte byteValue() {\n return value;\n }", "public void setValue(char value)\n\t{\n\t\tthis.value = value;\n\t}", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}", "public int getValue() \n {\n return value;\n }", "public int get_char() {\n return local_char;\n }", "public _char get_char() {\n return local_char;\n }", "public java.lang.String getValue() {\n return value;\n }", "public Object getValue() { return _value; }", "static int getValue(char c) {\n\t\tswitch(c) {\n\t\tcase 'A': return 0;\n\t\tcase 'C': return 1;\n\t\tcase 'G': return 2;\n\t\tcase 'T': return 3;\n\t\tdefault: return -1;\n\t\t}\n\t}", "public int getValue() \n {\n return value;\n }", "@Override\n\tpublic String getValue() {\n\t\treturn value;\n\t}", "public int getValue()\r\n {\r\n return value;\r\n }", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public int getValue() {\n return this.value;\n }", "public Object getValue() { return this.value; }", "String getValue()\n {\n return value.toString();\n }", "String getValue();", "String getValue();", "String getValue();", "String getValue();" ]
[ "0.858945", "0.81979924", "0.77326256", "0.74724793", "0.7369775", "0.7121566", "0.70561546", "0.70313334", "0.6973804", "0.678774", "0.67814106", "0.67499113", "0.6747899", "0.67290473", "0.67221135", "0.6698846", "0.6691585", "0.66451484", "0.663381", "0.6624049", "0.6614905", "0.66065454", "0.6603444", "0.6597383", "0.6592651", "0.6592651", "0.6592651", "0.6592651", "0.6592651", "0.6592651", "0.6592651", "0.6592103", "0.6592103", "0.6592103", "0.65701085", "0.65701085", "0.65701085", "0.65701085", "0.65701085", "0.6566012", "0.6566012", "0.65616155", "0.6553397", "0.65511173", "0.6544888", "0.6544305", "0.65404105", "0.6522001", "0.65092695", "0.65092695", "0.65092695", "0.65092695", "0.65092695", "0.64976805", "0.6489748", "0.64881575", "0.6487158", "0.64847183", "0.64824206", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.6482099", "0.64658415", "0.646421", "0.6444277", "0.6411956", "0.6386698", "0.6385581", "0.63757294", "0.63622046", "0.6353064", "0.63446695", "0.63300306", "0.6324842", "0.63217753", "0.632134", "0.6312488", "0.6308508", "0.63041073", "0.62972856", "0.6295854", "0.629353", "0.62918663", "0.62918663", "0.62918663", "0.62918663" ]
0.86300623
0
/ Suit getSuit() In: Nothing Out: The card's suit type. Description: This is an accessor for the card's suit.
public Suit getSuit() { return this.suit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Suit getSuit() {\n\t\treturn suit;\n\t}", "public Suit getSuit() {\r\n\t\treturn this.suit;\r\n\t}", "public Suit getSuit() {\n return suit;\n }", "public Suits getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public Suit getSuit() {\n return cardSuit;\n }", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}", "public final Suit getSuit() {\n\t\treturn this.suit;\n\t}", "public String getSuit()\n\t{\n\t\treturn suit;\n\t}", "public String getSuit() {\r\n return suit;\r\n }", "public String getSuit() {\n return this.suit;\n }", "public String getSuit() {\n return suit;\n }", "public int getSuit() {\n\t\treturn suit;\n\t}", "public Suit getSuit() {\n return this.suit;\n }", "public String getSuit()\r\n {\r\n return suit;\r\n }", "public String getSuit()\r\n { return suit; }", "public int getSuit() {\r\n return suit;\r\n }", "public int getSuit() {\n return suit;\n }", "public int getSuit() {\n return suit;\n }", "public int getSuit(){\n\t\treturn suit; \n\t}", "public int getSuit() {\n return this.suit;\n }", "public String getSuit() {\r\n return suitStr;\r\n }", "public int getSuit()\n {\n return suit;\n }", "public int getSuitInt() {\n return this.suit;\n }", "public int getSuit()\n {\n return suit;\n }", "public String getCardSuit() {\n return Csuit;\n }", "public String suit() {\r\n return suit;\r\n }", "public int getSuit(){\n return suit;\n }", "public String getSuit(){ return this.suit; }", "public void setSuit(String value) {\n suit = value;\n }", "public int getSuit() {\n\t\tif (!this.isCard()) {\n\t\t\tSystem.out.println(\"Error! \" + id + \" isn't a card!\");\n\t\t\treturn 0;\n\t\t} else if (id < 14)\n\t\t\treturn 1;\n\t\telse if (id >= 14 && id < 27)\n\t\t\treturn 2;\n\t\telse if (id >= 27 && id < 40)\n\t\t\treturn 3;\n\t\telse\n\t\t\treturn 4;\n\t}", "public short getSuit(){\n\t\treturn srtSuit;\r\n\t}", "private static int suitAsInt(Card card) {\n return card.getSuit().ordinal();\n }", "public void setSuit(Suit suit) {\n this.suit = suit;\n }", "public void setSuit(String suit)\r\n {\r\n this.suit = suit;\r\n }", "public char getSuit(){\n return Suits;\n }", "String getSuit(int suitNumber) {\n\t\tswitch(suitNumber) {\n\t\tcase 0:\n\t\t\treturn \"Clubs\";\n\t\tcase 1:\n\t\t\treturn \"Diamonds\";\n\t\tcase 2:\n\t\t\treturn \"Hearts\";\n\t\tcase 3:\n\t\t\treturn \"Spades\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String getSuitString()\n {\n switch (suit)\n {\n case SPADES: return \"SPADES\";\n case CLUBS: return \"CLUBS\";\n case DIAMONDS: return \"DIAMONDS\";\n case HEARTS: return \"HEARTS\";\n default: return \"Invalid\";\n }\n \n }", "public void setSuit(String suit) {\n\t\tthis.suit = suit;\n\t}", "public void setCardSuit(String suit) {\n this.Csuit = suit;\n }", "private String getSuitName() {\n String result;\n if (this.suit == 0) {\n result = \"Clubs\";\n } else if (this.suit == 1) {\n result = \"Diamonds\";\n } else if (this.suit == 2) {\n result = \"Hearts\";\n } else {\n result = \"Spades\";\n }\n return result;\n }", "public int suitNum() {\r\n return this.i;\r\n }", "public void setSuit(Suit suit) {\r\n\t\tthis.suit = suit;\r\n\t}", "public static Suit getSuit(int num) {\r\n switch (num) {\r\n case 1:\r\n return Suit.Clubs;\r\n case 2:\r\n return Suit.Diamonds;\r\n case 3:\r\n return Suit.Hearts;\r\n case 4:\r\n return Suit.Spades;\r\ndefault:\r\n throw new IllegalArgumentException(\"num must be 1-4\");\r\n }\r\n }", "public String getSuitAsString(){\n\t\tString str = \"\";\n\t\tif (suit == 0)\n\t\t\tstr = new String(\"Clubs\");\n\t\telse if (suit == 1)\n\t\t\tstr = new String(\"Diamonds\");\n\t\telse if (suit == 2)\n\t\t\tstr = new String(\"Hearts\");\n\t\telse if (suit == 3)\n\t\t\tstr = new String(\"Spades\");\n\t\treturn str;\n\t}", "public void setSuitOfCard(int suitOfCard) {\n this.suitOfCard = suitOfCard;\n }", "public int getSuit ()\n {\n return this.suits; \n }", "public String chooseSuit()\t{\n\t\tString choose = \"\";\n\t\tSystem.out.println(\"Choose a suit: h) hearts, d) diamonds, s) spades, c) clubs\");\n\t\tchoose = input.nextLine();\n\t\tswitch(choose.toLowerCase())\t{\n\t\tcase \"h\":\n\t\t\tchoose = \"Hearts\";\n\t\t\tbreak;\n\t\tcase \"d\":\n\t\t\tchoose = \"Diamonds\";\n\t\t\tbreak;\n\t\tcase \"s\":\n\t\t\tchoose = \"Spades\";\n\t\t\tbreak;\n\t\tcase \"c\":\n\t\t\tchoose = \"Clubs\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Try again!\");\n\t\t\tchooseSuit();\n\t\t\tbreak;\n\t\t}\n\t\treturn choose;\n\t}", "private int getSuit(int tile)\n\t{\n\t\tif(TilePattern.getSuit(tile)==TilePattern.BAMBOOS) return BAMBOO;\n\t\telse if(TilePattern.getSuit(tile)==TilePattern.CHARACTERS) return CHARACTERS;\n\t\telse if(TilePattern.getSuit(tile)==TilePattern.DOTS) return DOTS;\n\t\telse if(TilePattern.getSuit(tile)==TilePattern.HONOURS) return HONOURS;\n\t\telse if(TilePattern.getSuit(tile)==TilePattern.FLOWERS) return BONUS;\n\t\telse if(TilePattern.getSuit(tile)==TilePattern.SEASONS) return BONUS;\n\t\t// fail\n\t\treturn -1;\n\t}", "public static Suit randomSuit() {\n int pick = new Random().nextInt(Suit.values().length-1); // w/o Excuse\n return Suit.values()[pick];\n }", "public String getSuitAsString (int aSuit)\n {\n switch (aSuit)\n {\n case 1:return(\"Spades\");\n case 2:return(\"Diamonds\");\n case 3:return(\"Clubs\");\n case 4:return(\"Hearts\");\n default:return(\"Invalid Rank\");\n }\n }", "public char getSuit(){\n\t\treturn this.farge;\n\t}", "public boolean setSuit(char inSuit) {\r\n\t\tinSuit = Character.toUpperCase(inSuit);\r\n\t\tboolean status = false;\r\n\t\t\r\n\t\tswitch (inSuit) {\r\n\t\tcase 'S':\r\n\t\tcase 'H':\r\n\t\tcase 'C':\r\n\t\tcase 'D':\r\n\t\tcase 'T':\r\n\t\tcase '1':\r\n\t\tcase '2':\r\n\t\tcase '3':\r\n\t\t\tsuit = inSuit;\r\n\t\t\tstatus = true;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tsuit = DEFAULT_SUIT;\r\n\t\t\tstatus = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn status;\r\n\t}", "public void setSuit (int aSuit)\n {\n this.suits = aSuit;\n }", "public char[] getSuitArr() {\r\n return suitArr;\r\n }", "public Card(int type, int suit) {\n var allTypes = Type.values();\n var allSuits = Suit.values();\n this.type = allTypes[type];\n this.suit = allSuits[suit];\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn (\"Suit: \"+this.suit+\"\\nValue: \"+this.value);\r\n\t}", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public static int suit(int card){\n //check if card is out of bounds\n if(card < 1 || card > 52){\n return 0;\n }\n //subtract 1 from card to include multiples of 13\n //add 1 so that it matches up with the desired output\n return (card - 1) / 13 + 1;\n }", "public void setSuit(int suit) throws Exception{\n\t\tif (suit < 0 || suit > 3)\n\t\t\tthrow new Exception();\n\t\tthis.suit = suit;\n\t}", "public String toString()\n {\n return value + \" \" + suit;\n }", "boolean haveSuit(char suit){\n for (int i=0; i<6; i++)\n if (hand.get(i).suit != suit)\n return false;\n return true;\n }", "@Override\n\tpublic String toString() {\n\t\tString strSuit = suit.toString().substring(0, 1);\n\t\tstrSuit += suit.toString().toLowerCase()\n\t\t\t\t.substring(1, suit.toString().length());\n\n\t\treturn strSuit + value;\t\n\t}", "public FursuitType getFursuitType () {\n return fursuitType;\n }", "public String toString ()\n {\n return rank + \" of \" + suit;\n }", "public Suit getReferencedSuit() {\n return this.referencedSuit;\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public String getSuits() {\n return suits;\n }", "public interface PlayingCard {\n\n public Value getValue();\n public Suit getSuit();\n}", "public String toString() {\n return \"The \" + value + \" of \" + suit;\n }", "@Test\n public void cardHasSuit(){\n assertEquals(Suit.CLUBS, this.card.getSuit());\n // Suit.Clubs expected, referencing this.card instance from method getSuit in in Card class\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "private String symbol() {\n switch (this.suit) {\n case 1:\n return \"♣\";\n case 2:\n return \"♦\";\n case 3:\n return \"♥\";\n case 4:\n return \"♠\";\n default:\n throw new IllegalArgumentException(\"Invalid Suit\");\n }\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "public Card(char value, Suit suit) {\n this.set(value, suit);\n }", "public void determineHandType(){\n \r\n if(isStraightFlush()){\r\n handType = HandType.STRAIGHT_FLUSH;\r\n }\r\n else if(isFourOfAKind()){\r\n handType = HandType.FOUR_OF_A_KIND;\r\n }\r\n else if(isFullHouse()){\r\n handType = HandType.FULL_HOUSE;\r\n }\r\n else if(isFlush()){\r\n handType = HandType.FLUSH;\r\n }\r\n else if(isStraight()){\r\n handType = HandType.STRAIGHT;\r\n }\r\n else if(isThreeOfAKind()){\r\n handType = HandType.THREE_OF_A_KIND;\r\n }\r\n else if(isTwoPairs()){\r\n handType = HandType.TWO_PAIRS;\r\n }\r\n else if(isPair()){\r\n handType = HandType.PAIR;\r\n }\r\n else{\r\n //High Card: Hands which do not fit any higher category are ranked by\r\n //the value of their highest card. If the highest cards have the same\r\n //value, the hands are ranked by the next highest, and so on.\r\n handType = HandType.HIGH_CARD;\r\n handValue = cards.get(cards.size()-1).getValue();\r\n }\r\n }", "public java.lang.String getCardType() {\r\n return cardType;\r\n }", "public Integer getCardtype() {\n return cardtype;\n }", "public int getCardType() {\n\t\t\treturn cardType;\n\t\t}", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public String toString() \r\n\t{\r\n\t\treturn value + \" \" + rank + \" of \" + suit;\r\n\t}", "boolean hasSuit();", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "public Integer getIscard() {\n return iscard;\n }", "public Card(Suit suit, Value value){\n this.value = value;\n this.suit = suit;\n }", "public CardTypes getType() {\n\t\treturn type;\n\t}", "public Card(Suit suit, int number) {\n\t\tthis.suit = suit;\n\t\tthis.number = number;\n\t\tswitch(number) {\n\t\t\t//place in CardType\n\t\t\tcase 1:\n\t\t\t\ttype = \"Ace\";\n\t\t\t\tsetNumber(14);\n\t\t\t\tbreak;\n\t\t\tcase 2:\t\t\t\t\n\t\t\t\tmagic = Magic.startAgain;\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tmagic = Magic.seeThrough;\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tmagic = Magic.missAGo;\n\t\t\t\tbreak;\n\t\t\tcase 9: \n\t\t\t\tmagic = Magic.playBelow;\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tmagic = Magic.burn;\n\t\t\tcase 11:\n\t\t\t\ttype = \"Jack\";\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttype = \"Queen\";\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttype = \"King\";\n\t\t\t\tbreak;\n\t\t}\n\t\tif(number > 1 && number < 11) {\n\t\t\ttype = Integer.toString(number);\n\t\t}\n\t}", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "public String GetHumanCard(int value){\n return handHuman.get(value);\n }", "@Override\n public String toString() {\n CardValue cardValue = new CardValue(value).invoke();\n\n // Change the value to the actual name when printing out\n // the card.\n\n return cardValue.getValueName() + \" of \" + suit;\n }", "public String getCardType() {\n return cardType;\n }", "public UnoHand getHand() {\r\n return hand;\r\n }", "public SuitImitator(RankedCard model) {\n this(model.getSuit());\n }", "private boolean isValidSuit(int suit) {\r\n if (suit < 0 || suit > 3) {\r\n return false;\r\n }\r\n return true;\r\n }", "public int getHandValue() {\n\t\tint value = 0;\n\t\tint aces = 0;\n\t\tfor (Card card : cardHand) {\n\t\t\t// convert suits to 10\n\t\t\tif (card.getValue() > 10) {\n\t\t\t\tvalue += 10;\n\t\t\t} else if (card.getValue() == 1) {\n\t\t\t\taces++;\n\t\t\t} else {\n\t\t\t\tvalue += card.getValue();\n\t\t\t}\n\t\t}\n\t\tvalue += calculateAce(value, aces);\n\n\t\treturn value;\n\t}" ]
[ "0.8536454", "0.8474654", "0.84272766", "0.83966964", "0.8372117", "0.83508027", "0.8328799", "0.8328799", "0.8306775", "0.82920384", "0.8261609", "0.8237789", "0.822481", "0.8212079", "0.8183862", "0.81395745", "0.8139469", "0.80968326", "0.80612725", "0.8054439", "0.8054439", "0.8041596", "0.8034173", "0.79972214", "0.7960765", "0.79227746", "0.78655416", "0.7819002", "0.777536", "0.7544623", "0.7539716", "0.72357374", "0.7092687", "0.70859694", "0.70613384", "0.70188457", "0.70156527", "0.6996312", "0.69895244", "0.6987048", "0.6979891", "0.6932324", "0.6922916", "0.68853635", "0.6867047", "0.6757904", "0.66170275", "0.6401145", "0.6377721", "0.6365068", "0.63617563", "0.6320615", "0.6287675", "0.62722045", "0.6258395", "0.62572837", "0.61484975", "0.6145853", "0.6138446", "0.6094713", "0.5981246", "0.5927986", "0.5916435", "0.5893981", "0.58228236", "0.57937104", "0.57271147", "0.5684288", "0.5681921", "0.5648648", "0.5644037", "0.56256884", "0.5621335", "0.55993676", "0.5577133", "0.5576882", "0.55260855", "0.5521365", "0.55188537", "0.5511246", "0.5496791", "0.5484319", "0.54757035", "0.5454645", "0.5449005", "0.5442177", "0.54373276", "0.5436394", "0.5428791", "0.54229426", "0.5418308", "0.5413361", "0.53894466", "0.5386118", "0.53794473", "0.53654355", "0.5327645", "0.5310671", "0.5294383", "0.5289416" ]
0.83545864
5
/ String toString() In: Nothing Out: A String object containing the value and suit of the card, or [INVALID CARD] if the errorFlag is set to true. Description: This returns the card's value to the caller in String form.
public String toString() { if (this.errorFlag == true) return "[INVALID CARD]"; else return this.value + " of " + suit.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString() {\n CardValue cardValue = new CardValue(value).invoke();\n\n // Change the value to the actual name when printing out\n // the card.\n\n return cardValue.getValueName() + \" of \" + suit;\n }", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public String toString(){\r\n\t\t\r\n\t\tString result = \"\";\r\n\t\tfor (int i = 0; i < this.cardCount()-1; i++)\r\n\t\t\tresult += this.getCard(i).toString() + \", \";\r\n\t\t\r\n\t\treturn result + this.getCard(this.cardCount()-1).toString() + \" has Blackjack value \" + this.value();\r\n\t}", "public String toString()\n {\n return value + \" \" + suit;\n }", "@Override\n\tpublic String toString() {\n\t\tString strSuit = suit.toString().substring(0, 1);\n\t\tstrSuit += suit.toString().toLowerCase()\n\t\t\t\t.substring(1, suit.toString().length());\n\n\t\treturn strSuit + value;\t\n\t}", "public static String cardToString(int card){\n StringBuffer sb = new StringBuffer(\"\");\n //add the suit of the card\n //convert the suit number into letter\n //create an array of suits\n String[] suits = {\"S\", \"H\", \"C\", \"D\"};\n sb.append(suits[suit(card) - 1]);\n //add the face of the card\n //convert 1, 10, 11, 12, 13 face numbers into letters\n //create an array of special faces\n String[] faces = {\"X\", \"J\", \"Q\", \"K\"};\n if(face(card) == 1){\n sb.append(\"A\");\n } else if(face(card) >= 10){\n sb.append(faces[face(card) - 10]);\n } else {\n sb.append(face(card));\n }\n return sb.toString();\n }", "@Override\r\n public String toString(){\n StringBuilder displayCard = new StringBuilder();\r\n \r\n if(rank==11)\r\n {\r\n displayCard.append(\"Jack\");\r\n }\r\n else if(rank==12)\r\n {\r\n displayCard.append(\"Queen\");\r\n }\r\n else if(rank == 13)\r\n {\r\n displayCard.append(\"King\");\r\n }\r\n else if(rank==14)\r\n {\r\n displayCard.append(\"Ace\");\r\n }\r\n else\r\n {\r\n displayCard.append(rank);\r\n }\r\n displayCard.append(\" of \"); //setting the format of the output\r\n \r\n if(suit==0)\r\n {\r\n displayCard.append(\"Spades\");\r\n }\r\n else if(suit==1)\r\n {\r\n displayCard.append(\"Hearts\");\r\n }\r\n else if(suit==2)\r\n {\r\n displayCard.append(\"Clubs\");\r\n }\r\n else if(suit==3)\r\n {\r\n displayCard.append(\"Diamonds\");\r\n }\r\n //return the result of an entire cmombined string\r\n return displayCard.toString();\r\n }", "public String toString() {\n // return \"Card {suit: \"+getSuitString()+\", rank: \"+getRankString()+\"}\";\n return \"{\"+getSuitString()+\",\"+getRankString()+\"}\";\n }", "@Override\r\n public final String toString(){\n if(this.rank.equals(RANKS[0])){ \r\n\t\t\treturn \"no card\"; \r\n\t\t}\r\n\t\t\r\n int r = getRank();\r\n if( r >= 2 && r <= 14 ){\r\n return r + getSuit().substring(0,1);\r\n\t\t}\r\n return \"no card\";\r\n }", "public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }", "public String toString() \r\n\t{\r\n\t\treturn value + \" \" + rank + \" of \" + suit;\r\n\t}", "public String toString() {\n return \"The \" + value + \" of \" + suit;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn (\"Suit: \"+this.suit+\"\\nValue: \"+this.value);\r\n\t}", "public String getCardSuit() {\n return Csuit;\n }", "public String toString() {\r\n\t\t\r\n\t\tString cardSuit = \"\";\r\n\t\tString cardRank = \"\";\r\n\t\tString cardString = \"\";\r\n\t\t\r\n\t\t\r\n\t\tint cs = getSuit();\r\n\t\tint cr = getRank();\r\n\t\t\r\n\t\tswitch(cr) {\r\n\t\tcase 1:\r\n\t\t\tcardRank = \"ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2: \r\n\t\t\tcardRank =\"2\";\r\n\t\t\tbreak;\r\n\t\tcase 3: \r\n\t\t\tcardRank =\"3\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardRank =\"4\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardRank =\"5\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardRank =\"6\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardRank =\"7\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardRank =\"8\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardRank =\"9\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardRank =\"10\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardRank =\"jack\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardRank =\"queen\";\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardRank =\"king\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardRank = \"n/a\";\r\n\t\t\t\r\n\t\t}//switch rank\r\n\t\t\r\n\t\t//got a string representation of the rank\r\n\t\t//now get a string representation of the siut\r\n\t\t\r\n\t\tswitch(cs) {\r\n\t\tcase 0:\r\n\t\t\tcardSuit = \"hearts\";\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcardSuit = \"diamonds\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardSuit = \"clubs\";\r\n\t\t\tbreak; \r\n\t\tcase 3:\r\n\t\t\tcardSuit = \"spades\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardSuit = \"n/a\";\r\n\t\t\t\r\n\t\t}\r\n\t\tcardString = \"file:cards/\"+cardRank+\"_of_\"+cardSuit+\".png\";\r\n\t\t\r\n\t\treturn cardString;\r\n\t\t\r\n\t}", "public String getCardValue() {\n return Cvalue;\n }", "public String toString()\n {\n\t// Local constants\n\n\t// Local variables\n\tString outputString = \"\";\n\n\t/************** Start getCardPicture Method *****************/\n\n\t// Add face value to output string\n\toutputString += \"FaceValue: \" + faceValue + \" | \";\n\n\t// Add suit to output string\n\toutputString += \"Suit : \" + suit + \" | \";\n\n\t// Add trueValue to output string\n\toutputString += \" TrueValue :\" + trueValue;\n\n\t// Return output string\n return outputString;\n\n }", "public String toString()\r\n {\r\n StringBuilder sBuilder = new StringBuilder();\r\n sBuilder.append(\"Hand: \");\r\n sBuilder.append(\"\\n\");\r\n if (numCards == 0)\r\n {\r\n sBuilder.append(\"Out of Cards\");\r\n return sBuilder.toString();\r\n }\r\n for (int i = 0; i < numCards; i++)\r\n {\r\n if (myCards[i] != null)\r\n {\r\n if (i != numCards - 1)\r\n {\r\n if ((i + 1) % 10 == 0 && i != 0)\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\"\\n\");\r\n } else\r\n {\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\", \");\r\n }\r\n }\r\n\r\n } else\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n }\r\n }\r\n }\r\n return sBuilder.toString();\r\n }", "public String toString(){\n String r = \"\";\n String s = \"\";\n switch(rank){\n case 1: r = \"Ace\"; break;\n case 2: r = \"Two\"; break;\n case 3: r = \"Three\"; break;\n case 4: r = \"Four\"; break;\n case 5: r = \"Five\"; break;\n case 6: r = \"Six\"; break;\n case 7: r = \"Seven\"; break;\n case 8: r = \"Eight\"; break;\n case 9: r = \"Nine\"; break;\n case 10: r = \"Ten\"; break;\n case 11: r = \"Jack\"; break; \n case 12: r = \"Queen\"; break;\n case 13: r = \"King\"; break;\n }\n \n switch(suit) {\n case 1: s = \" of Clubs\"; break;\n case 2: s = \" of Diamonds\"; break;\n case 3: s = \" of Hearts\"; break;\n case 4: s = \" of Spades\"; break;\n }\n return r + s; //returns the name of the card\n }", "public String toString() {\n String info = values[value] + \" of \" + suits[suit];\n return info;\n }", "public String toString() {\n String temp = this.value + \"\";\n if (this.value == 11) {\n temp = \"Jack\";\n } else if (this.value == 12) {\n temp = \"Queen\";\n } else if (this.value == 13) {\n temp = \"King\";\n } else if (this.value == 14) {\n temp = \"Ace\";\n }\n return temp + \" of \" + getSuitName();\n }", "final public String toString() {\r\n\t\tswitch (face) {\r\n\t\tcase 10:\r\n\t\t\treturn \"X\" + Character.toString(suit);\r\n\t\tcase 11:\r\n\t\t\treturn \"J\" + Character.toString(suit);\r\n\t\tcase 12:\r\n\t\t\treturn \"Q\" + Character.toString(suit);\r\n\t\tcase 13:\r\n\t\t\treturn \"K\" + Character.toString(suit);\r\n\t\tdefault:\r\n\t\t\treturn face + Character.toString(suit);\t\t\t\t\r\n\t\t}\r\n\t}", "public String getSuit()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************** Start getSuit Method *****************/\n\n\t// Return suit of card\n return suit;\n\n }", "public String toString() {\n return \"The card has \" + this.balance + \" euros\";\n }", "public String toString() {\n String handString = \"( \";\n for (int i = 0; i < this.numCards; i++) {\n handString += this.myCards[i].toString();\n if (i != this.numCards - 1)\n handString += \", \";\n }\n handString += \" )\";\n return handString;\n }", "protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "public String getSuitString()\n {\n switch (suit)\n {\n case SPADES: return \"SPADES\";\n case CLUBS: return \"CLUBS\";\n case DIAMONDS: return \"DIAMONDS\";\n case HEARTS: return \"HEARTS\";\n default: return \"Invalid\";\n }\n \n }", "public String getSuitAsString(){\n\t\tString str = \"\";\n\t\tif (suit == 0)\n\t\t\tstr = new String(\"Clubs\");\n\t\telse if (suit == 1)\n\t\t\tstr = new String(\"Diamonds\");\n\t\telse if (suit == 2)\n\t\t\tstr = new String(\"Hearts\");\n\t\telse if (suit == 3)\n\t\t\tstr = new String(\"Spades\");\n\t\treturn str;\n\t}", "public void generateCardValue() {\r\n\t\tswitch (cardNumber) {\r\n\t\tcase 1:\r\n\t\t\tcardValue = \"Ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardValue = \"Two\";\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tcardValue = \"Three\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardValue = \"Four\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardValue = \"Five\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardValue = \"Six\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardValue = \"Seven\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardValue = \"Eight\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardValue = \"Nine\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardValue = \"Ten\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardValue = \"Jack\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardValue = \"Queen\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardValue = \"King\";\r\n\t\t\tcardNumber = 10;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public String getCardName()\n {\n String returnString = \"\";\n if(num == 14)\n {\n returnString+=(\"Ace\");\n }\n else if(num == 11)\n {\n returnString+=(\"Jack\");\n }\n else if(num == 12)\n {\n returnString+=(\"Queen\");\n }\n else if(num == 13)\n {\n returnString+=(\"King\");\n }\n else\n {\n returnString+=(num);\n }\n returnString+=(\" of \");\n if(suit == 1)\n {\n returnString+=(\"Spades\");\n }\n else if(suit == 2)\n {\n returnString+=(\"Hearts\");\n }\n else if(suit == 3)\n {\n returnString+=(\"Diamonds\");\n }\n else\n {\n returnString+=(\"Clubs\");\n }\n return returnString;\n }", "public String toString(){//method of return card number and balance\r\n return \"Card no:\" +number+\" has a balance of: \"+balance; \r\n }", "public String showCard(int card) {\n\t\tswitch (card) {\n\t\tcase 1:\n\t\t\treturn \"Ace\";\n\t\tcase 2:\n\t\t\treturn \"2\";\n\t\tcase 3:\n\t\t\treturn \"3\";\n\t\tcase 4:\n\t\t\treturn \"4\";\n\t\tcase 5:\n\t\t\treturn \"5\";\n\t\tcase 6:\n\t\t\treturn \"6\";\n\t\tcase 7:\n\t\t\treturn \"7\";\n\t\tcase 8:\n\t\t\treturn \"8\";\n\t\tcase 9:\n\t\t\treturn \"9\";\n\t\tcase 10:\n\t\t\treturn \"10\";\n\t\tcase 11:\n\t\t\treturn \"Jack\";\n\t\tcase 12:\n\t\t\treturn \"Queen\";\n\t\tcase 13:\n\t\t\treturn \"King\";\n\t\tdefault:\n\t\t\treturn \"??\";\n\t\t}\n\t}", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public void cardGen(){\n\t\tRandom rand = new Random();\n\t\tint randValue = rand.nextInt(13);\n\t\tcardString = value[randValue] + suit[rand.nextInt(4)];\n\t}", "public static String getCard(Card c)\n\t{\n\t\tString name=\"/cards/\";\n\n\t\t//Value of card\n\t\tint value =c.getValue();\n\t\tswitch(value)\n\t\t{\n\t\tcase 1:\n\t\t\tname+=\"A\";\n\t\t\tbreak;\n\t\tcase 11:\n\t\t\tname+=\"J\";\n\t\t\tbreak;\n\t\tcase 12:\n\t\t\tname+=\"Q\";\n\t\t\tbreak;\n\t\tcase 13:\n\t\t\tname+=\"K\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tname+=String.valueOf(value);\n\t\t}\n\n\t\t//suit of card\n\t\tint suit=c.getSuit();\n\t\tswitch(suit)\n\t\t{\n\t\tcase 0:\n\t\t\tname+=\"C\";\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tname+=\"D\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tname+=\"H\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tname+=\"S\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"invalid suit\");\n\t\t}\n\t\tname+=\".png\";\n\t\treturn name;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}", "public Card(String value, String suit) {\n this.value = value;\n this.suit = suit;\n }", "@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public String getSuit() {\r\n return suitStr;\r\n }", "public String toString(){\n return \"Hand: \" + cards; \n }", "@Override\n\tpublic String toString() {\n\t\tif(this.upOrDown == CardFace.FaceUp) {\n\t\t\treturn this.suit.toString() + \" \" + this.rank.toString();\n\t\t}\n\t\telse {\n\t\t\treturn \"Card Face Down\";\n\t\t}\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(rank.toString());\n sb.append(\" \");\n sb.append(suit.toString());\n\n return sb.toString();\n }", "public String printCard(int player) {\n\t\tif (player >= 4 || player < 0) {\n\t\t\treturn \"Error\";\n\t\t}\n\t\tif (show[player]) {\n\t\t\treturn suit + rank;\n\t\t}\n\t\treturn suit;\n\t}", "public String toString() {\n return faceName + \" of \" + suit;\n }", "public String toString() {\n\t\treturn String.format(\"%-6s %-8s\", pileNum, numOfCards) + card.toString();\n\t}", "public String getencodedCard() {\r\n \r\n String cardDesc=\"\";\r\n String partnerId=\"\";\r\n String cardId=\"\";\r\n \r\n if(session!=null) {\r\n if (session.getAttribute(\"Partner_Object_List\") != null) {\r\n partnerInfoList =\r\n (List<PartnerInfo>)session.getAttribute(\"Partner_Object_List\");\r\n if(getPartner()!=null && !getPartner().equals(\"\") && getCardPk() != null && !getCardPk().equals(\"\")){\r\n partnerId=getPartner();\r\n cardId=getCardPk().toString().trim();\r\n \r\n if (partnerInfoList != null) {\r\n for (int k = 0; k < partnerInfoList.size(); k++) {\r\n if (partnerId.equalsIgnoreCase(partnerInfoList.get(k).getPartnerValue().toString())) {\r\n for (int ac = 0;ac < partnerInfoList.get(k).getAccountList().size();ac++) {\r\n for (int cg = 0;cg < partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().size();cg++) {\r\n for (int cd = 0;cd < partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().size();cd++) {\r\n if(cardId.equalsIgnoreCase(partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getCardID())) {\r\n if(partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getDisplayCardNumber() != null)\r\n {\r\n cardDesc= partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getDisplayCardNumber().toString();\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return cardDesc;\r\n \r\n \r\n }", "public String toString() {\n String color = translateColor(card.getColor());\n StringBuilder build = new StringBuilder();\n build.append(color).append(\" \").append(color).append(card.getCardID()).append(color).append(\" \").append(Color.reset()).append(\"\\n\").append(color).append(\"╔════\").append(color).append(\"Level\").append(color).append(\"════╗\").append(Color.reset()).append(\"\\n\").append(color).append(\"║ \").append(color).append(card.getLevel()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\").append(color).append(\"╠════\").append(color).append(\"Cost\").append(color).append(\"═════╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getCost().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getCost().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"╠═\").append(color).append(\"Production\").append(color).append(\"══╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getConsumedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getConsumedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getRequiredResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getRequiredResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"║ \").append(color).append(\"--->>> \").append(color).append(\" ║ \").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getProducedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getProducedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getFaithPointsProduced() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getFaithPointsProduced()).append(\" \").append(\"+\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getProducedResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getProducedResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n\n\n build.append(color).append(\"╠═══\").append(color).append(\"VPoints\").append(color).append(\"═══╣\").append(Color.reset()).append(\"\\n\");\n if (card.getVictoryPoints() < 10) {\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n } else\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n build.append(color).append(\"╚════\").append(color).append(color).append(\"═════════╝\").append(Color.reset()).append(\"\\n\");\n build.append((color + \" \" + color + color + \" \" + Color.reset() + \"\\n\").repeat(5));\n return build.toString();\n }", "public String toString ()\n {\n return rank + \" of \" + suit;\n }", "public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }", "public java.lang.String getCardNo() {\r\n return localCardNo;\r\n }", "public String suit() {\r\n return suit;\r\n }", "public String toString() {\n\t\treturn SUIT_NAMES[suit]+RANK_NAMES[rank];\n\t}", "@Override\n public String toString() {\n StringBuilder stringBuilder = new StringBuilder(\"Hand contains:\\n\");\n for (Card c : cardList) {\n stringBuilder.append(c.getFace().toString());\n stringBuilder.append(\" of \");\n stringBuilder.append(c.getSuit().toString());\n stringBuilder.append(\"\\n\");\n }\n return stringBuilder.toString();\n }", "public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }", "public String getSuit()\r\n {\r\n return suit;\r\n }", "public String getSuit()\r\n { return suit; }", "public String toString() {\n String cardListOutput = \"\";\n for (Card aCard : this.cards) {\n cardListOutput += aCard.toString() + \"\\n\";\n }\n return cardListOutput;\n }", "public String toString(int format)\n {\n StringBuilder outString = new StringBuilder();\n\n //outString.ensureCapacity();\n\n outString.ensureCapacity(3*(cardAry.length+2));\n\n for (int i=0; i<cardAry.length; i++)\n {\n if (i%13 == 0 )\n outString.append(\"\\n\");\n\n //System.err.println(\"cardNum is \" + i);\n if( cardAry[i] != null) {\n\n if(i>0 && cardAry[i-1].hashCode() > cardAry[i].hashCode())\n outString.append(\"*\");\n\n outString.append(cardAry[i].toString(format));\n if (format == Card.VERBOSE)\n outString.append(\"\\n\");\n else if (format == Card.SHORT)\n outString.append(\", \");\n }\n\n else \n {\n outString.append(\" nul \");\n }\n }\n\n return new String( outString);\n }", "public String getCardRequired() {\n return cardRequired1;\n }", "public int getCardVal(){\n\t\tint aces = 0;\n\t\tif(cardString.charAt(0) == 'J' || cardString.charAt(0) == 'Q' || cardString.charAt(0) == 'K' || cardString.charAt(0) == 'T'){\n\t\t\tcardValue = 10;\n\t\t}\n\t\telse if(cardString.charAt(0) == 'A'){\n\t\t\tcardValue = 11;\n\t\t}\n\t\telse{\n\t\t\tcardValue = Character.getNumericValue(cardString.charAt(0));\n\t\t}\n\t\treturn cardValue;\n\t}", "public String getSuit()\r\n\t{\r\n\t\treturn suit;\r\n\t}", "public String get_card(int index){\r\n return String.valueOf(hand.get(index).get_value()) + hand.get(index).get_suit() + \".jpg\";\r\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public String getSuit() {\r\n return suit;\r\n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "public String getSuit() {\n return suit;\n }", "public String getSuit()\n\t{\n\t\treturn suit;\n\t}", "public int cardValue(Card card) //translate string into card's numerical value\r\n {\r\n if (card.face.equals(\"Deuce\"))\r\n return 2;\r\n if (card.face.equals(\"Three\"))\r\n return 3;\r\n if (card.face.equals(\"Four\"))\r\n return 4;\r\n if (card.face.equals(\"Five\"))\r\n return 5;\r\n if (card.face.equals(\"Six\"))\r\n return 6;\r\n if (card.face.equals(\"Seven\"))\r\n return 7;\r\n if (card.face.equals(\"Eight\"))\r\n return 8;\r\n if (card.face.equals(\"Nine\"))\r\n return 9;\r\n if (card.face.equals(\"Ten\"))\r\n return 10;\r\n if (card.face.equals(\"Jack\"))\r\n return 11;\r\n if (card.face.equals(\"Queen\"))\r\n return 12;\r\n if (card.face.equals(\"King\"))\r\n return 13;\r\n if (card.face.equals(\"Ace\"))\r\n return 14;\r\n return -2;\r\n }", "@Override\n public String toString() {\n return \"Card{\"\n + \"frontInfo='\" + frontInfo\n + '\\''\n + \", backInfo='\" + backInfo\n + '\\''\n + \", startTime=\" + startTime\n + \", ID=\" + cardID\n + '}';\n }", "public String toString() {\n\t\t\tStringBuilder str = new StringBuilder();\n\t\t\tstr.append(\"Hand ID: \" + getHandId() + \"<br>\");\n\t\t\tstr.append(\"Hand Wager: <font color = red>\" + moneyFormat.format(getHandWager()) + \"</font><br>\");\n\t\t\tstr.append(\"Dealer Total: <font color = red>\" + getDealerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Player Total: <font color = red>\" + getPlayerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Hand Outcome: <font color = red>\" + getHandOutcome().substring(0, (getHandOutcome().length() - 2)) + \"</font><br>\" );\n\t\t\tstr.append(\"Post-Hand Player Wallet: <font color = red>\" + moneyFormat.format(getPlayerWallet()) + \"</font><br><br>\");\n\t\t\t\t\n\t\t\treturn str.toString();\t\t\n\t\t}", "private String getCardStatusString(int cardStatus) {\n if (cardStatus == BluetoothReader.CARD_STATUS_ABSENT) {\n return \"Absent.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_PRESENT) {\n return \"Present.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_POWERED) {\n return \"Powered.\";\n } else if (cardStatus == BluetoothReader.CARD_STATUS_POWER_SAVING_MODE) {\n return \"Power saving mode.\";\n }\n return \"The card status is unknown.\";\n }", "public String toString(){\n String handString = \"\";\n int i = 1;\n sort();\n for(Card c: cards){\n handString += Integer.toString(i) + \": \" + c + \"\\n\";\n i++;\n }\n handString = handString.substring(0, handString.length() - 1);\n return handString;\n }", "public String toString() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n return firstName + lastName + \"\\n\" + cardNum + \"\\n\" + email + \"\\n\" + formatter.format(accCreditLimit);\n }", "public String getSuit() {\n return this.suit;\n }", "public java.lang.String getCardID() {\r\n return localCardID;\r\n }", "public String GetHumanCard(int value){\n return handHuman.get(value);\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public String getCreditCard()\n\t{\n\t\treturn m_creditCard;\n\t}", "@Override\n public String toString() {\n return rankArray[rank] + suitArray[suit];\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \" (Deck, \" + cards.size() + \" cards)\";\r\n\t}", "String getSuit(int suitNumber) {\n\t\tswitch(suitNumber) {\n\t\tcase 0:\n\t\t\treturn \"Clubs\";\n\t\tcase 1:\n\t\t\treturn \"Diamonds\";\n\t\tcase 2:\n\t\t\treturn \"Hearts\";\n\t\tcase 3:\n\t\t\treturn \"Spades\";\n\t\tdefault:\n\t\t\treturn \"\";\n\t\t}\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}", "public String getSuit() {\n\t\treturn suit;\n\t}", "public Card inspectCard(int k)\r\n {\r\n if (0 <= k && k < numCards && myCards[k] != null && \r\n myCards[k].getErrorFlag() == true)\r\n {\r\n return myCards[k];\r\n }\r\n return new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n }", "public static String cardIntToString(int k) {\n String temp = \"\";\n switch (k) {\n case 11:\n temp = \"Jack\";\n break;\n case 12:\n temp = \"Queen\";\n break;\n case 13:\n temp = \"King\";\n break;\n case 14:\n temp = \"Ace\";\n break;\n\n default:\n temp = String.valueOf(k);\n break;\n }\n return temp;\n }", "public String toString() {\n return crcValue.toString();\n }", "private String getSuitName() {\n String result;\n if (this.suit == 0) {\n result = \"Clubs\";\n } else if (this.suit == 1) {\n result = \"Diamonds\";\n } else if (this.suit == 2) {\n result = \"Hearts\";\n } else {\n result = \"Spades\";\n }\n return result;\n }", "public String toString() {\n return value;\r\n }", "public int getCardValue()\n {\n return cardValue; \n }", "@Override\n public final String toString() {\n return this.value;\n }", "@Override\n public String toString() {\n return \"Deck{\" + \"deck=\" + deck + '}';\n }", "public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }", "public String getSuit(){ return this.suit; }", "@Override\n\tpublic String toString() {\n\t\treturn rawValue;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn value + \"\";\r\n\t}", "public String getDealerHandString() {\n\t\tString s = \"Dealer's Hand:\\n\";\n\t\ts += this.hand.getHandString() + \"\\n\";\n\t\ts += this.hand.valueString();\n\t\treturn s;\n\t}", "public String getCardNo() {\n return cardNo;\n }", "public String toString()\n\t{\n\t\treturn Integer.toString(bitHolder.getValue());\n\t}" ]
[ "0.805353", "0.7934607", "0.76563036", "0.7561195", "0.7301019", "0.7280859", "0.7203827", "0.71757054", "0.71748734", "0.7111289", "0.70974815", "0.70685005", "0.7045587", "0.7038859", "0.7029459", "0.7023606", "0.6951121", "0.68677795", "0.6864208", "0.6852423", "0.68263215", "0.6791608", "0.6779978", "0.6727504", "0.6694111", "0.66385263", "0.66155875", "0.6603591", "0.65547764", "0.65502256", "0.6518338", "0.6464486", "0.63857746", "0.63730335", "0.63555115", "0.6349639", "0.63426805", "0.6332443", "0.6319509", "0.63160676", "0.63003796", "0.626814", "0.62642497", "0.6238304", "0.6223373", "0.6196374", "0.61867726", "0.61854655", "0.61784816", "0.6168268", "0.6164492", "0.6164492", "0.61347264", "0.61314964", "0.61303484", "0.61245644", "0.6122644", "0.61040556", "0.6073163", "0.60567987", "0.60511583", "0.6050191", "0.6049166", "0.60425156", "0.6041741", "0.6041406", "0.60314626", "0.6009638", "0.6008826", "0.5993216", "0.5987376", "0.5976912", "0.5969968", "0.5948579", "0.59412", "0.59324676", "0.5923324", "0.59233147", "0.59171855", "0.5915565", "0.5909342", "0.5901125", "0.58974314", "0.5896191", "0.5896191", "0.58828485", "0.58806705", "0.58801305", "0.587919", "0.5878403", "0.58643293", "0.5863702", "0.5855912", "0.5854964", "0.5854357", "0.58529234", "0.585156", "0.58501595", "0.5849887", "0.58463913" ]
0.9040196
0
/ In: A card object Out: A boolean value. True if the cards are equal, false if otherwise.
public boolean equals(Card c) { if (this.getValue() == c.getValue() && this.getSuit() == c.getSuit()) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean equals(Card card){\n return (this.getCardValue() == card.getCardValue());\n }", "boolean similarCard(Card c);", "public static boolean sameCard(Card card1, Card card2){\r\n return (card1.rank == card2.rank && card1.suit == card2.suit);\r\n }", "@Override\n\tpublic boolean equals(Card anotherCard){\n\t\t\n\t}", "public boolean valueEquals(Card c) {\n return this.cardNum == c.cardNum;\n }", "@Override\r\n\tpublic boolean equals(Object card) {\r\n\t\tBlackjackCard c = (BlackjackCard)card;\r\n\t\treturn (this.suit == c.getSuit() && this.value == c.getValue());\r\n\t}", "public boolean equals(Card other) {\n return this.compareTo(other) == 0;\n }", "public boolean equals(Card OtherCard){\n\t\treturn (this.equals(OtherCard));\n\t}", "public boolean equals(Card c)\n {\n if (rank == c.rank)\n return true;\n else\n return false;\n }", "public boolean isEqual(Card card) {\n\t\treturn imageLink.equals(card.getURL());\n\t}", "public boolean sameValue(Card card) {\r\n boolean isSameValue = false;\r\n if (card.getValue() == (value)) {\r\n isSameValue = true;\r\n }\r\n return isSameValue;\r\n }", "@Override\n public boolean equals(Object otherObject) {\n if (this == otherObject) return true;\n if (!(otherObject instanceof Card)) return false;\n Card card = (Card) otherObject;\n return suit == card.suit &&\n rank == card.rank;\n }", "public boolean matches(Card otherCard) {\r\n if (suit==otherCard.suit() && pointValue == otherCard.pointValue() && rank == otherCard.rank())\r\n return true;\r\n else\r\n return false;\r\n }", "@Override\n public boolean match(Card card) {\n if (card.getColor().equals(\"BLACK\"))\n return true;\n\n return (card.getColor().equals(this.getColor())\n || card.getValue().equals(this.getValue()));\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n if (!(other instanceof Card)) {\n return false;\n }\n\n Card otherCard = (Card) other;\n return otherCard.getFrontFace().equals(getFrontFace())\n && otherCard.getBackFace().equals(getBackFace());\n }", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public boolean sameColor(Card card) {\r\n boolean isSameColor = false;\r\n if (card.getColor().equals(color)) {\r\n isSameColor = true;\r\n }\r\n return isSameColor;\r\n }", "public boolean equals(Object object) {\n\n if (object == null || object.getClass() != this.getClass()) {\n return false;\n }\n\n Card other;\n other = (Card) object;\n\n return getRank() == other.getRank() && getSuit() == other.getSuit();\n }", "private boolean inSameSuit() {\n for (int i = 0; i < cards.length-2; i++) {\n if (cards[i].charAt(1) != cards[i + 1].charAt(1)) {\n return false;\n }\n }\n \n return true;\n }", "public boolean isEqual(MatchingCardsTile other){\n return this.getNumber() == other.getNumber();\n }", "@Override\n public boolean equals(Object c)\n {\n boolean retVal = false;\n if( c instanceof Card) {\n Card temp = (Card) c;\n if ( temp.getValue().equals(this.value))\n retVal = true;\n }\n return retVal;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Card)) {\n return false;\n }\n Card other = (Card) object;\n if ((this.cardPK == null && other.cardPK != null) || (this.cardPK != null && !this.cardPK.equals(other.cardPK))) {\n return false;\n }\n return true;\n }", "public boolean orderedEquals( Deck otherDeck ) {\n if (this.cards.length == otherDeck.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(otherDeck.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "@Test\n\tpublic void testDeckEquals() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tStandardDeckClass testDeck = new StandardDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", true, isSame);\n\t\t\n\t}", "public boolean rankIsEqualsTo(Card c) {\r\n\t\t//this method compares two card objects and if one is equal to the other then it return the value as true\r\n\t\tboolean rankIsEqualsTo = false;\r\n\t\t\r\n\t\tif(rank == c.getRank()) {\r\n\t\t\trankIsEqualsTo = true;\r\n\t\t}//if\r\n\t\treturn rankIsEqualsTo;\r\n\t\t\r\n\t}", "public boolean put(Card card) {\n if (this.isEmpty() && card.value() != 13) {\n return false;\n }\n if (!this.isEmpty()) {\n// System.out.println(\"chci polozit: \" + card + \" na \" + this.deck[this.top]);\n Card tmp = this.deck[this.top];\n// System.out.println(\"Rozdil karet je: \"+ tmp.compareValue(card) + \" Jsou si podobne?\" + tmp.similarColorTo(card));\n if (tmp.compareValue(card) != 1 || tmp.similarColorTo(card)) {\n// System.out.println(\"Nepolozeno - chyba\");\n return false;\n }\n }\n\n if (this.top+1 < this.size) {\n this.deck[++this.top] = card;\n return true;\n }\n else {\n return false;\n }\n }", "@Override\n public boolean equals(Object other) {\n if (null == other) {\n return false;\n }\n if (this == other) {\n return true;\n }\n if (!(other instanceof Card)) {\n return false;\n }\n Card that = (Card) other;\n return this.getName().equals(that.getName());\n }", "boolean similarColorTo(Card c);", "protected final boolean isSameSuit(Card cardOne, Card cardTwo)\n {\n return cardOne.getSuit().equals(cardTwo.getSuit());\n }", "public boolean hasPair(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < cards.size() - 1; i++) {\r\n\t\t\tfor(int j = i+1; j < cards.size(); j++) {\r\n\t\t\t\tif(cards.get(i).getValue() == cards.get(j).getValue()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (this == object) {\n return true;\n }\n if (object == null || getClass() != object.getClass()) {\n return false;\n }\n CardBalance that = (CardBalance) object;\n return Objects.equals(dollar, that.dollar)\n && Objects.equals(cent, that.cent);\n }", "@Test\n public void testCardCanPlay_TRUE_VALUE() {\n System.out.println(\"cardCanPlay TRUE VALUE\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }", "public boolean hasFlush(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < 4 ; i++) {\r\n\t\t\tif(cards.get(i).getSuit() != cards.get(i+1).getSuit()) {\r\n\t\t\t\treturn false; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true; \r\n\t}", "public static boolean hasPair(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 0; i < cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=1){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean containCreditCard(ArrayList<CreditCard> card){\n\t\tfor (CreditCard creditCard : creditCards){\n\t\t\tfor (CreditCard creditCard1 : card){\n\t\t\t\tif(creditCard.equals(creditCard1))return true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "@Test\n public void testCardCanPlay_TRUE() {\n System.out.println(\"cardCanPlay TRUE COLOUR\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }", "public boolean isFlush() {\n Set<Suit> vari = new TreeSet<Suit>();\n for (Card c : cards) {\n \tvari.add(c.getSuit());\n }\n return(vari.size() == 1);\n }", "private void checkCardMatch(Card card1, Card card2) {\n if(card1.getColor().getColor() == card2.getColor().getColor()){\n card1.setCardState(CardState.MATCHED);\n card2.setCardState(CardState.MATCHED);\n\n playerManager.incrementScore();\n } else{\n card1.flipCard();\n card2.flipCard();\n }\n cardsClicked = new Card[2];\n switchPlayer();\n setRandomColors();\n checkGameOver();\n }", "public boolean isFlush(){\n \r\n if(haveSameSuit(cards)){\r\n handValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean contains(Card c);", "@Override\n public boolean equals( Object obj ) {\n if (this == obj) {\n return true;\n }\n\n if (obj == null) {\n return false;\n }\n\n if (getClass() != obj.getClass()) {\n return false;\n }\n\n Deck other = (Deck)obj;\n // Due to the possibility of duplicates, deck comparison is a notch trickier.\n // Our approach is to count the cards in each deck then ensure that the cards\n // and counts are the same.\n return tally().equals(other.tally());\n }", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public static boolean hasPair(Card[] cards) {\n\t\tint startInt= 1;\n\t\tfor(int check1 = 0; check1 < cards.length-1; check1++)\n\t\t{\n\t\t\tfor(int check2 = startInt; check2 < cards.length; check2++)\n\t\t\t{\n\t\t\t\tif (cards[check1].getValue() == cards[check2].getValue())\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstartInt++;\n\t\t}\n\t\treturn false;\n\t\t//throw new RuntimeException(\"Not yet implemented.\");\n\t}", "public static boolean hasTwoPair(Card[] cards) {\n\t\tint counter = 0;\n\t\tint value = 0;\n\t\tfor(int i = 0; i< cards.length; i++){\n\t\t\tfor(int j = i+1; j< cards.length; j++){\n\t\t\t\tif(cards[i].getValue() == cards[j].getValue() \n\t\t\t\t\t\t&& value !=cards[j].getValue()){\n\t\t\t\t\tcounter++;\n\t\t\t\t\tvalue = cards[j].getValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(counter>=2){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean isPair(){\n \r\n List<PokerCard> pair;\r\n remainingCardValues = new ArrayList<>();\r\n \r\n //First possibility: first two cards\r\n pair = cards.subList(0, 2);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(2).getValue()); \r\n \r\n return true;\r\n }\r\n \r\n //Second possibility: cards 2 and 3\r\n pair = cards.subList(1, 3);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(3).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Third possibility: cards 3 and 4\r\n pair = cards.subList(2, 4);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(4).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n \r\n //Fourth possibility: last two cards\r\n pair = cards.subList(3, 5);\r\n if(haveSameValue(pair)){\r\n handValue = pair.get(0).getValue();\r\n \r\n //Store remaining card values for potential later comparison\r\n remainingCardValues.add(cards.get(2).getValue());\r\n remainingCardValues.add(cards.get(1).getValue());\r\n remainingCardValues.add(cards.get(0).getValue());\r\n \r\n return true;\r\n }\r\n return false;\r\n }", "public boolean checksuits(Card cardsuits){\n Boolean flag;\n if(cardsuits.suits == this.suits){ flag = true; }\n else{flag = false;}\n return flag;}", "public boolean equals(Object obj){\r\n\t\tif(!(obj instanceof BaseballCard))\r\n\t\t\treturn false;\r\n\t\tBaseballCard compareable = (BaseballCard) obj;\r\n\t\t\r\n\t\treturn(this.getPrice()==(compareable.getPrice())&&this.getYear()==\r\n\t\t\t\t(compareable.getYear())&&this.getSizeX()==(compareable.getSizeX())\r\n\t\t\t\t&&this.getSizeY()==(compareable.getSizeY())&&this.getName()==\r\n\t\t\t\tcompareable.getName()&&this.getManufacturer()==compareable.getManufacturer());\r\n\t\t\r\n\t}", "public static boolean hasFlush(Card[] cards) {\n\t\tint counter = 0;\n\t\tfor(int i = 1; i< cards.length; i++){\n\t\t\tif(cards[0].getSuit() == cards[i].getSuit()){\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\tif(counter==4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void testCanPlayOn() {\n \n DrawCard redDraw2 = new DrawCard(Card.COLOUR_RED, 2);\n \n // create another 4 normal cards\n \n Card card1 = new Card(Card.COLOUR_BLUE, 5);\n Card card2 = new Card(Card.COLOUR_BLUE,2);\n \n //card 1 and card 2 should yield false on the method\n assertFalse(redDraw2.canPlayOn(card1));\n assertFalse(redDraw2.canPlayOn(card2));\n \n Card card3 = new Card(Card.COLOUR_RED, 5);\n Card card4 = new Card(Card.COLOUR_RED,2);\n \n // card 3 and card 4 should gives true\n \n assertTrue(redDraw2.canPlayOn(card3));\n assertTrue(redDraw2.canPlayOn(card4));\n \n }", "@Test\n public void testCardCanPlay_FALSE() {\n System.out.println(\"cardCanPlay FALSE COLOUR\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(false, result);\n }", "public boolean isValid() {\n\t\t\n\t\tif(this.size()!=2)\n\t\t\treturn false;\n\t\telse {\n\t\t\tint rank1=this.getCard(0).getRank();\n\t\t\tint rank2=this.getCard(1).getRank();\n\t\t\t\n\t\t\tif(rank1==rank2)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}", "@Override\n public boolean equals(Object o){\n if (o == this) { //True if it's this instance\n return true;\n }\n if (!(o instanceof LeaderCard))\n return false;\n\n //Check if same values\n LeaderCard c = (LeaderCard) o;\n return this.getId() == c.getId() && this.getVictoryPoints() == c.getVictoryPoints() && this.getRequirement().equals(c.getRequirement()) &&\n this.getSpecialAbility().equals(c.getSpecialAbility()) && this.inGame == c.inGame;\n }", "@Test\n\tpublic void testDeckEqualsAgain() {\n\t\t\n\t\tStandardDeckClass oneDeck = new StandardDeckClass();\n\t\tVegasDeckClass testDeck = new VegasDeckClass();\n\t\t\n\t\tboolean isSame = oneDeck.equals(testDeck);\n\t\t\n\t\tassertEquals(\"equals method not working as expected\", false, isSame);\n\t}", "@Test\n public void testCardCanPlay_FALSE_VALUE() {\n System.out.println(\"cardCanPlay FALSE VALUE\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.THREE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(false, result);\n }", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return id.getText().equals(card.id.getText())\n && person.equals(card.person);\n }", "public boolean hasTwoP(ArrayList<Card> cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tboolean retVal = false;\r\n\t\tint numPairs = 0;\r\n\t\tint counter;// counts how many of those cards are in the hand\r\n\t\tint pairVal = 0;\r\n\t\tfor (int i = 0; i <cards.size()-1; i++) {\r\n\t\t\tcounter = 1;\r\n\t\t\tfor (int j = i+1; j < cards.size(); j++) {\r\n\t\t\t\tif(cards.get(i).getValue() == cards.get(j).getValue() &&\r\n\t\t\t\t\t\tcards.get(i).getValue() != pairVal){\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t\tpairVal = cards.get(j).getValue();\r\n\t\t\t\t\tif(counter > 1) {\r\n\t\t\t\t\t\tnumPairs++;\r\n\t\t\t\t\t\tif (numPairs == 2) {\r\n\t\t\t\t\t\t\tretVal = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}", "@Override\r\n\tpublic boolean equals(Object o) {\r\n\t\tif (o instanceof Seed) {\r\n\t\t\tSeed s = (Seed) o;\r\n\t\t\tCards cs1, cs2;\r\n\r\n\t\t\tif (this.size() != s.size()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\tfor (int i = 0; i < s.size(); i++) {\r\n\t\t\t\tcs1 = s.get(i);\r\n\t\t\t\tcs2 = this.get(i);\r\n\t\t\t\tif (cs1.getCardsType() != cs2.getCardsType()\r\n\t\t\t\t\t\t|| cs1.getCardsValue() != cs2.getCardsValue()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public boolean compareRank(Card otherCard) {\n return rank == otherCard.rank;\n }", "boolean hasSameAs();", "private boolean tieForCards(Card[] cards) {\n int largest = largestCard(cards);\n\n int count = 0;\n\n for (Card card : cards) {\n if (card.getDenomination() == cards[largest].getDenomination())\n count++;\n }\n\n return count > 1;\n }", "private boolean canPlay(UnoCard topCard, UnoCard newCard) {\n\n\t\t// Color or value matches\n\t\tif (topCard.getColor().equals(newCard.getColor())\n\t\t\t\t|| topCard.getValue().equals(newCard.getValue()))\n\t\t\treturn true;\n\t\t// if chosen wild card color matches\n\t\telse if (topCard instanceof WildCard)\n\t\t\treturn ((WildCard) topCard).getWildColor().equals(newCard.getColor());\n\n\t\t// suppose the new card is a wild card\n\t\telse if (newCard instanceof WildCard)\n\t\t\treturn true;\n\n\t\t// else\n\t\treturn false;\n\t}", "public boolean checkBlackJack() {\r\n if(cards.size() == 2 && score() == 21){\r\n blackJack = true;\r\n over = true;\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean playerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(playerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "private boolean faceCard(ArrayList<Card> cards) {\r\n\t\tfor (Card card: cards) {\r\n\t\t\tif (card.getValue() >= 11 && card.getValue() <= 13) \r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof PersonCard)) {\n return false;\n }\n\n // state check\n PersonCard card = (PersonCard) other;\n return displayedIndex == card.getDisplayedIndex()\n && staff.equals(card.staff);\n }", "protected abstract boolean isCardActivatable(Card card);", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof DateCard)) {\n return false;\n }\n\n // state check\n DateCard card = (DateCard) other;\n return id.getText().equals(card.id.getText())\n && date.equals(card.date);\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tint suitValue = hand.get(0).getSuit().getValue();\n\n\t\t\t// check all of the same suit\n\t\t\tfor (int i = 1; i < hand.size(); i++) {\n\t\t\t\tif (hand.get(i).getSuit().getValue() != suitValue)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "@Test\n public void testDrawOneCard() {\n System.out.println(\"drawOneCard\");\n Deck instance = new Deck();\n Card expResult = new Card(cardColors.CLUB, cardValues.ACE);\n Card result = instance.drawOneCard();\n assertEquals(expResult, result);\n // TEST 1 : draw a card from an empty deck\n // TEST 2 : add a card, draw it and check it's the good one.\n instance = new Deck();\n Card card = new Card(cardColors.HEART, cardValues.THREE);\n int expResulti = 0;\n instance.addOneCard(card);\n Card drawnCard = instance.drawOneCard();\n assertEquals(expResulti, card.compare(drawnCard));\n /* TEST 3 : add an existing card. Draw this card, be sure that the \n second one is still there */\n boolean expResultb = true;\n assertEquals(expResultb, instance.into(card));\n\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof QuestionCard)) {\n return false;\n }\n\n // state check\n QuestionCard card = (QuestionCard) other;\n return this.id.getText().equals(card.id.getText())\n && this.question.equals(card.question);\n }", "public boolean isInDeck(String cardName){\n boolean status = false;\n ArrayList<Card> cardStatus = getCards();\n for(Card card: cardStatus){\n if(cardName.equals(card.getName())){\n status = true;\n }\n }\n return status;\n }", "public boolean hasSet(ArrayList<Card> cards) {\r\n\t\tCollections.sort(cards);\r\n\t\t/*Once the cards are sorted, then the third card can be\r\n\t\t * used to compare with others\r\n\t\t */\r\n\t\tint compare = cards.get(2).getValue();\r\n\t\tint counter = 0;\r\n\t\tfor(int i = 0; i < 5 ; i++) {\r\n\t\t\tif(cards.get(i).getValue() == compare) {\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (counter == 3);\r\n\t}", "public boolean isStandardDeck() {\n Deck jeff = new Deck () ;\n if (this.cards.length == jeff.cards.length) {\n for (int i = 0; i < this.cards.length; i++ ) {\n if (!this.cards[i].equals(jeff.cards[i])) {\n return false;\n }\n }\n return true;\n }\n return false;\n }", "@Override\n public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) {\n topCard = topPileCard;\n boolean drawCard = true;\n for (Card card : cardsInHand) {\n if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) {\n drawCard = false;\n break;\n }\n }\n return drawCard;\n }", "boolean hasPlaySingleCardResponse();", "public boolean validCardPlay(UnoCard card) {\r\n return card.getColor() == validColor || card.getValue() == validValue;\r\n }", "@Override\n public boolean isBlackjack() {\n return ( (countCards()==2) && (higherScore()==21) );\n }", "public boolean addCard(VentraCard card){\n \tboolean isExist = true;\n \t\n \tfor(int i=0; i<allCards.size(); i++ ) {\n \t\tif(card.getCardNumber() == allCards.get(i).getCardNumber()\n \t \t&& card.getPhoneNumber().equals(allCards.get(i).getPhoneNumber())) {\n \t\t\tisExist = false;\n \t\t}\t\n \t}\n \tif(isExist == true) { // if(isExist)\n \t\tallCards.add(card);\t\n \t\treturn true;\n \t}\n \t\n return false;\n }", "private static boolean flush(ArrayList<CardSuit> suits) {\n //this for loop traverse the suits in order to check if there\n // are two cards of different suits\n for (int i = 1; i < suits.size(); i++) {\n if (suits.get(i) != suits.get(i -1)){\n return false;\n }\n }\n return true;\n }", "boolean hasIsEquivalent();", "int compareValue(Card c);", "boolean hasCardType();", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "private boolean isEqual(Roster r2)\n\t{\n\t\tIterator<Player> it1 = iterator();\n\t\twhile(it1.hasNext())\n\t\t{\n\t\t\tPlayer p = it1.next();\n\t\t\tif(!r2.has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\t\n\t\tIterator<Player> it2 = r2.iterator();\n\t\twhile(it2.hasNext())\n\t\t{\n\t\t\tPlayer p = it2.next();\n\t\t\tif(!has(p))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isInHand( int x)\n\t{\n\t\tfor(int i=0; i<5;i++)\n\t\t{\n\t\t\tif(x == cardNumbers[i]) // verify that you are not adding the same replacement card twice\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\t\n\t}", "public boolean isValid() {\n\t\t\n\t\tif (this.size() == 2)\n\t\t\tif (this.getCard(0).getRank() == this.getCard(1).getRank())\n\t\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "@Override\n\t\tboolean hasMatch(ArrayList<Card> hand) {\n\t\t\tfor (int i = 0; i < hand.size(); i++) {\n\t\t\t\tif (i + 1 < hand.size()) {\n\t\t\t\t\tif (hand.get(i + 1).getCardValue().getValue()\n\t\t\t\t\t\t\t- hand.get(i).getCardValue().getValue() > 1)\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof EventCard)) {\n return false;\n }\n\n // state check\n EventCard card = (EventCard) other;\n return id.getText().equals(card.id.getText())\n && event.equals(card.event);\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "public boolean hasBlackjack()\n {\n return getSumOfCards(false) == 21;\n }", "private boolean Nob() {\r\n String Nob1=\"J\" + Card[Card.length-1].substring(1,2);\r\n for (int i = 0; i < Card.length-1; i++) {\r\n if (Card[i].equals(Nob1)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n\r\n }", "public boolean isValid() {\n\t\tif (this.size() != 5) return false;\n\t\tif (!((this.getCard(0).getSuit() == this.getCard(1).getSuit()) && (this.getCard(1).getSuit() == this.getCard(2).getSuit()) && (this.getCard(2).getSuit() == this.getCard(3).getSuit()) && (this.getCard(3).getSuit() == this.getCard(4).getSuit()))) return false;\n\t\t\n\t\tint[] cardsInHand= {this.getCard(0).getRank(), this.getCard(1).getRank(), this.getCard(2).getRank(), this.getCard(3).getRank(), this.getCard(4).getRank()};\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif (cardsInHand[i]==0) cardsInHand[i]=13;\n\t\t\telse if (cardsInHand[i]==1) cardsInHand[i]=14;\n\t\t}\n\t\t\n\t\tArrays.sort(cardsInHand);\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tif(cardsInHand[i]!=cardsInHand[i+1]-1) return false;\n\t\t}\n\t\treturn true;\n\t}", "public boolean isEqual(Heaper anObject) {\n\treturn anObject.getCategory() == getCategory();\n/*\nudanax-top.st:15781:SequenceSpace methodsFor: 'testing'!\n{BooleanVar} isEqual: anObject {Heaper}\n\t\"is equal to any basic space on the same category of positions\"\n\t^anObject getCategory == self getCategory!\n*/\n}", "public boolean isFullHouse(){\n List<PokerCard> firstList;\r\n List<PokerCard> secondList;\r\n \r\n //First possibility: first two cards are a pair\r\n firstList = cards.subList(0, 2);\r\n secondList = cards.subList(2, cards.size());\r\n if(haveSameValue(firstList) && haveSameValue(secondList)){\r\n handValue = secondList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n //Second possibility: last two cards are a pair\r\n firstList = cards.subList(0, 3);\r\n secondList = cards.subList(3, cards.size());\r\n if(haveSameValue(firstList) && haveSameValue(secondList)){\r\n handValue = firstList.get(0).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }" ]
[ "0.7866549", "0.76809335", "0.7624251", "0.751498", "0.7471979", "0.7370306", "0.72697914", "0.72531855", "0.7253145", "0.7153623", "0.70943207", "0.7018343", "0.69878286", "0.6984242", "0.6932757", "0.6859207", "0.6844733", "0.68346256", "0.6812787", "0.680465", "0.6801684", "0.6712063", "0.6587798", "0.65469366", "0.6536054", "0.65077436", "0.64794934", "0.6473512", "0.64597094", "0.64566445", "0.64538133", "0.6424683", "0.64141256", "0.6414074", "0.6378985", "0.6371541", "0.63632035", "0.6352847", "0.6352089", "0.63368994", "0.6336724", "0.631992", "0.6305369", "0.6293225", "0.62877667", "0.62851304", "0.62812597", "0.6260966", "0.6255963", "0.62179035", "0.6211991", "0.61867625", "0.61853266", "0.61748123", "0.6166577", "0.61618793", "0.6148059", "0.6121123", "0.61138344", "0.6113746", "0.6083662", "0.60832727", "0.6038897", "0.6025635", "0.6020715", "0.6019095", "0.60183483", "0.60015863", "0.59972155", "0.59953916", "0.59932995", "0.59824365", "0.5977725", "0.5964459", "0.5964459", "0.59477335", "0.5937989", "0.59260964", "0.59240717", "0.592295", "0.5914629", "0.5892887", "0.58904105", "0.58808863", "0.58778703", "0.58743155", "0.58733827", "0.587104", "0.58694994", "0.58690304", "0.58677286", "0.5864522", "0.5861281", "0.58585316", "0.58563226", "0.58465695", "0.5841698", "0.58335793", "0.5832078", "0.5830314" ]
0.7082593
11
/ Hand() In: Nothing Out: Nothing Description: The default constructor for Hand does not actually do anything.
public Hand() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Hand(){}", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public Hand() {\r\n\t\t\r\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public Player() {\n hand = new Hand();\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "public Player() {\n//\t\thand = new Hand();\n\t\tthis.cardsInhand = new ArrayList<Card>();\n\t}", "public Hand(Card[] hand) {\r\n\t\tthis.cards = new ArrayList<Card>(Arrays.asList(hand));\r\n\t}", "public Hand(){\n dice = new Die[HAND_SIZE];\n for(int i = 0; i < dice.length; ++i){\n dice[i] = new Die();\n }\n }", "public Hand() {\n downStack = new ArrayList<>();\n cardsInPlayStack = new Stack<>();\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public Hand getHand() {\n return hand;\n }", "public Hand getHand() {\n return hand;\n }", "public void emptyHand();", "public Player()\r\n\t{\r\n\t\tpCards = new String[DECK_SIZE];\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public Hand(Hand toCopy) {\n if (toCopy.hole1 instanceof BlankCard) {\n hole1 = new BlankCard();\n hole2 = new BlankCard();\n } else {\n hole1 = new Card((Card)toCopy.hole1);\n hole2 = new Card((Card)toCopy.hole2);\n }\n showCards = toCopy.showCards;\n }", "void setHand(Hand hand) {\n\t\t_hand = hand;\n\t}", "Hand getHand() {\n\t\treturn _hand;\n\t}", "public Hand getHand() {\n\t\treturn hand;\n\t}", "public Player(){\r\n\t\tname = \"\";\r\n\t\tchip = 0;\r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public Player()\n\t{\n\t\tmyName = DEFAULT_NAME;\n\t\tmyHand = new PokerHand(5);\n\t\tmyNumberWins = 0;\n\t\tmyAmAI = false;\n\t}", "public HumanPlayer(Hand hand, Card selected) {\n this.hand = hand;\n // Set up human player for interaction\n CardListener cardListener = new CardAdapter() {\n private Card card;\n\n public void leftDoubleClicked(Card card) {\n Whist.setCard(card);\n\t\t\t\thand.setTouchEnabled(false);\n\t\t\t}\n };\n hand.addCardListener(cardListener);\n }", "public Handwritten(int bookID) {\n\t\tsuper(bookID, \"H\");\n\t}", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public Deck()\n {\n this(1);\n }", "public Hand(Shuffleable cards) {\n this.setLayout(new BorderLayout());\n this.cards = cards;\n this.busted = false; //Player not busted by default\n this.value = 0; //Value starts at 0\n values.add(0);\n nameLabel = new JLabel(\"\", SwingConstants.LEFT); //Initializes name label\n valueLabel = new JLabel(\"Value: \" + value, SwingConstants.LEFT); //Initilizes value label\n cardPane = new JPanel(new FlowLayout());\n cardPane.setBackground(Color.GREEN); //Background color green\n this.add(nameLabel, BorderLayout.NORTH);\n this.add(valueLabel, BorderLayout.SOUTH);\n this.add(cardPane, BorderLayout.CENTER);\n }", "public HandLead(EntityHumanBase owner, ItemStack itemStack)\n/* 19: */ {\n/* 20:18 */ super(owner, itemStack);\n/* 21: */ }", "public LinkedList<PlayingCard> getHand(){\n\t\treturn hand;\n\t}", "public Dealer() {\n dealerHand = new Deck();\n }", "public UnoHand getHand() {\r\n return hand;\r\n }", "public CardGame(){\n this.handOne = new Hand();\n this.handTwo = new Hand();\n this.gameDeck = new Deck();\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public Deck()\n\t{\n\t\t//call other Constructor defining one deck with out shuffling\n\t\tthis(false);\n\t}", "public void setHand(ArrayList<Card> hand) {\n this.hand = hand;\n }", "public void clearHand() {\n\t\thand.clear();\n\t}", "public CrazyEightHumanPlayer(String name, int handSize) {\n super(name, handSize);\n }", "public void addHand(Hand h)\n {\n hand.add(h);\n }", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public Card () {}", "public HandController(SessionController parent) {\n\tinitComponents();\n\t\n\tthis.sessionController = parent;\n\t\n\tthis.hand = new Hand(this);\n }", "public Hand(String str){\r\n\r\n setHandStr(str);\r\n findSuits();\r\n findCardValue();\r\n findHighestConsecutive();\r\n determineRank();\r\n }", "public Card() {\n this(new Random().nextInt(54));\n establishHierarchicalValue();\n }", "@Test\r\n public void testGenerateHand() {\r\n System.out.println(\"generateHand\");\r\n Cardhand instance = new Cardhand();\r\n instance.generateHand();\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public Card()\n {}", "public String getHand(){\r\n return this.handStr;\r\n }", "public ArrayList<Card> getHand() {\r\n\t\treturn this.Hand;\r\n\t}", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "public Deck() {\n generateDeckOfCards();\n }", "public Deck() {\n this.deck = new LinkedList<>();\n }", "public War()\n {\n //create deck of cards\n deck.shuffle();\n \n //deal cards to two different hands\n while(!deck.isEmpty())\n {\n card=deck.dealCard();\n player1Hand.enqueue(card);\n \n card=deck.dealCard();\n player2Hand.enqueue(card);\n }\n \n }", "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public Player() {\r\n\t\tthis.gemPile = new int[4];\r\n\t\tthis.hand = new ArrayList<Card>();\r\n\t\tthis.bag = new ArrayList<Card>();\r\n\t\tthis.discard = new ArrayList<Card>();\r\n\t\tthis.lockedCards = new ArrayList<Card>();\r\n\t\tthis.toUse = new ArrayList<Integer>();\r\n\t\tnewTurn();\r\n\t}", "public int getHandId() {\n\t\t\treturn handId;\n\t\t}", "public Card()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start Card Method *****************/\n\n\t// Set face value to null\n\tfaceValue = null;\n\n\t// Set true value to 0\n\ttrueValue = 0;\n\n\t// Set suit to null\n\tsuit = null;\n\n\t// Set picture to null\n\tpicture = null;\n\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "public void showHand(){\n System.out.println(this.hand.toString());\n }", "public poker_class ()\n\t{\n\t face = \"Two\";\n\t suit = \"Clubs\";\n\t}", "public Card() { this(12, 3); }", "public Player(String name, double chip){\r\n\t\tthis.name = name;\r\n\t\tthis.chip = chip; \r\n\t\tbet = 0;\r\n\t\tplayerHand = new PlayerHand();\r\n\t\ttable = null;\r\n\t}", "public CardGame( int handSize, int copiesPerDeck ){\n this.handOne = new Hand(handSize);\n this.handTwo = new Hand(handSize);\n this.gameDeck = new Deck(copiesPerDeck);\n this.playerScore = 0;\n this.oppoScore = 0;\n }", "public CardGameFramework() {\n this(1, 0, 0, null, 4, 13);\n }", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "public Deck() {\n deck = new LinkedList<>();\n for (int i = 1; i < FACE_VALUES + 1; i++) {\n deck.add(new Card(i, SPADES));\n deck.add(new Card(i, CLUB));\n deck.add(new Card(i, DIAMOND));\n deck.add(new Card(i, HEART));\n }\n }", "Person(Card card1, Card card2) {\n\t\t_money = 50; // Start with 50 dollars\n\t\t_bet = 0;\n\t\t_hand = new Hand(card1, card2); // for now a person starts with an empty deck this way everyone can get a card\n\t\t\t\t\t\t\t// at the same time\n\t\t_wins = 0;\n\t\t_pushes = 0;\n\t\t_loses = 0;\n\t}", "public JavaHand getHand() {\r\n return this.dealerHand;\r\n }", "public Handshake()\n\t{\n\t this(-1);\n\t}", "public Deck() {\n System.out.println(\"Inside deck\");\n cards = new ArrayList<>();\n fillDeck();\n }", "public Hand getHand(int k) {\n if (k < 0 || k >= numPlayers)\n return new Hand();\n\n return hand[k];\n }", "public deal()\n {\n player1Hand = 0;\n player2Hand = 0;\n dealerHand = 0;\n }", "public Game() {\t\t\t\t\t\n\t\t\n\t\tmDeck = new Deck();\t\t\t\t\t\t\t\t\t\t\t\n\t\tmDealer = new Dealer(mDeck.getCard(), mDeck.getCard());\t//dealer gets a random value card twice to initialise the dealers hand with 2 cards\n\t\tmUser = new User();\t\t\t\t\t\t\t\t\t\t\t\n\t\tgiveCard();\t\t\t\t\t\n\t}", "public static Hand composeHand(CardGamePlayer player, CardList cards) {\n\t\tHand temp = new StraightFlush(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Quad(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Quad(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new FullHouse(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Flush(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Straight(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Triple(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Pair(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\ttemp = new Single(player,cards);\n\t\tif (temp.isValid()) {\n\t\t\treturn temp;\n\t\t}\n\t\treturn null;\n\n\t}", "public Battle() {\r\n\t\tnbVals = 0;\r\n\t\tplayer1 = new Deck();\r\n\t\tplayer2 = new Deck();\r\n\t\ttrick = new Deck();\r\n\t}", "public interface CardHand { // if you want to be considered a CardHand you MUST define these methods(behaviors)\n\t\n\tpublic ArrayList<PlayingCard> getHand(); // returns the cards in the hand as an ArrayList\n\n\tpublic void addCard(PlayingCard aCard); // receive a PlayingCard and add to the hand\n\t\n\tpublic void emptyHand(); // remove all PlayingCards from the hand\n\n\tpublic void show(); // display all the cards in the hand\n\n}", "public HumanPlayer(int num){\r\n super(num);\r\n getHand().drawCards(7);\r\n }", "public Hand getHand(int k)\n {\n if (k < 0 || k >= numPlayers)\n return new Hand();\n\n return hand[k];\n }", "public PlayingCard(){\n\t\tsuper();\n\t}", "public Deck()\r\n\t{\r\n\t\tcards = new String[DECK_SIZE];\r\n\t\t\r\n\t\tnewDeck();\r\n\t}", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Arrays.toString(result));\r\n// Assert.isTrue(hr.getHandType() == HandType.HIGH);\r\n//\r\n// SimpleHandAggregator sha = new SimpleHandAggregator();\r\n// System.out.println(sha.scoreHand(hand));\r\n }", "@Test\n public void testGiveHand() throws Exception {\n\n Deck giveHand = new Deck();\n giveHand.add(cardB);\n giveHand.add(cardB);\n giveHand.add(cardP);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardB);\n playerHuman.addCardToDeck(cardP);\n playerHuman.giveHand();\n org.junit.Assert.assertEquals(giveHand, playerHuman.getPlayHand());\n }", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public Card()\n {\n suit = 0;\n rank = Card.ACE;\n }", "public Player(Integer nameKey){\n\t\thand = new HashSet<Card>();\n\t\tswitch(nameKey){\n\t\tcase 0:\n\t\t\tname = \"Kasandra Scarlet\"; break;\n\t\tcase 1:\n\t\t\tname = \"Jack Mustard\"; break;\n\t\tcase 2:\n\t\t\tname = \"Diane White\"; break;\n\t\tcase 3:\n\t\t\tname = \"Jacob Green\"; break;\n\t\tcase 4:\n\t\t\tname = \"Eleanor Peacock\"; break;\n\t\tcase 5:\n\t\t\tname = \"Victor Plum\"; break;\n\t\t}\n\t}", "public Card(){\n\t\trank = (int) (Math.random()*(13-1));\n\t\tsuit = (int) (Math.random()*4);\n\t}", "public Card(){\n suit = 0;\n rank = 0;\n }", "public UserPlayer(){\n this.playerNum = 0;\n this.isLead = false;\n this.playerHand = new Hand();\n this.suitUserChose = null;\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n handOutlet = new javax.swing.JPanel();\n\n setLayout(new java.awt.BorderLayout());\n\n handOutlet.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Hand\", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP));\n add(handOutlet, java.awt.BorderLayout.CENTER);\n }", "@Override\n public void setOpponentsLastHand(Hand hand)\n {\n }", "public Game() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (int i = 0; i < NBCARDS; i++) {\r\n\t\t\tcards.add(new Card());\r\n\t\t}\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < NBPLAYER; i++) {\r\n\t\t\tplayers.add(new Player(i + 1));\r\n\t\t}\r\n\t}", "public SlotHandLeft(IInventory arg0, int id, int x, int y, Slot rightHand)\n/* 17: */ {\n/* 18:15 */ super(arg0, id, x, y);\n/* 19:16 */ this.rightHand = rightHand;\n/* 20: */ }", "private static int play() {\n\n Hand h = new Hand();\n int handValue = 0;\n\n // Deck deck = new Deck(); // Get a new deck of cards, and\n // store a reference to it in\n // the variable, deck.\n\n for (int i=0;i<3;i++) {\n Card c = new Card(3,Card.VICTORY);\n h.addCard(c);\n }\n for (int i=0;i<7;i++) {\n Card c = new Card();\n h.addCard(c);\n }\n\n for (int i=0;i<h.getCardCount();i++) {\n Card c = h.getCard(i);\n System.out.println(c.toString());\n handValue += c.getValue();\n }\n\n return handValue;\n }", "public card(){\n\t\tname = \"blank\";\n\t\ttype = \"blank\";\n\t\tcost = 0;\n\t\tgold = 0;\n\t\tvictory_points = 0;\n\t\taction = 0;\n\t\tbuy = 0;\n\t\tcard= 0;\n\t\tattack = false;\n\t}", "public abstract void setHand(Card[] hand);", "public BlackjackGameImpl(){\n\t\tsuper();\n\t\tplayers = new HashMap<>();\n\t\tplayersAvailableOptions = new HashMap<>();\n\t\thandAvailableOptions = new HashMap<>();\n\t\thistoricalActions = new HashMap<>();\n\t\tinsurances = new ArrayList<>();\n\t}", "Card(){\t \n}" ]
[ "0.89953953", "0.88530725", "0.8732816", "0.8170031", "0.8075864", "0.79682744", "0.7596351", "0.7500445", "0.74300146", "0.73211944", "0.72558796", "0.720355", "0.704504", "0.7028394", "0.7019739", "0.6948191", "0.6948191", "0.69450325", "0.67640656", "0.6757502", "0.6718334", "0.670483", "0.6699634", "0.66655487", "0.66502386", "0.65777457", "0.6501357", "0.64949685", "0.649285", "0.6464739", "0.6448351", "0.64263225", "0.63971746", "0.6376469", "0.6375143", "0.6346074", "0.63360864", "0.6299577", "0.62803805", "0.6277949", "0.6272856", "0.62605745", "0.62156516", "0.6213509", "0.6203148", "0.6201273", "0.61929905", "0.61850417", "0.61850315", "0.61587006", "0.6146093", "0.6139826", "0.61284316", "0.60995585", "0.60899055", "0.6082737", "0.60692453", "0.6062544", "0.606192", "0.60439247", "0.60304976", "0.5975875", "0.5968871", "0.59508747", "0.59330046", "0.59326226", "0.59238654", "0.59217465", "0.5887455", "0.5883437", "0.5880663", "0.58767724", "0.5863666", "0.5853956", "0.58536947", "0.5853234", "0.5853167", "0.5850692", "0.583929", "0.58305186", "0.58285683", "0.58073384", "0.5806854", "0.5801421", "0.578564", "0.5783135", "0.5781458", "0.57616997", "0.57548404", "0.5724937", "0.57104474", "0.5701734", "0.5686295", "0.56791055", "0.56775254", "0.5676925", "0.56758463", "0.5674425", "0.56710404", "0.5657847" ]
0.8659175
3
/ In: Nothing Out: Nothing Sorts all of the cards in the hand object.
void sort() { Card.arraySort(this.myCards, numCards); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sortHand(){\n\t\thand.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public void sortHand(){\n Arrays.sort(Hand);\n }", "@Override\n\t\n\tpublic void sortHand(PlayingCard[][] cards) {\n\t\tfor(int k = 0; k < cards.length; k++) {\n\t\t\tPlayingCard [] hand = cards[k];\n\t\t\t\n\t\t\tfor(int i = hand.length - 1; i > 0; i--) {\n\t\t\t\tfor(int j = i - 1; j > -1; j--) {\n\t\t\t\t\tif(hand[j].compareTo(hand[i]) == 1) {\n\t\t\t\t\t\tSkatCard speicherCard = new SkatCard(hand[i].getSuit(), hand[i].getRank());\n\t\t\t\t\t\thand[i] = null;\n\t\t\t\t\t\thand[i] = new SkatCard(hand[j].getSuit(), hand[j].getRank());\n\t\t\t\t\t\thand[j] = null;\n\t\t\t\t\t\thand[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public ArrayList<Card> getCardsInHand(){\n\t\tCollections.sort(CardsInHand, Card.CardRank);\r\n\t\treturn CardsInHand;\r\n\t}", "public void sort()\r\n {\r\n Card.arraySort(myCards, myCards.length);\r\n }", "public void sortByValue() {\n\t\tArrayList<Card> newHand = new ArrayList<Card>();\n\t\twhile (this.cardsInhand.size() > 0) {\n\t\t\tint pos = 0; // Position of minimal card.\n\t\t\tCard c = this.cardsInhand.get(0); // Minimal card.\n\t\t\tfor (int i = 1; i < this.cardsInhand.size(); i++) {\n\t\t\t\tCard c1 = this.cardsInhand.get(i);\n\t\t\t\tif (c1.getValue() < c.getValue() || (c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit())) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\tc = c1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.cardsInhand.remove(pos);\n\t\t\tnewHand.add(c);\n\t\t}\n\t\tthis.cardsInhand = newHand;\n\t}", "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void sort() {\n Card.arraySort(this.cards, this.topCard);\n }", "private void initAndSortAllHands() {\n\t\tArrayList<Card> sevenCards;\n\t\tPlayer player;\n\n\t\t// initalize the seven cards hand\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tsevenCards = new ArrayList<Card>(7);\n\t\t\tplayer = table.getTablePlayers().get(i);\n\n\t\t\tsevenCards.add(player.getHoleCard1());\n\t\t\tsevenCards.add(player.getHoleCard2());\n\t\t\tsevenCards.add(dealer.getFlop()[0]);\n\t\t\tsevenCards.add(dealer.getFlop()[1]);\n\t\t\tsevenCards.add(dealer.getFlop()[2]);\n\t\t\tsevenCards.add(dealer.getTurn());\n\t\t\tsevenCards.add(dealer.getRiver());\n\n\t\t\ttable.getTablePlayers().get(i).setSevenCardsTempHand(sevenCards);\n\t\t}\n\n\t\t// sort the hand\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++)\n\t\t\ttable.getTablePlayers().get(i).sortHandByRank(table.getTablePlayers().get(i).getSevenCardsTempHand());\n\t}", "void sort()\n {\n Card.arraySort(cards, topCard);\n }", "public static void main(String[] args) {\n Hand hand1 = new Hand();\n\n hand1.add(new Card(2, Card.SPADES));\n hand1.add(new Card(14, Card.CLUBS));\n hand1.add(new Card(12, Card.HEARTS));\n hand1.add(new Card(2, Card.CLUBS));\n\n hand1.sort();\n\n Hand hand2 = new Hand();\n\n hand2.add(new Card(11, Card.DIAMONDS));\n hand2.add(new Card(11, Card.CLUBS));\n hand2.add(new Card(11, Card.HEARTS));\n\n int comparison = hand1.compareTo(hand2);\n\n if (comparison < 0) {\n System.out.println(\"the most valuable hand contains the cards\");\n hand2.print();\n } else if (comparison > 0) {\n System.out.println(\"the most valuable hand contains the cards\");\n hand1.print();\n } else {\n System.out.println(\"the hands are equally valuable\");\n }\n\n System.out.println(\"\");\n System.out.println(\"_________________________\");\n System.out.println(\"\");\n\n Card cardTest1 = new Card(3, Card.SPADES);\n Card cardTest2 = new Card(3, Card.SPADES);\n\n SortAgainstSuitAndValue sorter = new SortAgainstSuitAndValue();\n int sortingVar = sorter.compare(cardTest1, cardTest2);\n\n if (sortingVar < 0) {\n System.out.println(\"The highest card is:\" + cardTest1);\n } else if (sortingVar > 0) {\n System.out.println(\"The highest card is:\" + cardTest2);\n } else if (sortingVar == 0) {\n System.out.println(\"The cards are the same.\");\n }\n\n Hand hand = new Hand();\n\n hand.add(new Card(12, Card.HEARTS));\n hand.add(new Card(4, Card.CLUBS));\n hand.add(new Card(2, Card.DIAMONDS));\n hand.add(new Card(14, Card.CLUBS));\n hand.add(new Card(7, Card.HEARTS));\n hand.add(new Card(2, Card.CLUBS));\n\n hand.sortAgainstSuit();\n\n //hand.print();\n }", "void sort()\n {\n Card.arraySort(myCards, numCards);\n }", "public void sortBySuit() {\r\n List<Card> newHand = new ArrayList<Card>();\r\n while (hand.size() > 0) {\r\n int minPos = 0;\r\n Card minCard = hand.get(0);\r\n for (int i = 1; i < hand.size(); i++) {\r\n Card curCard = hand.get(i);\r\n if (curCard.getSuit().ordinal() < minCard.getSuit().ordinal() ||\r\n (curCard.getSuit().ordinal() == minCard.getSuit().ordinal() && curCard.getRank().ordinal() < minCard.getRank().ordinal())) {\r\n minPos = i;\r\n minCard = curCard;\r\n }\r\n }\r\n hand.remove(minPos);\r\n newHand.add(minCard);\r\n }\r\n hand = newHand;\r\n }", "public void ArrangeSuits() {\n if (mCardCount > 0) {\n \tCard card;\n \tCard orderedCards[];\n \torderedCards = new Card[mCardCount];\n \tint iValue;\n \tint iOrder[];\n \tint iCount = 0;\n \tiOrder = new int [mCardCount];\n \tint iMinValue = Card.HEARTS * 13 + Card.KING;\n \tiOrder[0] = iMinValue;\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tcard = mCard[i];\n \t\tiValue = card.GetSuit()*13 + card.GetValue();\n \t\tiCount = 0;\n \t\t// See where the card value comes in the pecking order\n \t\twhile (iValue > iOrder[iCount]){\n \t\t\tiCount++;\n \t\t}\n \t\t// It goes here, so move everything else along one\n \t\tfor (int j = mCardCount-1; j > iCount; j--)\n \t\t\tiOrder[j] = iOrder[j-1];\n \t\tiOrder[iCount] = iValue;\n \t}\n \t\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tfor (int j = 0; j < mCardCount; j++){\n \t\tcard = mCard[j];\n \t\tiValue = card.GetSuit()*13 + card.GetValue(); \t\t\t\n \t\t\tif (iValue == iOrder[i]){\n \t\t\t\torderedCards[i] = mCard[j];\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t}\n \tfor (int i = 0; i < mCardCount; i++){\n \t\tmCard[i] = orderedCards[i];\n \t} \t\n }\n }", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "public void makeHigh() {\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n ArrayList<String> validHand = new ArrayList<>();\n for(int i = this.cards.size() - 5; i < this.cards.size(); i++)\n validHand.add(this.cards.get(i).toString());\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n }", "public void sort() {\n\n try {\n if (cards != null) {\n cards.sort(Comparator.comparing(Flashcard::getRepetitionDate));\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" sortiert.\");\n\n } else {\n LogHelper.writeToLog(Level.INFO, \"Karten von Model.Deck \" + name + \" nicht sortiert (null).\");\n }\n } catch (Exception ex) {\n LogHelper.writeToLog(Level.INFO, \"Fehler beim Sortieren der Karten\" + ex);\n }\n }", "public void sort(){\n ArrayList<Card> sortedCards = new ArrayList<Card>();\n ArrayList<Card> reds = new ArrayList<Card>();\n ArrayList<Card> yellows = new ArrayList<Card>();\n ArrayList<Card> greens = new ArrayList<Card>();\n ArrayList<Card> blues = new ArrayList<Card>();\n ArrayList<Card> specials = new ArrayList<Card>();\n for(int i = 0; i < cards.size(); i++){\n if(cards.get(i).getColor() == RED){\n reds.add(cards.get(i));\n }else if(cards.get(i).getColor() == YELLOW){\n yellows.add(cards.get(i));\n }else if(cards.get(i).getColor() == GREEN){\n greens.add(cards.get(i));\n }else if(cards.get(i).getColor() == BLUE){\n blues.add(cards.get(i));\n }else if(cards.get(i).getColor() == ALL){\n specials.add(cards.get(i));\n }\n }\n cards = new ArrayList<Card>();\n for(Card c: reds){\n sortedCards.add(c);\n }\n for(Card c: yellows){\n sortedCards.add(c);\n }\n for(Card c: greens){\n sortedCards.add(c);\n }\n for(Card c: blues){\n sortedCards.add(c);\n }\n for(Card c: specials){\n sortedCards.add(c);\n }\n for(Card c: sortedCards){\n cards.add(c);\n }\n }", "public void sortPassing(){\n\t\tpassing.sort(PlayingCard.PlayingCardComparator_ACEHIGH);\n\t}", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "private void sortByRank(Card[] hand) {\n\t\tfor (int i = 0; i < hand.length; i++) {\n\t\t\tfor (int j = i + 1; j < hand.length; j++) {\n\t\t\t\tif (hand[i].getRank().getValue() > hand[j].getRank().getValue()) {\n\t\t\t\t\tCard temp = hand[i];\n\t\t\t\t\thand[i] = hand[j];\n\t\t\t\t\thand[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void sort() {\n /*int jokers = this.getJokers();\n\t\tif (jokers > 0 && this.size() > 2) {\n\t\t\tArrayList<Tile> list = new ArrayList<>();\n for (int i=0; i<this.size(); i++) {\n\t\t\t\tif (this.get(i).getColour() == 'J') {\n\t\t\t\t\tTile joker = this.remove(this.get(i));\n\t\t\t\t\tlist.add(joker);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (Tile j : list) {\n\t\t\t\tthis.addInSort(j);\n\t\t\t}\n }*/\n \n\n //may need something in here to accomodate a joker changing its form\n\n if (tiles.size() > 1) { //will only sort a meld with any tiles in it\n //Override default comparator to compare by tile value (ints)\n Collections.sort(tiles, new Comparator<Tile>() {\n @Override \n public int compare(Tile t1, Tile t2) { \n if (t1.getColour() > t2.getColour()) {\n return 1;\n } else if (t1.getColour() < t2.getColour()) {\n return -1;\n }\n if (t1.getValue() > t2.getValue()) {\n return 1;\n } else if (t1.getValue() < t2.getValue()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n }\n\n }", "public String toString(){\n String handString = \"\";\n int i = 1;\n sort();\n for(Card c: cards){\n handString += Integer.toString(i) + \": \" + c + \"\\n\";\n i++;\n }\n handString = handString.substring(0, handString.length() - 1);\n return handString;\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public Hand(){\n cards = new ArrayList<Card>();\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public ArrayList<PlayingCard> getHand();", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "@Override\n\tpublic int compareTo(Card arg0) {\n\t\treturn 0;\n\t}", "public ArrayList<Card> getHand(){\n return cards;\n }", "private void InitializeHumanHand(){\n for(int i = 0; i < 7; i++){\n //Add to the human hand\n handHuman.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n\n /*\n System.out.println(\"HUMAN\");\n for(int i = 0; i < handHuman.size(); i++){\n System.out.println(handHuman.get(i));\n }\n\n System.out.println(\"DECK AFTER REMOVE\");\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n */\n }", "public void evaluateAllHands() {\n\t\tPlayer player;\n\t\tresetHandRanks();\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\thand = new Card[5];\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkStrFlush(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkQuads(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkFullHouse(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkFlush(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkStraight(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (player.isTrips())\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkTwoPairs(player))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tinitAndSortAllHands();\n\t\t\tif (player.isPair())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tinitAndSortAllHands();\n\t\t\tcheckHighCard(player);\n\t\t}\n\t}", "public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}", "public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }", "public void dealInitialPlayerHands() {\n\t\tint temp = 0;\n\t\tSystem.out.println(\"This is the deck size before dealing: \" + this.tileDeck.deckSize());\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tfor (int i = 0; i < 14; i ++) {\n\t\t\t\tp.hand.add(this.tileDeck.dealTile());\n\t\t\t}\n\t\t\tp.sort();\n\t\t\tSystem.out.println(\"Player \" + temp + \"'s hand: \" + p.getHandTiles());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t\t//System.out.println(this.tileDeck.deckSize());\n\t}", "public ArrayList<Card> giveAllCards() {\n\t\tArrayList<Card> temp = new ArrayList<Card>();\n\t\ttemp.addAll(cards);\n\t\tcards.clear();\n\t\ttopCard = new Card();\n\t\treturn temp;\n\t}", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public String toString(){\n return \"Hand: \" + cards; \n }", "public static void main(String[] args) {\n\t\t\n\t\tList<Card> listOfCards = new ArrayList<Card>();\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.ACE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.FIVE));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.HEART, SuitValue.FOUR));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.SPADE, SuitValue.THREE));\n\t\tlistOfCards.add(new Card(SuitColor.BLACK, SuitType.CLUB, SuitValue.TWO));\n\t\tlistOfCards.add(new Card(SuitColor.RED, SuitType.DIAMOND, SuitValue.JACK));\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ColorComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.TypeComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.ValueComparator);\n\t\tSystem.out.println(listOfCards);\n\t\tCollections.sort(listOfCards, Card.CardComparator);\n\t\tSystem.out.println(listOfCards);\n\t}", "@Override\n public final int compareTo(Hand otherHand) {\n return byTypeThenFaces.compare(this, otherHand);\n }", "public Hand() {\n downStack = new ArrayList<>();\n cardsInPlayStack = new Stack<>();\n }", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public static void main(String[] args) {\n deck = new Deck();\n\n //1c)\n hand = deck.assign(10);\n\n // prints all cards in hand\n System.out.print(String.format(\"Printing all %s cards in hand: \", hand.size()));\n hand.stream()\n .map(Card::getDetails)\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream.concat(Stream.of(det), Stream.of(\", \"))\n .forEachOrdered(System.out::print));\n //TODO refactor formatted print to own method\n System.out.println(\"\");\n\n //1d) filter and print specific suit from hand\n //TODO refactor to separate method and make calls for each suit\n\n System.out.print(\"Printing all Spades suit cards: \");\n hand.stream()\n .filter(Card -> (Card.getSuit() == 'S'))\n .map(Card::getDetails)\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream\n .concat( Stream.of(det), Stream.of(\", \") ) //separates cards with \", \"\n .forEachOrdered(System.out::print) );\n System.out.println(\"\"); //line break\n\n\n // 1e) filters heart cards from hand into new set\n HashSet<Card> cardsOfHeart = hand.stream()\n .filter(Card -> ( Card.getSuit() == 'H') )\n .collect(Collectors\n .toCollection(HashSet::new));\n\n //print heart cards\n System.out.print( String.format( \"Printing all %s heart cards: \", cardsOfHeart.size() ) );\n cardsOfHeart.stream()\n .map(Card::getDetails) //map to card details\n .sorted() //TODO fix sorting by numeric value. x1 x11 x12 x10 x2 etc..\n .forEachOrdered(\n det -> Stream\n .concat( Stream.of(det), Stream.of(\", \") ) //separates cards with \", \"\n .forEachOrdered(System.out::print)\n );\n System.out.println(\"\");\n\n //1f) stream map cards to stream of suit chars\n System.out.print(\"Printing only suit value of cards in hand: \");\n hand.stream().map(Card::getSuit).sorted().forEachOrdered(System.out::print);\n System.out.println(\"\");\n\n //1g) stream reduce card values to sum of values in hand\n System.out.println(\n String.format(\"The sum of the face values on hand is %s\",\n hand.stream()\n .map(Card::getFace)\n .reduce(0, Integer::sum)\n )\n );\n\n }", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "public void deal(){\n // deal cards when game is started and game stage is 0\n // need to clear everything\n if(turn == 4){\n turn = 0;\n }\n player1Hand.clear();\n player2Hand.clear();\n player3Hand.clear();\n player4Hand.clear();\n kitty.clear();\n currentMiddle.clear();\n\n /**\n * External Citation\n * Date: 19 September 2019\n * Problem: Did not have a good way to shuffle array\n * Resource: Dr. Tribelhorn, https://www.geeksforgeeks.org/collections-shuffle-java-examples/\n * Solution: Tribelhorn informed us of the shuffle function, and\n * we used the code in this post as a resource\n */\n // shuffle deck\n Collections.shuffle(deck.cardDeck);\n\n // deal cards to each player\n // player 1's hand\n for (int i = 0; i < 5; i++) {\n player1Hand.add(i, deck.cardDeck.get(i));\n player2Hand.add(i, deck.cardDeck.get(5 + i));\n player3Hand.add(i, deck.cardDeck.get(10 + i));\n player4Hand.add(i, deck.cardDeck.get(15 + i));\n }\n\n for (int i = 0; i < 4; i++) {\n kitty.add(i, deck.cardDeck.get(20 + i));\n }\n kittyTop = kitty.get(0);\n middleCard = deck.cardDeck.get(20);\n middleCardSuit = middleCard.getSuit();\n\n // make middle card visible\n middleVisible = true;\n\n // change game state to 1\n gameStage++;\n }", "public Hand(Card[] hand) {\r\n\t\tthis.cards = new ArrayList<Card>(Arrays.asList(hand));\r\n\t}", "public static void main(String[] args) {\r\n\r\n CardDeck deck = new CardDeck();\r\n System.out.println(deck.dealHand(5)); // <- print 5 cards 3 times\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(5));\r\n System.out.println(deck.dealHand(50)); // <- only 39 cards should be printed here\r\n System.out.println(deck.dealHand(50)); // <- and empty list should be printed\r\n deck.shuffle();\r\n System.out.println(deck.dealHand(5)); // <- another 5 cards\r\n\r\n }", "public interface CardHand { // if you want to be considered a CardHand you MUST define these methods(behaviors)\n\t\n\tpublic ArrayList<PlayingCard> getHand(); // returns the cards in the hand as an ArrayList\n\n\tpublic void addCard(PlayingCard aCard); // receive a PlayingCard and add to the hand\n\t\n\tpublic void emptyHand(); // remove all PlayingCards from the hand\n\n\tpublic void show(); // display all the cards in the hand\n\n}", "Deque<PokerCard> getShuffledHalfDeck();", "public void gatherCards() {\n this.cards.clear();\n this.cards.addAll(this.roomCards);\n this.cards.addAll(this.weaponCards);\n this.cards.addAll(this.suspectCards);\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public ArrayList<Card> getHand() {\r\n\t\treturn this.Hand;\r\n\t}", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "private void shuffleAndGiveCards() {\n\n List<Card> tmpDeck= new ArrayList<Card>(deck); \n Collections.shuffle(tmpDeck, shuffleRng);\n \n for (int i=0; i<players.size(); ++i) {\n int startIndex= Jass.HAND_SIZE*i; //So for player 0 the startIndex will be 0, for player2 9, etc...\n int endIndex = Jass.HAND_SIZE*(i+1); //So for player 1 the endIndex will be 9, for player2 18, etc...\n\n CardSet hand= CardSet.of(tmpDeck.subList(startIndex, endIndex));\n PlayerId player = PlayerId.ALL.get(i);\n\n players.get(player).updateHand(hand);\n handsOfCards.put(player, hand); \n }\n }", "public String getCards()\r\n\t{\r\n\t\t// creates a larger string which will have the cards appended to it\r\n\t\tString cardList = \"\";\r\n\t\t\r\n\t\t// adds all cards currently in hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tcardList = cardList + pCards[i] + \" \";\r\n\t\t}\r\n\t\t\r\n\t\treturn cardList;\r\n\t}", "public void setHand(ArrayList<Card> hand) {\n this.hand = hand;\n }", "public void sortCompetitors(){\n\t\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public void printHand(Cards cards) {\n\t\tfor (int j = 0; j < hand.length; j++) {//loop through the hand\n\t\t\tcards.makeCard(cards.getColorAndNum(hand[j])[0], cards.getColorAndNum(hand[j])[1], hand[j]);\n\t\t\t//System.out.println((j+1) + \": \" + hand[j]);//print each card with its slot number\n\t\t}\n\t}", "@Test\r\n\tpublic void testPlayableCards2()\r\n\t{\n\t\t\r\n\t\tCardList clubList = new CardList();\r\n\t\tclubList.add(AllCards.a6C);\r\n\t\tclubList.add(AllCards.aTC);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.CLUBS, null).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tCardList diamondsList = new CardList();\r\n\t\tdiamondsList.add(AllCards.a7D);\r\n\t\tdiamondsList.add(AllCards.aQD);\r\n\t\tdiamondsList.add(AllCards.aKD);\r\n//\t\tassertTrue( h.playableCards(Suit.DIAMONDS, null).toString().equals(diamondsList.toString()));\r\n\t\t\r\n\t\tCardList heartsList = new CardList();\r\n\t\theartsList.add(AllCards.a9H);\t\t\r\n//\t\tassertTrue( h.playableCards(Suit.HEARTS, null).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tCardList spadesList = new CardList();\r\n\t\tspadesList.add(AllCards.aTS);\r\n\t\tspadesList.add(AllCards.a7S);\r\n\t\tspadesList.add(AllCards.aJS);\r\n\t\tspadesList.add(AllCards.aKS);\r\n//\t\tassertTrue( h.playableCards(Suit.SPADES, null).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\tCardList joker = new CardList();\t\t\t\r\n\t\tjoker.add(AllCards.aLJo);\t\t\r\n\t\tjoker.add(AllCards.aHJo);\r\n//\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, null).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\t\r\n\t\t// Trump\r\n\t\tclubList.add(AllCards.aJS);\r\n\t\tclubList.add(AllCards.aLJo);\r\n\t\tclubList = clubList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.CLUBS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(clubList.toString()));\r\n\t\t\r\n\t\tdiamondsList.add(AllCards.aLJo);\r\n\t\tdiamondsList = diamondsList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(diamondsList.toString()));\r\n\r\n\t\theartsList = heartsList.sort(new Card.ByRankComparator());\t\t\r\n\t\tassertTrue( h.playableCards(Suit.HEARTS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(heartsList.toString()));\r\n\t\t\r\n\t\tspadesList.remove(AllCards.aJS);\r\n\t\tspadesList = spadesList.sort(new Card.ByRankComparator());\r\n\t\tassertTrue( h.playableCards(Suit.SPADES, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(spadesList.toString()));\r\n\t\t\r\n\t\t// no Trump in hand\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.DIAMONDS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\tassertTrue(jokerhand.playableCards(Suit.DIAMONDS, Suit.CLUBS).sort(new Card.ByRankComparator()).toString().equals(joker.toString()));\r\n\t\t\r\n\t\tCardList jackList = new CardList();\r\n\t\tjackList.add(AllCards.aJS);\r\n\t\tjackList.add(AllCards.aJC);\r\n\t\tassertTrue(jackHand.playableCards(Suit.CLUBS, Suit.SPADES).sort(new Card.ByRankComparator()).toString().equals(jackList.toString()));\r\n\t\t\r\n\t}", "public int playHand(Hand hand){\r\n\r\n if( this.getRank() > hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"Black wins!\");\r\n return 1;\r\n }\r\n\r\n else if(this.getRank() < hand.getRank()){\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n System.out.println(\"White wins!\");\r\n return -1;\r\n }\r\n else{\r\n System.out.println();\r\n System.out.println(\"Black: \" + this.getHand() + \" White: \" + hand.getHand());\r\n\r\n if(this.getHighCard() > hand.getHighCard()){\r\n System.out.println(\"Black Wins!\");\r\n return 1;\r\n }\r\n else if(hand.getHighCard() > this.getHighCard()){\r\n System.out.println(\"white Wins!\");\r\n }\r\n System.out.print(\"Tie!\");\r\n return 0;\r\n }\r\n\r\n }", "int compareTo(PokerHand other);", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public void AddCardToHumanHand(){\n //Add the first card to the human hand\n handHuman.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Arrays.toString(result));\r\n// Assert.isTrue(hr.getHandType() == HandType.HIGH);\r\n//\r\n// SimpleHandAggregator sha = new SimpleHandAggregator();\r\n// System.out.println(sha.scoreHand(hand));\r\n }", "@Override\r\n\tprotected int giveCardProtected(ArrayList<Card> hand) {\n\t\treturn getRandomCard(hand);\r\n\t}", "public void startOrder() {\n\t\tDeck tempDeck = new Deck();\n\t\tArrayList<Player> highPlayerList = new ArrayList<Player>();\n\t\tStrategy3 testPlayer = new Strategy3();\n\t\tint temp = 0;\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.hand.add(tempDeck.dealTile());\n\t\t}\n\t\t\n\t\twhile (playerList.isEmpty() == false) {\t\n\t\t\tPlayer min = playerList.get(0);\n\t\t\tfor(Player i : playerList) {\n\t\t\t\tif (i.getHandValue() > min.getHandValue()) {min = i;}\n\t\t\t}\n\t\t\thighPlayerList.add(min);\n\t\t\tplayerList.remove(min);\n\t\t}\n\t\tthis.playerList = highPlayerList;\t\n\t\ttemp = 0; \n\t\tfor(Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t}\n\t\t\n\t\tfor (Player p : playerList) {\n\t\t\tp.hand.clear();\n\t\t}\t\t\n\t}", "private Hand getStraight(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"getStraight(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\tSet<CardNumber> set = new HashSet<CardNumber>(hand.getNumberValues());\n\t\tif(set.size()<5){\n\t\t\tlog.debug(\"Only \"+set.size()+\" unique numbers\");\n\t\t\treturn null;\n\t\t}\n\t\tList<CardNumber> sorted = CollectionHelper.asSortedList(set);\n\t\tlog.debug(\"Sorted Size = \"+sorted.size());\n\t\tHand numberInSequence = new FiveCardHand();\n\t\tif(sorted.size()>1){\n\t\t\t//Inch worm a long, adding hands as this will handle more than 5 cards\n\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(0)));\n\t\t\tfor(int i=1; i<sorted.size();i++){\n\t\t\t\tif(CardUtil.areCardNumbersSequential(sorted.get(i-1),sorted.get(i))){\n\t\t\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(i)));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnumberInSequence = hand.getSubHandHavingNumber(sorted.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t //Check wrap around, (example: Ace)\n\t\t\tCardNumber start = sorted.get(0);\n\t\t\tCardNumber end = sorted.get(sorted.size()-1);\n\t\t\tlog.debug(\"Checking wrap around case, if \"+start+\" and \"\n\t\t\t\t\t+end+\" are sequential\");\n\t\t\tif(CardUtil.areCardNumbersSequential(start,end)){\n\t\t\t\tlog.debug(\"Wrap around Ace in play\");\n\t\t\t\t//Add the Ace\n\t\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(0)));\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Number of cards in sequence: \"+numberInSequence.getCards().size());\n\t\tif(numberInSequence.getCards().size()>4){\n\t\t\treturn numberInSequence;\n\t\t}\n\t\treturn null;\n\t}", "public PokerHand(Card... cards) {\n for (Card c : cards) {\n this.cards.add(c);\n }\n }", "@Override\n public int compare(Card card1, Card card2) {\n return card2.getId().compareTo\n (card1.getId());\n }", "private void dealCards(){\n\t\tfor(int k = 0; k <2;k++){\n\t\t\tfor(int i = 0; i < Players.size();i++){\n\t\t\t\tPlayers.get(i).addCardToHand(gameDeck.dealCard());\n\t\t\t}\n\t\t}\n\t\t\n\t setChanged();\n\t notifyObservers(\"CardsDealed\");\n\t}", "public void takeACard(Card card){\n hand.add(card);\n }", "public void shuffle() {\n\t\t\t/*\n\t\t\t * This is very different from the sort method because:\n\t\t\t * @ we decant the cards into an array list;\n\t\t\t * @ we use a library function to do the work;\n\t\t\t * The implementation you write for the sort method should\n\t\t\t * have *neither* of these characteristics.\n\t\t\t */\n\t\t\tList<Card> cards = new ArrayList<Card>();\n\t\t\twhile (!isEmpty()) {\n\t\t\t\tcards.add(draw());\n\t\t\t}\n\t\t\tCollections.shuffle(cards);\n\t\t\tfor (Card c: cards) {\n\t\t\t\tadd(c);\n\t\t\t}\n\t\t}", "public void Shuffle() {\n\t\tCollections.shuffle(cards);\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public void sort() {\n }", "public List<Card> getCards(){\n\t\treturn this.pile;\n\t}", "public Iterator<PolicyCard> getHand()\n {\n return hand.iterator();\n }", "public void sort(Comparator<Card> cmp) {\n\t\t\tassert wellFormed() : \"invariant false on entry to sort()\";\n\t\t\t// TODO\n\t\t\t// Implement insertion sort efficiently.\n\t\t\t// You may find it helpful to use \"remove\" (but watch about size!).\n\t\t\t// DO NOT use anything in the CardUtil class or any java.util class\n\n\n\t\t\tint n = 0;\n\t\t\tCard current = this.first;\n\n\n\t\t\tif(this.size > 0) {\n\t\t\t\t\n\t\t\t\tCard pointer, temp;\n\t\t\t\tcurrent = current.next;\n\n\t\t\t\twhile(current != null) {\n\t\t\t\t\tn = 0;\n\t\t\t\t\tpointer = current;\n\t\t\t\t\ttemp = current.prev;\n\t\t\t\t\tcurrent = current.next;\n\n\t\t\t\t\twhile(temp != null && cmp.compare(temp, pointer) > 0) {\n\t\t\t\t\t\t++n;\n\t\t\t\t\t\ttemp = temp.next;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(n != 0) {\n\n\t\t\t\t\t\tpointer.prev.next = pointer.next;\n\t\t\t\t\t\tif(pointer.next != null) {\n\t\t\t\t\t\t\tpointer.next.prev = pointer.prev;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(temp == null) {\n\t\t\t\t\t\t\ttemp = this.first;\n\t\t\t\t\t\t\tpointer.prev = null;\n\t\t\t\t\t\t\tpointer.next = temp;\n\t\t\t\t\t\t\tpointer.next.prev = pointer;\n\t\t\t\t\t\t\tthis.first = pointer;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\ttemp = temp.next;\n\t\t\t\t\t\t\ttemp.prev.next = pointer;\n\t\t\t\t\t\t\tpointer.prev = temp.prev;\n\t\t\t\t\t\t\ttemp.prev = pointer;\n\t\t\t\t\t\t\tpointer.next = temp;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tassert wellFormed() : \"invariant false on exit to sort()\";\n\t\t}", "private void sort() {\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(\n this.getChildren()\n );\n\n Collections.sort(workingCollection, new Comparator<Node>() {\n @Override\n public int compare(Node o1, Node o2) {\n CardView c1 = (CardView) o1;\n CardView c2 = (CardView) o2;\n return c1.getCard().compareTo(c2.getCard());\n }\n });\n\n this.getChildren().setAll(workingCollection);\n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "void getArrangedDeck() {\n\t\t\t\t\n\t\tint strength = 1;\n\t\t\n\t\tfor(int index = 0; index < this.numberOfCards; index++) {\n\n\t\t\tif((index+1)%4==0) {\n\t\t\t\tthis.cardsInDeck[index].setColor('\\u2660');\n\t\t\t} else {\n\t\t\t\tif((index+2)%4==0) {\n\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2665');\n\t\t\t\t} else {\n\t\t\t\t\tif((index+3)%4==0) {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2666');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2663');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.cardsInDeck[index].setStrength(strength);\n\t\t\tif((index+1) % 4 == 0){\n\t\t\t\tstrength++;\n\t\t\t}\n\t\t\t\n\t\t\tif (index >= 0 && index <= 3) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"2\");\n\t\t\t}\n\t\t\tif (index >= 4 && index <= 7) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"3\");\n\t\t\t}\n\t\t\tif (index >= 8 && index <= 11) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"4\");\n\t\t\t}\n\t\t\tif (index >= 12 && index <= 15) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"5\");\n\t\t\t}\n\t\t\tif (index >= 16 && index <= 19) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"6\");\n\t\t\t}\n\t\t\tif (index >= 20 && index <= 23) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"7\");\n\t\t\t}\n\t\t\tif (index >= 24 && index <= 27) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"8\");\n\t\t\t}\n\t\t\tif (index >= 28 && index <= 31) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"9\");\n\t\t\t}\n\t\t\tif (index >= 32 && index <= 35) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"10\");\n\t\t\t}\n\t\t\tif (index >= 36 && index <= 39) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"J\");\n\t\t\t}\n\t\t\tif (index >= 40 && index <= 43) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"Q\");\n\t\t\t}\n\t\t\tif (index >= 44 && index <= 47) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"K\");\n\t\t\t}\n\t\t\tif (index >= 48 && index <= 51) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"A\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "public void dealCards() {\n for(int i=0; i < 5; i++) { \n for(PokerPlayer player : players) {\n player.takeCard(deck.draw());\n }\n }\n }", "public Card getAllCards() {\n\t\tfor (Card cardInDeck : cards) {\n\t\t\tSystem.out.println(\"Rank: \" + cardInDeck.getRank() + \"\\n\"\n\t\t\t\t\t+ \"Suit: \" + cardInDeck.getSuit()+ \"\\n\");\n\t\t\t//System.out.println(i++);\n\t\t}\n\t\treturn null;\n\t}", "private int compareToHelper(PokerHand other) {\n int output=0;\n if (this.HandType > other.getHandType()){\n //System.out.println(\"\");\n output = -1;\n }else if (this.HandType < other.getHandType()) {\n //System.out.println(\"\");\n output = 1;\n } else{\n //this is the trouble case\n if(this.Hand[0].getValue()==other.Hand[0].getValue()) {\n /*\n if((this.HandType==9)||(this.HandType==8)||(this.HandType==7)||(this.HandType==4)||(this.HandType==3)){\n //if you have paris, compare pair primary ans secondary\n if(this.pairprimary==other.pairprimary){\n if(this.pairsecondary==other.pairsecondary){\n\n }\n }\n }else{\n */\n if(this.Hand.length==1){\n //System.out.println(\"\");\n output = 0;\n }else{//same exact hand\n PokerHand thisCopy = new PokerHand(\n Arrays.copyOfRange(this.Hand,1,this.Hand.length),this.HandType);\n output = -(thisCopy.compareTo(new PokerHand(\n Arrays.copyOfRange(other.Hand,1,other.Hand.length),other.getHandType())));\n }\n //}\n }else{\n //System.out.println(\"\");\n output = (this.Hand[0].getValue()-other.Hand[0].getValue());\n }\n\n }\n //System.out.print(output+\",\");\n return output;\n }", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "public void shuffle(){\r\n Collections.shuffle(cards);\r\n }", "void dealTheCards();", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public List<Card> getCardsInPlay() {\n List<Card> cards = new ArrayList<>(cardsInPlayStack);\n cardsInPlayStack.removeAllElements();\n return cards;\n }" ]
[ "0.81867355", "0.793171", "0.7595467", "0.7454618", "0.70789516", "0.70459694", "0.69861615", "0.6985108", "0.6947369", "0.6889746", "0.68435985", "0.679587", "0.66597724", "0.65930426", "0.6582829", "0.65760446", "0.65411997", "0.652425", "0.64995813", "0.64744747", "0.64438117", "0.64400196", "0.6423039", "0.64169544", "0.6405318", "0.63937575", "0.63795877", "0.6293882", "0.62629616", "0.62284565", "0.62234396", "0.62229246", "0.62199056", "0.62037945", "0.61739016", "0.6139437", "0.61369324", "0.6104357", "0.6102515", "0.6095072", "0.6084704", "0.6067581", "0.60468537", "0.60347223", "0.60168093", "0.6013807", "0.60136205", "0.6003829", "0.60012454", "0.5995735", "0.59942836", "0.59870726", "0.5966757", "0.59400713", "0.5929332", "0.59187603", "0.5913467", "0.5884771", "0.5881739", "0.5879616", "0.5858746", "0.58554816", "0.58479726", "0.58445585", "0.58349764", "0.58325154", "0.58322686", "0.5830299", "0.582725", "0.5821708", "0.5820245", "0.58197916", "0.58129025", "0.5798506", "0.5794948", "0.5794612", "0.57937837", "0.57848644", "0.57834095", "0.5781131", "0.5773558", "0.57663405", "0.57244474", "0.5723727", "0.572026", "0.57184607", "0.5717988", "0.5715309", "0.5711537", "0.5684422", "0.56797624", "0.56758004", "0.5668802", "0.5668778", "0.566715", "0.56543326", "0.5653474", "0.56502247", "0.564638", "0.5643684" ]
0.7109022
4
/ void resetHand() In: Nothing Out: Nothing Description: This sets the hand to its default state, containing no cards.
public void resetHand() { this.myCards = new Card[MAX_CARDS]; this.numCards = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public void resetActiveHand() {\n\t\tif (activeHand != null) {\n\t\t\tactiveHand.setActive(false);\n\t\t\tactiveHand = null;\n\t\t}\n\n\t}", "public void clearHand() {\n\t\thand.clear();\n\t}", "private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }", "public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "public void emptyHand();", "public void ResetGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n\n InitializeDeck();\n InitializeComputerHand();\n InitializeHumanHand();\n\n topCard = deck.get(0);\n }", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public void clearHand() {\n for (Component c : cardPane.getComponents()) {\n if (c instanceof Card) {\n cardPane.remove(c); //Removes all Cards from card panel\n }\n }\n busted = false; //Hand not busted\n values.clear(); //Removes all Integers from values\n values.add(0); //Sets initial value to 0\n updateValue(); //Updates value\n repaint(); //Redraws hand\n }", "public void resetHandRanks() {\n\t\tPlayer player;\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\tplayer.setPair(false);\n\t\t\tplayer.setTwoPairs(false);\n\t\t\tplayer.setTrips(false);\n\t\t\tplayer.setStraight(false);\n\t\t\tplayer.setFlush(false);\n\t\t\tplayer.setFullHouse(false);\n\t\t\tplayer.setQuads(false);\n\t\t\tplayer.setStrFlush(false);\n\t\t}\n\t}", "public void reset() {\r\n\r\n for ( Card card : cards ) {\r\n if ( card.isFaceUp() ) {\r\n card.toggleFace( true );\r\n }\r\n }\r\n Collections.shuffle( cards );\r\n\r\n this.undoStack = new ArrayList<>();\r\n\r\n this.moveCount = 0;\r\n\r\n announce( null );\r\n }", "public void reset() {\r\n\t\tcards.addAll(dealt);\r\n\t\tdealt.clear();\r\n\t}", "public void resetGame() {\n\t\thandler.setDown(false);\n\t\thandler.setLeft(false);\n\t\thandler.setRight(false);\n\t\thandler.setUp(false);\n\n\t\tclearOnce = 0;\n\t\thp = 100;\n\t\tfromAnotherScreen = true;\n\t\tsetState(1);\n\t}", "public void reset(){\n super.reset();\n this.troef = CardColor.NONE;\n }", "public void resetDeck() {\n cards.addAll(removedCards);\n removedCards.clear();\n }", "final void reset() {\r\n\t\t\tsp = 0;\r\n\t\t\thp = 0;\r\n\t\t}", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public void resetDeck() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (Suit f : Suit.values())\r\n\t\t\tfor (int i = 2; i < 15; i++)\r\n\t\t\t\tcards.add(new Card(i, f));\r\n\r\n\t}", "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "void setHand(Hand hand) {\n\t\t_hand = hand;\n\t}", "@Override\n\tpublic void reset(){\n\t\tstate.reset();\n\t\toldState.reset();\n\t\treturnAction = new boolean[Environment.numberOfButtons]; \n\t\trewardSoFar = 0;\n\t\tcurrentReward = 0;\n\t}", "public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }", "public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}", "public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public final void reset(){\n\t\tthis.undoStack = new GameStateStack();\n\t\tthis.redoStack = new GameStateStack();\n\t\t\n\t\tthis.currentBoard = currentRules.createBoard(currentSize);\n\t\tthis.currentRules.initBoard(currentBoard, currentInitCells, currentRandom);\n\t}", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset();", "public void reset() {\n\t\tinit(0, 0, 1, false);\n\t}", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}", "private void resetGame() {\n rockList.clear();\n\n initializeGame();\n }", "public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }", "public void reset()\n\t{\n\t}", "public void reset()\n\t{\n\t}", "public void reset() {\n\n players = new Player[numAIPlayers + 1];\n createHumanPlayer();\n createAIPlayers(numAIPlayers);\n wholeDeck.shuffle();\n\n // --- DEBUG LOG ---\n // The contents of the complete deck after it has been shuffled\n Logger.log(\"COMPLETE GAME DECK AFTER SHUFFLE:\", wholeDeck.toString());\n\n assignCards(wholeDeck, players);\n activePlayer = randomlySelectFirstPlayer(players);\n playersInGame = new ArrayList<>(Arrays.asList(players));\n winningCard = null;\n roundWinner = null;\n\n roundNumber = 1;\n drawRound = 0;\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "public void reset() {\n }", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "public void reset() {\n this.state = null;\n }", "public void ClearGame(){\n handComputer.clear();\n handHuman.clear();\n deck.clear();\n }", "public void setHand(ArrayList<Card> hand) {\n this.hand = hand;\n }", "public void reset () {}", "public void reset() {\r\n\t\tplayAgain = false;\r\n\t\tmainMenu = false;\r\n\t\tachievement = 0;\r\n\t}", "public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}", "@Override\n public void setOpponentsLastHand(Hand hand)\n {\n }", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "protected void resetState()\n {\n // Nothing to do by default.\n }", "public void resetGame()\r\n\t{\r\n\t\tthis.inProgress = false;\r\n\t\tthis.round = 0;\r\n\t\tthis.phase = 0;\r\n\t\tthis.prices = Share.generate();\r\n\t\tint i = 0;\r\n\t\twhile(i < this.prices.size())\r\n\t\t{\r\n\t\t\tthis.prices.get(i).addShares(Config.StartingStockPrice);\r\n\t\t\t++i;\r\n\t\t}\r\n\t\tint p = 0;\r\n\t\twhile(p < Config.PlayerLimit)\r\n\t\t{\r\n\t\t\tif(this.players[p] != null)\r\n\t\t\t{\r\n\t\t\t\tthis.players[p].reset();\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\tthis.deck = Card.createDeck();\r\n\t\tthis.onTable = new LinkedList<>();\r\n\t\tCollections.shuffle(this.deck);\r\n\t\tthis.dealToTable();\r\n\t}", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "public void reset() {\n\t board = new int[]{1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,\n 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0,\n 0, 0, 0, 2, 2, 2, 0, 0, 0, 0, 0, 2, 2, 2, 2};\n\t currentPlayer = 1;\n\t turnCount = 0;\n\t for (int i=0; i<81; i++) {\n\t \n\t\t hash ^= rand[3*i+board[i]]; //row-major order\n\t \n\t }\n }", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "public void reset() {\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\tairCrafts.clear();\r\n\t}", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "private void resetDeck()\n {\n Stack<Card> temp = new Stack<Card>();\n while(!waste.isEmpty())\n temp.push(waste.pop()); \n while(!temp.isEmpty())\n deck.addCard((Card)temp.pop());\n }", "private void reset() {\n }", "public final void Reset()\n\t{\n\t}", "private void resetHead() {\n mHead.setMode(Head.MODE_SMOOTH_TACKING);\n mHead.setWorldYaw(0);\n mHead.setWorldPitch(0.7f);\n }", "@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }", "public void reset() {\n\n }", "public void reset() {\n\n\t}", "public void resetState();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();", "void reset();" ]
[ "0.8879864", "0.8376941", "0.8209056", "0.8142579", "0.80779594", "0.7847258", "0.78375757", "0.7788418", "0.77542", "0.7730402", "0.7715235", "0.74301445", "0.72979105", "0.7162681", "0.71566236", "0.69952655", "0.6926683", "0.69198036", "0.6895407", "0.6874462", "0.6844765", "0.68181", "0.6796416", "0.67866987", "0.6702592", "0.6690643", "0.6675275", "0.66683334", "0.66247976", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.6608192", "0.66009796", "0.65884984", "0.6578917", "0.6572083", "0.65663785", "0.6556759", "0.6556759", "0.6542023", "0.65389115", "0.65389115", "0.65389115", "0.65389115", "0.6533891", "0.65263784", "0.65124476", "0.65083504", "0.6505581", "0.6501963", "0.6497261", "0.6494937", "0.648539", "0.64827436", "0.6477793", "0.6474009", "0.64651304", "0.64552724", "0.64552724", "0.64552724", "0.64552724", "0.6436257", "0.64336336", "0.64322287", "0.64270467", "0.6426782", "0.6424419", "0.6399647", "0.63979626", "0.6394139", "0.6387917", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838", "0.6368838" ]
0.8608125
1
/ boolean takeCard(Card) In: A Card object Out: True if there is room in the hand for the card, false if otherwise Description: This takes a Card object and places a copy of that object into the hand.
public boolean takeCard(Card card) { if (this.numCards >= MAX_CARDS) return false; else { this.myCards[numCards] = new Card(card); this.numCards++; return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "public void takeACard(Card card){\n hand.add(card);\n }", "public Card takeTurn() {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the player has it in their hand, then play it\n ArrayList<Card> cards = hand.getCards();\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(new Card(inputSuit, inputRank))) {\n return hand.draw(input);\n }\n }\n System.out.println(\"Invalid card. Try again\");\n }\n }", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "boolean canBeAdded(ICard toBeAddedCard);", "abstract boolean allowedToAdd(Card card);", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public boolean put(Card card) {\n if (this.isEmpty() && card.value() != 13) {\n return false;\n }\n if (!this.isEmpty()) {\n// System.out.println(\"chci polozit: \" + card + \" na \" + this.deck[this.top]);\n Card tmp = this.deck[this.top];\n// System.out.println(\"Rozdil karet je: \"+ tmp.compareValue(card) + \" Jsou si podobne?\" + tmp.similarColorTo(card));\n if (tmp.compareValue(card) != 1 || tmp.similarColorTo(card)) {\n// System.out.println(\"Nepolozeno - chyba\");\n return false;\n }\n }\n\n if (this.top+1 < this.size) {\n this.deck[++this.top] = card;\n return true;\n }\n else {\n return false;\n }\n }", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "public Card takeCard() {\n return this.deck.pop();\n }", "public void addCard(Card card) {\n personHand.add(card);\n }", "public Card chooseCard(Hand h, Trick t);", "public void addToHand(PlayingCard card){\n\t\thand.add(card);\n\t}", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "public void hitCard() {\n if (this.state == GameState.ROUNDACTIVE) {\n Seat s = this.getSeat(seatPlaying);\n if (s.hasPlayer()) {\n Hand h = s.getPlayer().getHands().get(0);\n h.addCard(this.deck.dealCard());\n if (h.getIsBusted()) {\n this.activeHandStand();\n }\n }\n repaintAll();\n }\n }", "public void catchCard(){\r\n changePlace(deck);\r\n changePlace(hand);\r\n }", "public boolean deal() {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards; k++) {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard(deck.dealCard());\n else {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "@Override\n\tpublic boolean addCard(UnoCard card){\n\t\treturn this.cardList.add(card);\n\t}", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "public boolean addCard(Card hit) {\n if (numOfCards == 10) {\r\n System.err.println(\"You already have 5 cards. \"\r\n + \"Cannot add another. \\n\");\r\n }\r\n //actually adding cards\r\n hand[numOfCards] = hit;\r\n numOfCards++;\r\n\r\n return (getHandSum() <= 21);\r\n }", "public void sell(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Sell: \" + card.getName()));\n card.sellAction(this);\n }\n }", "public void giveCard(Card c){\n\t\thand.add(c);\n\t}", "public Card push(Card card)\n {\n if (card != null)\n {\n cards.add(card);\n card.setBounds(0, 0, CARD_WIDTH, CARD_HEIGHT);\n add(card, 0);\n }\n \n return card;\n }", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[topCard++] = card;\n return true;\n }", "public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}", "public void applyCard(Card card, String user){\n if (user.equals(\"player\")){\n if (card == null){\n //System.out.println(\"No card in this slot\");\n //System.out.println(\"Size of tempDeck: \" + playerTempDeck.size());\n } else{\n if(playerMana >= card.getManaCost()){\n updateMana(\"player\", -card.getManaCost());\n //Check if has enough gold, too. Make free cards have a worth of gold = 0.\n //playerGoldAmount -= card.getGoldCost(); //------------------------------------------------Implement this once it can be tested.\n\n if(card.getEffect().contains(\"A\")){ //attack\n //looks long, but it finds the index of the Attack symbol (\"A\") and adds one to it, so it'll find the value 5 if the input is \"A5\", anywhere on the string.\n //Allows for things such as \"A4D1\" in theory.\n updateHealth(\"enemy\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) { //Defend\n updateDefence(\"player\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n\n //Discard the card just used, put into discarded pile.\n Integer index = playerHand.indexOf(card);\n discardedCards.add(card);\n //System.out.println(\"Current index is: \" + index);\n //System.out.println(\"At that index was: \" + playerHand.get(index));\n playerHand.set(index, null);\n\n\n //System.out.println(\"The deck is currently: \" + playerHand.toString());\n //playerHand.remove(card); //Doesn't work, shortens the size all together.\n drawCard(index);\n }\n }\n }\n\n else if (user.equals(\"enemy\")){\n if(enemyMana >= card.getManaCost()){\n updateMana(\"enemy\", -card.getManaCost());\n if(card.getEffect().contains(\"A\")){\n updateHealth(\"player\", -Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"A\") + 1)), true);\n }\n if(card.getEffect().contains(\"D\")) {\n updateDefence(\"enemy\", Character.getNumericValue(card.getEffect().charAt(card.getEffect().indexOf(\"D\") + 1)));\n }\n }\n }\n }", "void addCard(Card card) {\n\t\t_hand.addCard(card);\n\t}", "public void drawCard(Card card) {\n hand.addCard(card);\n }", "public void addCard(Card c)\n {\n hand.add(c);\n }", "public boolean addCard(Card card) {\n int cardCount = 0;\n //Check to see if the deck already has the maximum number of cards\n //of this type.\n for (Card cardInDeck : this.cards)\n if (cardInDeck.equals(card))\n cardCount++;\n //Return false is the card will not fit, or if it is invalid.\n if (cardCount >= this.numPacks || this.topCard >= this.MAX_CARDS || card.errorFlag)\n return false;\n this.topCard++;\n //Add the card object to the deck.\n this.cards[topCard - 1] = new Card(card);\n return true;\n }", "public void push(Card card){\n\t\t//Make sure the stack is not the deck or draw pile\n\t\tif(StackID > 1){\n\t\t\t//If it's one of the foundations...\n\t\t\tif(StackID < 6){\n\t\t\t\t//If the foundation wasn't empty, unhighlight the top card before putting the new card on it\n\t\t\t\tif(!Solitaire.foundations[StackID-2].isEmpty())\n\t\t\t\t\tSolitaire.foundations[StackID-2].peek().highlightOff();\n\t\t\t\t//Put the card on the right foundation\n\t\t\t\tSolitaire.foundations[StackID-2].place(card);\n\t\t\t//If it's one of the piles...\n\t\t\t} else if(StackID <= 12){\n\t\t\t\t//If the pile wasn't empty, unhighlight the top card before putting the new card on it\n\t\t\t\tif(!Solitaire.piles[StackID-6].isEmpty())\n\t\t\t\t\tSolitaire.piles[StackID-6].peek().highlightOff();\n\t\t\t\t//Put the card on the right pile\n\t\t\t\tSolitaire.piles[StackID-6].place(card);\n\t\t\t}\n\t\t}\n\t}", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "public int hit(Card card)\n\t{\n\t\thand.add(card);\n\t\treturn getHandTotal();\n\t}", "Card dealOneCard();", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public void Hit(Card card) {\r\n\t\tthis.cards++;\r\n\t\tthis.Hand.add(card);\r\n\t\tif (card.cardValue() == 11) {\r\n\t\t\tthis.aceCounter++;\r\n\t\t}\r\n\t}", "private static boolean handOutCards(Player player){\r\n\t\t/* \r\n\t\t * Seleccionamos una de las cartas restantes\r\n\t\t * en la baraja de forma aleatoria y se la \r\n\t\t * pasamos a la mano del jugador\r\n\t\t */\r\n\t\tint index;\r\n\r\n\t\t// Comprobamos las cartas restantes en la baraja\r\n\t\tif(deckOfCards.size() <= 0 || deckOfCards == null){\r\n\t\t\tSystem.err.println(\"No hay cartas para repartir.\");\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t// Seleccionamos una de las cartas de la baraja\r\n\t\t\tindex = (int) (Math.random()*deckOfCards.size());\r\n\t\t\tplayer.addCard(deckOfCards.get(index)); // Agregamos la carta a la mano del jugador\r\n\t\t\t// Eliminamos la carta de la baraja y lo mostramos en la consola\r\n\t\t\tSystem.out.println(player.getName() + \" recibió una carta con valor de \" + deckOfCards.remove(index).getValue() + \" puntos\"); \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "void pushCard(ICard card);", "public boolean push(Card card) {\n if (this.size() == 0) {\n if (card.get_value() != 1) {\n return false;\n }\n else {\n this.color = card.get_color();\n this.force_push(card);\n return true;\n }\n }\n else if (card.get_color() == this.color && card.get_value() == (1 + this.top().get_value())) {\n this.force_push(card);\n return true;\n }\n else {\n return false;\n }\n }", "public void addCardToHand(final Card card) {\n\t\tcahActivity.runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tcahActivity.addCardToHand(card);\n\t\t\t}\n\t\t});\n\t}", "public void addCard(Card card){\n\t\tthis.pile.add(0, card);\n\t}", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "private boolean offerCard(Player p) {\n\n //Offer card (take or pass)\n p.sendMessage(\"TAKE OR PASS\");\n\n //Wait until they take the card\n waitForPlayerAction(p, \"TAKE\", \"PASS\");\n\n if(actionChosen.equals(\"TAKE\")) {\n\n giveCard(p);\n return true;\n\n } else if(actionChosen.equals(\"PASS\")) {\n //Don't give card\n\n cList.sendToAll(\"Player \" + p.getUsername() + \" passes\");\n return false;\n }\n\n return false;\n }", "public void addCard(Card card)\n {\n if (card1 == null)\n {\n card1 = card;\n }\n else if (card2 == null)\n {\n card2 = card;\n }\n }", "protected final void hit() throws InsufficientCardsException {\n hand.add(deck.deal());\n update();\n }", "public void addCard(PlayingCard aCard);", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "public boolean buyCard(Supply s) {\r\n\t\tboolean wasBought;\r\n\t\tif(s.getQuantity() < 1 || contraband.contains(s.getTopCard())) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tCard c = s.getTopCard();\r\n\t\tbuying = true;\r\n\t\tbought.add(c);\r\n\t\tif(buys > 0 && treasure - c.getCost() >= 0 && c.canBeGained()\r\n\t\t\t\t&& (!c.costsPotion() || potion > 0)) {\r\n\t\t\ttreasure -= c.getCost();\r\n\t\t\tif(c.costsPotion()) potion--;\r\n\t\t\tbuys--;\r\n\t\t\ts.takeCard();\r\n\t\t\tdeck.gain(c);\r\n\t\t\tfor(int i = 0; i < s.getEmbargo(); i++) {\r\n\t\t\t\tbuying = false;\r\n\t\t\t\tdeck.gain(access.board.getCurse().takeCard());\r\n\t\t\t\tbuying = true;\r\n\t\t\t}\r\n\t\t\taccess.gamePhase = 2;\r\n\t\t\twasBought = true;\r\n\t\t\taccess.log(getPlayerName() + \" bought \" + c.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\twasBought = false;\r\n\t\t\tbought.remove(bought.size() - 1);\r\n\t\t}\r\n\t\tif(buys < 1) {\r\n\t\t\taccess.gamePhase = 3;\r\n\t\t}\r\n\t\tbuying = false;\r\n\t\tnotifyObservers();\r\n\t\treturn wasBought;\r\n\t}", "public Hand(Hand toCopy) {\n if (toCopy.hole1 instanceof BlankCard) {\n hole1 = new BlankCard();\n hole2 = new BlankCard();\n } else {\n hole1 = new Card((Card)toCopy.hole1);\n hole2 = new Card((Card)toCopy.hole2);\n }\n showCards = toCopy.showCards;\n }", "public boolean isFlush(){\n \r\n if(haveSameSuit(cards)){\r\n handValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "void setCard(Card card) {\n this.card = card;\n }", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public void addWinning2(Card card)\n {\n player2Hand.enqueue(card);\n }", "@Override\n public boolean shouldDrawCard(Card topPileCard, Card.Suit changedSuit) {\n topCard = topPileCard;\n boolean drawCard = true;\n for (Card card : cardsInHand) {\n if (card.getSuit().equals(changedSuit) || card.getRank().equals(topPileCard.getRank())) {\n drawCard = false;\n break;\n }\n }\n return drawCard;\n }", "public boolean takeShot(Point shot) {\n return opponentsBoard.takeShot(shot);\n }", "public void putCard(Cards cards) {\n playedCards.add(cards);\n }", "public boolean hit() {\r\n add(deck.deal());\r\n return getHandValue() <= 21;\r\n }", "public boolean takeCardReward(int i){\n if(!isGameOver() || character.getHp() <= 0 )return false;\n if( cardRewardGiven )return false;\n Pile cPile = character.getDeck();\n Card c = reward.getCards().get(i);\n System.out.println(\"**IN takeCardReward, card name is : \" + c.getName());\n character.getDeck().addCard(c);\n cardRewardGiven=true;\n return true;\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public boolean play(DiscardPile discardPile, \n\t Stack<Card> drawPile, \n\t\t\t\t\t\t\t\t\t\t\tArrayList<Player> players)\n\t{\t\n\t\n\t\n\tSystem.out.println(\"Before playing: \" + this.hand.toString());\n\t\tboolean temp = false;\n\t\tString suitEight = \"xyz\";\n\t\n\t\tif ((discardPile.top()).getRank() == 4 && super.checker_4 == true){\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\tSystem.out.println(\"\\t | skipping the turn.. :( |\");\n\t\t\tSystem.out.println(\"\\t -----------------------------\");\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println();\n\t\t\tsuper.checker_4 = false;\n\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t\t/* adding two cards */\n\t\t if ((discardPile.top()).getRank() == 2 && super.checker_2 == true){\n\t\t\t \n\t\t\t System.out.println();\n\t\t\t System.out.println(\"\\t _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \");\n\t\t\t System.out.println(\"\\t | twice the value added! |\");\n\t\t\t System.out.println(\"\\t -----------------------------\");\n\t\t\t System.out.println();\n\t\t\t System.out.println();\n\t\t\t \n\t\t\t \n\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t this.hand.add(drawPile.pop());\n\t\t\ttemp = false;\n\t\t\tsuper.checker_2 = false;\n\t\t }\n\t\t\n\t\t\n\t\t \n\t\t\n\t\telse{\n\t\t\tint i = location_1(discardPile);\n\t\t\t\n\t\t\t\n\t\t\tif(i == -1){\n\t\t\t\tthis.hand.add(drawPile.pop());\n\t\t\t\tif( i == location_2(discardPile)){ \n\t\t\t\t\t//System.out.println(\"value is added!\");\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\t//System.out.println();\n\t\t\t\t\n\t\t\t\t} else{\n\t\t\t\t\ti = location_2(discardPile);\n\t\t\t\t\t//System.out.println(\"HAHA! got it!\");\n\t\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\t\ttemp = false;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else{\n\t\t\t\tdiscardPile.add(this.hand.remove(i));\n\t\t\t\ttemp = false;\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 2 && super.checker_2 == false){\n\t\t\t\t\t\tsuper.checker_2 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(discardPile.top().getRank() == 4 && super.checker_4 == false){\n\t\t\t\t\tsuper.checker_4 = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ((discardPile.top()).getRank() == 8 && temp == false){\n\t\t\t\t\t\tsuitEight = this.wildEight(discardPile, drawPile, players);\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t Changing the suit to: \" + suitEight);\n\t\t\t\t\t\tSystem.out.print(\"\\t \\t \\t Processing....\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t(discardPile.top()).setSuit(suitEight);\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t draw pile : \" + drawPile.peek() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t \\t discard pile : \" + discardPile.top() );\n\t\t\t\t\t\tSystem.out.println(\"\\t \\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( this.hand.size() == 0 ){\n\t\t\t\t\ttemp = true;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\n\n\t\t\n\t\t\n\t\n\t\tSystem.out.println(\"After Playing: \" + this.hand.toString());\n\t\tSystem.out.println();\n\t\treturn temp;\n\t\t\n\t\n\t}", "public boolean belongsToSuit(Card card){\r\n return (suit == card.suit);\r\n }", "public boolean addHand(Hand hand) {\n\t\treturn hands.add(hand);\n\t}", "void dealTheCards();", "private boolean canPlay(UnoCard topCard, UnoCard newCard) {\n\n\t\t// Color or value matches\n\t\tif (topCard.getColor().equals(newCard.getColor())\n\t\t\t\t|| topCard.getValue().equals(newCard.getValue()))\n\t\t\treturn true;\n\t\t// if chosen wild card color matches\n\t\telse if (topCard instanceof WildCard)\n\t\t\treturn ((WildCard) topCard).getWildColor().equals(newCard.getColor());\n\n\t\t// suppose the new card is a wild card\n\t\telse if (newCard instanceof WildCard)\n\t\t\treturn true;\n\n\t\t// else\n\t\treturn false;\n\t}", "public void removeCardAndAddToHand(int location,ArrayList<Card> hand) {\n// if(cards.get(location).equals()){\n hand.add(cards.get(location));\n cards.remove(location);\n// }\n //add to player\n }", "public void addToCollected(PlayingCard card){\n\t\tcollected.add(card);\t\t\n\t}", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public boolean hit()\n\t{\n\t\taddCardToHand(new BlackJackCard());\n\t\treturn getHandValue() <= 21;\n\t}", "public void discard(Card card) {\n discardPile.add(card);\n }", "public boolean rulesForAddingCard(Card card)\n\t{\n\t\treturn true;\n\t}", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "public boolean takeItem(Items item)\n { \n boolean itemTaken = false;\n if(!haveItem(item) && currentRoom.haveItem(item)){ //if item in room not inventory\n if(!item.canBeHeld()){ // if item can't be held\n System.out.println (\"This item can not be picked up\");\n }else if(itemsHeld >= itemLimit) { //item can be held but not enough space\n System.out.println(\"Inventory is full. Drop something first\");\n }else{ //item can be held and there is space in inventory\n Inventory.put(item.getName(), item);\n //currentRoom.removeItem(item); //responsibility for this is in cmd_take\n itemsHeld ++; //inventory tracker +1\n itemTaken = true;\n }\n }\n return itemTaken;\n }", "public boolean addToTable(Card cardInPlay) {\n\t\tArrayList<Card> cardsInPlay = new ArrayList<Card>();\n\t\tcardsInPlay.add(cardInPlay);\n\t\treturn addToTable(cardsInPlay);\n\t}", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "private void push( Card card ) {\r\n undoStack.add( card );\r\n }", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "public void addToDiscard(Card card) {\r\n\t\tthis.discard.add(card);\r\n\t}", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }", "public void AddCardToHumanHand(){\n //Add the first card to the human hand\n handHuman.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "public interface CardHand { // if you want to be considered a CardHand you MUST define these methods(behaviors)\n\t\n\tpublic ArrayList<PlayingCard> getHand(); // returns the cards in the hand as an ArrayList\n\n\tpublic void addCard(PlayingCard aCard); // receive a PlayingCard and add to the hand\n\t\n\tpublic void emptyHand(); // remove all PlayingCards from the hand\n\n\tpublic void show(); // display all the cards in the hand\n\n}", "public void addCard(Card card, GamePlayer GP){\n for(int i=0; i<4; i++){\n if(cardsPlayed[i] == null){\n cardsPlayed[i]=card;\n if(i == 0){\n suit = card.getSuit();\n }\n break;\n }\n }\n }", "public void addWinning1(Card card)\n {\n player1Hand.enqueue(card);\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "public boolean isValidMove(Card card)\n {\n return false;\n }", "public boolean addTopCard( Card c)\r\n {\r\n if ( valid < cards.length)\r\n {\r\n cards[valid] = c; // should this be cloned?\r\n valid++;\r\n return true;\r\n }\r\n return false;\r\n }", "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "@Test\r\n public void testRemoveFromHand() {\r\n Player player = new Player();\r\n boolean expResult = false;\r\n boolean result = player.removeFromHand(0);\r\n assertEquals(expResult, result);\r\n \r\n Stack stack=new Stack(false);\r\n player.setHand(stack.drawTiles(2));\r\n player.removeFromHand(0);\r\n ArrayList <Tile> temp=player.getHand();\r\n Tile tile=new Tile(0,1);\r\n \r\n boolean expResult2=true;\r\n boolean result2=(player.getHand().get(0).getHead()==0 && player.getHand().get(0).getTail()==1);\r\n assertEquals(expResult2, result2);\r\n \r\n \r\n \r\n \r\n }", "boolean similarCard(Card c);", "public boolean canCapture(Card otherCard) {\n return this.getRank().equals(Rank.JACK) || this.compareRank(otherCard);\n }", "private void putCurrentCard() {\n int temp = 0;\n while (true) {\n if(!(cards.get(temp) instanceof WildCard) ) {\n currentCard = cards.get(temp);\n cards.remove(temp);\n break;\n }\n temp++;\n }\n if (!(currentCard instanceof NumberCard)) {\n show();\n }\n //Reverse\n if (currentCard instanceof ReverseCard) {\n ((ReverseCard) currentCard).changeState(state);\n }\n //Skip\n if (currentCard instanceof SkipCard) {\n ((SkipCard) currentCard).changeState(state);\n }\n //Draw2\n if (currentCard instanceof Draw2Card) {\n System.out.println(\"The player was fined.\");\n for (int i = 0; i < ((Draw2Card) currentCard).getForcedCards(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.nextTurn();\n }\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Card createCard();", "public void getCard(Card card, Board board){\n card.action(this, board);\n }", "private void addCardToDeck(Card card) {\n\t\tdeck.add(card);\n\t}" ]
[ "0.77605283", "0.72874486", "0.6534812", "0.6349677", "0.6339647", "0.6289991", "0.6264207", "0.62598526", "0.62585145", "0.61841035", "0.6170144", "0.61563754", "0.6153908", "0.6119176", "0.60964197", "0.6078454", "0.60492224", "0.60350263", "0.60309064", "0.6022675", "0.6010034", "0.6004568", "0.59967923", "0.594715", "0.58915144", "0.58898085", "0.58830404", "0.58714426", "0.5864345", "0.5855358", "0.5816717", "0.58115375", "0.5810534", "0.5802382", "0.5796383", "0.57848793", "0.5770545", "0.57638943", "0.5760498", "0.5757415", "0.57495224", "0.5745242", "0.572446", "0.5712935", "0.5711013", "0.5708607", "0.5702389", "0.569739", "0.5696993", "0.56898826", "0.56887907", "0.56879604", "0.56864005", "0.5677586", "0.5659309", "0.5647345", "0.5643679", "0.5640472", "0.5637819", "0.56244403", "0.5621208", "0.56141317", "0.56101644", "0.5605983", "0.5604881", "0.55956155", "0.55927", "0.55911875", "0.55905956", "0.5582258", "0.558049", "0.55659837", "0.55591244", "0.55589014", "0.5558736", "0.553283", "0.5528917", "0.5521369", "0.5520882", "0.5518345", "0.5510191", "0.5501668", "0.55011666", "0.5500122", "0.54938936", "0.5472679", "0.5454841", "0.5451777", "0.5451129", "0.5450979", "0.5449972", "0.5444929", "0.5444796", "0.5440164", "0.5432921", "0.54327774", "0.543147", "0.54276574", "0.5426531", "0.54262596" ]
0.75303763
1
/ Card playCard() In: Nothing Out: A Card object with the same values as the card on the top of the hand. Description: This creates a copy of the first card in the hand and returns it to the caller.
public Card playCard() { Card card = this.myCards[this.numCards - 1]; this.myCards[this.numCards - 1] = null; this.numCards--; return card; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }", "public Card playCard(int cardIndex)\r\n {\r\n if (numCards == 0) // error\r\n {\r\n // Creates a card that does not work\r\n return new Card('E', Card.Suit.SPADES);\r\n }\r\n // Save the current card\r\n Card card = myCards[cardIndex];\r\n // Decreases numCards.\r\n numCards--;\r\n for (int i = cardIndex; i < numCards; i++)\r\n {\r\n myCards[i] = myCards[i + 1];\r\n }\r\n\r\n myCards[numCards] = null;\r\n\r\n return card;\r\n }", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "private PlayingCard chooseCard(HeartsGraphics g){\t\t\n\t\tHearts.setCurrentPlayer(this);\n\t\t\n\t\tif(number != PLAYER_ONE){\n\t\t\t// A.I. code\n\t\t\tint index;\n\t\t\t\n\t\t\tRandom r = new Random();\n\t\t\tindex = r.nextInt(hand.size());\t\t\t\n\t\t\t\n\t\t\treturn hand.get(index);\t\t\t\n\t\t} else {\n\t\t\treturn getCard(g);\n\t\t}\t\t\n\t}", "public Card takeCard() {\n return this.deck.pop();\n }", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card takeTurn() {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the player has it in their hand, then play it\n ArrayList<Card> cards = hand.getCards();\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(new Card(inputSuit, inputRank))) {\n return hand.draw(input);\n }\n }\n System.out.println(\"Invalid card. Try again\");\n }\n }", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public Card drawCard() {\n\t\tCard c = cards.get(0);\n\t\tcards.remove(0);\n\n\t\treturn c;\n\t}", "public Card getPlayer2Card()\n {\n player2card = new Card(player2Hand.dequeue().toString());\n return player2card;\n \n }", "Card playCard(int playerIndex, int cardIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1 ||\n cardIndex < 0 || cardIndex > numCardsPerHand - 1)\n {\n //Creates a card that does not work\n return new Card('M', Card.Suit.spades); \n }\n\n // return the card played\n return hand[playerIndex].playCard(cardIndex);\n\n }", "public Card playCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.numCards || k < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Return the card in that position, and\n //move all of the cards after that card\n //back by one position.\n Card card = new Card(this.myCards[k]);\n for (int i = k + 1; i < this.numCards; i++) {\n this.myCards[i - 1] = this.myCards[i];\n this.myCards[i] = null;\n }\n this.numCards--;\n return card;\n }\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "@Override\n public Card chooseCardtoPlay() {\n assert(card1 != null && card2 != null);\n if (card1.value == Card.PRINCESS) return playCard2();\n if (card2.value == Card.PRINCESS) return playCard1();\n return rand.nextBoolean() ? playCard1() : playCard2();\n }", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "@Override\n public Card cardToPlay(TurnState state, CardSet hand) {\n //Causes the player to spend a certain amount of time for each card\n double currentTime = System.currentTimeMillis();\n Card card = underlyingPlayer.cardToPlay(state, hand);\n try {\n long totalTime;\n if ((totalTime = (minTime - ((long) System.currentTimeMillis() - (long) currentTime))) > 0) {\n Thread.sleep(totalTime);\n }\n } catch (InterruptedException e) {\n }\n return card;\n }", "private static int play() {\n\n Hand h = new Hand();\n int handValue = 0;\n\n // Deck deck = new Deck(); // Get a new deck of cards, and\n // store a reference to it in\n // the variable, deck.\n\n for (int i=0;i<3;i++) {\n Card c = new Card(3,Card.VICTORY);\n h.addCard(c);\n }\n for (int i=0;i<7;i++) {\n Card c = new Card();\n h.addCard(c);\n }\n\n for (int i=0;i<h.getCardCount();i++) {\n Card c = h.getCard(i);\n System.out.println(c.toString());\n handValue += c.getValue();\n }\n\n return handValue;\n }", "public void takeACard(Card card){\n hand.add(card);\n }", "public Card drawCard() {\n return deck.pop();\n }", "public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }", "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}", "public Card drawCard() {\n\t// To draw a card, it isn't necessary to change the contents of the array.\n\t// But you do want to make sure that each card can be drawn only once.\n\t// Do you see how to do this? (Hint: it's easiest to draw cards from the\n\t// high end of the array.)\n\t\n\tif (cardsLeft==0)\n\t return null;\n\tcardsLeft--;\n\treturn (this.cards[cardsLeft]);\n \n }", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public Card copy(){\n return new Card(Suits, Value);\n }", "public void playCard(int player, int card) {\n }", "public Board.Cards buyCard(Board.Cards card) {\n \t\tif (!affordCard())\n \t\t\treturn null;\n \n \t\t// out of cards\n \t\tif (card == null)\n \t\t\treturn null;\n \n \t\t// deduct resources\n \t\tuseResources(Type.WOOL, 1);\n \t\tuseResources(Type.GRAIN, 1);\n \t\tuseResources(Type.ORE, 1);\n \n \t\tif (card == Cards.VICTORY)\n \t\t\tvictory += 1;\n \t\telse\n \t\t\tnewCards.add(card);\n \n \t\tappendAction(R.string.player_bought_card);\n \n \t\treturn card;\n \t}", "public Card push(Card card)\n {\n if (card != null)\n {\n cards.add(card);\n card.setBounds(0, 0, CARD_WIDTH, CARD_HEIGHT);\n add(card, 0);\n }\n \n return card;\n }", "public Card getNextPlayerCard()\n\t{\n\t\tDeck<Card> playerCards = board.getPlayerCardDeck();\n\t\tif (playerCards.isEmpty())\n\t\t{\n\t\t\tsystemDataInput.printMessage(\"There is no player card to play the game.\");\n\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCard topCard = playerCards.pickTopCard();\n\t\t\tif (playerCards.size() == 1)\n\t\t\t{\n\t\t\t\tsystemDataInput.printMessage(\"The last player card \" + topCard.getName() + \" has been picked up. This is the end of the game.\");\n\t\t\t\tendGame(EndGameType.noPlayerCard);\n\t\t\t}\n\t\t\t\n\t\t\treturn topCard;\n\t\t}\n\t}", "public Card next();", "private Card drawCard() {\n return cardStack.pop();\n }", "public Card drawCard() {\n return gameDeck.removeTopCard();\n }", "public Card takeTurn(Suit suit, int rank) throws InvalidCardException {\n //display current hand and prompt the user to input a card to play\n Scanner scanner = new Scanner(System.in);\n while(true) {\n System.out.println(name+\"'s turn\");\n System.out.println(\"Your current hand is:\");\n System.out.print(\"[\"+hand.getCards().get(0));\n for(int i=1; i<hand.getCards().size(); i++) {\n System.out.print(\", \"+hand.getCards().get(i));\n }\n System.out.println(\"]\");\n System.out.println(\"Which card do you want to play?\");\n //read the user's input and make sure it's a valid card\n String input = scanner.next();\n //if the user entered nothing, they draw by default\n if(input.equals(\"none\")) {\n return null;\n }\n Suit inputSuit = null;\n switch(input.substring(input.length()-1).toLowerCase()) {\n case \"c\":\n inputSuit = Suit.CLUBS;\n break;\n case \"s\":\n inputSuit = Suit.SPADES;\n break;\n case \"h\":\n inputSuit = Suit.HEARTS;\n break;\n case \"d\":\n inputSuit = Suit.DIAMONDS;\n break;\n default:\n throw new InvalidCardException(\"Invalid suit\");\n }\n int inputRank = Integer.parseInt(input.substring(0,input.length()-1));\n if(inputRank < 1 || inputRank > 13) {\n throw new InvalidCardException(\"Invalid rank\");\n }\n //if the card is playable and the player has it in their hand, then play it\n if(inputSuit.equals(suit) || inputRank == rank) {\n ArrayList<Card> cards = hand.getCards();\n Card card = new Card(inputSuit, inputRank);\n for(int i=0; i<cards.size(); i++) {\n if(cards.get(i).equals(card)) {\n return hand.draw(input);\n }\n }\n System.out.println(\"You do not have that card\");\n } else if(hand.getCards().contains(new Card(inputSuit, inputRank)) && inputRank == 8) { //this makes 8s always playable\n return hand.draw(input);\n } else {\n System.out.println(\"Invalid card. Try again\");\n }\n }\n }", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public Card drawFromDeck() {\n\t\treturn cards.remove(0);\n\t}", "public void AddCardToComputerHand(){\n //Add the first card to the computer\n handComputer.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "public final PlayingCard chooseRoundCard(HeartsGraphics g){\n\t\treturn hand.get(hand.indexOf(chooseCard(g)));\n\t}", "public void playCard(ActionCard card, Integer selectedPlayer)\n {\n System.out.println(\"gui: playCard: \" + card + \", selected: \" + selectedPlayer);\n // Guard against this\n if (!isTurn || this.played)\n {\n return;\n }\n \n if(card instanceof PrivateTip || card instanceof Snoop) \n {\n if(selectedPlayer == null) \n {\n JOptionPane.showMessageDialog(null, \"Please select \"\n + \"a player in the \"\n + \"Player Listing (Upper right) that is not yourself!\", \n \"Warning\", \n JOptionPane.ERROR_MESSAGE); \n return;\n }\n }\n\n if (card instanceof Suggestion)\n {\n this.played = true;\n // prompt for solution\n suggestionScreen = new AccusationScreen(this, true, (Suggestion)card);\n suggestionScreen.setVisible(true);\n }\n else\n {\n this.played = clientController.playActionCard(card, selectedPlayer);\n if(!this.played)\n {\n mainGameScreen.notifyUser(\"Play failed: To Play this card,\"\n + \" please select a CluePlayer from the 'Players' list,\"\n + \" then click on this card.\");\n }\n }\n\n }", "public Card enemyPlayCard(){ //Is it really worth the effort to give the enemy a full deck/temp hand? Having 2-4 basic abilities that vary should be enough.\n if(!(enemyHand.isEmpty())){\n return enemyHand.get(0);\n } else {\n return null;\n }\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (int i = ONE; i < this.numOfCards; i++) {\r\n this.deck[i - ONE] = this.deck[i];\r\n }\r\n this.deck[this.numOfCards - ONE] = null;\r\n //decrement the number of cards currently in the deck \r\n this.numOfCards--;\r\n\r\n return top;\r\n }", "public CardGao nextCard()\r\n {\r\n return cards.get(top--);\r\n }", "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "public Card chooseCard(Hand h, Trick t);", "public void returnCard(Card newCard)\n {\n if(!isEmpty())\n {\n newCard.setNext(top);\n top = newCard;\n }\n else\n {\n top = newCard;\n }\n \n size++;\n }", "public void testGetCard() {\n System.out.println(\"getCard\");\n Card expResult = new Card(Rank.QUEEN, Suit.SPADES);\n Play instance = new Play(\"Player1\", expResult);\n Card result = instance.getCard();\n assertEquals(expResult, result);\n }", "public TrainCard draw(){\n TrainCard card = cardDeck.get(0);\n cardDeck.remove(0);\n return card;\n }", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "public void addCard(PlayingCard aCard);", "public Card draw() {\n\t\t\n\t\tCard topCard = deck.get(0);\n\t\tdeck.remove(0);\n\t\treturn topCard;\n\t\t\n\t}", "public Player switchPlayer(){\n Player player = getGame().getCurrentPlayer();\n\n List<Card> cards = new ArrayList<>();\n\n for(Card card: getGame().getCards()){\n if(card.rule.isValid(getGame().getDices())){\n cards.add(card);\n }\n }\n\n //get the best card\n if(!cards.isEmpty()){\n Card card = takeTheBestCard(cards);\n\n //add it to the player\n player.getCardsWon().add(card);\n getGame().getCards().remove(card);\n\n System.out.println(player.getName() + \" won \" + card.getExplaination());\n getGame().addAction(new Action(player.getName() + \" won \" + card.getExplaination()));\n }\n\n if(getGame().getCards().isEmpty()){\n game.setStatus(Game.GameStatus.COMPLETED);\n getGame().addAction(new Action(bestPlayer().getName() + \" WON THE GAME!!!\"));\n }\n //turn\n getGame().setCountOfTrialForPlayer(0);\n\n game.setIndexOfCurrentPlayer(game.getIndexOfCurrentPlayer()+1);\n\n if(game.getIndexOfCurrentPlayer() == getGame().getPlayers().size()){\n game.setIndexOfCurrentPlayer(0);\n }\n\n game.setCountOfTrialForPlayer(0);\n game.setDices(new ArrayList<>());\n\n return getGame().getCurrentPlayer();\n }", "public Card dealOne() {\r\n\t\tif (cards.isEmpty()) {\r\n\t\t\t// Make this and retrieve_one an exception instead?\r\n\t\t\tSystem.out.println(\"dealOne(): Deck is empty\");\r\n\t\t}\r\n\t\tCard topCard = top();\r\n\t\tcards.remove(cards.size() - 1);\r\n\t\treturn topCard;\r\n\t}", "public void getCard(Card card, Board board){\n card.action(this, board);\n }", "public Card viewTopCardInPlay(){\n if(cardsInPlayStack.isEmpty()) {\n return null;\n }\n return cardsInPlayStack.peek();\n }", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public T drawCard() {\n\t\treturn (T) this.deck.pop();\n\t}", "public Card playCard(Card card, Deck faceDown, Deck faceUp, Card.Face face, Card.Suit suit) {\n if (card == faceDown.peekTopCard()) {\n drawCard(faceDown);\n return card;\n }\n else if (accordingToRules(card, face, suit)) {\n this.putDownCard(faceUp, card);\n return card;\n }\n else {\n return null;\n }\n }", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "public Card nextCard()\n\t{\n\t\tif (this.card[0] == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//get top card\n\t\t\tCard top = this.card[0];\n\t\t\t\t\t\n\t\t\t//Move the dealt card so it can be later deleted // -1\n\t\t\tfor (int i = 1; i < this.cardNumber; i++) \n\t\t\t{\n\t\t\t\tthis.card[i-1] = this.card[i]; \n\t\t\t}\n\t\t\t//To delete the last card to make sure its same position/ Set it to Null\n\t\t\tthis.card[this.cardNumber-1] = null;\n\t\t\t//After dealt the count of cards in deck goes down --\n\t\t\tthis.cardNumber--;\n\t\t\t\t\t\n\t\t\treturn top;\n\t\t}\n\t}", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public Card getCard(){\n return cards.get(0);\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public Card getPresentCard() {\n return storageCards.peek();\n }", "public void play() {\n\t\t// setting up\n\t\tdeck = new Deck();\n\t\tdeck.shuffle();\n\t\tint turn = 0;\n\t\tRandom rand = new Random();\n\t\tCardRank previousCardRank = null;\n\t\tboolean snapTime = false;\n\t\t\n\t\t// the turning card loop, which ends when two cards with the same value/rank are revealed\n\t\t// or when no cards are left in the deck\n\t\twhile (!snapTime) {\n\t\t\tString currentPlayer = (turn % 2 == 0) ? player1 : player2;\n\t\t\t\n\t\t\tint timeout = 1000 + rand.nextInt(1000);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) timeout);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tCard nextCard = deck.turnCard();\n\t\t\t\n\t\t\t// possible draw if no cards are left in the deck\n\t\t\tif (nextCard == null) {\n\t\t\t\tSystem.out.println(\"No cards left in the deck! It's a draw!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tSystem.out.println(currentPlayer + \" turns card \\'\" + nextCard + \"\\'\");\n\t\t\t\n\t\t\tturn++;\n\t\t\t\n\t\t\t// trigger the end of the turning card loop\n\t\t\tif (nextCard.getCardRank() == previousCardRank) {\n\t\t\t\tsnapTime = true;\n\t\t\t}\n\t\t\tpreviousCardRank = nextCard.getCardRank();\n\t\t}\n\t\t\n\t\t// simulate the time needed for both players to say \"SNAP!\"\n\t\tint snapTimeoutP1 = 500 + rand.nextInt(1000);\n\t\tint snapTimeoutP2 = 500 + rand.nextInt(1000);\n\t\t\n\t\t// rare draw situation, if the two players say \"SNAP!\" at the same time\n\t\tif (snapTimeoutP1 == snapTimeoutP2) {\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) snapTimeoutP1);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(\"SNAP! It's a draw!\");\n\t\t}\n\t\t// in most cases, a player will say \"SNAP!\" first, and they will be the winner\n\t\telse {\n\t\t\tString result = String.format(\"SNAP! %s is the winner!\", (snapTimeoutP1 < snapTimeoutP2) ? player1 : player2);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tTimeUnit.MILLISECONDS.sleep((long) Math.min(snapTimeoutP1, snapTimeoutP2));\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}\n\t}", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "public Card getCard() {\n return this.card;\n }", "public List<Card> getCardsInPlay() {\n List<Card> cards = new ArrayList<>(cardsInPlayStack);\n cardsInPlayStack.removeAllElements();\n return cards;\n }", "public Card drawCardFromTop() {\n Card temp = this.cards [this.topCardIndex];\n this.topCardIndex++;\n return temp;\n }", "public void drawCard(Card card) {\n hand.addCard(card);\n }", "@Override\n\t\n\tpublic PlayingCard drawCard() {\n\t\tif(getCount() > 0) {\n\t\t\tPlayingCard obersteKarte = aktuellesDeck[getCount() - 1];\n\t\t\taktuellesDeck[getCount() - 1] = null;\n\t\t\tcount--;\n\t\t\treturn obersteKarte;\n\t\t}else {\n\t\t\tSystem.out.println(\"Stapel leer! Karte ziehen nicht mehr möglich.\");\n\t\t\treturn null;\n\t\t}\n\t}", "public Card getCard(Card c){\n\t\tif(contains(c)){\n\t\t\tfor(int i = 0; i < hand.size(); i ++)\n\t\t\t{\n\t\t\t\tif(hand.get(i).getSuit().equals(c.getSuit()))\n\t\t\t\t{\n\t\t\t\t\thand.remove(i);\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//else\n\t\treturn null;\n\t}", "public PlayingCard getPlayed(){\n\t\treturn played;\n\t}", "public void addToHand(PlayingCard card){\n\t\thand.add(card);\n\t}", "public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}", "public Card getCard() {\n return this.card;\n }", "public Card getActivePlayerOneCard()\n\t{\n\t\treturn activePlayerOneCard;\n\t}", "public boolean playCard(Card card){\n boolean b = effectHandler.playCard( card , null);\n return b;\n }", "public Card deal() {\n\t\tif (cardsUsed == deck.length)\n\t\t\tthrow new IllegalStateException(\"No cards are left in the deck.\");\n\t\tcardsUsed++;\n\t\treturn deck[cardsUsed - 1];\n\n\t}", "public PlayingCard(){\n\t\tsuper();\n\t}", "Card drawCard() {\n if (this.pointer >= this.cards.size()) {\n throw new NoMoreCardsAvailableException();\n }\n return cards.get(pointer++);\n }", "public Card deal()\n\t{\n\t\tif (cards.isEmpty())\n\t\t\treturn null;\n\t\t\n\t\t//Generate a random index to pull a random card from the ordered deck\n\t\tint rand = (int) (Math.random() * cards.size());\n\t\tCard dealt = cards.get(rand);\n\t\t//Remove the pulled card from the deck\n\t\tcards.remove(rand);\n\t\t\n\t\treturn dealt;\n\t}", "private void putCurrentCard() {\n int temp = 0;\n while (true) {\n if(!(cards.get(temp) instanceof WildCard) ) {\n currentCard = cards.get(temp);\n cards.remove(temp);\n break;\n }\n temp++;\n }\n if (!(currentCard instanceof NumberCard)) {\n show();\n }\n //Reverse\n if (currentCard instanceof ReverseCard) {\n ((ReverseCard) currentCard).changeState(state);\n }\n //Skip\n if (currentCard instanceof SkipCard) {\n ((SkipCard) currentCard).changeState(state);\n }\n //Draw2\n if (currentCard instanceof Draw2Card) {\n System.out.println(\"The player was fined.\");\n for (int i = 0; i < ((Draw2Card) currentCard).getForcedCards(); i++) {\n players.get(state.getTurn()).addCard(cards.get(0));\n cards.remove(0);\n }\n state.nextTurn();\n }\n }", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public Optional<Card> dealOneCard() {\n if (cards.size() > 0) {\n return Optional.of(cards.remove(0));\n } else {\n return Optional.empty();\n }\n }", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public abstract CardAction play(Player p);", "public Card flip() {\n\t\treturn hand.remove(0);\n\t}" ]
[ "0.745069", "0.74463516", "0.7430298", "0.71187913", "0.7116646", "0.69866616", "0.69839823", "0.69818693", "0.6916091", "0.68931985", "0.6875194", "0.6843831", "0.684107", "0.67553407", "0.67316395", "0.671552", "0.67110366", "0.66575146", "0.6648404", "0.66140604", "0.66066873", "0.6604126", "0.6597599", "0.6577437", "0.6543279", "0.6519465", "0.6513766", "0.65044636", "0.6494724", "0.64682907", "0.64365077", "0.64248925", "0.6421727", "0.64192283", "0.6414781", "0.6378512", "0.63545775", "0.6344444", "0.6341349", "0.62928414", "0.62800926", "0.6276188", "0.62700194", "0.6254743", "0.62500226", "0.6246957", "0.62392133", "0.6231418", "0.62276137", "0.6216501", "0.6214069", "0.6211077", "0.62066007", "0.6196646", "0.6180576", "0.61803186", "0.61748415", "0.6173885", "0.61734813", "0.61686784", "0.6154972", "0.6152107", "0.6151124", "0.61393106", "0.613661", "0.6128272", "0.6119488", "0.61180013", "0.6109911", "0.6096593", "0.60951847", "0.6093636", "0.608135", "0.60657334", "0.6063457", "0.60616267", "0.6060846", "0.6055968", "0.60525054", "0.60524535", "0.6048679", "0.6040209", "0.6037489", "0.6037136", "0.60341454", "0.6034037", "0.6032358", "0.6031063", "0.6029484", "0.60277766", "0.6025919", "0.6020901", "0.60105693", "0.59934175", "0.5990126", "0.59883624", "0.5987703", "0.59848744", "0.59654164", "0.59576774" ]
0.7698171
0
/ String toString() In: Nothing Out: A String object containing the cards in the hand. Description: This will provide a textual representation of the data contained in hand to the caller.
public String toString() { String handString = "( "; for (int i = 0; i < this.numCards; i++) { handString += this.myCards[i].toString(); if (i != this.numCards - 1) handString += ", "; } handString += " )"; return handString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n return \"Hand: \" + cards; \n }", "@Override\n public String toString() {\n String hand = \"\";\n for (int i = 0; i < cards.size(); i++) {\n hand += \"(\"+(i+1)+\")\"+cards.get(i).toString() + \", \";\n }\n return hand;\n }", "public String toString()\r\n {\r\n StringBuilder sBuilder = new StringBuilder();\r\n sBuilder.append(\"Hand: \");\r\n sBuilder.append(\"\\n\");\r\n if (numCards == 0)\r\n {\r\n sBuilder.append(\"Out of Cards\");\r\n return sBuilder.toString();\r\n }\r\n for (int i = 0; i < numCards; i++)\r\n {\r\n if (myCards[i] != null)\r\n {\r\n if (i != numCards - 1)\r\n {\r\n if ((i + 1) % 10 == 0 && i != 0)\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\"\\n\");\r\n } else\r\n {\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n sBuilder.append(\", \");\r\n }\r\n }\r\n\r\n } else\r\n {\r\n sBuilder.append(myCards[i].toString());\r\n }\r\n }\r\n }\r\n return sBuilder.toString();\r\n }", "public String toString(){\n String handString = \"\";\n int i = 1;\n sort();\n for(Card c: cards){\n handString += Integer.toString(i) + \": \" + c + \"\\n\";\n i++;\n }\n handString = handString.substring(0, handString.length() - 1);\n return handString;\n }", "@Override\n public String toString() {\n StringBuilder stringBuilder = new StringBuilder(\"Hand contains:\\n\");\n for (Card c : cardList) {\n stringBuilder.append(c.getFace().toString());\n stringBuilder.append(\" of \");\n stringBuilder.append(c.getSuit().toString());\n stringBuilder.append(\"\\n\");\n }\n return stringBuilder.toString();\n }", "public String getHand()\n\t{\n\t\tStringBuffer buffer = new StringBuffer(String.format(\"%s:[%d] \", getName(), getHandTotal() ));\n\t\t\n\t\tfor (Card c : hand)\n\t\t{\n\t\t\tbuffer.append(String.format(\"%s: \", c));\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "public String handToString() {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(\"Holding:\");\n\t\tfor (Card c: hand) {\t\t\t\n\t\t\tstr.append(\" \" + c.getName() + \",\");\n\t\t}\n\t\treturn str.toString().substring(0, str.toString().length()-1);\n\t}", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "public void printHand(){\n\t\tSystem.out.println(name + \"'s hand:\");\n\t\tfor(int i=0; i<hand.size(); i++){\n\t\t\tSystem.out.print(i+1 + \".\\t\");\n\t\t\thand.get(i).printCard();\n\t\t}\n\t}", "public void showHand(){\n System.out.println(this.hand.toString());\n }", "public String toString() {\n // return \"Card {suit: \"+getSuitString()+\", rank: \"+getRankString()+\"}\";\n return \"{\"+getSuitString()+\",\"+getRankString()+\"}\";\n }", "public String getCards()\r\n\t{\r\n\t\t// creates a larger string which will have the cards appended to it\r\n\t\tString cardList = \"\";\r\n\t\t\r\n\t\t// adds all cards currently in hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tcardList = cardList + pCards[i] + \" \";\r\n\t\t}\r\n\t\t\r\n\t\treturn cardList;\r\n\t}", "public String getHand(){\r\n return this.handStr;\r\n }", "public String showCards() {\n String message = \"[ \";\n for (Card card : personHand) {\n message += card + \" \";\n }\n message += \"]\";\n return message;\n }", "public String toString() {\n\t\t\tStringBuilder str = new StringBuilder();\n\t\t\tstr.append(\"Hand ID: \" + getHandId() + \"<br>\");\n\t\t\tstr.append(\"Hand Wager: <font color = red>\" + moneyFormat.format(getHandWager()) + \"</font><br>\");\n\t\t\tstr.append(\"Dealer Total: <font color = red>\" + getDealerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Player Total: <font color = red>\" + getPlayerTotal() + \"</font><br>\");\n\t\t\tstr.append(\"Hand Outcome: <font color = red>\" + getHandOutcome().substring(0, (getHandOutcome().length() - 2)) + \"</font><br>\" );\n\t\t\tstr.append(\"Post-Hand Player Wallet: <font color = red>\" + moneyFormat.format(getPlayerWallet()) + \"</font><br><br>\");\n\t\t\t\t\n\t\t\treturn str.toString();\t\t\n\t\t}", "@Override\n public String toString() {\n CardValue cardValue = new CardValue(value).invoke();\n\n // Change the value to the actual name when printing out\n // the card.\n\n return cardValue.getValueName() + \" of \" + suit;\n }", "public String showCardInHand(){\n String handCard = \"\";\n int cardNum = 0;\n for(Card cards: playerHand)\n {\n String cardDesc;\n if (cards instanceof Mineral) {\n // Description of the Mineral card\n cardDesc = \"No: \" + cardNum + \" \" +\n \"Name: \" + cards.getCardName() + \" \" +\n \"Hardness: \" + ((Mineral) cards).getCardHardness() + \" \" +\n \"Specific Gravity: \" + ((Mineral) cards).getCardSpecGravity() + \" \" +\n \"Cleavage: \" + ((Mineral) cards).getCardCleavage() + \" \" +\n \"Crystal Abundance: \" + ((Mineral) cards).getCardCrystalAbundance() + \" \" +\n \"Economic Value: \" + ((Mineral) cards).getCardEconomicValue() + \"\\n\";\n }\n else{\n // Description of the Supertrump card\n cardDesc = \"No: \"+ cardNum+ \" \" + \"Name: \" + cards.getCardName()+ \" \" + \"Description: \" +\n ((SuperTrumps) cards).effectDescription()+ \"\\n\";\n }\n cardNum += 1;\n handCard += cardDesc; // Used for adding the description of the card in the hand\n }\n return handCard;\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn name + \" (Deck, \" + cards.size() + \" cards)\";\r\n\t}", "public void printHand() {\n\t\thandIterator = new HandIterator(hand.getCards());\n\t\tSystem.out.println(\"\\n\" + getName() + \"'s hand:\");\n\t\twhile(handIterator.hasNext()) {\n\t\t\tCard card = (Card) handIterator.next();\n\t\t\tSystem.out.println(\"\\t\" + card);\n\t\t}\n\t\tSystem.out.println(\"\\tHand value: \" + hand.checkHandValue());\n\t}", "@Override\r\n public String toString(){\n StringBuilder displayCard = new StringBuilder();\r\n \r\n if(rank==11)\r\n {\r\n displayCard.append(\"Jack\");\r\n }\r\n else if(rank==12)\r\n {\r\n displayCard.append(\"Queen\");\r\n }\r\n else if(rank == 13)\r\n {\r\n displayCard.append(\"King\");\r\n }\r\n else if(rank==14)\r\n {\r\n displayCard.append(\"Ace\");\r\n }\r\n else\r\n {\r\n displayCard.append(rank);\r\n }\r\n displayCard.append(\" of \"); //setting the format of the output\r\n \r\n if(suit==0)\r\n {\r\n displayCard.append(\"Spades\");\r\n }\r\n else if(suit==1)\r\n {\r\n displayCard.append(\"Hearts\");\r\n }\r\n else if(suit==2)\r\n {\r\n displayCard.append(\"Clubs\");\r\n }\r\n else if(suit==3)\r\n {\r\n displayCard.append(\"Diamonds\");\r\n }\r\n //return the result of an entire cmombined string\r\n return displayCard.toString();\r\n }", "protected String printCard(){\r\n return ranks[rank] + \" of \" + suits[suit];\r\n }", "public String getDealerHandString() {\n\t\tString s = \"Dealer's Hand:\\n\";\n\t\ts += this.hand.getHandString() + \"\\n\";\n\t\ts += this.hand.valueString();\n\t\treturn s;\n\t}", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public String toString() {\n String cardListOutput = \"\";\n for (Card aCard : this.cards) {\n cardListOutput += aCard.toString() + \"\\n\";\n }\n return cardListOutput;\n }", "public String toString() {\r\n\t\t\r\n\t\tString cardSuit = \"\";\r\n\t\tString cardRank = \"\";\r\n\t\tString cardString = \"\";\r\n\t\t\r\n\t\t\r\n\t\tint cs = getSuit();\r\n\t\tint cr = getRank();\r\n\t\t\r\n\t\tswitch(cr) {\r\n\t\tcase 1:\r\n\t\t\tcardRank = \"ace\";\r\n\t\t\tbreak;\r\n\t\tcase 2: \r\n\t\t\tcardRank =\"2\";\r\n\t\t\tbreak;\r\n\t\tcase 3: \r\n\t\t\tcardRank =\"3\";\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tcardRank =\"4\";\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tcardRank =\"5\";\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tcardRank =\"6\";\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tcardRank =\"7\";\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tcardRank =\"8\";\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tcardRank =\"9\";\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tcardRank =\"10\";\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tcardRank =\"jack\";\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tcardRank =\"queen\";\r\n\t\t\tbreak;\r\n\t\tcase 13:\r\n\t\t\tcardRank =\"king\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardRank = \"n/a\";\r\n\t\t\t\r\n\t\t}//switch rank\r\n\t\t\r\n\t\t//got a string representation of the rank\r\n\t\t//now get a string representation of the siut\r\n\t\t\r\n\t\tswitch(cs) {\r\n\t\tcase 0:\r\n\t\t\tcardSuit = \"hearts\";\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tcardSuit = \"diamonds\";\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tcardSuit = \"clubs\";\r\n\t\t\tbreak; \r\n\t\tcase 3:\r\n\t\t\tcardSuit = \"spades\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tcardSuit = \"n/a\";\r\n\t\t\t\r\n\t\t}\r\n\t\tcardString = \"file:cards/\"+cardRank+\"_of_\"+cardSuit+\".png\";\r\n\t\t\r\n\t\treturn cardString;\r\n\t\t\r\n\t}", "public String toString()\n {\n return value + \" \" + suit;\n }", "public void displayHand(int hand)\n {\n System.out.println(highCardGame.getHand(hand).toString());\n }", "public String toString()\n {\n\t// Local constants\n\n\t// Local variables\n\tString outputString = \"\";\n\n\t/************** Start getCardPicture Method *****************/\n\n\t// Add face value to output string\n\toutputString += \"FaceValue: \" + faceValue + \" | \";\n\n\t// Add suit to output string\n\toutputString += \"Suit : \" + suit + \" | \";\n\n\t// Add trueValue to output string\n\toutputString += \" TrueValue :\" + trueValue;\n\n\t// Return output string\n return outputString;\n\n }", "public String toString() {\n return \"The \" + value + \" of \" + suit;\n }", "public String showFirstRoundCards() {\n String message = \"[ Unknown \";\n message += personHand.get(1) + \" ]\";\n return message;\n }", "public String toString() {\n if (this.errorFlag == true)\n return \"[INVALID CARD]\";\n else\n return this.value + \" of \" + suit.toString();\n }", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "public void printCards()\n {\n System.out.println(\"Your Card \" + playerCard.toString() + \" and the Computer Card \" + computerCard.toString());\n }", "public String toString() {\n return faceName + \" of \" + suit;\n }", "public String toString(){\r\n\t\t\r\n\t\tString result = \"\";\r\n\t\tfor (int i = 0; i < this.cardCount()-1; i++)\r\n\t\t\tresult += this.getCard(i).toString() + \", \";\r\n\t\t\r\n\t\treturn result + this.getCard(this.cardCount()-1).toString() + \" has Blackjack value \" + this.value();\r\n\t}", "@Override\n public String toString() {\n return \"Card{\"\n + \"frontInfo='\" + frontInfo\n + '\\''\n + \", backInfo='\" + backInfo\n + '\\''\n + \", startTime=\" + startTime\n + \", ID=\" + cardID\n + '}';\n }", "final public String toString() {\r\n\t\tswitch (face) {\r\n\t\tcase 10:\r\n\t\t\treturn \"X\" + Character.toString(suit);\r\n\t\tcase 11:\r\n\t\t\treturn \"J\" + Character.toString(suit);\r\n\t\tcase 12:\r\n\t\t\treturn \"Q\" + Character.toString(suit);\r\n\t\tcase 13:\r\n\t\t\treturn \"K\" + Character.toString(suit);\r\n\t\tdefault:\r\n\t\t\treturn face + Character.toString(suit);\t\t\t\t\r\n\t\t}\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"\\nCard Name: \" + getName() +\n\t\t\t\t\"\\nMultiverse Id: \" + getMultiverseid() +\n\t\t\t\t\"\\nMana Cost: \" + getManaCost();\n\t}", "public String cardDisplay(){\n if(this.faceDown) {\n return \"Bicycle\";}\n else{ return \"Friendly Names of: \" + this.rank + \":\"+this.suit;\n\n }\n }", "public String toString() {\n\t\treturn String.format(\"%-6s %-8s\", pileNum, numOfCards) + card.toString();\n\t}", "public void printHand(Cards cards) {\n\t\tfor (int j = 0; j < hand.length; j++) {//loop through the hand\n\t\t\tcards.makeCard(cards.getColorAndNum(hand[j])[0], cards.getColorAndNum(hand[j])[1], hand[j]);\n\t\t\t//System.out.println((j+1) + \": \" + hand[j]);//print each card with its slot number\n\t\t}\n\t}", "@Override\r\n public final String toString(){\n if(this.rank.equals(RANKS[0])){ \r\n\t\t\treturn \"no card\"; \r\n\t\t}\r\n\t\t\r\n int r = getRank();\r\n if( r >= 2 && r <= 14 ){\r\n return r + getSuit().substring(0,1);\r\n\t\t}\r\n return \"no card\";\r\n }", "@Override\n public String toString() {\n return \"Deck{\" + \"deck=\" + deck + '}';\n }", "@Override\n\tpublic String toString() {\n\t\tif(this.upOrDown == CardFace.FaceUp) {\n\t\t\treturn this.suit.toString() + \" \" + this.rank.toString();\n\t\t}\n\t\telse {\n\t\t\treturn \"Card Face Down\";\n\t\t}\n\t}", "public String displayCard()\n {\n card = \"\";\n \n switch(cardValue)\n {\n case 11:\n card+= \"J\";\n break;\n case 12:\n card+= \"Q\";\n break;\n case 13:\n card+= \"K\";\n break;\n case 14:\n card+= \"A\";\n break; \n default:\n card+= String.valueOf(cardValue); \n break;\n }\n \n switch(cardSuit){\n case 0:\n card+= \" of Clubs\";\n break;\n case 1:\n card+= \" of Diamonds\";\n break;\n case 2:\n card+= \" of Spades\";\n break;\n case 3:\n card+= \" of Hearts\";\n break;\n default:\n break;\n }\n \n return card;\n }", "public void printCard() {\r\n String print = \"[\";\r\n for (Card card : cards) {\r\n print += card.toString();\r\n print += \",\";\r\n }\r\n\r\n print = print.substring(0, print.length() - 1);\r\n print += \"]\";\r\n print += \" Score = \";\r\n print += score();\r\n\r\n System.out.println(print);\r\n }", "public String toString(){\n String r = \"\";\n String s = \"\";\n switch(rank){\n case 1: r = \"Ace\"; break;\n case 2: r = \"Two\"; break;\n case 3: r = \"Three\"; break;\n case 4: r = \"Four\"; break;\n case 5: r = \"Five\"; break;\n case 6: r = \"Six\"; break;\n case 7: r = \"Seven\"; break;\n case 8: r = \"Eight\"; break;\n case 9: r = \"Nine\"; break;\n case 10: r = \"Ten\"; break;\n case 11: r = \"Jack\"; break; \n case 12: r = \"Queen\"; break;\n case 13: r = \"King\"; break;\n }\n \n switch(suit) {\n case 1: s = \" of Clubs\"; break;\n case 2: s = \" of Diamonds\"; break;\n case 3: s = \" of Hearts\"; break;\n case 4: s = \" of Spades\"; break;\n }\n return r + s; //returns the name of the card\n }", "public String toString() \r\n\t{\r\n\t\treturn value + \" \" + rank + \" of \" + suit;\r\n\t}", "public String describe() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(Player.class.getSimpleName())\n\t\t.append(\" name=\").append(name)\n\t\t.append(\" , score= \").append(score);\n\t\t\n\t\tfor(Card card : hand) {\n\t\t\tbuilder.append(\"\\n\").append(card.describe());\n\t\t}\n\t\treturn builder.toString();\n\t}", "private static String getMyHand(JSONObject data) {\n\n String rez = null;\n\n JSONArray myCard = (JSONArray)data.get(\"newRightHand\");\n\n JSONArray myFirstCard = (JSONArray)myCard.get(0);\n JSONArray mySecondCard = (JSONArray)myCard.get(1);\n\n if (!\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()) && !\"a\".equalsIgnoreCase(mySecondCard.get(0).toString()))\n rez = mySecondCard.get(2).toString();\n else\n if (\"a\".equalsIgnoreCase(myFirstCard.get(0).toString()))\n rez = \"A\" + filterCard(mySecondCard.get(0).toString());\n else rez = \"A\" + filterCard(myFirstCard.get(0).toString());\n\n return \"A10\".equals(rez) ? \"20\" : rez;\n }", "public static String cardToString(int card){\n StringBuffer sb = new StringBuffer(\"\");\n //add the suit of the card\n //convert the suit number into letter\n //create an array of suits\n String[] suits = {\"S\", \"H\", \"C\", \"D\"};\n sb.append(suits[suit(card) - 1]);\n //add the face of the card\n //convert 1, 10, 11, 12, 13 face numbers into letters\n //create an array of special faces\n String[] faces = {\"X\", \"J\", \"Q\", \"K\"};\n if(face(card) == 1){\n sb.append(\"A\");\n } else if(face(card) >= 10){\n sb.append(faces[face(card) - 10]);\n } else {\n sb.append(face(card));\n }\n return sb.toString();\n }", "public String showInitinalHand() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showDealerHand() + \"\\n\";\n\t\treturn string;\n\t}", "public String getCardName(){\n return type.getType() + \" of \" + suit.getSuit();\n }", "@Override\n public String toString() {\n return super.toString() +\n \"\\nChemical Name: \" + chemicalName +\n \"\\nHazards: \" + hazards +\n \"\\nPrecautions: \" + precautions +\n \"\\nFirst Aid: \" + firstAid +\n \"\\nUses: \" + uses;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder(rank.toString());\n sb.append(\" \");\n sb.append(suit.toString());\n\n return sb.toString();\n }", "public String toString() {\n\t\tStringBuilder str = new StringBuilder();\n\t\tstr.append(\"<html><body><p style=\\\"font-size:15px\\\">\");\n\t\tstr.append(\"Dealer Average Points per Hand: <font color = red>\" + calcAvgPointsPerHand(false) + \"</font><br>\");\n\t\tstr.append(\"Player Average Points per Hand: <font color = red>\" + calcAvgPointsPerHand(true) + \"</font><br><br>\");\n\t\tstr.append(\"Dealer Win Percentage: <font color = red>\" + calcWinPercentage(false) + \"</font><br>\");\n\t\tstr.append(\"Player Win Percentage: <font color = red>\" + calcWinPercentage(true) + \"</font><br>\");\n\t\tstr.append(\"Hand Push Percentage: <font color = red>\" + calcPushPercentage() + \"</font><br>\");\n\t\tstr.append(\"</p><br><br><p style=\\\"font-size:12px\\\">\");\t\t\n\t\t\n\t\tfor(HandStats h : handStats) {\n\t\t\tstr.append(h.toString());\n\t\t}\t\t\n\t\t\n\t\tstr.append(\"</p></body></html>\");\n\t\t\t\t\n\t\treturn str.toString();\t\t\n\t}", "public void displayCards() {\n\t\tSystem.out.println(\"\\n---------- Deck Worker ----------\");\n\t\tfor(Card worker : this.deckWorker) {\n\t\t\tSystem.out.print(worker.toString());\n\t\t}\n\t\tSystem.out.println(\"\\n\\n---------- Deck Building and Machine ----------\");\n\t\tfor(IBuilding building : this.deckBuilding) {\n\t\t\tSystem.out.print(building.toString());\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn (\"Suit: \"+this.suit+\"\\nValue: \"+this.value);\r\n\t}", "public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}", "@Override\n\tpublic String toString() {\n\t\tString strSuit = suit.toString().substring(0, 1);\n\t\tstrSuit += suit.toString().toLowerCase()\n\t\t\t\t.substring(1, suit.toString().length());\n\n\t\treturn strSuit + value;\t\n\t}", "public Card() {\n\t\tthis.suit = \" \";\n this.rank = 0;\n this.face = \" \";\n this.color = \" \";\n\t}", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public String showHands() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showHand();\n\t\treturn string;\n\t}", "public String toString ()\n {\n return rank + \" of \" + suit;\n }", "@Override\n\tpublic String toString() {\n\t\tString objStr = \"\\n\";\n\t\tobjStr += \"Plate Type: Japanese Plate with \"+pieces.size()+\" Piece\\n\";\n\t\tobjStr += \"PLATE PIECE DETAILS:\\n\";\n\t\t\n\t\tint pieceCouter = 1;\n\t\tfor (Piece currentPiece:pieces){\n\t\t\tobjStr += \"Piece \"+pieceCouter+\":\\n\";\n\t\t\tobjStr += \"=========\";\n\t\t\tobjStr += currentPiece.toString() + \"\\n\";\n\t\t\tpieceCouter++;\n\t\t}\n\t\tobjStr += \"Japanese Sauce:\";\n\t\tfor (Ingredient currentSauce:baseSauce){\n\t\t\tobjStr += currentSauce.toString()+\" \";\n\t\t}\n\t\tobjStr += \"\\n\";\n\t\treturn objStr;\n\t}", "public LinkedList<PlayingCard> getHand(){\n\t\treturn hand;\n\t}", "@Override\n\tpublic String cardDetail() {\n\t\treturn atmCard.cardDetail();\n\t}", "public String toString() {\n\t\treturn SUIT_NAMES[suit]+RANK_NAMES[rank];\n\t}", "public String get_card(int index){\r\n return String.valueOf(hand.get(index).get_value()) + hand.get(index).get_suit() + \".jpg\";\r\n }", "public String toString()\n\t{\n\t\tString output=\"Chip ID: \"+theChipId+\" Name: \"+theName+\" Pet Type: \"+ thePetType+\" Age: \"+theAge+\"\";\n\t\treturn output;\n\t}", "public String GetHumanCard(int value){\n return handHuman.get(value);\n }", "public ArrayList<Card> getHand() {\r\n\t\treturn this.Hand;\r\n\t}", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public String toString() {\n String color = translateColor(card.getColor());\n StringBuilder build = new StringBuilder();\n build.append(color).append(\" \").append(color).append(card.getCardID()).append(color).append(\" \").append(Color.reset()).append(\"\\n\").append(color).append(\"╔════\").append(color).append(\"Level\").append(color).append(\"════╗\").append(Color.reset()).append(\"\\n\").append(color).append(\"║ \").append(color).append(card.getLevel()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\").append(color).append(\"╠════\").append(color).append(\"Cost\").append(color).append(\"═════╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getCost().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getCost().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"╠═\").append(color).append(\"Production\").append(color).append(\"══╣\").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getConsumedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getConsumedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getRequiredResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getRequiredResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n build.append(color).append(\"║ \").append(color).append(\"--->>> \").append(color).append(\" ║ \").append(Color.reset()).append(\"\\n\");\n for (Resource resource : card.getProductionPower().getProducedResources().keySet()) {\n build.append(color).append(\"║ \").append(CLI.colorResource(resource)).append(card.getProductionPower().getProducedResources().get(resource)).append(\" \").append(CLI.shapeResource(resource)).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getFaithPointsProduced() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getFaithPointsProduced()).append(\" \").append(\"+\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n if (card.getProductionPower().getProducedResourceOfChoice() != 0) {\n build.append(color).append(\"║ \").append(color).append(+card.getProductionPower().getProducedResourceOfChoice()).append(\" \").append(\"?\").append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n }\n\n\n build.append(color).append(\"╠═══\").append(color).append(\"VPoints\").append(color).append(\"═══╣\").append(Color.reset()).append(\"\\n\");\n if (card.getVictoryPoints() < 10) {\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n } else\n build.append(color).append(\"║ \").append(color).append(card.getVictoryPoints()).append(color).append(\" ║\").append(Color.reset()).append(\"\\n\");\n build.append(color).append(\"╚════\").append(color).append(color).append(\"═════════╝\").append(Color.reset()).append(\"\\n\");\n build.append((color + \" \" + color + color + \" \" + Color.reset() + \"\\n\").repeat(5));\n return build.toString();\n }", "public void printHand(){\n System.out.println();\n for(int i = 1 ; i <= 6; i++){\n for(int j = 0 ; j < hand.size(); j++){\n if(j == hand.size()-1){\n System.out.print(hand.get(j).fullRowString(i));\n }\n else{\n System.out.print(hand.get(j).halfRowString(i));\n }\n }\n System.out.println();\n }\n System.out.println();\n for(int k = 0; k < hand.size() ; k++){\n if(k >= 10){\n System.out.print(\" \" + (k+1) + \" \");\n }\n else{\n System.out.print(\" \" + (k+1) + \" \");\n }\n }\n System.out.println();\n }", "public static void showHands(){\n Scanner scan=new Scanner(System.in);//call the Scanner constructor\n int Deck[]=new int[52];//set up the array for deck\n String answer=\"\";\n do{\n //store 0 to 51 into the Deck array\n for(int i=0;i<Deck.length;i++){\n Deck[i] = i; \n }\n \n int Hand[]={-1,-1,-1,-1,-1};//set up and initialize the array for hand\n \n Random r = new Random ();//Decalre a instance of the Random generator\n int k = Deck.length;//declare a variable to show the effective length of the Deck array\n //set up a loop to draw cards from the deck ramdomly\n for(int j=0;j<Hand.length;j++){\n int draw = r.nextInt(k-1);\n Hand[j] = Deck[draw];//store the ramdom pick from Deck into Hand\n //set the random pick in Deck to -1 and swap with the last effective number in Deck\n Deck[draw]=Deck[k-1];\n Deck[k-1]= -1;\n k--;//reduce the effective array size\n }\n \n //set up the strings, which will indicate the result\n String Clubs = \"Clubs: \";\n String Diamonds = \"Diamonds: \";\n String Hearts = \"Hearts: \";\n String Spades = \"Spades: \";\n //set up a loop to determine the kind and value of each card in hand\n for(int j=0;j<Hand.length;j++){\n int kind = Hand[j]/13;//calculate the kind of the card\n int rank = Hand[j]%13;//calculete the rank of the card\n switch (kind){\n case 0:\n switch (rank){\n case 0:\n Clubs += \"A \";\n break;\n case 1:\n Clubs += \"K \";\n break; \n case 2:\n Clubs += \"Q \";\n break; \n case 3:\n Clubs += \"J \";\n break; \n case 4:\n Clubs += \"10 \";\n break; \n case 5:\n Clubs += \"9 \";\n break; \n case 6:\n Clubs += \"8 \";\n break; \n case 7:\n Clubs += \"7 \";\n break; \n case 8:\n Clubs += \"6 \";\n break; \n case 9:\n Clubs += \"5 \";\n break; \n case 10:\n Clubs += \"4 \";\n break; \n case 11:\n Clubs += \"3 \";\n break; \n case 12:\n Clubs += \"2 \";\n break; \n } \n break;\n case 1:\n switch (rank){\n case 0:\n Diamonds += \"A \";\n break;\n case 1:\n Diamonds += \"K \";\n break; \n case 2:\n Diamonds += \"Q \";\n break; \n case 3:\n Diamonds += \"J \";\n break; \n case 4:\n Diamonds += \"10 \";\n break; \n case 5:\n Diamonds += \"9 \";\n break; \n case 6:\n Diamonds += \"8 \";\n break; \n case 7:\n Diamonds += \"7 \";\n break; \n case 8:\n Diamonds += \"6 \";\n break; \n case 9:\n Diamonds += \"5 \";\n break; \n case 10:\n Diamonds += \"4 \";\n break; \n case 11:\n Diamonds += \"3 \";\n break; \n case 12:\n Diamonds += \"2 \";\n break; \n } \n break;\n case 2:\n switch (rank){\n case 0:\n Hearts += \"A \";\n break;\n case 1:\n Hearts += \"K \";\n break; \n case 2:\n Hearts += \"Q \";\n break; \n case 3:\n Hearts += \"J \";\n break; \n case 4:\n Hearts += \"10 \";\n break; \n case 5:\n Hearts += \"9 \";\n break; \n case 6:\n Hearts += \"8 \";\n break; \n case 7:\n Hearts += \"7 \";\n break; \n case 8:\n Hearts += \"6 \";\n break; \n case 9:\n Hearts += \"5 \";\n break; \n case 10:\n Hearts += \"4 \";\n break; \n case 11:\n Hearts += \"3 \";\n break; \n case 12:\n Hearts += \"2 \";\n break; \n } \n break;\n case 3:\n switch (rank){\n case 0:\n Spades += \"A \";\n break;\n case 1:\n Spades += \"K \";\n break; \n case 2:\n Spades += \"Q \";\n break; \n case 3:\n Spades += \"J \";\n break; \n case 4:\n Spades += \"10 \";\n break; \n case 5:\n Spades += \"9 \";\n break; \n case 6:\n Spades += \"8 \";\n break; \n case 7:\n Spades += \"7 \";\n break; \n case 8:\n Spades += \"6 \";\n break; \n case 9:\n Spades += \"5 \";\n break; \n case 10:\n Spades += \"4 \";\n break; \n case 11:\n Spades += \"3 \";\n break; \n case 12:\n Spades += \"2 \";\n break; \n } \n break;\n }\n }\n \n //print out the results\n System.out.println(Clubs);\n System.out.println(Diamonds);\n System.out.println(Hearts);\n System.out.println(Spades);\n //ask user for input\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer=scan.next();\n }while(answer.equals(\"Y\") || answer.equals(\"y\"));\n return;\n }", "com.google.protobuf.ByteString getCards();", "public String toString() {\n return \"The card has \" + this.balance + \" euros\";\n }", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public ArrayList<PlayingCard> getHand();", "public static String cardsToString(List<Integer> cards) {\n if (cards.size() == 0) {\n return \"\";\n }\n \n StringBuilder out = new StringBuilder();\n out.append(toSymbol(cards.get(0)));\n for (int i = 1; i < cards.size(); i++) {\n out.append(\",\" + toSymbol(cards.get(i)));\n }\n \n return out.toString();\n }", "@Override\n public String toString() {\n return rankArray[rank] + suitArray[suit];\n }", "@Override\r\n public String toString() {\r\n\r\n int num = 1;\r\n String output = String.format(\"Player Name: %s%n%nCurrent \"\r\n + \"Card Ranks:%n\", getName());\r\n for (Card x : currentCards) {\r\n output += String.format(\"%d. %s%n\", num, x.getRank().name());\r\n num++;\r\n\r\n }\r\n return output;\r\n }", "public void print_Deck() {\n for(int i = 0; i<52; i++) {\n System.out.println(deck.get(i));\n }\n }", "public String showFirstCard() {\n return dealerHand.getFaceNames().get(0) + \" of \" + dealerHand.getSuits().get(0);\n }", "public String detailedToString() {\r\n\t\tString tempStr = \"Player One:\\n\"+\r\n\t\t\t\t\t\t \"Current Card: \" + card1 + \"\\n\" +\r\n\t\t\t\t\t\t \"Unplayed Pile: \" + player1.unplayedCount() + \"\\n\" +\r\n\t\t\t\t\t\t \"Winnings Pile: \" + player1.winningsCount() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"War Pile: \" + warPile.size() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"Player Two:\\n\"+\r\n\t\t\t\t\t\t \"Current Card: \" + card2 + \"\\n\" +\r\n\t\t\t\t\t\t \"Unplayed Pile: \" + player2.unplayedCount() + \"\\n\" +\r\n\t\t\t\t\t\t \"Winnings Pile: \" + player2.winningsCount() + \"\\n\\n\" +\r\n\t\t\t\t\t\t \"Moves: \" + moves;\r\n\t\treturn tempStr;\r\n\t}", "public String showCard(int card) {\n\t\tswitch (card) {\n\t\tcase 1:\n\t\t\treturn \"Ace\";\n\t\tcase 2:\n\t\t\treturn \"2\";\n\t\tcase 3:\n\t\t\treturn \"3\";\n\t\tcase 4:\n\t\t\treturn \"4\";\n\t\tcase 5:\n\t\t\treturn \"5\";\n\t\tcase 6:\n\t\t\treturn \"6\";\n\t\tcase 7:\n\t\t\treturn \"7\";\n\t\tcase 8:\n\t\t\treturn \"8\";\n\t\tcase 9:\n\t\t\treturn \"9\";\n\t\tcase 10:\n\t\t\treturn \"10\";\n\t\tcase 11:\n\t\t\treturn \"Jack\";\n\t\tcase 12:\n\t\t\treturn \"Queen\";\n\t\tcase 13:\n\t\t\treturn \"King\";\n\t\tdefault:\n\t\t\treturn \"??\";\n\t\t}\n\t}", "public String getCardSuit() {\n return Csuit;\n }", "public String toString() {\n String info = values[value] + \" of \" + suits[suit];\n return info;\n }", "@Override\npublic String toString() {\n\treturn \"Phieu tra [id=\" + getId() + \", reader= sqlite no supported, card= sqlite no supported]\";\n}", "@Override\n public String toString() {\n StringBuilder devPlaceArt = new StringBuilder();\n StringBuilder[] devString = new StringBuilder[3];\n devString[0] = new StringBuilder();\n devString[1] = new StringBuilder();\n devString[2] = new StringBuilder();\n int i = 0;\n String space = \" \";\n String emptyCard =\n \"\"\"\n ┌─────────────────┐\n │ │\n │ │\n │ │\n │ │\n │ │\n │ │\n │ │\n │ │\n └─────────────────┘\n \"\"\";\n String emptySpace = \"\"\"\n \\s\n \\s\n \\s\n \"\"\";\n String[] temp1;\n String[] temp2;\n String[] temp3;\n\n for (ObservableList<DevelopmentCard> stacks : devStack) {\n if (stacks.isEmpty()) {\n devString[i].append(emptyCard);\n devString[i].append(emptySpace).append(emptySpace);\n } else {\n devString[i].append(stacks.get(stacks.size() - 1).toString());\n switch (stacks.size()) {\n case 1 -> devString[i].append(emptySpace).append(emptySpace);\n case 2 -> {\n int l = stacks.get(0).toString().length();\n devString[i].append(stacks.get(0).toString(), l - 58, l);\n devString[i].append(emptySpace);\n }\n case 3 -> {\n int len = stacks.get(0).toString().length();\n devString[i].append(stacks.get(0).toString(), len - 58, len);\n devString[i].append(stacks.get(1).toString(), len - 58, len);\n }\n }\n\n }\n i++;\n }\n temp1 = devString[0].toString().split(\"\\n\");\n temp2 = devString[1].toString().split(\"\\n\");\n temp3 = devString[2].toString().split(\"\\n\");\n\n for (int j = 0; j < 14; j++) {\n devPlaceArt.append(temp1[j]).append(space).append(temp2[j]).append(space).append(temp3[j]);\n devPlaceArt.append(\"\\n\");\n }\n return devPlaceArt.toString();\n }", "public String toString() {\r\n\t\treturn super.display() + \"\\n\" + listAllCards() + \r\n\t\t\t\t\"Purchased tickets: \\n\" + listAllTickets() +\r\n\t\t\t\t\"___________________________________________\";\r\n\t}", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n\n for (Map.Entry<String, BlackjackCommand> command : commands.entrySet()) {\n if (!command.getValue().isHidden())\n sb.append(BLACKJACK_COMMAND_PREFIX + command.getValue()).append(\"\\n\");\n }\n\n if (sb.length() > 0)\n sb.deleteCharAt(sb.length() - 1);\n\n sb.append(\"\\n\\n\");\n sb.append(\"**Note**: Owners bypass several restrictions.\");\n return sb.toString();\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"icecream in a \");\n sb.append(holder.toString().toLowerCase());\n sb.append(\" with:\\n\");\n for (IceCreamScoop scoop : scoops) {\n sb.append(\"\\t\");\n sb.append(scoop);\n sb.append(\"\\n\");\n }\n\n return sb.toString();\n }", "@Override\n\tpublic String print(CliPrinter printer) {\n\t\treturn printer.printTProductCards(this);\n\t}", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void printDrawCard(PoliticCard card);", "public void takeACard(Card card){\n hand.add(card);\n }" ]
[ "0.87009835", "0.8535572", "0.84729034", "0.8232304", "0.8219801", "0.8122389", "0.8026344", "0.7857243", "0.7782486", "0.7685221", "0.76264834", "0.75762415", "0.75736636", "0.75489163", "0.74928063", "0.74698067", "0.7461152", "0.7355063", "0.72842854", "0.7262117", "0.72236836", "0.71968794", "0.7183212", "0.7162494", "0.7150548", "0.7128935", "0.712195", "0.7117303", "0.7106727", "0.71043766", "0.71030885", "0.70906645", "0.7041933", "0.6995342", "0.6975125", "0.69709814", "0.6970922", "0.69618285", "0.6959588", "0.69592243", "0.69462705", "0.6910952", "0.6835986", "0.683404", "0.68136317", "0.68046564", "0.67828584", "0.67718464", "0.6770958", "0.6749886", "0.6730123", "0.6711221", "0.6698088", "0.6695945", "0.6634163", "0.66283506", "0.6591554", "0.6580978", "0.65561503", "0.6553327", "0.65433097", "0.65208024", "0.6513763", "0.64985025", "0.64913344", "0.64869344", "0.6483138", "0.64453495", "0.6444385", "0.6436389", "0.64351875", "0.64265656", "0.6424366", "0.64129037", "0.63991547", "0.63829523", "0.6369289", "0.6366169", "0.6355492", "0.6355309", "0.63447285", "0.63404596", "0.63267463", "0.63196963", "0.63174844", "0.63053954", "0.6297237", "0.6264006", "0.6261192", "0.6255532", "0.62530375", "0.62383825", "0.6234127", "0.6197285", "0.6186741", "0.6181158", "0.61801714", "0.61779475", "0.6158269", "0.61569107" ]
0.8699887
1
/ int getNumCards() In: Nothing Out: An integer whose value is the number of cards in the hand. Description: This is a basic accessor function.
public int getNumCards() { return this.numCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public int getNumberOfCards()\n\t{\n\t\treturn numCards;\n\t}", "public int getNumberOfCards() {\r\n\t\treturn numberOfCards;\r\n\t}", "public int numOfCards() {\n return cards.size();\n }", "public int getNumCards() {\n return this.topCard;\n }", "public int getCardCount() {\n\t\treturn this.cardsInhand.size();\n\t}", "int getNumCards();", "public int getCardCount() {\r\n\t\treturn this.cards;\r\n\t}", "public int getAmountOfCards() {\n\t\t\n\t\treturn myCards.size();\n\t\t\n\t}", "public static int getNumCardsPerHand()\n {\n return NUM_CARDS_PER_HAND;\n }", "public int getCardCount() {\r\n return cardCount;\r\n\t}", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "public int getTotalCards() {\n\t\treturn cards.size();\n\t}", "public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}", "public int getCardCount() {\n return cardSet.totalCount();\n }", "public int size() {\r\n\t\treturn cards.size();\r\n\t}", "public int receiveNumCards() {\n try {\n return dIn.readInt();\n } catch (IOException e) {\n System.out.println(\"Number of cards not received\");\n e.printStackTrace();\n }\n return 0;\n }", "public int length()\n {\n return cards.size();\n }", "public int getCountTradeCards() {\r\n\t\treturn countTradeCards;\r\n\t}", "public int getSize(){\r\n\t\treturn cards.size();\r\n\t}", "public int size()\n\t{\n\t\treturn card.size();\n\t}", "public int getHandSize() {\r\n\t\treturn playerCards.size();\r\n\t}", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public int getCardsRemaining() {\n\n\treturn cardsLeft;\n\n }", "public Integer getRedCards() {\n return this.redCards;\n }", "public int getNumDevCards() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < cards.length; i++)\n \t\t\tcount += cards[i];\n \n \t\treturn count + newCards.size();\n \t}", "public static double getCardCounter() {\n\t\treturn cardCounter;\n\t}", "public int getCardCount() {\n \t\treturn dupCount;\n \t}", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "public int cardsLeft() {\n return deck.size();\n }", "public Integer getYellowCards() {\n return this.yellowCards;\n }", "public int getCardNumber() {\n return cardNumber;\n }", "public int remainingCards() {\n return this.cards.length - this.topCardIndex ;\n }", "public int cardsRemaining() {\n return deck.cardsRemaining();\n }", "public int size() {\r\n\t\treturn seedCards.size();\r\n\t}", "public int getSizeOfDeck(){\n return cardDeck.size();\n }", "int getCardsRemaining(int player) {\n return players[player].getHand().size();\n }", "public int getHandKarteCount(){\n return getHandKarte().size();\n }", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "public int count() {\n\t\t\tassert wellFormed() : \"invariant false on entry to count()\";\n\n\t\t\tint count = 0;\n\t\t\tfor(Card p = this.first; p != null; p = p.next) {\n\t\t\t\t++count;\n\t\t\t}\n\n\t\t\treturn count; // TODO\n\t\t}", "public int getHighCard() {\r\n return highCard;\r\n }", "public int getResourceCardHandSize() {\n\t\t return resourceCardHand.getResourceCardHandSize();\n\t }", "public int getCardsToDraw() {\r\n return cardsToDraw;\r\n }", "public int size()\r\n\t{\r\n\t\treturn deck.size();\r\n\t}", "public int getHandSize()\n {\n return hand.size();\n }", "public int size() {\n return deck.size();\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "public Cards getCards() {\r\n\t\treturn cards;\r\n\t}", "public int getNumber(){\n return cardNumber;\n }", "public Integer getIscard() {\n return iscard;\n }", "public int getNumber(){return cardNumber;}", "public double getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public List<Card> getCards()\n {\n return this.deckOfCards;\n }", "public int receiveHandCount() {\n try {\n return dIn.readInt();\n } catch (IOException e) {\n System.out.println(\"Hand count not received\");\n e.printStackTrace();\n }\n return 0;\n }", "public int getCardID() {\n return cardID;\n }", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public int leaderDeckSize(){\n return deckLeaderCard.size();\n }", "public List<Card> getCards() {\n\t\treturn cards;\n\t}", "@Override\n\tpublic Cards getCards() {\n\t\treturn cards;\n\t}", "public int getTotalRegularCards() {\n return StatisticsHelper.sumMapValueIntegers(statistics.getCardsByWins());\n }", "public int handValue() {\n int handValue = 0;\n for (Card card : cards) {\n switch (((BlackjackCard)card).getRank()) {\n case TWO:\n handValue += 2;\n break;\n case THREE:\n handValue += 3;\n break;\n case FOUR:\n handValue += 4;\n break;\n case FIVE:\n handValue += 5;\n break;\n case SIX:\n handValue += 6;\n break;\n case SEVEN:\n handValue += 7;\n break;\n case EIGHT:\n handValue += 8;\n break;\n case NINE:\n handValue += 9;\n break;\n case TEN:\n handValue += 10;\n break;\n case JACK:\n handValue += 10;\n break;\n case QUEEN:\n handValue += 10;\n break;\n case KING:\n handValue += 10;\n break;\n }\n }\n\n for (int i = 0; i < aceCount; i++) {\n if (handValue < 11) {\n handValue += 11;\n } else {\n handValue += 1;\n }\n }\n\n return handValue;\n }", "public int getSize() {\n return pokerList.size();\n }", "public int size() {\n return this.deck.size();\n }", "public String getCardNumber()\r\n {\r\n return cardNumber;\r\n }", "public int deckLength() {\n\t\treturn this.deck.size();\n\t}", "public int packed() {\n return this.nbCard;\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public int getDeckSize()\n\t{\n\t\treturn deck.size();\n\t}", "public String getCardNumber()\n {\n return cardNumber;\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public int getCardsToDeal() {\r\n\t\treturn cardsToDeal;\r\n\t}", "public String getCardNo() {\n\t\treturn cardNo;\n\t}", "public ArrayList<Card> getCards()\n\t{\n\t\treturn cards;\n\t}", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public List<Card> getCards(){\r\n\t\treturn cards;\r\n\t}", "public int getCardSlot() {\n return cardSlot;\n }", "public String getCardNo() {\n return cardNo;\n }", "public String getCardNumber() {\n return cardNumber;\n }", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public int getHandValue() {\r\n int handValue = 0;\r\n for (Card card : this) {\r\n handValue += card.getCardValue();\r\n }\r\n return handValue;\r\n }", "public int GetSizeOfComputerHand(){\n return handComputer.size();\n }", "public int getNumDevCardType(Cards card) {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < newCards.size(); i++) {\n \t\t\tif (newCards.get(i) == card)\n \t\t\t\tcount += 1;\n \t\t}\n \n \t\treturn cards[card.ordinal()] + count;\n \t}", "public int GetDeckSize(){\n System.out.println(\"DECK \" + deck.size());\n\n return deck.size();\n }", "public String getCardNumber() {\n\t\treturn cardNumber;\n\t}", "public String getCards()\r\n\t{\r\n\t\t// creates a larger string which will have the cards appended to it\r\n\t\tString cardList = \"\";\r\n\t\t\r\n\t\t// adds all cards currently in hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tcardList = cardList + pCards[i] + \" \";\r\n\t\t}\r\n\t\t\r\n\t\treturn cardList;\r\n\t}", "public int deckSize() {\n\t\treturn size;\n\t}", "@Override\n public int getShoeSize() {\n return this.cards.size();\n }", "@Test\n\tpublic void testGetCardNum() {\n\t\tassertEquals(cardNumber, card.getCardNum());\n\t}", "public List<Integer> getHandSizes() {\n List<Integer> handSizes = new ArrayList<>(hands.size());\n for (List<ICard> hand : hands) {\n handSizes.add(hand.size());\n }\n return handSizes;\n }", "public double getCarrotCards() {\n\t\treturn carrotCards;\n\t}", "public int getTopCard() {\n return this.topCard;\n }", "private int getRandomCard (ArrayList<Card> hand) {\n\t\treturn (int)(Math.random() * hand.size());\r\n\t}", "static int getHighCardWithinHand(String[] hand) {\n\tint highCard = 1;\n\tfor (int i = 0; i < hand.length; i++) {\n\t if (getNumberOfCard(hand[i]) > highCard) {\n\t\thighCard = getNumberOfCard(hand[i]);\n\t }\n\t}\n\treturn highCard;\n }", "public interface CardCounts {\n\n int[] FULL_SETS_CARD_COUNTS = {324, 162, 162, 180, 180, 180, 324, 180, 182, 54, 99, 189, 100, 129};\n\n int[] PREMIUM_SETS_CARD_COUNTS = {6, 11, 2, 7, 6, 18, 6, 6, 12, 12, 6, 20};\n\n int[] VIRTUAL_SETS_CARD_COUNTS = {146, 42, 15, 36, 58, 23, 14, 30, 59, 56, 47, 61, 6, 59, 22, 27, 49, 52, 32, 48, 10, 75};\n\n int[] VIRTUAL_PREMIUM_SETS_CARD_COUNTS = {8};\n\n int[] DREAM_CARD_SETS_CARD_COUNTS = {0};\n\n int[] PLAYTESTING_SETS_CARD_COUNTS = {200};\n\n int[] LEGACY_SETS_CARD_COUNTS = {999};\n}", "private static int play() {\n\n Hand h = new Hand();\n int handValue = 0;\n\n // Deck deck = new Deck(); // Get a new deck of cards, and\n // store a reference to it in\n // the variable, deck.\n\n for (int i=0;i<3;i++) {\n Card c = new Card(3,Card.VICTORY);\n h.addCard(c);\n }\n for (int i=0;i<7;i++) {\n Card c = new Card();\n h.addCard(c);\n }\n\n for (int i=0;i<h.getCardCount();i++) {\n Card c = h.getCard(i);\n System.out.println(c.toString());\n handValue += c.getValue();\n }\n\n return handValue;\n }", "public ArrayList<Card> getHand(){\n return cards;\n }", "public int getNumBooks() {\n return numBooks;\n }", "public int getCardValue()\n {\n return cardValue; \n }", "public ArrayList<Card> getCards() {\n\n return cards;\n }" ]
[ "0.90650165", "0.89068174", "0.8741486", "0.8390125", "0.8286878", "0.82771", "0.82758075", "0.826963", "0.8245277", "0.82030225", "0.79270685", "0.7786041", "0.7731443", "0.7648604", "0.7609052", "0.7408437", "0.7400375", "0.73145163", "0.72804326", "0.7267997", "0.72283125", "0.71829313", "0.71674", "0.715403", "0.70854855", "0.7068826", "0.7064926", "0.70198655", "0.7004701", "0.69170964", "0.68499255", "0.68369085", "0.6834534", "0.6819673", "0.68111295", "0.67985016", "0.6758465", "0.67453", "0.6688922", "0.6673834", "0.6624131", "0.6610384", "0.65932775", "0.6582085", "0.65505373", "0.6537623", "0.64984465", "0.64861625", "0.6466142", "0.64185375", "0.6413993", "0.638755", "0.6372273", "0.6371616", "0.63639176", "0.6363008", "0.63536143", "0.6320988", "0.63018817", "0.62868434", "0.62823194", "0.62762195", "0.6268291", "0.6247252", "0.6231269", "0.6223604", "0.62232363", "0.62199146", "0.6208401", "0.62015194", "0.6196856", "0.6196141", "0.6190284", "0.61747175", "0.61673063", "0.6166233", "0.615964", "0.6144309", "0.61402094", "0.61374074", "0.6137224", "0.61155856", "0.6114282", "0.6096546", "0.60946065", "0.6085942", "0.60841095", "0.6083047", "0.60631126", "0.6051752", "0.6049877", "0.602268", "0.6016202", "0.6012784", "0.6010404", "0.6006881", "0.599831", "0.59914464", "0.5983342", "0.59809834" ]
0.90009344
1
/ Card inspectCard(int) In: An integer representing the position of the card to be inspected. Out: A copy of the card at the specified position, or an invalid card if there is no card in that position. Description: This function returns a Card object whose values are equal to the card in the specified position.
public Card inspectCard(int k) { if (k >= this.numCards || k < 0) return new Card('0', Card.Suit.spades); else return new Card(this.myCards[k]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card inspectCard(int k) {\n //If k is invalid, return an invalid card.\n if (k >= this.topCard || k < 0)\n return new Card('0', Card.Suit.spades);\n else\n //Otherwise, return a copy of the card in position k.\n return new Card(this.cards[k]);\n }", "ICard getCard(int cardIndex) throws IllegalArgumentException;", "public Card inspectCard(int k)\r\n {\r\n if (0 <= k && k < numCards && myCards[k] != null && \r\n myCards[k].getErrorFlag() == true)\r\n {\r\n return myCards[k];\r\n }\r\n return new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n }", "public Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= topCard)\n return errorReturn;\n else\n return cards[k];\n }", "Card inspectCard(int k)\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (k < 0 || k >= numCards)\n return errorReturn;\n else\n return myCards[k];\n }", "Card getCard(UUID cardId);", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public Card getCardAt( int index ) {\n return this.cards[index];\n }", "public Card getCard(int n) {\r\n\t\treturn this.Hand.get(n);\r\n\t}", "public Card getCard(int index)\n {\n if( index <0 || index >=52)\n return null;\n\n return cardAry[index];\n }", "ICard getTopCard() throws IllegalArgumentException;", "public Card copy(){\n return new Card(Suits, Value);\n }", "public int getCard(List<Integer> hand2, int position) {\n\t\tif (position >= 0 && position < hand2.size()) {\n\t\t\treturn ((Integer) hand2.get(position)).intValue();\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public Card getCard(int i) {\n\t\treturn cards.get(i);\n\t}", "public Card getCard() {\n return this.card;\n }", "public Card getCard() {\n return this.card;\n }", "public Card getCard(int idx) {\n return deck[idx];\n }", "public Card getCard(int index)\n\t{\n\t\treturn hand[index];\n\t}", "public DevelopmentCard getTopCard(int pos) {\n int size = devStack.get(--pos).size();\n return this.devStack.get(pos).get(--size);\n }", "public Card getCard( int cardNum ) {\n\t\treturn deck[ cardNum ];\n\t}", "public void testGetCard() {\n System.out.println(\"getCard\");\n Card expResult = new Card(Rank.QUEEN, Suit.SPADES);\n Play instance = new Play(\"Player1\", expResult);\n Card result = instance.getCard();\n assertEquals(expResult, result);\n }", "public void setValueOfCard(int valueOfCard) {\n this.valueOfCard = valueOfCard;\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "public Card getCardAtLocation(int index)\n {\n if (index < cards.size())\n return cards.get(index);\n \n return null;\n }", "@Override\n public Card getCard(int i) {\n return this.cards.get(i);\n }", "CardDto getCustomerCardDetails(Long cardId) throws EOTException;", "public Card getCardAtIndex(int i)\n {\n return cards.get(i);\n }", "Card(int num,String suit){\n this.number = num;\n this.suits = suit;\n }", "@Test\r\n public void testGetSpecificCard() {\r\n Deck instance = new Deck();\r\n System.out.println(\"Testing getSpecificCard\");\r\n Card result = instance.getSpecificCard(51);\r\n System.out.println('\\t' + \"Card toString: \" + result.toString());\r\n assertNotNull(result);\r\n }", "public UnoCard getCard(){\n Random rnd = new Random();\n int rnd_number = rnd.nextInt(((this.cards.size()-1)-0) + 1) + 0;\n return this.cards.get(rnd_number);\n\n }", "public Card giveCard(){\n return this.cardDeck.get(lastIndex++);\n }", "public Cards get(int i) {\r\n\t\treturn seedCards.get(i);\r\n\t}", "public Card(int value, int suit)\n {\n cardValue = value;\n cardSuit = suit;\n }", "public BlackjackCard getCardAtIndex(int index) {\n return (BlackjackCard)cards.get(index);\n }", "public Card getCard(int idx) {\r\n\t\tif (idx < 0 || idx >= cards.size()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn cards.get(idx);\r\n\t}", "public Card(Card card) {\n this.set(card.value, card.suit);\n }", "public Card nextCard(){\r\n\t if(topCardIndex >=52){\r\n\t throw new IndexOutOfBoundsException();\r\n\t }\r\n\t return cards[topCardIndex++];\r\n\t}", "public int chooseCard(){\n if(playable.size() == 1)//checks the size\n return searchCard(0);//returns the only playable card\n else{\n int temp = (int) Math.random()*playable.size();//chooses a random one\n return searchCard(temp);//returns that cards position\n }\n }", "public Card makeCopy(){\n return new Card(vimage);\n }", "@Override\r\n public Card getCardFromDealer(int deckPosition) {\r\n return this.dealer.getCard(deckPosition);\r\n }", "public Card getCard(int index){\n return cards.get(index - 1);\n }", "public Card getPresentCard() {\n return storageCards.peek();\n }", "public Card(String suit, int value)\n {\n this.suit = suit;\n this.value = value;\n \n }", "public Card(){\n suit = 0;\n rank = 0;\n }", "Symbol getActiveCard();", "public Card getCardInDeck(int i){\n\t\treturn deck[i];\n\t}", "public CardDetail(String suit, String rank){\r\n this.suit = suit;\r\n this.rank = rank;\r\n }", "public CardStack getStack(Card card)\n {\n CardStack temp = new CardStack();\n int index = search(card);\n \n for (int i = 0; i < index; i++)\n {\n temp.push(getCardAtLocation(cards.size() - i - 1).clone());\n getCardAtLocation(cards.size() - i - 1).highlight();\n }\n \n return temp;\n }", "public int getCardSlot() {\n return cardSlot;\n }", "public Card(String suit, int value) {\n this.value = value;\n this.suit = suit;\n }", "public Card(Card orig){\n this.cardType = orig.cardType;\n this.cardRank = orig.cardRank;\n this.cardSuit = orig.cardSuit;\n scaleCard(this.cardType);\n this.cardId = orig.cardId;\n this.isClick = false;\n this.inValidGroup = orig.inValidGroup;\n }", "public int getTopCard() {\n return this.topCard;\n }", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public Card(int cardRank, int cardSuit){\n this.rank = cardRank;\n this.suit = cardSuit;\n }", "public Card showCard()\r\n {\r\n return pile.peek();\r\n }", "public Card getCard(ArrayList<Card> cards, int index);", "public UnoCard getTopCard() {\r\n return new UnoCard(validColor, validValue);\r\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public Card(int suit, int rank) {\n\n // pre-condition: suit and rank are valid\n \n this.suit = suit;\n this.rank = rank;\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public Card(String suit, String rank, int value)\t\r\n\t{\r\n\t\tthis.suit = suit;\r\n\t\tthis.rank = rank;\r\n\t\tthis.value = value;\r\n\t}", "public int getCardValue(int card) {\n\t\tint result = card;\n\t\tswitch (card) {\n\t\tcase 11:\n\t\tcase 12:\n\t\tcase 13:\n\t\t\tresult = 10;\n\t\t}\n\t\treturn result;\n\t}", "public Cardholder(String name, String address, int cardNumber){\n this.name = name;\n this.address = address;\n this.cardNumber = cardNumber;\n }", "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card(String suit,int value)\n\t{\n\t\tthis.suit=suit;\n\t\tthis.value=value;\n\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card(int s, int r)\n {\n suit = s;\n rank = r;\n }", "public String GetDeckCard(int value){\n return deck.get(value);\n }", "public Card (Rank rank, Suit suit)\n {\n this.rank = rank;\n this.suit = suit;\n }", "@Test\r\n\tpublic void testCardStack() {\r\n\t\t\r\n\t\t// create a card stack\r\n\t\tCardStack testStack = new CardStack();\r\n\t\t\r\n\t\t// test if we can place a non-king card onto the empty stack\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(1)));\r\n\t\t\r\n\t\t// test if we can place a king onto an empty stack\r\n\t\t// remember testStack starts at 0 not 1, so kings are at position 12\r\n\t\tassertTrue(testStack.isValidMove(deckCards.get(12)));\r\n\t\t\r\n\t\t// add the king to the stack\r\n\t\tassertEquals(deckCards.get(12), testStack.push(deckCards.get(12)));\r\n\t\t\r\n\t\t// now test can we add the same suit queen\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(12)));\r\n\t\t\r\n\t\t// now test if can add an off-suit different color queen\r\n\t\tassertTrue(testStack.isValidMove(deckCards.get(37)));\r\n\t\t\r\n\t\t// place the card to the stack\r\n\t\tassertEquals(deckCards.get(37), testStack.push(deckCards.get(37)));\r\n\t\t\r\n\t\t// add a card to the stack via add method as if being dealt\r\n\t\ttestStack.addCard(deckCards.get(40));\r\n\t\t\r\n\t\t// now check if that changes what will be accepted\r\n\t\tassertFalse(testStack.isValidMove(deckCards.get(41)));\r\n\t}", "public Card (int aRank , int aSuit)\n {\n this.ranks = aRank;\n this.suits = aSuit;\n }", "public TACardInfo getCard(String referenceId) {\n synchronized (cardInfoListLock) {\n if (cardInfoListCache != null) {\n if (!cardInfoListCache.isEmpty()) {\n TACardInfo cardInfo = getCardFromCardListCache(referenceId);\n if (cardInfo == null) {\n return null;\n }\n TACardInfo clone = cardInfo.clone();\n return clone;\n }\n }\n }\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "public Card getPlayer2Card()\n {\n player2card = new Card(player2Hand.dequeue().toString());\n return player2card;\n \n }", "public int getCardValue()\n {\n return cardValue; \n }", "public Integer getIscard() {\n return iscard;\n }", "Card drawCard() {\n if (this.pointer >= this.cards.size()) {\n throw new NoMoreCardsAvailableException();\n }\n return cards.get(pointer++);\n }", "public UnoCard getCardByName(String cardName){\n Drawable color_change_plus4 = this.appContext.getResources().getDrawable(R.drawable.color_change_plus4);\n Drawable card_back = this.appContext.getResources().getDrawable(R.drawable.card_back);\n UnoCard card = new UnoCard(this.appContext, deckPos, new Point(20, 20), color_change_plus4, card_back, \"Color Change Plus 4\", \"\", \"COLOR CHANGE PLUS 4\", \"COLOR CHANGE PLUS 4\");\n for (UnoCard c : this.cards){\n if (c.getName().equals(cardName)){\n card = c;\n break;\n }\n }\n return card;\n }", "public void victoryCardFind();", "public int getCardNumber() {\n return cardNumber;\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public Card takeCard() {\n return this.deck.pop();\n }", "CardNumber(int number) {\r\n this.number = number;\r\n }", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public int getCardID() {\n return cardID;\n }", "public static Card summaryCard(String summary) {\n Card card = baseCard();\n card.setSummary(summary);\n return card;\n }", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public Card getPlayer1Card()\n {\n player1card = new Card(player1Hand.dequeue().toString());\n return player1card;\n }", "public Card playCard(int cardIndex)\r\n {\r\n if (numCards == 0) // error\r\n {\r\n // Creates a card that does not work\r\n return new Card('E', Card.Suit.SPADES);\r\n }\r\n // Save the current card\r\n Card card = myCards[cardIndex];\r\n // Decreases numCards.\r\n numCards--;\r\n for (int i = cardIndex; i < numCards; i++)\r\n {\r\n myCards[i] = myCards[i + 1];\r\n }\r\n\r\n myCards[numCards] = null;\r\n\r\n return card;\r\n }", "boolean similarCard(Card c);", "public Card(String suit, String rank){\r\n\t\t\t// assume input is valid!\r\n\t\t\tthis.suit = suit; \r\n\t\t\tthis.rank = rank;\r\n\t\t\tthis.rankValue = new HashMap<String,Integer>(15);\r\n\t\t\tfor(int r = 2; r < RANKS.length; r+=1){\r\n\t\t\t\tthis.rankValue.put(RANKS[r], r);\r\n\t\t\t}\r\n\t }", "public Integer getRoomcard() {\n return roomcard;\n }", "public Card(int v, Suit s) {\n this.value = v;\n this.suit = s;\n //this.specialTypeOfCard = NOT_FACE_NOT_ACE;\n\n }", "public Card drawCard() {\n return deck.pop();\n }", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public void getCard(Card card, Board board){\n card.action(this, board);\n }", "public String toString(){\n String card = null; \n //clubs\n if(suit==1){\n \tcard = \"c\" + Integer.toString(value);\n }\n //diamonds\n if(suit==2){\n \tcard = \"d\" + Integer.toString(value);\n }\n //hearts\n if(suit==3){\n \tcard = \"h\" + Integer.toString(value);\n }\n //spades\n if(suit==4){\n \tcard = \"s\" + Integer.toString(value);\n }\n return card; \n\t}", "public Card(int value)\n {\n //initialize the value instance variable\n this.value = value;\n }", "public Card(int s, int r){\n suit = s;\n rank = r;\n }", "private Card drawCard() {\n return cardStack.pop();\n }" ]
[ "0.70188725", "0.6685246", "0.6295219", "0.6268143", "0.6113591", "0.59031713", "0.5895638", "0.58300775", "0.5792667", "0.577735", "0.576042", "0.5730506", "0.5724839", "0.57179636", "0.571217", "0.56940866", "0.56646645", "0.5618974", "0.5588994", "0.55750513", "0.55499786", "0.5532897", "0.5529593", "0.5511857", "0.55061144", "0.54908353", "0.54882574", "0.5478303", "0.54746157", "0.5466794", "0.5452105", "0.54311985", "0.542014", "0.5408589", "0.5397073", "0.53917116", "0.538851", "0.5371803", "0.53706664", "0.5369613", "0.5356517", "0.53564215", "0.53515357", "0.5342972", "0.5340826", "0.5335397", "0.53154254", "0.53081214", "0.52841675", "0.527637", "0.52709115", "0.5268806", "0.5260988", "0.52567345", "0.5245508", "0.5240087", "0.52347594", "0.52296704", "0.5222252", "0.5196045", "0.5189243", "0.51769793", "0.5171044", "0.5166881", "0.5164417", "0.51544666", "0.51525265", "0.5148351", "0.51428616", "0.5125804", "0.51167464", "0.511538", "0.5114673", "0.51137525", "0.51124233", "0.50948995", "0.5090937", "0.50851595", "0.50829595", "0.5076165", "0.50707537", "0.5070407", "0.5068948", "0.5068828", "0.50684375", "0.506636", "0.5065184", "0.506138", "0.5061355", "0.50494725", "0.5046232", "0.50428647", "0.5042604", "0.5040809", "0.50281304", "0.5027727", "0.5023448", "0.502205", "0.50208575", "0.5018944" ]
0.666091
2
/ In: An integer specifying the position of the card to play in the hand Out: The Card object representing the card in that position This plays a card and removes it from the hand.
public Card playCard(int k) { //If k is invalid, return an invalid card. if (k >= this.numCards || k < 0) return new Card('0', Card.Suit.spades); else { //Return the card in that position, and //move all of the cards after that card //back by one position. Card card = new Card(this.myCards[k]); for (int i = k + 1; i < this.numCards; i++) { this.myCards[i - 1] = this.myCards[i]; this.myCards[i] = null; } this.numCards--; return card; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void playCard(PlayingCard card){\n\t\tplayed = hand.remove(hand.indexOf(card));\t\t\n\t}", "public Card playCard(int index)\n\t{\n\t\treturn currentHand.remove(index);\n\t}", "public Card playCard() {\n Card card = this.myCards[this.numCards - 1];\n this.myCards[this.numCards - 1] = null;\n this.numCards--;\n return card;\n }", "public Card playCard()\r\n {\r\n Card removedCard = new Card('E', Card.Suit.valueOf(\"SPADES\"));\r\n if (numCards <= 0)\r\n {\r\n return removedCard;\r\n }\r\n Card playedCard = new Card(myCards[numCards - 1].getValue(),\r\n myCards[numCards - 1].getSuit());\r\n myCards[numCards - 1] = removedCard;\r\n numCards--;\r\n return playedCard;\r\n }", "public void removePresentCard() {\n storageCards.remove();\n }", "public void removeCardAndAddToHand(int location,ArrayList<Card> hand) {\n// if(cards.get(location).equals()){\n hand.add(cards.get(location));\n cards.remove(location);\n// }\n //add to player\n }", "public Card giveMeACardForPlayer() {\n Card cardToGive = new Card(storageCards.peek().getCardMode(), storageCards.peek().getColor(), storageCards.peek().getScore());\n storageCards.remove();\n return cardToGive;\n }", "public Card deal()\r\n\t{\r\n\t\tCard card = deck.remove(0);\r\n\t\treturn card;\r\n\t}", "public Card playCard()\n {\n\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (numCards == 0)\n return errorReturn;\n else\n return myCards[--numCards];\n }", "public Card flip() {\n\t\treturn hand.remove(0);\n\t}", "public Card removeCard(){\n Card temp = pile[0]; //removes top card. putting placement card to avoid null pointer\n for(int i = 0; i < pilePlace; i++){ //shifts cards\n pile[i] = pile[i+1];\n }\n pilePlace--;\n return temp;\n\n }", "public SpoonsCard dealCard() {\r\n\t SpoonsCard card = deck.get(0);\r\n\t deck.remove(0);\r\n\t return card;\r\n }", "public void remove(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Remove: \" + card.getName()));\n handPile.remove(card);\n }\n }", "public void RemoveCardFromComputer(int value){\n handComputer.remove(value);\n }", "public Card dealCard() {\n if (deck.size() == 52) {\n shuffle();\n }\n Card temp;\n temp = deck.get(0);\n remove(0);\n return temp;\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "public void discard(Card card) {\n if (!myTurn()) {\n return;\n }\n // CardAction cardAct = new CardAction(card, \"Discard: \" + card.getName());\n // history.add(cardAct);\n\n if (handPile.contains(card)) {\n tmpDiscardPile.add(card);\n handPile.remove(card);\n } else {\n tmpDiscardPile.add(card);\n }\n }", "public Card drawCard() {\n Card c = cards.get(0);//get a card\n cards.remove(0);//remove the card form the deck that's given out\n discard.add(c);//so the card given out is added to the discard list\n return c;//return a card object\n\n }", "void cut(int cardPosition);", "public void remove(Card card) {\r\n\t\tcards.remove(card);\r\n\t}", "public CardGao dealCard()\r\n {\r\n return cards.get(top--);\r\n\r\n }", "public void dealCard(Player player){\n TrainCard removedCard = draw();\n player.addTrainCard(removedCard);\n }", "public Card play7(){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which card ? (it should be 7 )\");\n cardIndex = scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex<=0 || cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(\"7\")))){\n System.out.println(\"! it is not a seven card !\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n\n\n }", "public Card takeCard() {\n return this.deck.pop();\n }", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public Card playCard(int cardIndex)\r\n {\r\n if (numCards == 0) // error\r\n {\r\n // Creates a card that does not work\r\n return new Card('E', Card.Suit.SPADES);\r\n }\r\n // Save the current card\r\n Card card = myCards[cardIndex];\r\n // Decreases numCards.\r\n numCards--;\r\n for (int i = cardIndex; i < numCards; i++)\r\n {\r\n myCards[i] = myCards[i + 1];\r\n }\r\n\r\n myCards[numCards] = null;\r\n\r\n return card;\r\n }", "public Card giveCard()\n {\n return deck.pop();\n }", "public void play(PlasterClash p) {\n p.currentPlayer().getHand().remove(this);\n }", "public Card drawFromDeck() {\n\t\treturn cards.remove(0);\n\t}", "@Override\r\n\tpublic void playCard() {\n\t\t\r\n\t}", "public int dealCard() {\n\n\t\tif (currentPosition == 52) {\n\t\t\tshuffle();\n\t\t}\n\t\tcurrentPosition++;\n\t\treturn deck[currentPosition - 1];\n\t}", "public TrainCard draw(){\n TrainCard card = cardDeck.get(0);\n cardDeck.remove(0);\n return card;\n }", "public void removeCard(int index) {\n cards.remove(index);\n }", "public void RemoveCardFromHuman(int value){\n handHuman.remove(value);\n }", "public void discardCard(int player, Card card) {\r\n\t\tplayers.get(player).removeCard(card);\r\n\t\tdiscardPile.addCard(card);\r\n\t}", "public Card remove() {\n return (this.cards.size() > 0) ? this.cards.remove(0) : null;\n }", "public Card drawCard() {\n return deck.pop();\n }", "public void shuffleThePresentCardToTheEnd() {\n storageCards.add(storageCards.remove());\n }", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public Card chooseFromHand(String sign , String colorName){\n Scanner scanner = new Scanner(System.in);\n Card chosenCard = null;\n int cardIndex;\n do{\n System.out.println(\"which cart ? (-1 to pick up card from cardDeck) ?\");\n cardIndex =scanner.nextInt();\n// scanner.nextLine();\n if(cardIndex == -1){\n ArrayList<Card> playableCards = playableNormalCards(sign , colorName);\n if(playableCards.size() == 0){\n return null;\n }\n else {\n System.out.println(\"you still can play : \");\n for(Card card : playableCards){\n System.out.print(card + \" \");\n }\n System.out.println();\n }\n }\n else if(cardIndex<=0 ||cardIndex > hand.size()){\n System.out.println(\"not valid input\");\n System.out.println(\"please try again : \");\n }\n else if(hand.get(cardIndex-1).getSign().equals(\"B\")){\n chosenCard = hand.get(cardIndex -1);\n }\n else if((!(hand.get(cardIndex-1).getSign().equals(sign))) &&\n (!(hand.get(cardIndex-1).getColorName().equals(colorName)))){\n System.out.println(\"not playable card\");\n System.out.println(\"please try again : \");\n }\n else{\n chosenCard = hand.get(cardIndex - 1);\n }\n\n }while(cardIndex <= 0 || cardIndex > hand.size() || chosenCard == null);\n\n\n hand.remove(chosenCard);\n return chosenCard;\n }", "public Card dealCard() {\n //Return an invalid card if there are no cards in the deck.\n if (this.topCard < 0)\n return new Card('0', Card.Suit.spades);\n else {\n //Create a copy of the card on the top of the deck.\n Card card = new Card(this.cards[this.topCard - 1]);\n //Set the actual card on the top of the deck to null, to destroy it.\n this.cards[this.topCard - 1] = null;\n //The topCard is now one less than it was.\n this.topCard--;\n //return the copy.\n return card;\n }\n }", "public void playCard(int player, int card) {\n }", "public void RemoveCardFromDeck(int value){\n deck.remove(value);\n }", "@Override\n public void removeCard(int i) {\n this.cards.remove(i);\n }", "public void cardWasUsed(Card card) {\r\n\t\tthis.hand.remove(card);\r\n\t\tthis.discard.add(card);\r\n\t}", "@Override\n\tpublic void playCard() {\n\t\t\n\t}", "public void findAndRemoveCard(Card c){\n\t\tboolean b = myCards.remove(c);\n//\t\tSystem.out.println(\"mycards size\" + myCards.size() + \"and removed was \" + b);\n\t\treturn;\n\t}", "@Override\n public Card playCard() {\n List<Card> rank1 = new ArrayList<>();\n List<Card> rank2 = new ArrayList<>();\n List<Card> rank3 = new ArrayList<>();\n List<Card> rank4 = new ArrayList<>();\n for (Card card : cardsInHand) {\n if (card.getRank().equals(Card.Rank.EIGHT)) {\n rank1.add(card);\n break;\n } else if (card.getSuit().equals(idealSuit)\n && card.getRank().equals(idealRank)\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank2.add(card);\n } else if ((card.getSuit().equals(idealSuit) || card.getRank().equals(idealRank))\n && (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank()))) {\n rank3.add(card);\n } else if (topCard.getSuit().equals(card.getSuit())\n || topCard.getRank().equals(card.getRank())) {\n rank4.add(card);\n }\n }\n List<List<Card>> playPossibilities = new ArrayList<>(Arrays.asList(rank1, rank2, rank3, rank4));\n for (List<Card> list : playPossibilities) {\n if (list.size() > 0) {\n cardsInHand.remove(list.get(0));\n return list.get(0);\n }\n }\n // This method will never return null if shouldDrawCard() is called beforehand.\n return null;\n }", "public Card drawCard(){\n if(size() == 0)\n throw new IndexOutOfBoundsException();\n Card card = cards.get(cards.size() - 1);\n cards.remove(card);\n return card;\n }", "protected void removeChosenCard(Board gameBoard, Card chosenCard) {\n Iterator<Card> it = myCards.iterator();\n Card tempgroundCard= gameBoard.getGroundCard();\n while (it.hasNext()) {\n Card tempCard = it.next();\n if (tempCard.equals(chosenCard)) {\n it.remove();\n // Card tempgroundCard=gameBoard.getGroundCard;\n if (tempgroundCard instanceof WildDrawCard\n || tempgroundCard instanceof ColorChangeCard) {// if the last ground card was Wild set\n // it black again\n gameBoard.getGroundCard().setColor(0);\n }\n gameBoard.setGroundCard(tempCard);\n gameBoard.addToStorage(tempCard);\n if (!(tempCard instanceof DrawCard) && !(tempCard instanceof WildDrawCard)) { // if the Card was't Draw\n gameBoard.resetDraw();\n }\n cardNumber = myCards.size();\n break;\n }\n }\n }", "public void cancelCard() {}", "private void removeCard() {\n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC ID number you'd like to remove:\");\n\t\tsic_idHolder = scan.nextInt(); // prompts user to input sic_idHolder\n\t\tscan.nextLine();\n\t\t\n\t\tinventoryObject.removeStockIndexCard(sic_idHolder); //calls removeStockIndexCard from InventoryManagement\n\t\tgetUserInfo();\n\t}", "public Card drawCard() {\n\t\tCard c = cards.get(0);\n\t\tcards.remove(0);\n\n\t\treturn c;\n\t}", "public Card deal() {\n size--;\n return cards[size];\n }", "public Card drawCard() {\n return gameDeck.removeTopCard();\n }", "@Override\r\n public ICard dealCard() {\r\n //get the first card from top of the deck \r\n ICard top = this.deck[ZERO];\r\n //shift cards to the left, because we get the first one \r\n for (int i = ONE; i < this.numOfCards; i++) {\r\n this.deck[i - ONE] = this.deck[i];\r\n }\r\n this.deck[this.numOfCards - ONE] = null;\r\n //decrement the number of cards currently in the deck \r\n this.numOfCards--;\r\n\r\n return top;\r\n }", "public Card dealCard() {\n int randPos = random.nextInt(51 - 0 + 1);\n Card rand = deck[randPos];\n return rand;\n\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "public void play(GameController game){\n game.trashCard(this);\n \n }", "private Card drawCard() {\n return cardStack.pop();\n }", "public Card removeFirstCard()\n {\n return cards.remove(0);\n }", "public Card PlayCard() {\n\t Card ret = null;\n\t Card card;\n\t if (mCardCount > 0) {\n\t\t // To work out what card to play, see what cards can be played\n\t\t \tCard[] playableCards;\n\t\t \tplayableCards = mRules.GetPlayableCards();\n\t\t \tCard[] selectedCards;\n\t\t \tselectedCards = new Card[8];\n\t\t \tint iNumSelectableCards = 0;\n\t\t \tfor (int i = 0; i < 8; i++)\n\t\t \t\tselectedCards[i] = null;\n\t \tfor (int i = 0; i < mCardCount; i++){\n\t \t\tcard = mCard[i];\n\t \t\tswitch (card.GetSuit()){\n\t \t\tcase Card.HEARTS:\n\t \t\t\t\n\t \t\t\t// Card is a heart, can it be played?\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t// and must be played first\n\t \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n\t \n\t \t\t\t\treturn card;\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()-1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){\n\t \t\t\t\t\tselectedCards[Rules.HEARTS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t\t//Log.i(\"\",\" Playing card \" + (card.GetValue()) + \" , \" +card.GetSuit());\n\t \t\t\t\t\t//Log.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.HEARTS);\t \t\t\t\t\t\n\t \t\t\t\t\t//playableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n\t \t\t\t\t\t//return card;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\tcase Card.DIAMONDS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\n\t \t\t\t\t\tselectedCards[Rules.DIAMONDS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.CLUBS:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n\t \t\t\t\t\tselectedCards[Rules.CLUBS8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t\t \t\t\t\n\t \t\t\tbreak;\n\t \t\t\t\n\t \t\tcase Card.SPADES:\n\t \t\t\t// Is it a seven, it can be played...\n\t \t\t\tif (card.GetValue() == 7){\n\t \t\t\t\tif (card.Equals(playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\tif (card.GetValue() < 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES6] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\tif (card.GetValue() > 7){\n\t \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\n\t \t\t\t\t\tselectedCards[Rules.SPADES8] = card;\n\t \t\t\t\t\tiNumSelectableCards++;\n\t \t\t\t\t}\n\t \t\t\t}\t \t\t\t\n\t \t\t\tbreak;\n\n\t \t\t\t\t \t\t\t\n\t \t\t}\n\t\n\t \t}\t\n\t \t\n\t \t// Now go through the selectable cards and see which is best to be played\n\t \tif (iNumSelectableCards == 0)\n\t \t\treturn ret;\n\t \t\n\t \tint iPos;\n\t \tcard = null;\n\t \tif (iNumSelectableCards == 1){\n\t\t\t \tfor (int i = 0; i < 8; i++)\n\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t \t\t\tcard = selectedCards[i];\n\t\t\t \t\t\tbreak;\n\t\t\t \t\t}\n\t\t\t \t\t\t \t\n\t \t}\n\t \telse {\n\t\t\t String sDifficulty = mRules.mView.GetSettings().getString(\"Difficulty\", \"0\");// 0 = hard, 1 = easy\n\t\t\t int iDifficulty = Integer.parseInt(sDifficulty);\n\t\t\t if (iDifficulty == EASY){\n\t\t\t \t// Get a random card from the playable ones\n\t\t\t\t\t Random generator = new Random();\n\t\t\t\t\t int randomIndex = generator.nextInt( iNumSelectableCards );\n\t\t\t\t\t int iCount = 0;\n\t\t\t\t\t \tfor (int i = 0; i < 8; i++){\n\t\t\t\t\t \t\tif (selectedCards[i] != null){\n\t\t\t\t\t \t\t\tif (iCount == randomIndex){\n\t\t\t\t\t \t\t\t\tcard = selectedCards[i];\n\t\t\t\t\t \t\t\t\tbreak;\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t \t\t\telse iCount++;\n\t\t\t\t\t \t\t}\t\n\t\t\t\t\t \t}\n\t\t\t }\n\t\t\t else {\n\t\t\t \tiPos = GetBestCard(selectedCards);\n\t\t\t \tcard = selectedCards[iPos];\n\t\t\t }\n\t \t}\n\t \t\n\t \tswitch (card.GetSuit()){\n \t\tcase Card.HEARTS:\t \t\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\t// and must be played first\n \t\t\t\tplayableCards[Rules.HEARTS8] = new Card(8,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.HEARTS6] = new Card(6,Card.HEARTS);\n \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(7,Card.CLUBS);\n \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(7,Card.DIAMONDS);\n \t\t\t\tplayableCards[Rules.SPADES8] = new Card(7,Card.SPADES);\n \n \t\t\t\treturn card;\n \t\t\t}\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.HEARTS6])){\n \t\t\t\t\tplayableCards[Rules.HEARTS6] = new Card(card.GetValue()-1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.HEARTS8])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.HEARTS8] = new Card(card.GetValue()+1,Card.HEARTS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\tcase Card.DIAMONDS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(8,Card.DIAMONDS);\n\t \t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(6,Card.DIAMONDS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS6])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS6] = new Card(card.GetValue()-1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.DIAMONDS8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.DIAMONDS8] = new Card(card.GetValue()+1,Card.DIAMONDS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\t\n \t\t\tbreak; \n \t\t\t\n \t\tcase Card.CLUBS:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.CLUBS8] = new Card(8,Card.CLUBS);\n\t \t\t\t\tplayableCards[Rules.CLUBS6] = new Card(6,Card.CLUBS);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS6])){\n \t\t\t\t\tplayableCards[Rules.CLUBS6] = new Card(card.GetValue()-1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals(playableCards[Rules.CLUBS8])){\n \t\t\t\t\tLog.i(\"\",\" Updating playable card \" + (card.GetValue()+1) + \" , \" +Card.CLUBS);\n \t\t\t\t\tplayableCards[Rules.CLUBS8] = new Card(card.GetValue()+1,Card.CLUBS);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t\t \t\t\t\n \t\t\tbreak; \n \t\tcase Card.SPADES:\n \t\t\t// Is it a seven, it can be played...\n \t\t\tif (card.GetValue() == 7){\n \t\t\t\tif (playableCards[Rules.HEARTS8] != null && playableCards[Rules.HEARTS8].GetValue() > 7){\n\t \t\t\t\tplayableCards[Rules.SPADES8] = new Card(8,Card.SPADES);\n\t \t\t\t\tplayableCards[Rules.SPADES6] = new Card(6,Card.SPADES);\t \t\t\t\t\t\n \t\t\t\t\treturn card;\n \t\t\t\t}\t \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\tif (card.GetValue() < 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES6])){ \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES6] = new Card(card.GetValue()-1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (card.GetValue() > 7){\n \t\t\t\tif (card.Equals( playableCards[Rules.SPADES8])){\t \t\t\t\t\t\n \t\t\t\t\tplayableCards[Rules.SPADES8] = new Card(card.GetValue()+1,Card.SPADES);\n \t\t\t\t\treturn card;\n \t\t\t\t}\n \t\t\t}\t \t\t\t\n \t\t\tbreak;\n \t\t\t\n\t \t}\n\t \n\t }\n\t return ret;\n }", "public Card deal()\n\t{\n\t\tif (cards.isEmpty())\n\t\t\treturn null;\n\t\t\n\t\t//Generate a random index to pull a random card from the ordered deck\n\t\tint rand = (int) (Math.random() * cards.size());\n\t\tCard dealt = cards.get(rand);\n\t\t//Remove the pulled card from the deck\n\t\tcards.remove(rand);\n\t\t\n\t\treturn dealt;\n\t}", "@Override\r\n public void moveCard() {\n \r\n }", "for (Card ca : deck) {\n\t\tif (ca.suit == 'c') {\n\t\t\tdeck.remove(ca);\n\t\t}\n\t}", "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "public void playCard(int joshleisajoke)\r\n\t{\n\t\tCard thing = hand.remove(joshleisajoke);\r\n\t\tw.build(thing);\r\n\t\tif(thing.getCost().containsKey(\"coin\"))\r\n\t\t\tcoins--;\r\n\t\tdoEffect(thing);\r\n\t}", "public void otherPlay(int pos, GameCard card){\n System.out.println(pos);\n int cardColor = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).color.get().ordinal();\n int cardNumber = playerCardsList.get(turnCounter % playerCardsList.size()).get(pos).number.get();\n int number = playedCardPile.get(cardColor).number.get();\n if (cardNumber - 1 ==number){\n playedCardPile.set(cardColor, playerCardsList.get(turnCounter % playerCardsList.size()).get(pos));}\n playerCardsList.get(turnCounter % playerCardsList.size()).set(pos, card);\n notifyObservors();\n\n }", "public Card dealCard() {\n\t\tnumCards = deckCount * 52;\n\t\tif (dealt >= numCards) {\n\t\t\tthrow new IllegalStateException(\"No Cards Left In The Deck\");\n\t\t} else {\n\n\t\t\tcardsRemaining = numCards - dealt;\n\t\t\tswitch (cardsRemaining) {\n\t\t\tcase 15:\n\t\t\t\tSystem.out.println(\"15 cards remaining in the shoe\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out\n\t\t\t\t.println(\"5 cards remaining in the shoe, adding cards \"\n\t\t\t\t\t\t+ \"to shoe \");\n\t\t\t\tShoe.clear();\n\t\t\t\tfor (int h = 0; h < deckCount; h++) {\n\t\t\t\t\tfor (int i = 1; i < 14; i++) {\n\t\t\t\t\t\tfor (int j = 1; j < 4; j++) {\n\t\t\t\t\t\t\tShoe.add(new Card(i, j));\n\t\t\t\t\t\t\tCollections.shuffle(Shoe);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdealt++;\n\t\t\treturn Shoe.get(dealt - 1);\n\t\t}\n\t}", "public void play() {\r\n this.cardDeck = new JavaDeck();\r\n cardDeck.shuffle();\r\n dealerHand = new JavaHand(2);\r\n dealerHand.DiscardHand();\r\n addDealerCard();\r\n }", "public Card deal() {\n\t\tif (cardsUsed == deck.length)\n\t\t\tthrow new IllegalStateException(\"No cards are left in the deck.\");\n\t\tcardsUsed++;\n\t\treturn deck[cardsUsed - 1];\n\n\t}", "public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }", "public Card draw() {\n if (cards.size() == 0) {\n shuffleDiscardToCards();\n }\n return cards.remove(cards.size() - 1);\n }", "public void removeCard(Player player, AbstractCard card) { //throws exception\n\n for (Hand hand : hands)\n if (hand.getHandOwner().equals(player))\n hand.removeCard(card);\n\n }", "@Override\n\tpublic UnoCard getCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.remove(index);\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }", "public void remove(int idx) {\r\n\t\tcards.remove(idx);\r\n\t}", "public Card dealCard()\n {\n Card errorReturn = new Card('E', Card.Suit.spades); // in rare cases\n\n if (topCard == 0)\n return errorReturn;\n else\n return cards[--topCard];\n }", "public Card hit() {\n Card drawn = deck.get(0);\n deck.remove(0);\n return drawn;\n }", "@Override\n public void visit(PlayCardMove move) {\n ICard cardToPlay = move.getCard();\n\n if (!isValidPlay(cardToPlay)) {\n return;\n }\n\n ArrayList<ICard> hand = hands.get(currentTurn);\n\n hand.remove(cardToPlay);\n discardPile.push(cardToPlay);\n\n // detect game over\n if (hand.size() == 0) {\n isGameOver = true;\n winner = currentTurn;\n }\n\n if (!isGameOver) {\n cardToPlay.onPlay(this);\n }\n }", "public Card pullCard(){\n if(this.deckOfCards.isEmpty()){\n return null;\n }\n Card cardPulled = this.deckOfCards.get(0);\n this.deckOfCards.remove(0);\n return cardPulled;\n }", "public Card dealCard() {\n\t\tsize--;\n\t\t//return deck.pop();\n\t\tCard card = deck.pop();\n\t\tint rank = card.getRank();\n\t\t\n\t\t// Adjust total count accordingly\n\t\tif ((rank >= 2) && (rank <= 6)) {\n\t\t\ttotal_count++;\n\t\t}\n\t\telse if ((rank >= 10) || (rank == 1)) {\n\t\t\ttotal_count--;\n\t\t}\n\t\t\n\t\treturn card;\n\t}", "@Override\n\tpublic void cardInPlay() {\n\t\tIPlayer playedOn = this.game.getOtherPlayer();\n\t\tif(!playedOn.getFaction().equals(Faction.Cultist)){\n\t\t\tplayedOn.setFaction(Faction.UNAFFILIATED);\n\t\t}\n\t\tthis.setDiscard();\n\t}", "@Override\r\n public void transferFromDiscard(int plDeckPosition, int player){\r\n PlayingCard card;\r\n while(!this.players.get(player).getDeck(plDeckPosition+1).isDeckEmpty()){\r\n card = (PlayingCard) this.getPlayerCard(player, plDeckPosition+1);\r\n this.giveCardToPlayer(card, player, plDeckPosition);\r\n } \r\n }", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "public void kill () throws GameExceptions.GameException {\n if (!this.hasCounter) {\n this.play ();\n this.power++;\n this.toughness++;\n this.hasCounter = true;\n } else {\n this.power--;\n this.toughness--;\n this.hasCounter = false;\n this.place(GameEnums.Zone.GRAVEYARD);\n }\n }", "public void sell(Card card) {\n if (!myTurn()) {\n return;\n }\n if (handPile.contains(card)) {\n //history.add(new CardAction(card, \"Sell: \" + card.getName()));\n card.sellAction(this);\n }\n }", "public void deal() {\r\n\t\twhile(! deck.isEmpty()) {\r\n\t\t\tplayer1.addToUnplayedPile(deck.deal());\r\n\t\t\tplayer2.addToUnplayedPile(deck.deal());\r\n\t\t}\r\n\t}", "@Override\r\n public Card getPlayerCard(int player, int plDeckPosition) {\r\n // Get the top card of the specified player deck\r\n return this.players.get(player).getTopCardRemove(plDeckPosition);\r\n }", "private void deal() {\n int index = 0;\n while (!deck.isEmpty()) {\n Card card = deck.get(0);\n players.get(index).receiveCard(card);\n deck.remove(0);\n if (index < players.size() - 1) {\n index++;\n } else {\n index = 0;\n }\n }\n }", "public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }", "public Card playerPlayCard(Integer choice){\n if(!(playerHand.isEmpty())){\n return playerHand.get(choice);\n } else {\n return null;\n }\n }", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public void discardToDeck() {\n\t\tfor(int i=discardPile.size(); i>0; i--) {\n\t\t deck.add(discardPile.remove(0));\n\t\t}\n\t\tCollections.shuffle(deck);\n\t}", "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public void drawCard(int player) {\r\n\t\tCard topCard = drawPile.cards.get(0);\r\n\t\tplayers.get(player).addCard(topCard);\r\n\t\tdrawPile.removeCard(topCard);\r\n\t}", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "public Card deal() {\r\n if (this.cardsLeft == 0) {\r\n return null;\r\n }\r\n \r\n// In the event that there are no cards left, a null value is returned\r\n \r\n Card topOfDeck = cardDeck[this.cardsLeft-1]; \r\n this.cardsLeft--;\r\n return topOfDeck;\r\n \r\n// The card off of the top of the deck is returned and the amount of cards remaining is deincremented\r\n \r\n }", "public void otherDiscard(int pos, GameCard card){\n this.infoTokens += 1;\n int count = this.discardPile.getOrDefault(card.toString(), 0);\n this.discardPile.put(card.toString(), count + 1);\n playerCardsList.get(turnCounter % playerCardsList.size()).set(pos, card);\n notifyObservors();\n }", "public void deal()\n\t{\n\t Random generator = new Random();\n\t int thisCard = generator.nextInt(52);\n\n\t face = faces[thisCard % 13];\n\t suit = suits[thisCard / 13];\n\n\t faceValue = thisCard %13;\n\t}" ]
[ "0.81940264", "0.8030844", "0.7787562", "0.7703821", "0.68735015", "0.6862532", "0.6855371", "0.6834848", "0.6811276", "0.6810668", "0.6777626", "0.67702085", "0.6763355", "0.67101115", "0.6701717", "0.668427", "0.666342", "0.66474307", "0.66350484", "0.663469", "0.6627615", "0.6623038", "0.6590648", "0.65889937", "0.6566914", "0.6552338", "0.6544436", "0.6543129", "0.65181917", "0.6509218", "0.6469527", "0.64622784", "0.6462039", "0.64518905", "0.645012", "0.64483905", "0.64418966", "0.64416975", "0.6434452", "0.6424171", "0.64131194", "0.64115894", "0.6397798", "0.63967466", "0.63862526", "0.6385328", "0.636299", "0.6354736", "0.6339123", "0.6315278", "0.62916976", "0.6264138", "0.6262951", "0.62622565", "0.625361", "0.6248957", "0.6239079", "0.6230705", "0.61992955", "0.61953604", "0.61941105", "0.619393", "0.6192", "0.6171052", "0.61550546", "0.61459607", "0.61191744", "0.61139625", "0.61064875", "0.6105633", "0.60837156", "0.6079693", "0.6065439", "0.6051371", "0.60493135", "0.6048605", "0.6043323", "0.60418034", "0.6040496", "0.60370094", "0.60355556", "0.6035", "0.6033259", "0.602795", "0.60128117", "0.6011451", "0.6011172", "0.60078347", "0.5998794", "0.5993734", "0.5990887", "0.5985818", "0.597586", "0.5969125", "0.59685045", "0.5955512", "0.59550154", "0.5942824", "0.59358084", "0.5925906" ]
0.6246212
56
an array holding the cards not used in the game. e.g. pinochle does not use cards 28 of any suit
public CardGameFramework(int numPacks, int numJokersPerPack, int numUnusedCardsPerPack, Card[] unusedCardsPerPack, int numPlayers, int numCardsPerHand) { int k; // filter bad values if (numPacks < 1 || numPacks > 6) numPacks = 1; if (numJokersPerPack < 0 || numJokersPerPack > 4) numJokersPerPack = 0; if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card numUnusedCardsPerPack = 0; if (numPlayers < 1 || numPlayers > MAX_PLAYERS) numPlayers = 4; // one of many ways to assure at least one full deal to all players if (numCardsPerHand < 1 || numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack) / numPlayers) numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers; // allocate this.unusedCardsPerPack = new Card[numUnusedCardsPerPack]; this.hand = new Hand[numPlayers]; for (k = 0; k < numPlayers; k++) this.hand[k] = new Hand(); deck = new Deck(numPacks); // assign to members this.numPacks = numPacks; this.numJokersPerPack = numJokersPerPack; this.numUnusedCardsPerPack = numUnusedCardsPerPack; this.numPlayers = numPlayers; this.numCardsPerHand = numCardsPerHand; for (k = 0; k < numUnusedCardsPerPack; k++) this.unusedCardsPerPack[k] = unusedCardsPerPack[k]; // prepare deck and shuffle newGame(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void discard(){\n for(int i = 1 ; i <= 110 ; i++) cardDeck.remove(i);\n }", "public static Card[] getStandardDeck() {\n Card[] deck = new Card[52];\n int s = 0;\n for (SUIT suit : SUIT.values()) {\n for (int i = 12; i > -1; i--) {\n deck[s + i] = new Card(suit, i);\n }\n s += 13;\n }\n return deck;\n }", "public void discardAll()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t}", "public CardStack getAvailableCards()\n {\n return null;\n }", "public void resetDeck() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (Suit f : Suit.values())\r\n\t\t\tfor (int i = 2; i < 15; i++)\r\n\t\t\t\tcards.add(new Card(i, f));\r\n\r\n\t}", "public Deck() { // This constructor creates a standard deck\n\n\tcards = new Card[52];\n\tint k=0;\n\t\n\tfor (int i=0; i<4; i++)\n\t for (int j=2; j<15; j++){\n\t\tcards[k]= new Card (j, i);\n\t\tk++;\n\t\t }\n\t \n\n\tshuffle();\n\t\n\tcardsLeft = 52;\n\t/*\tfor (int i=0; i<52; i++)\n\t\tSystem.out.println (cards[i]);*/\n }", "private ArrayList<Card> getDeckCards(){\n\t\t\t\tArrayList<Card> getdeck = new ArrayList<>();\r\n\t\t\t\t// deck = new ArrayList(52);\r\n\r\n\t\t\t\t// create cards in the deck (0-51)\r\n\t\t\t\tfor (int i = 0; i <= 10; i++) {\r\n\t\t\t\t\tgetdeck.add(new Card(i));\r\n\t\t\t\t}\r\n\t\t\t\t//Collections.shuffle(getdeck);\r\n\t\t\t\t// shuffle the cards\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tint newindex = (int) (Math.random() * 51);\r\n\t\t\t\t\tCard temp = getdeck.get(i);\r\n\t\t\t\t\tgetdeck.set(i, getdeck.get(newindex));\r\n\t\t\t\t\tgetdeck.set(newindex, temp);\r\n\t\t\t\t}\r\n\t\t\t\t//TODO delete println\r\n\t\t\t\t// print shuffled deck\r\n\t\t\t\tfor (int i = 0; i <= getdeck.size()-1; i++) {\r\n\t\t\t\t\tSystem.out.println(getdeck.get(i).getCardNbr());\r\n\t\t\t\t}\r\n\t\t\t\treturn getdeck;\r\n\t}", "public Deck() {\n cards = new LinkedList<Integer>();\n removedCards = new LinkedList<Integer>();\n \n int i, j;\n for (i = MIN_VALUE; i <= MAX_VALUE; i++) {\n for (j = 0; j <= NUM_SUITS; j++) {\n cards.add(i);\n }\n }\n }", "private void discardRestrictedCards()\n\t{\n\t\tif (playerList.size() == 2)\n\t\t{\n\t\t\tfor(Card card : restrictedCard2PlayerList)\n\t\t\t{\n\t\t\t\tswitch (card.getType())\n\t\t\t\t{\n\t\t\t\t\tcase GreenPlayerCard:\n\t\t\t\t\tcase BrownPlayerCard:\n\t\t\t\t\t\tCard playerCardMatch = board.getPlayerCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (playerCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(playerCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase CityAreaCard:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PersonalityCard:\n\t\t\t\t\t\tCard personalityCardMatch = board.getPersonalityCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (personalityCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(personalityCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase RandomEventCard:\n\t\t\t\t\t\tCard randomEventCardMatch = board.getRandomEventCardDeck().pickCardByID(card.getId());\n\t\t\t\t\t\tif (randomEventCardMatch != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tboard.getDiscardDeck().addCard(randomEventCardMatch);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@JsonIgnore\n\tpublic List<Card> getAvailableCards() {\n\t\tList<Card> availableCards = new ArrayList<>();\n\t\tfor (int i = dealtCards.get(); i < Deck.DECK_SIZE; i++) {\n\t\t\tCard card = cards.get(i);\n\t\t\tavailableCards.add(card);\n\t\t}\n\t\treturn availableCards;\n\t}", "public int[] getCards() {\n \t\treturn cards;\n \t}", "public TrainCard usedCard(){\n TrainCard removedCard = cardDeck.remove(0);\n return removedCard;\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "public Deck () {\r\n int arrayPlace = 51;\r\n cardDeck = new Card [52];\r\n String [] suits = {\"Clubs\", \"Diamonds\", \"Hearts\", \"Spades\"};\r\n for (int index = 0; index < suits.length; index++) {\r\n for (int i = 1; i < 14; i++) {\r\n cardDeck [arrayPlace] = new Card (i, suits[index]);\r\n arrayPlace--;\r\n }\r\n }\r\n }", "public Deck(){\n\t\tcount = 51;\n\t\tcards = new Card[52];\n\t\trand = new Random();\n\t\tfor(Suit suit : Suit.values()){\n\t\t\tfor (int i = 2; i < 15; i++) {\n\t\t\t\tcards[suit.ordinal()*13 + i - 2] = new Card(suit,i);\n\t\t\t}\n\t\t}\n\t}", "public Deck() {\n cards = new Card[52];\n size = 0;\n for (int suit = Card.SPADES; suit <= Card.CLUBS; suit++) {\n for (int rank = Card.ACE; rank <= Card.KING; rank++) {\n cards[size] = new Card(rank, suit);\n size += 1;\n }\n }\n }", "@Override\r\n public List<Card> getDeck() {\n myDeck2.clear();\r\n\r\n //loops through twice in order to create the deck of 104\r\n for (int k = 0; k < 2; k++) {\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 1; j <= 13; j++) {\r\n Card nextCard = new Card(suit[i], j);\r\n myDeck2.add(nextCard);\r\n }\r\n }\r\n }\r\n\r\n return myDeck2;\r\n }", "public Card[] GetCardStack() { return null; }", "public int getNumDevCards() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < cards.length; i++)\n \t\t\tcount += cards[i];\n \n \t\treturn count + newCards.size();\n \t}", "public void generateDeck() {\n\t\tList<String> valueList = Arrays.asList(\"Ace\", \"2\", \"3\",\"4\", \"5\", \"6\",\"7\", \"8\", \"9\",\"10\", \"Jack\", \"Queen\",\"King\");\n\t\tList<String> suitList = Arrays.asList(\"Diamonds\", \"Spades\", \"Clubs\", \"Hearts\");\n\t\tvalues.addAll(valueList);\n\t\tsuits.addAll(suitList);\n\t\t\n\t\t//adding card objects to deckOfCards arraylist\n\t\tint i = 1;\n\t\twhile(i<=52){\n Card card = new Card(values.get(random.nextInt(13)), suits.get(random.nextInt(4)));\n if (!deckOfCards.contains(card)) {\n deckOfCards.add(card);\n i++;\n }else{\n\n }\n }\n\t}", "public List<Integer> askPlayerCardsToUse();", "public void removeFromHand(int card) {\n\t\tString [] temp = new String[hand.length];//make new temp array for hand\n\t\tint internalCounter = 0;//keeps track of next available index\n\t\tfor(int i = 0; i < hand.length; ++i){//loop through whole hand\n\t\t if( i != card ){//if the current card is not equal to the desired card\n\t\t temp[internalCounter] = hand[i];//add the current card to the array in the lowest available slot\n\t\t internalCounter++;//increase available index\n\t\t }\n\t\t}\n\t\ttemp[temp.length-1] = null;//make last slot null\n\t\tString [] temp2 = new String[temp.length-1];//new temp array to shorten the hand to exclude null entries\n\t\tfor (int j = 0; j < temp2.length; j++) {//loop through the new temp array\n\t\t\tif (temp[j] != null) {//if the slot in the first temp array isn't null\n\t\t\t\ttemp2[j] = temp[j];//add the card to the shortened temp array\n\t\t\t}\n\t\t}\n\t\thand = temp2;//make the hand equal to the shortened hand\n\t}", "public DeckOfCards() {\n\n String faces[] = {\"Ace\", \"Deuce\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\", \"Jack\", \"Queen\", \"King\"};\n String suits[] = {\"Hearts\", \"Diamonds\", \"Clubs\", \"Spades\"};\n\n deck = new Card[NUMBER_OF_CARDS]; //create an array of card objects (52)\n currentCard = 0;\n randomNumbers = new Random();\n\n //Populate deck with card objects\n for(int count = 0; count < deck.length; count++){\n deck[count] = new Card(faces[count % 13], suits[count / 13]);\n //first 13 cards will be ace through king of hearts then ace though king of diamonds etc...\n\n }\n\n }", "public void checkDeck(){\n\t\tfor(int i: deck)\n\t\t\tSystem.out.println(Integer.toString(i));\n\t}", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "@Override\n public boolean canUseCard(){\n return false;\n }", "public DiscardDeck() {\n\t\tthis.content = new ArrayList<Card>();\n\t}", "public int[] hasNSequentially(int lengthOfHand) {//check for Ace case //need to NOT ALLOW DUPLICATES\n ArrayList<Card> handList = new ArrayList<Card>();\n int solution[] = {0, 0};//number in a row, lowest number of that\n boolean foundSomeNInAFow = false;\n int hasAce = 0;\n\n int usedNumbers[] = new int[13];//2,3,4,5,6,7,8,9,10,j,q,k,a --> THIS HANDLES THE ACE CASE\n for (int i = 0; i < lengthOfHand; i++) {//was\n usedNumbers[allCards[i].value - 2]++;//USED\n if (usedNumbers[allCards[i].value - 2] == 1) {//handles NOT having doubles of numbers like 2 3 4 4 5 \n handList.add(this.allCards[i]);\n if (this.allCards[i].value == 14) {\n Card c = new Card(1, this.allCards[i].suit);\n handList.add(0, c);//add to front..shifts elements to right\n }\n }\n }\n\n for (int i = 0; i < handList.size() - 4; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 4; j++) {//was 4\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 4) {//was 4\n foundSomeNInAFow = true;\n solution[0] = 5;\n solution[1] = val;\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 3; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 3; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 3) {\n // System.out.println(\"yes 4 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 4;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 2; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 2; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 2) {\n // System.out.println(\"yes 3 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 3;\n solution[1] = val;\n }\n }\n }\n }\n\n if (foundSomeNInAFow == false) {\n for (int i = 0; i < handList.size() - 1; i++) {//check for 5 in a row, //was - 4\n int val = handList.get(i).value;\n int counter = 0;\n for (int j = 0; j < 1; j++) {\n if (handList.get(j + i + 1).value == val + 1 + j) {\n counter++;\n } else {\n break;\n }\n if (counter == 1) {\n //System.out.println(\"yes 2 sequentially\");\n foundSomeNInAFow = true;\n solution[0] = 2;\n solution[1] = val;\n\n }\n }\n }\n }\n\n return solution;//return at end that way if there is 2,3,5,7,8 it returns 7 8 not 2 3\n\n }", "private void generateDeckOfCards() {\n this.cards = new ArrayList<Card>(Suit.values().length * Rank.values().length);\n for (Suit suit : Suit.values()) {\n for (Rank rank : Rank.values()) {\n cards.add(new Card(suit, rank));\n }\n }\n }", "public List<Integer> dealCards(int numCards) {\n int[] hand = new int[numCards];\n Random rand = new Random();\n int index, chosenCard;\n \n for (int i = 0; i < numCards; i++) {\n index = rand.nextInt(cards.size());\n chosenCard = cards.remove(index);\n \n hand[i] = chosenCard;\n removedCards.add(chosenCard);\n }\n \n Arrays.sort(hand);\n return toList(hand);\n }", "public void cards() {\n\t\t\n\n\t\tboolean[] randomCards = new boolean[52];\n\n\t\t// choose 4 random distinct cards from the deck\n\t\tint count = 0;\n\t\tint card1 = 0;\n\t\tint card2 = 0;\n\t\tint card3 = 0;\n\t\tint card4 = 0;\n\n\t\twhile (count < 4) {// Display only four cards\n\n\t\t\tcard1 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard2 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard3 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\t\t\tcard4 = ((int) (Math.random() * 12) + 1) + 1;// Ignore zero\n\n\t\t\tif ((randomCards[card1] = !randomCards[card2]) && (randomCards[card1] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card1] = !randomCards[card4]) && (randomCards[card2] = !randomCards[card3])\n\t\t\t\t\t&& (randomCards[card2] = !randomCards[card4]) && (randomCards[card3] = !randomCards[card4])) {\n\n\t\t\t\tString[] cards = { \"clubs\", \"diamonds\", \"hearts\", \"spades\" };\n\n\t\t\t\tString name1 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name2 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name3 = cards[(int) (Math.random() * cards.length)];\n\t\t\t\tString name4 = cards[(int) (Math.random() * cards.length)];\n\n\t\t\t\tImage image1 = new Image(\"png/\" + (card1) + \"_of_\" + name1 + \".png\");\n\t\t\t\tImage image2 = new Image(\"png/\" + (card2) + \"_of_\" + name2 + \".png\");\n\t\t\t\tImage image3 = new Image(\"png/\" + (card3) + \"_of_\" + name3 + \".png\");\n\t\t\t\tImage image4 = new Image(\"png/\" + (card4) + \"_of_\" + name4 + \".png\");\n\n\t\t\t\timgCard1.setImage(image1);\n\t\t\t\timgCard2.setImage(image2);\n\t\t\t\timgCard3.setImage(image3);\n\t\t\t\timgCard4.setImage(image4);\n\n\t\t\t\tcount++;\n\n\t\t\t}\n\n\t\t}\n\n\t\tString cardOneValue = Integer.toString(card1);\n\t\tString cardTwoValue = Integer.toString(card2);\n\t\tString cardThreeValue = Integer.toString(card3);\n\t\tString cardFourValue = Integer.toString(card4);\n\t\tSystem.out.println(cardOneValue + \" - \" + cardTwoValue + \" - \" + cardThreeValue + \" - \" + cardFourValue);\n\t\tsetText.setText(cardOneValue +\" \"+ cardTwoValue +\" \"+ cardThreeValue +\" \"+ cardFourValue);\n\t\t\n\t\tint solution = 0; \n\t\tif(solution!=24) {\n\t\tfor(int limit = 0; limit < 25; limit++) {\n\t\t\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(solution);\n\t\t\n\t}", "public void reset(){\n\n deck = new PlayingCard[52];\n String[] cardTypes = {\"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"J\", \"Q\", \"K\"};\n\n // initialise Aces separately for a cleaner loop later\n deck[0] = new PlayingCard(\"A\", PlayingCard.HEARTS, 1, 14);\n deck[1] = new PlayingCard(\"A\", PlayingCard.DIAMONDS, 1, 14);\n deck[2] = new PlayingCard(\"A\", PlayingCard.CLUBS, 1, 14);\n deck[3] = new PlayingCard(\"A\", PlayingCard.SPADES, 1, 14);\n\n int j = 0;\n\n for(int i = 0; i < Constants.SUIT_SIZE-1; ++i) {\n\n j = (i+1) * 4; // used to be able to declare 4 cards at once without overwriting\n deck[j] = new PlayingCard(cardTypes[i], PlayingCard.HEARTS, i + 2, i + 2);\n deck[j+1] = (new PlayingCard(cardTypes[i], PlayingCard.CLUBS, i + 2, i + 2));\n deck[j+2] = new PlayingCard(cardTypes[i], PlayingCard.DIAMONDS, i + 2, i + 2);\n deck[j+3] = new PlayingCard(cardTypes[i], PlayingCard.SPADES, i + 2, i + 2);\n }\n\n this.shuffle();\n }", "public Deck( Card c1, Card c2, Card c3, Card c4, Card c5, Card c6, Card c7, Card c8, Card c9,\n\t\t\t\t Card c10, Card c11, Card c12, Card c13, Card c14, Card c15, Card c16, Card c17, Card c18,\n\t\t\t\t Card c19, Card c20, Card c21, Card c22, Card c23, Card c24, Card c25, Card c26, Card c27, \n\t\t\t\t Card c28, Card c29, Card c30, Card c31, Card c32, Card c33, Card c34, Card c35, Card c36, \n\t\t\t\t Card c37, Card c38, Card c39, Card c40, Card c41, Card c42, Card c43, Card c44, Card c45, \n\t\t\t\t Card c46, Card c47, Card c48, Card c49, Card c50, Card c51, Card c52 ) \n\t{\n\t\tCard[] tempDeck = { c1, c2, c3, c4, c5, c6, c7, c8, c9,\n\t\t\t\t\t\t\tc10, c11, c12, c13, c14, c15, c16, c17, c18,\n\t\t\t\t\t\t\tc19, c20, c21, c22, c23, c24, c25, c26, c27,\n\t\t\t\t\t\t\tc28, c29, c30, c31, c32, c33, c34, c35, c36, c37,\n\t\t\t\t\t\t\tc38, c39, c40, c41, c42, c43, c44, c45, c46, \n\t\t\t\t\t\t\tc47, c48, c49, c50, c51, c52 };\n\t\t\n\t\tdeck = new Card[tempDeck.length];\n\t\t\n\t\tfor( int i = 0; i < tempDeck.length; i++ ) {\n\t\t\tdeck[i] = tempDeck[i];\n\t\t}\n\t}", "private void initializeDeck() {\r\n deck = new ArrayList<>(52);\r\n\r\n for (String suit : SUITS) {\r\n for (String rank : RANKS) {\r\n deck.add(new Card(rank, suit)); // adds 52 cards to the deck (13 ranks, 4 suits)\r\n }\r\n }\r\n }", "public static int[] createShuffledDeck(){\n //create a deck\n int[] deck = new int[52];\n //make each item their respective index + 1 to avoid repetition\n for(int i = 0; i < deck.length; i++){\n deck[i] = i+1;\n }\n //shuffle deck\n shuffle(deck);\n return deck;\n }", "private Integer[] getNumberOfCards() {\n Integer[] numberOfCards = new Integer[players.length];\n\n for (int i = 0; i < players.length; i++) {\n numberOfCards[i] = players[i].getHand().length;\n }\n\n return numberOfCards;\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "@Override\n\tpublic PlayingCard[] getCards() {\n\t\tif(getCount() != 0) {\n\t\t\tPlayingCard[] kopie = new SkatCard[getCount()];\n\t\t\tfor(int i = 0; i < getCount(); i++) {\n\t\t\t\tkopie[i] = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t}\n\t\t\treturn kopie;\n\t\t}else {\n\t\t\tSystem.out.println(\"Stapel leer --> Kopie vom Stapel leer\");\n\t\t\treturn null;\n\t\t}\n\t}", "private List<Card> createDeck(){\n List<Card> newDeck= new ArrayList<Card>();\n for (int i =0;i<CardSet.ALL_CARDS.size(); ++i ) {\n newDeck.add(CardSet.ALL_CARDS.get(i));\n }\n return newDeck;\n }", "private void initCultistCardDeck(){\n unusedCultist = new ArrayList<Cultist>();\n \n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 2));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n unusedCultist.add(new Cultist(\"No puedes dejar de ser sectario\", 1));\n \n Collections.shuffle(unusedCultist);\n }", "private Deck()\n\t{\n\t\tfor (Suit s : Suit.values())\n\t\t\tfor(Rank r : Rank.values())\n\t\t\t\tcards.add(new Card(s,r));\n\t}", "public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }", "public Card [] getCards() {\r\n Card [] cardDeckCopy = new Card [this.cardsLeft];\r\n \r\n // A copy of the cardDeck is made of the size of the remaining cards so that the private attribute is not directly\r\n // affected\r\n \r\n for (int index = 0; index < this.cardsLeft; index++) {\r\n cardDeckCopy [index] = cardDeck [index];\r\n }\r\n return cardDeckCopy;\r\n }", "public String getCards()\r\n\t{\r\n\t\t// creates a larger string which will have the cards appended to it\r\n\t\tString cardList = \"\";\r\n\t\t\r\n\t\t// adds all cards currently in hand\r\n\t\tfor (int i = 0; i < handCount; i++)\r\n\t\t{\r\n\t\t\tcardList = cardList + pCards[i] + \" \";\r\n\t\t}\r\n\t\t\r\n\t\treturn cardList;\r\n\t}", "public ArrayList<CtColor> getMissingChips(ArrayList<CtColor> array) {\n\t\tArrayList<CtColor> missing = new ArrayList<CtColor>();\n\t\tChipSet myClone = (ChipSet) this.clone();\n\t\tfor (CtColor color : array)\n\t\t\t// If there is at least one chip of this color at this place then is\n\t\t\t// not missing and decrement\n\t\t\t// its counter so that we know that we have already used it.\n\t\t\tif (myClone.getNumChips(color) >= 1)\n\t\t\t\tmyClone.setNumChips(color, myClone.getNumChips(color) - 1);\n\t\t\telse\n\t\t\t\tmissing.add(color);\n\n\t\treturn missing;\n\t}", "private void fillDeck() {\n int index = 0;\n for (int suit = 1; suit <= 4; suit++) {\n for (int rank = 1; rank <= 13; rank++) {\n deck[index] = new Card(rank, suit);\n index++;\n\n }\n }\n }", "private static ArrayList<String> createOrderedDeck() {\n\t\t// Create a new deck of \"unshuffled\" cards from the unique suits and values\n\t\tArrayList<String> newDeck = new ArrayList<String>();\n\t\tfor (int s = 0; s < SUITS.length; s++)\n\t\t\tfor (int v = 0; v < VALUES.length; v++)\n\t\t\t\tnewDeck.add(VALUES[v] + \" of \" + SUITS[s]);\n\t\t\n\t\t// Return new deck of cards\n\t\treturn newDeck;\n\t}", "public CardGameFramework( int numPacks, int numJokersPerPack,\n int numUnusedCardsPerPack, Card[] unusedCardsPerPack,\n int numPlayers, int numCardsPerHand)\n {\n int k;\n\n // filter bad values\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n if (numJokersPerPack < 0 || numJokersPerPack > 4)\n numJokersPerPack = 0;\n if (numUnusedCardsPerPack < 0 || numUnusedCardsPerPack > 50) // > 1 card\n numUnusedCardsPerPack = 0;\n if (numPlayers < 1 || numPlayers > MAX_PLAYERS)\n numPlayers = 4;\n // one of many ways to assure at least one full deal to all players\n if (numCardsPerHand < 1 ||\n numCardsPerHand > numPacks * (52 - numUnusedCardsPerPack)\n / numPlayers )\n numCardsPerHand = numPacks * (52 - numUnusedCardsPerPack) / numPlayers;\n\n // allocate\n this.unusedCardsPerPack = new Card[numUnusedCardsPerPack];\n this.hand = new Hand[numPlayers];\n for (k = 0; k < numPlayers; k++)\n this.hand[k] = new Hand();\n deck = new Deck(numPacks);\n\n // assign to members\n this.numPacks = numPacks;\n this.numJokersPerPack = numJokersPerPack;\n this.numUnusedCardsPerPack = numUnusedCardsPerPack;\n this.numPlayers = numPlayers;\n this.numCardsPerHand = numCardsPerHand;\n for (k = 0; k < numUnusedCardsPerPack; k++)\n this.unusedCardsPerPack[k] = unusedCardsPerPack[k];\n\n // prepare deck and shuffle\n newGame();\n }", "public static List<ScrumPokerCard> getDeck() {\n return Arrays.stream(values()).collect(Collectors.toList());\n }", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "public DevCard[][] getUpperDevCardsOnTable(){\n DevCard[][] cardsOnTable = new DevCard[4][3];\n for(int i=0;i<4;i++){\n for(int j=0; j<3;j++){\n if (!devDecksOnTable[i][j].littleDevDeck.isEmpty())\n cardsOnTable[i][j]= devDecksOnTable[i][j].littleDevDeck.get(0);\n }\n }\n return cardsOnTable;\n }", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public void displayUnusedCards(MapBoard board){\n\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"|\\t\\t\\t\\t\\tSelect card to play |\");\n\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------\");\n\t\tSystem.out.println(\"\\n\");\n\t\tint local=0;\n\t\tScanner input=new Scanner(System.in);\n\t\tArrayList<Integer> temp=new ArrayList<>();\n\t\tfor (int i = 0; i < playerCards.size(); i++) {\n\t\t\tif (!(playerCards.get(i).used)) {\n\t\t\t\tSystem.out.println(\"\\tPress \\\"\"+(i)+\"\\\"\");\n\t\t\t\tplayerCards.get(i).showPlayerCardDetails();\n\t\t\t\tSystem.out.println();\n\t\t\t\tlocal++;\n\t\t\t\ttemp.add(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdo{\n\t\t\tint j=input.nextInt();\n\t\t\t\n\t\t\tif(!(temp.contains(j))){\n\t\t\t\tSystem.out.println(\"<<<<<---Wrong choice--->>>>>\\n\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//perform action specific to player card\n\t\t\tplayerCards.get(j).used=true;\n\t\t\tplayerCards.get(j).startPlayerCardActions();\n\t\t\tbreak;\n\t\t}while(true);\n\t\t\n\t\t\n\t\t//discard used cards at the end of each turn\n\t\tdiscardUsedCards();\n\t\tif(Start.temparea.size()>0)\n\t\t{\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tSystem.out.println(\"| <<<< Do you want to perform cityarea card ? >>>> |\");\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\tSystem.out.println(\"| 1. YES |\");\n\t\t\tSystem.out.println(\"| 2. No |\");\n\t\t\tSystem.out.println(\"--------------------------------------------------------------\");\n\t\t\n\t\t\tdo\n\t\t\t{\n\t\t\t\tint value=input.nextInt();\n\t\t\t\tif(value==1)\n\t\t\t\t{\n\t\t\t\t\t//Start.PerformPlayerCard(board, this);\n\t\t\t\t\tStart.CheckCityAreaCard(board, this);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(value==2)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"<<<<<---Wrong Choice.--->>>>\\n\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\twhile(true);\n\t\t}\n\t\t\n\t}", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "public int getVictoryCards() {\n \t\treturn victory;\n \t}", "public int cardsLeft() {\n return deck.size();\n }", "public final PlayingCard[] choosePassingCards(HeartsGraphics g){\n\t\tLinkedList<PlayingCard> tempList = new LinkedList<PlayingCard>();\n\t\tPlayingCard[] cards = new PlayingCard[3];\n\t\t\n\t\twhile(tempList.size() < 3){\n\t\t\tPlayingCard temp = chooseCard(g);\n\t\t\t\n\t\t\t// check to make sure the card can be removed (this enables the user\n\t\t\t// to deselect cards if they want to)\n\t\t\tif(!hand.remove(temp)){\n\t\t\t\thand.add(temp);\n\t\t\t\ttempList.remove(temp);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\ttempList.add(temp);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\tfor(int i=0; i<3; i++){\n\t\t\tcards[i] = tempList.get(i);\n\t\t}\n\t\t\n\t\treturn cards;\n\t}", "public void testOnlyPrint()\r\n {\r\n for ( int i =0; i < valid; i++)\r\n {\r\n System.out.println( cards[i] );\r\n }\r\n }", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "com.google.protobuf.ByteString getCards();", "public com.google.protobuf.ByteString getCards() {\n return cards_;\n }", "private void addCards() {\r\n\t\tfor (Color color : UNO_COLORS) {\r\n\r\n\t\t\t// Create 76 NumberCards --> doubles except 0s.\r\n\t\t\tfor (int num : UNO_NUMBERS) {\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tdo {\r\n\t\t\t\t\tUNOcards.add(new NumberCard(color, Integer.toString(num)));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t} while (num != 0 && i < 2);\r\n\t\t\t}\r\n\r\n\t\t\t// Create 24 ActionCards --> everything twice\r\n\t\t\tfor (String type : ActionTypes) {\r\n\t\t\t\tfor (int i = 0; i < 2; i++)\r\n\t\t\t\t\tUNOcards.add(new ActionCard(color, type));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfor (String type : WildTypes) {\r\n\t\t\tfor (int i = 0; i < 4; i++) {\r\n\t\t\t\tUNOcards.add(new WildCard(type));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void initializeDeck() {\r\n\t\t// Loop over the 4 card suits\r\n\t\tfor (Suit suit : Suit.values()) {\r\n\t\t\t// Loop over 13 card types\r\n\t\t\tfor (CardType value : CardType.values()) {\r\n\t\t\t\tcards.addCard(new Card(suit, value));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Deck() {\n this.cards = new Card[STANDARD_DECK_SIZE];\n this.topCardIndex = 0;\n int cardIndex = 0;\n int DeckLength = this.cards.length;\n for (Card.Suit suit : Card.Suit.values() ) {\n for (int i = Card.ACE ; i <= Card.KING ; i++ ) {\n cards[cardIndex] = new Card (i, suit);\n cardIndex++;\n }\n }\n }", "public void addCardsToDiscardPile(List<Card> cards) {\r\n discardPile.addAll(cards); // TODO: this triggers a nullpointerexception ( ava.lang.NullPointerException: Attempt to invoke interface method 'int java.util.Collection.size()' on a null object reference\r\n // at java.util.LinkedList.addAll(LinkedList.java:386)\r\n // at ch.ethz.inf.vs.a4.minker.einz.model.GlobalState.addCardsToDiscardPile(GlobalState.java:158) )\r\n discardPile.subList(Math.max(0, discardPile.size() - maxDiscardPileSize), discardPile.size());\r\n }", "public void shuffle() {\n List<Card> shuffledCards = new ArrayList<>(52);\n while (cards.size() > 0) {\n int index = random.nextInt(cards.size());\n shuffledCards.add(cards.remove(index));\n }\n cards = shuffledCards;\n }", "public List<Card> getDiscardPile() {\r\n return discardPile;\r\n }", "public Deck() {\n\t\trand = new Random();\n\t\trand.setSeed(System.currentTimeMillis());\n\t\twhile(deck.size()<52){\n\t\t\tint suit = rand.nextInt(4);\n\t\t\tint rank = rand.nextInt(13);\n\t\t\tString card = this.rank[rank] +\" of \" + this.suit[suit];\n\t\t\tdeck.add(card);\n\t\t}\n\t}", "public int getNumCards()\r\n {\r\n return numCards;\r\n }", "public Card []getFinalBoard()\n\t{\n\t\tsynchronized (this) \n\t\t{\t\n\t\t\tCard []ret = null;\n\t\t\ttry {\n\t\t\t\tif (numberCards != constants.NUMBER_CARDS_BOARD)\n\t\t\t\t\tthrow new Exception(\"Le tableau est incomplet quand on lui demande la copie de sa version finale. Nombre de cartes : \" + numberCards + \".\");\n\t\t\t\tret = new Card[constants.NUMBER_CARDS_BOARD];\n\t\t\t\tfor (int i = 0 ; i < numberCards ; i++)\n\t\t\t\t{\n\t\t\t\t\tret[i] = (Card)(board[i].clone());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t}", "public Integer suitedCards(Card[] hand, Integer minNum){\n\t\tInteger[] suits = {0,0,0,0};\n\t\tInteger retVal = 1;\n\t\tfor (int i = 0; i < hand.length; i++) {\n\t\t\tsuits[hand[i].getSuit()-1]++;\n\t\t}\n\t\tInteger max = suits[0];\n\t\tfor (int i = 1; i < 4; i++){\n\t\t\tmax = Math.max(max, suits[i]);\n\t\t\tif (max == suits[i]) {\n\t\t\t\tretVal = i + 1;\n\t\t\t}\n\t\t}\n\t\tif (max >= minNum) {\n\t\t\treturn retVal;\n\t\t}\n\t\treturn 0;\n\t}", "private int demDoiThong(List<Card> bai) {\n List<Card> cards = new ArrayList<>() ;\n int max = 0;\n int count = 0;\n for (int i = 0; i < bai.size() - 1; i++) {\n if (bai.get(i).getId() >= 48) {\n break;\n }\n if (count == 0 && bai.get(i).getCardNumber() == bai.get(i + 1).getCardNumber()) {\n count = 1;\n if (cards.isEmpty()) {\n cards.add(bai.get(i));\n cards.add(bai.get(i + 1));\n }\n } else {\n if (count % 2 != 0) {\n if (bai.get(i).getCardNumber()== bai.get(i + 1).getCardNumber() - 1) {\n count++;\n } else if (bai.get(i).getCardNumber()!= bai.get(i + 1).getCardNumber()) {\n // valid = false;\n if (count > max) {\n max = count;\n }\n if(cards.size()<6){\n cards.clear();\n }\n count = 0;\n }\n } else {\n if (bai.get(i).getCardNumber()== bai.get(i + 1).getCardNumber()) {\n if(!cards.contains(bai.get(i))){\n cards.add(bai.get(i));\n }\n if(!cards.contains(bai.get(i+1))){\n cards.add(bai.get(i+1));\n }\n count++;\n } else {\n // valid = false;\n if (count > max) {\n max = count;\n }\n if(cards.size()<6){\n cards.clear();\n }\n count = 0;\n }\n }\n }\n }\n if (count > max) {\n max = count;\n }\n if (max >= 5) {\n this.specialCards.addAll(cards);\n }\n return (max + 1) / 2;\n }", "private List<Card> setupDeck(){\n List<Card> llist = new LinkedList<Card>();\n String[] faceCards = {\"J\",\"Q\",\"K\",\"A\"};\n String[] suits = {\"spades\",\"clubs\",\"diamonds\",\"hearts\"};\n\n for(int i=2; i<=10; i++){\n for(int j=1; j<=4; j++){\n llist.add(new Card(Integer.toString(i), suits[j-1], j, i));\n }\n }\n for(int k=1; k<=4; k++){\n for(int l=1; l<=4; l++){\n llist.add(new Card(faceCards[k-1],suits[l-1], l, k+10));\n }\n }\n return llist;\n }", "private void discardPrompt() {\r\n\t\tfor (int i = 0; i < mustDiscard.size(); i++) {\r\n\t\t\tString prompt = \"**[Discard]** a card \";\r\n\t\t\tif (mustDiscard.get(i).contentEquals(\"Sleight of Hand\")) {\r\n\t\t\t\tprompt += \"to draw 2 cards\";\r\n\t\t\t} else if (mustDiscard.get(i).contentEquals(\"Apothecary\")) {\r\n\t\t\t\tprompt += \"to choose one: **3** :crossed_swords: **~OR~** **2** :moneybag: **~OR~** **1** :heart:\";\r\n\t\t\t}\r\n\t\t\tgameChannel.sendMessage(prompt).queue();\r\n\t\t}\r\n\t}", "private void fillDeck(){\r\n this.cards = new ArrayList<Card>();\r\n int cardPerSuit = this.deckSize/4;\r\n \r\n for( Suit Su: suits ){\r\n for(int i = 0; i < cardPerSuit; i++){\r\n this.cards.add(i, new Card(i+2, Su.ordinal()));\r\n }\r\n }\r\n \r\n }", "@Test\r\n public void testPlayer_getCautiousStrategyCardCard_numeric_matchNumberNotColor() {\n player2 = new Player(\"Player Two\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n\r\n // let the cpc be a blue eight\r\n Card blueEight = new Card(Card.BLUE, Card.EIGHT, cvm);\r\n\r\n // get rid of all non-numeric cards and the blue four so the red eight is the most attractive option\r\n player2.getHand().discard(wild);\r\n player2.getHand().discard(wildDrawFour);\r\n player2.getHand().discard(yellowReverse);\r\n player2.getHand().discard(redDrawTwo);\r\n player2.getHand().discard(blueFour);\r\n\r\n Card redEight = new Card(Card.RED, Card.EIGHT, cvm);\r\n\r\n assertTrue(player2.getCautiousStrategyCard(blueEight, yellowThree.getColor()).equals(redEight));\r\n }", "private List<Card> chooseMulligan() {\n return this.b.getPlayer(this.b.getLocalteam()).getHand().stream()\n .filter(c -> c.finalStats.get(Stat.COST) > 3 && c.finalStats.get(Stat.SPELLBOOSTABLE) == 0)\n .collect(Collectors.toList());\n }", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "public static int[] guthansEquipment() {\n return new int[]{\n Items.GUTHANS_HELM_4724,\n Items.GUTHANS_HELM_100_4904,\n Items.GUTHANS_HELM_75_4905,\n Items.GUTHANS_HELM_50_4906,\n Items.GUTHANS_HELM_25_4907,\n Items.GUTHANS_PLATEBODY_4728,\n Items.GUTHANS_PLATEBODY_100_4916,\n Items.GUTHANS_PLATEBODY_75_4917,\n Items.GUTHANS_PLATEBODY_50_4918,\n Items.GUTHANS_PLATEBODY_25_4919,\n Items.GUTHANS_CHAINSKIRT_4730,\n Items.GUTHANS_CHAINSKIRT_100_4922,\n Items.GUTHANS_CHAINSKIRT_75_4923,\n Items.GUTHANS_CHAINSKIRT_50_4924,\n Items.GUTHANS_CHAINSKIRT_25_4925,\n Items.GUTHANS_WARSPEAR_4726,\n Items.GUTHANS_WARSPEAR_100_4910,\n Items.GUTHANS_WARSPEAR_75_4911,\n Items.GUTHANS_WARSPEAR_50_4912,\n Items.GUTHANS_WARSPEAR_25_4913,\n Items.BERSERKER_RING_I_11773\n };\n }", "public void shuffle(){\n\n // resetting the int counters\n nextCard = 0;\n nextDiscardedPlace = 0;\n discardPile = new PlayingCard[Constants.DECK_SIZE];\n\n PlayingCard temp = null;\n Random rand = new Random();\n\n for(int i = 0; i < MAX_SHUFFLE; i++) {\n int pos1 = rand.nextInt(Constants.DECK_SIZE);\n int pos2 = rand.nextInt(Constants.DECK_SIZE);\n\n temp = deck[pos1];\n deck[pos1] = deck[pos2];\n deck[pos2] = temp;\n }\n }", "public static void cardsPlayer(int player){\n System.out.println(\"Player has cards as below\");\n for(int i=0;i<player;i++){\n System.out.println(\"the player has cards\"+i);\n shuffleCards(arrayList,player);\n }\n }", "public ArrayList<RandomEvent> getKeptRandomEventCards()\n\t{\n\t\treturn keptRandomEventCards;\n\t}", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "void discardCards(Resources resources);", "public stdDeck(){\n super();\n for(int i=1; i<14; i++){\n stdCard card = new stdCard(Suit.CLUBS, i);\n deck.add(card);\n card = new stdCard(Suit.DIAMONDS, i);\n deck.add(card);\n card = new stdCard(Suit.HEARTS, i);\n deck.add(card);\n card = new stdCard(Suit.SPADES, i);\n deck.add(card);\n }\n }", "public int[] deckRevealedIncreasing(int[] deck) {\r\n Arrays.sort(deck);\r\n int length = deck.length;\r\n int availableSlots = length;\r\n int[] ans = new int[length];\r\n boolean[] slots = new boolean[length];\r\n boolean skip = false;\r\n int index = 0;\r\n for (int i : deck) {\r\n while (availableSlots > 0) {\r\n boolean hasValue = slots[index];\r\n if (!hasValue) {\r\n if (!skip) {\r\n ans[index] = i;\r\n skip = true;\r\n availableSlots--;\r\n slots[index] = true;\r\n break;\r\n } else {\r\n skip = false;\r\n }\r\n }\r\n index++;\r\n if (index == length) index = 0;\r\n }\r\n }\r\n \r\n return ans;\r\n }", "public void discard(Card card) {\n discardPile.add(card);\n }", "int getCardsRemaining(int player) {\n return players[player].getHand().size();\n }", "@Test\r\n public void testPlayer_getDumbStrategyCard_differentWinners() {\r\n player2 = new Player(\"\", true);\r\n player2.setHand(strategyHand.getAllCards());\r\n boolean differentLegalCardFound = false;\r\n Card firstDiscard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n for(int i = 0; i < 25; i++) {\r\n Card loopCard = player2.getDumbStrategyCard(yellowSix, yellowSix.getColor());\r\n if(!loopCard.equals(firstDiscard)) {\r\n differentLegalCardFound = true;\r\n }\r\n }\r\n assertTrue(differentLegalCardFound);\r\n }", "public static int[] spacings(CardBrand card) {\n if (card == CardBrand.americanExpress) {\n return new int[] {3, 9};\n } else {\n return new int[] {3, 7, 11};\n }\n }", "public void RandomizeTheDeck() {\r\n ArrayList<ArrayList<Card>> alalCopy = new ArrayList<>();\r\n int i, iRand;\r\n Random rand = new Random();\r\n \r\n // remove deck to the copy\r\n for( i=0; i<104; i++) {\r\n alalCopy.add( alalSets.get(i) );\r\n }\r\n alalSets.clear();\r\n \r\n // randomly copy them back as copy size gets smaller\r\n for( i=104; i>0; i-- ) {\r\n iRand = (int)rand.nextInt(i);\r\n alalSets.add( alalCopy.remove(iRand) );\r\n }\r\n }", "private void buildDeck() {\r\n //Initialise size of deck and number of cards \r\n this.numOfCards = FIFTYTWO;\r\n //create new Deck Array \r\n this.deck = new ICard[this.numOfCards];\r\n //Creates Deck deck \r\n createDeck(Suit.values(), Rank.values());\r\n //shuffles deck \r\n shuffleCards(deck);\r\n\r\n }", "void getArrangedDeck() {\n\t\t\t\t\n\t\tint strength = 1;\n\t\t\n\t\tfor(int index = 0; index < this.numberOfCards; index++) {\n\n\t\t\tif((index+1)%4==0) {\n\t\t\t\tthis.cardsInDeck[index].setColor('\\u2660');\n\t\t\t} else {\n\t\t\t\tif((index+2)%4==0) {\n\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2665');\n\t\t\t\t} else {\n\t\t\t\t\tif((index+3)%4==0) {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2666');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.cardsInDeck[index].setColor('\\u2663');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.cardsInDeck[index].setStrength(strength);\n\t\t\tif((index+1) % 4 == 0){\n\t\t\t\tstrength++;\n\t\t\t}\n\t\t\t\n\t\t\tif (index >= 0 && index <= 3) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"2\");\n\t\t\t}\n\t\t\tif (index >= 4 && index <= 7) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"3\");\n\t\t\t}\n\t\t\tif (index >= 8 && index <= 11) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"4\");\n\t\t\t}\n\t\t\tif (index >= 12 && index <= 15) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"5\");\n\t\t\t}\n\t\t\tif (index >= 16 && index <= 19) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"6\");\n\t\t\t}\n\t\t\tif (index >= 20 && index <= 23) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"7\");\n\t\t\t}\n\t\t\tif (index >= 24 && index <= 27) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"8\");\n\t\t\t}\n\t\t\tif (index >= 28 && index <= 31) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"9\");\n\t\t\t}\n\t\t\tif (index >= 32 && index <= 35) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"10\");\n\t\t\t}\n\t\t\tif (index >= 36 && index <= 39) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"J\");\n\t\t\t}\n\t\t\tif (index >= 40 && index <= 43) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"Q\");\n\t\t\t}\n\t\t\tif (index >= 44 && index <= 47) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"K\");\n\t\t\t}\n\t\t\tif (index >= 48 && index <= 51) {\n\t\t\t\tthis.cardsInDeck[index].setName(\"A\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public void initializeCards() {\n\t\tcardSet.clear();\n\t\tfor (Suit suit : Suit.values()) {\n\t\t\tfor (Rank rank : Rank.values()) {\n\t\t\t\tCard card = new Card(suit, rank);\n\t\t\t\tcardSet.add(card);\n\t\t\t}\n\t\t}\n\t}", "boolean CanDiscardCards(Resources resources);", "public Card[] initialize(Card[] deck, int decks) {\n counter = 0;\n\n //Initialize the deck\n for (int i = 0; i < decks; i++) {\n for (int suit = 0; suit < 4; suit++) {\n for (int rank = 0; rank < 13; rank++) {\n cards[counter] = new Card(suit, rank, resolvePNG(suit, rank));\n counter++;\n }\n }\n }\n\n return deck;\n }", "int getNumCards();", "void playerUsedCard(Card c, boolean discard) {\n\t\t// The creator data is in the 2 first bytes, the other player in the 2\n\t\t// last bytes.\n\t\tplayedCard[0] = (discard ? DISCARDED_CARD : PLAYED_CARD);\n\t\tplayedCard[1] = (byte) c.id;\n\t}" ]
[ "0.6663006", "0.6655472", "0.6631206", "0.6502953", "0.6272898", "0.617632", "0.61722237", "0.61501193", "0.6139146", "0.6126807", "0.61165893", "0.60732406", "0.6069699", "0.6067958", "0.60595393", "0.6055631", "0.6033108", "0.6031214", "0.60240513", "0.601284", "0.6005197", "0.5989161", "0.5977789", "0.59718484", "0.5939418", "0.5935648", "0.59310687", "0.59171253", "0.58899426", "0.5883484", "0.5870592", "0.585778", "0.58492714", "0.58425975", "0.58367205", "0.58361185", "0.58351356", "0.5831802", "0.5827193", "0.5824703", "0.5812351", "0.5809026", "0.57987535", "0.57940763", "0.5793362", "0.579289", "0.5782353", "0.57800806", "0.5776349", "0.57650197", "0.57637143", "0.57599527", "0.57370245", "0.57186294", "0.57118464", "0.5704448", "0.56991017", "0.5698433", "0.5698273", "0.5694477", "0.5693298", "0.5691271", "0.56908816", "0.5690317", "0.5685165", "0.56653845", "0.5664917", "0.5659928", "0.5655904", "0.56513304", "0.56472945", "0.56413037", "0.56397426", "0.56324804", "0.5628283", "0.56225646", "0.56197184", "0.5606159", "0.56010675", "0.5599596", "0.55985075", "0.5594756", "0.55918574", "0.5591754", "0.5591008", "0.55835444", "0.55811924", "0.5579033", "0.5575769", "0.5569697", "0.55589557", "0.5558909", "0.5556465", "0.55559474", "0.5551502", "0.55439365", "0.5542595", "0.5541718", "0.5539142", "0.5538032" ]
0.56107503
77
constructor overload/default for game like bridge
public CardGameFramework() { this(1, 0, 0, null, 4, 13); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bridge() {\n }", "public PlayableGame() {\r\n\r\n }", "public Game() {}", "private Game() {}", "public MiniGame() {\n\n\t}", "public Game() {\n\n\t}", "public BeanGame () {\n\t}", "public OrchardGame() {\n\t\t\n\t}", "public CardGameFramework()\n {\n this(1, 0, 0, null, 4, 13);\n }", "public Game(){\n\n }", "public Game()//Method was given\n {\n parser = new Parser();\n player = new Player();\n }", "public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }", "public playGame()\n {\n // initialise instance variables\n //no constructor\n }", "public BaseballCard(){\r\n\r\n\t}", "public Game() {\n }", "private GameManager() \n\t{\n\t\t\n\t}", "public GamePlayer() {}", "private GameBoard() {}", "public ParkingSquare(Game game) \r\n {\r\n super(game);\r\n }", "public Game() \n {\n Logger.setLogger(null);\n createInstances();\n parser = new Parser();\n player = new Player();\n userInputs = new ArrayList<String>();\n }", "public GdGame()\n\t{\n\t\tthis(100);\t\t\n\t}", "public Player(){\n default_init();\n }", "public ArbolSplay() {\n super();\n }", "public AI(){\n super();\n }", "defaultConstructor(){}", "public God() {}", "public Chick() {\n\t}", "public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}", "public GameState() {}", "public OntoBridge()\r\n\t{ \r\n\t}", "public Game() {\n\n GameBoard gameBoard = new GameBoard();\n Renderer renderer = new Renderer(gameBoard);\n }", "Constructor() {\r\n\t\t \r\n\t }", "public GameClient() {\r\n super(new Client(Config.WRITE_BUFFER_SIZE, Config.OBJECT_BUFFER_SIZE), null, null);\r\n }", "public NullGameController()\r\n {\r\n }", "public Game() \n {\n parser = new Parser();\n }", "public Game() {\n parser = new Parser();\n }", "public Snake(){ super(); }", "public Ball(Game game) { // constructor that initializes the class Game\r\n this.game = game; // initializes the class Game\r\n }", "public HexComputerPlayer1(String name) {\n // invoke superclass constructor\n super(name); // invoke superclass constructor\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public Game() \n {\n createRooms();\n parser = new Parser();\n }", "public BlackJackGame()\r\n\t{\r\n\t\tplayer1 = new Player();\r\n\t\tdealer = new Player();\r\n\t\tcardDeck = new Deck();\r\n\t\tendGame = false;\r\n\t}", "protected abstract void construct();", "private GameConfig() {}", "public RailRoad() {}", "public GameClient(ReadableByteChannel r) {\r\n super(null, null, r);\r\n }", "public Multi_Player()\r\n {\r\n \r\n }", "public AbstractBinaryInteraction() {\n\n\t}", "public PacketGrabber() {\n //Log.d(TAG, \"PacketGrabber created...\");\n //gameState = -1;\n }", "public JumbleBoard()\n {\n }", "public Card() { this(12, 3); }", "public AbstractPlayer() {\r\n }", "public Game()\n {\n createRooms();\n parser= new Parser();\n }", "public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }", "public GameWorld(){\r\n\t\t\r\n\t}", "public GameCursor() {\n }", "public Hand(){}", "Reproducible newInstance();", "public Boop() {\n\t\tsuper();\n\t}", "private GameController() {\n\n }", "void DefaultConstructor(){}", "public Game(Board host) { \n\t\tthis.host = host ; \n\t\tthis.state = new model.State() ;\n\t}", "public Player(){}", "public Player(){}", "public Hand() {\n }", "public SinglePlayerGameController() {\n player1 = new Player(\"Player 1\");\n computer = new Player(\"Computer\");\n game = new Game(new Dice(), player1, computer);\n player1.setColor(\"blue\");\n computer.setColor(\"red\");\n diceImage = new DiceImage();\n }", "public Game2(Starter starter){\r\n chromaticManager = starter.chromaticManager;\r\n this.starter=starter;\r\n }", "public Deck()\n {\n this(1);\n }", "public Hand() {\r\n\t\t\r\n\t}", "Classroom() {}", "public Level3(Game game)\n {\n super(game);\n \n // set game var\n g = game;\n \n // set world\n world = game.getWorld();\n //set player\n player = game.getPlayer();\n // set default enemy exists state\n enemyExist = true;\n // set frame\n frame = g.getFrame();\n\n }", "private GameInformation() {\n }", "public GameInput() {\n keyboard = new Keyboard();\n mouse = new Mouse();\n mouseWheel = new MouseWheel();\n }", "public Player() {\t\n\t}", "public Game() {\n whitePlayer = new AwfulAIPlayer(Colour.WHITE, board);\n blackPlayer = new HumanPlayer(Colour.BLACK, board);\n\n sharedBoard = new CompositeBitBoard(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n }", "public Player(Game game){\r\n this.game = game;\r\n }", "public Game() {\n generatePort();\n status = Status.ATTENTE;\n generateGameID();\n name = \"GameG4B\";\n players = new ArrayList<>();\n maxRealPlayer = 0;\n maxVirtualPlayer = 0;\n realPlayerNb = 0;\n virtualPlayerNb = 0;\n rounds = new ArrayList<>();\n currentRound = 0;\n }", "public Bike(){\n\t}", "public WallLoader() {\n //Nothing to do.\n }", "public Board(String boardName) {\n\n /*\n * Created according to the specs online.\n */\n if (boardName.equals(\"default\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(1.25,\n 1.25));\n Gadget circle = new CircleBumper(1, 10, new Gadget[] {});\n Gadget triangle = new TriangleBumper(12, 15, 180, new Gadget[] {});\n Gadget square1 = new SquareBumper(0, 17, new Gadget[] {});\n Gadget square2 = new SquareBumper(1, 17, new Gadget[] {});\n Gadget square3 = new SquareBumper(2, 17, new Gadget[] {});\n Gadget circle1 = new CircleBumper(7, 18, new Gadget[] {});\n Gadget circle2 = new CircleBumper(8, 18, new Gadget[] {});\n Gadget circle3 = new CircleBumper(9, 18, new Gadget[] {});\n this.balls = new Ball[] { ball1 };\n this.gadgets = new Gadget[] { circle, triangle, square1, square2,\n square3, circle1, circle2, circle3, top, bottom, left,\n right };\n\n } else if (boardName.equals(\"absorber\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 10.25, 15.25));\n Ball ball2 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 19.25, 3.25));\n Ball ball3 = new Ball(new Vect(0, 0), new Geometry.DoublePair(1.25,\n 5.25));\n Gadget absorber = new Absorber(0, 18, 20, 2, new Gadget[] {});\n Gadget triangle = new TriangleBumper(19, 0, 90, new Gadget[] {});\n Gadget circle1 = new CircleBumper(1, 10, new Gadget[] { absorber });\n Gadget circle2 = new CircleBumper(2, 10, new Gadget[] { absorber });\n Gadget circle3 = new CircleBumper(3, 10, new Gadget[] { absorber });\n Gadget circle4 = new CircleBumper(4, 10, new Gadget[] { absorber });\n Gadget circle5 = new CircleBumper(5, 10, new Gadget[] { absorber });\n this.balls = new Ball[] { ball1, ball2, ball3 };\n this.gadgets = new Gadget[] { absorber, triangle, circle1, circle2,\n circle3, circle4, circle5, top, left, right, bottom };\n }\n\n else if (boardName.equals(\"flippers\")) {\n Ball ball1 = new Ball(new Vect(0, 0), new Geometry.DoublePair(.25,\n 3.25));\n Ball ball2 = new Ball(new Vect(0, 0), new Geometry.DoublePair(5.25,\n 3.25));\n Ball ball3 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 10.25, 3.25));\n Ball ball4 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 15.25, 3.25));\n Ball ball5 = new Ball(new Vect(0, 0), new Geometry.DoublePair(\n 19.25, 3.25));\n Gadget left1 = new LeftFlipper(0, 8, 90, new Gadget[] {});\n Gadget left2 = new LeftFlipper(4, 10, 90, new Gadget[] {});\n Gadget left3 = new LeftFlipper(9, 8, 90, new Gadget[] {});\n Gadget left4 = new LeftFlipper(15, 8, 90, new Gadget[] {});\n Gadget circle1 = new CircleBumper(5, 18, new Gadget[] {});\n Gadget circle2 = new CircleBumper(7, 13, new Gadget[] {});\n Gadget circle3 = new CircleBumper(0, 5, new Gadget[] { left1 });\n Gadget circle4 = new CircleBumper(5, 5, new Gadget[] {});\n Gadget circle5 = new CircleBumper(10, 5, new Gadget[] { left3 });\n Gadget circle6 = new CircleBumper(15, 5, new Gadget[] { left4 });\n Gadget triangle1 = new TriangleBumper(19, 0, 90, new Gadget[] {});\n Gadget triangle2 = new TriangleBumper(10, 18, 180, new Gadget[] {});\n Gadget right1 = new RightFlipper(2, 15, 0, new Gadget[] {});\n Gadget right2 = new RightFlipper(17, 15, 0, new Gadget[] {});\n Gadget absorber = new Absorber(0, 19, 20, 1, new Gadget[] { right1,\n right2, new Absorber(0, 19, 20, 1, new Gadget[] {}) });\n this.balls = new Ball[] { ball1, ball2, ball3, ball4, ball5 };\n this.gadgets = new Gadget[] { left1, left2, left3, left4, circle1,\n circle2, circle3, circle4, circle5, circle6, triangle1,\n triangle2, right1, right2, absorber, top, bottom, left,\n right };\n } else {\n this.gadgets = new Gadget[] {};\n this.balls = new Ball[] {};\n }\n\n checkRep();\n }", "public Gasto() {\r\n\t}", "public Vehicle2D() {\n }", "public BoardFactory(PacManSprites spriteStore) {Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\");this.sprites = spriteStore; Collect.Hit(\"BoardFactory.java\",\"BoardFactory(PacManSprites spriteStore)\", \"689\");}", "public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }", "public Battle(){\r\n\t\t\r\n\t}", "public Player() {}", "public Player() {}", "public Player() {}", "public Player() {}", "public BirdView(MyCumulusGame game) {\n super(game);\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public HowToPlay()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(763, 578, 1); \n //HowToPlay play = new HowToPlay();\n }", "public AbstractGameState() {\n\t\tsuper();\n\t}", "public Shot() {\n }", "private TbusRoadGraph() {}", "private CommandBrocker() {}", "public MorraGameLogic() {\n // This constructor is intentionally empty.\n }", "GamePlayAbstract(GameEngine1 p_ge) {\r\n super(p_ge);\r\n }", "public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }", "public GameUser() {\n\t}" ]
[ "0.71110535", "0.6985611", "0.6981887", "0.69626635", "0.6931178", "0.69149256", "0.6904134", "0.68891245", "0.6804011", "0.6763402", "0.674457", "0.6664951", "0.66603494", "0.664086", "0.66066813", "0.65733546", "0.65686136", "0.65541834", "0.65359926", "0.6500396", "0.64950734", "0.64586735", "0.6439921", "0.6432654", "0.63902533", "0.6371158", "0.6364713", "0.63432926", "0.6341784", "0.63228726", "0.63134843", "0.631229", "0.63042635", "0.62985367", "0.62980795", "0.6297083", "0.6278583", "0.6272902", "0.62713325", "0.6258538", "0.6258538", "0.62573004", "0.62505585", "0.6250028", "0.62477815", "0.624755", "0.6244961", "0.6240281", "0.62353444", "0.623422", "0.62219685", "0.6211635", "0.62015474", "0.6199984", "0.61933786", "0.6170781", "0.61690867", "0.6162753", "0.6136932", "0.6135787", "0.61272603", "0.61271733", "0.61210257", "0.61210257", "0.6109343", "0.6107666", "0.6103364", "0.6098608", "0.6095742", "0.6094303", "0.6090154", "0.60898286", "0.6088087", "0.60847753", "0.60828704", "0.6076108", "0.6071477", "0.605979", "0.60527235", "0.605268", "0.6052061", "0.60472715", "0.6042669", "0.60376793", "0.6037076", "0.6032332", "0.6032332", "0.6032332", "0.6032332", "0.6032123", "0.60297173", "0.60290545", "0.60205245", "0.6019998", "0.601959", "0.6019415", "0.6012929", "0.6011995", "0.6003095", "0.6001499" ]
0.6670086
11
hands start from 0 like arrays on error return automatic empty hand
public Hand getHand(int k) { if (k < 0 || k >= numPlayers) return new Hand(); return hand[k]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emptyHand();", "public void clearHand() {\n\t\tthis.aHand = new Chips[aHand.length];\n\t}", "public Hand() {\n cards = new int[16];\n numSoft = 0;\n score = 0;\n numCards = 0;\n }", "public void resetHand()\r\n\t{\r\n\t\thandCount = 0;\r\n\t\tstand = false;\r\n\t}", "public void resetHand() {\n this.myCards = new Card[MAX_CARDS];\n this.numCards = 0;\n }", "Hand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public void resetHand()\r\n {\r\n myCards = new Card[MAX_CARDS];\r\n numCards = 0;\r\n }", "public Hand()\n\t{\n\t\thand = new Card[12];\n\t\tnumCards = 0;\n\t\tscore = 0;\n\t}", "private void InitializeComputerHand(){\n for(int i = 0; i < 7; i++){\n //Add to the computer\n handComputer.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n }", "public Hand(){\n dice = new Die[HAND_SIZE];\n for(int i = 0; i < dice.length; ++i){\n dice[i] = new Die();\n }\n }", "public abstract void setHand(Card[] hand);", "private void InitializeHumanHand(){\n for(int i = 0; i < 7; i++){\n //Add to the human hand\n handHuman.add(deck.get(i));\n }\n\n for(int i = 6; i >= 0; i--){\n deck.remove(i);\n }\n\n /*\n System.out.println(\"HUMAN\");\n for(int i = 0; i < handHuman.size(); i++){\n System.out.println(handHuman.get(i));\n }\n\n System.out.println(\"DECK AFTER REMOVE\");\n for(int i = 0; i < deck.size(); i++){\n System.out.println(deck.get(i));\n }\n */\n }", "public Hand(Card[] hand) {\r\n\t\tthis.cards = new ArrayList<Card>(Arrays.asList(hand));\r\n\t}", "public Hand() {\n this.hole1 = new BlankCard();\n this.hole2 = new BlankCard();\n showCards = false;\n }", "public void tryStand() {\n if(player.getHand().size() > 0){\n firstStand = true;\n dealerTurn(1);\n } else{\n errorFlag = true;\n userMessage = \"You must get your initial hand dealt before you can stand\";\n }\n\n\n }", "public Hand () //No arg\n\t{\n\t\tthis.cardsInHand = 0;\n\t\tthis.handSize = 5;\n\t}", "public void clearHand() {\n\t\t_hand.clearHand();\n\n\t}", "public TowersOfHanoi(int noDisks){\n\n this.noDisks = noDisks;\n\n\n }", "public void handStarted(int position, GameState gs, Card[] cards) {\r\n }", "private Hand getStraight(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"getStraight(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning null\");\n\t\t\treturn null;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\tSet<CardNumber> set = new HashSet<CardNumber>(hand.getNumberValues());\n\t\tif(set.size()<5){\n\t\t\tlog.debug(\"Only \"+set.size()+\" unique numbers\");\n\t\t\treturn null;\n\t\t}\n\t\tList<CardNumber> sorted = CollectionHelper.asSortedList(set);\n\t\tlog.debug(\"Sorted Size = \"+sorted.size());\n\t\tHand numberInSequence = new FiveCardHand();\n\t\tif(sorted.size()>1){\n\t\t\t//Inch worm a long, adding hands as this will handle more than 5 cards\n\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(0)));\n\t\t\tfor(int i=1; i<sorted.size();i++){\n\t\t\t\tif(CardUtil.areCardNumbersSequential(sorted.get(i-1),sorted.get(i))){\n\t\t\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(i)));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tnumberInSequence = hand.getSubHandHavingNumber(sorted.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t //Check wrap around, (example: Ace)\n\t\t\tCardNumber start = sorted.get(0);\n\t\t\tCardNumber end = sorted.get(sorted.size()-1);\n\t\t\tlog.debug(\"Checking wrap around case, if \"+start+\" and \"\n\t\t\t\t\t+end+\" are sequential\");\n\t\t\tif(CardUtil.areCardNumbersSequential(start,end)){\n\t\t\t\tlog.debug(\"Wrap around Ace in play\");\n\t\t\t\t//Add the Ace\n\t\t\t\tnumberInSequence.addHand(hand.getSubHandHavingNumber(sorted.get(0)));\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Number of cards in sequence: \"+numberInSequence.getCards().size());\n\t\tif(numberInSequence.getCards().size()>4){\n\t\t\treturn numberInSequence;\n\t\t}\n\t\treturn null;\n\t}", "public Hand() {\r\n\t\t\r\n\t}", "public Hand(){}", "public void testGetHand() throws Exception {\r\n// System.out.println(getClass().getSimpleName() + \": getHand\");\r\n//\r\n// HandRank hr = hand.getHandRank();\r\n// Card[] result = hr.getHand();\r\n// System.out.println(hr.getHandType());\r\n// System.out.println(\"hand:\" + Arrays.toString(result));\r\n// Assert.isTrue(hr.getHandType() == HandType.HIGH);\r\n//\r\n// SimpleHandAggregator sha = new SimpleHandAggregator();\r\n// System.out.println(sha.scoreHand(hand));\r\n }", "public void clearHand(){\n\t\tthis.hand = new ArrayList<Card>();\n\t}", "@Override\n public void setOpponentsLastHand(Hand hand)\n {\n }", "public void initShoulder(){\r\n do{\r\n int currentShoulderPosition = motorShoulder.getCurrentPosition();\r\n posShoulder = currentShoulderPosition + DELTA_SHOULDER;\r\n motorShoulder.setTargetPosition(posShoulder);\r\n motorShoulder.setPower(POWER_SHOULDER_SLOW);\r\n\r\n //System.out.println(\"posShoulder = \" + posShoulder);\r\n } while(!sensorShoulder.isPressed());\r\n\r\n motorShoulder.setPower(STOP);\r\n resetShoulderEncoder();\r\n posShoulder = 0;\r\n }", "public void clearHand() {\n\t\thand.clear();\n\t}", "public Hand getLeftHand()\n\t{\n\t\treturn hands[0];\n\t}", "public void makeHigh() {\n Collections.sort(this.cards, Card.COMPARE_BY_VALUE);\n ArrayList<String> validHand = new ArrayList<>();\n for(int i = this.cards.size() - 5; i < this.cards.size(); i++)\n validHand.add(this.cards.get(i).toString());\n this.cardHand = new CardHand(validHand.toArray(new String[0]));\n }", "public void clearHand() {\n cards.clear();\n aceCount = 0;\n setSize(0);\n }", "private int royalFlush() {\n\t\tif (hand[0].getValueIndex() == 8 && hand[1].getValueIndex() == 9 && hand[2].getValueIndex() == 10\n\t\t\t\t&& hand[3].getValueIndex() == 11 && hand[4].getValueIndex() == 12) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public Hand()\n {\n cards = new ArrayList<Card>();\n }", "public Hand() {\n }", "public int getHandSize()\n {\n return hand.size();\n }", "public UnoHand getHand() {\r\n return hand;\r\n }", "public void evaluateHand(){only public for testing\n //hand types will be\n //1 royal flush\n //2 straight flush\n //3 four of a kind\n //4 full house\n //5 flush\n //6 straight\n //7 three of a kind\n //8 two pair\n //9 pair\n //10 high card\n //hand secondary values will have to some how account for\n //the lead card of a flush or straight or the bigger pair\n //\n HandType = 0;\n\n //----------checking flush----------\n boolean flush = true;//will flip the vriable when proven wrong\n //if Hand.suites all equal\n for(Card c : Hand) {\n if (!c.getSuite().contains(Hand[0].getSuite())) {\n flush = false;\n }\n }\n //--Handtype = 5//flush\n if(flush){\n HandType=5;\n }\n\n //----------checking pair, two pair, boat,three of a kind, four of a kind----------\n int countmatches=0;\n HashMap<Integer, ArrayList<Card>> maskd = new HashMap<>();\n int[] mask = new int[5];\n int currentmask=1;\n maskd.put(0, new ArrayList<>());\n mask[0]=0;\n maskd.get(0).add(this.Hand[0]);\n //if any two hand.value equal\n for(int comp = 0; comp<Hand.length;comp++){//comparitor\n for(int check = comp+1; check<Hand.length;check++) {//checker\n //System.out.print(\"{\"+comp+check+\"}\");\n if(0==Hand[comp].compareTo(Hand[check])){\n //System.out.println(\"pair\"+Hand[comp]+Hand[check]);\n countmatches++;\n /*if(pairprimary==0&&!(pairprimary==Hand[check].getValue())){\n pairprimary=Hand[check].getValue();\n }else if(pairsecondary==0){\n pairsecondary=Hand[check].getValue();\n }//this wont work for boats\n */\n //create mask?\n if(mask[comp]==0){\n mask[comp]=currentmask;\n maskd.put(currentmask,new ArrayList<>());\n maskd.get(currentmask).add(this.Hand[comp]);\n currentmask++;\n if(maskd.get(0).contains(this.Hand[comp])){\n maskd.get(0).remove(this.Hand[comp]);\n }\n }\n mask[check]=mask[comp];\n if(!maskd.get(mask[comp]).contains(this.Hand[check])) {\n if(maskd.get(0).contains(this.Hand[check]))\n maskd.get(0).remove(this.Hand[check]);\n maskd.get(mask[comp]).add(this.Hand[check]);\n }\n continue;\n }\n if(!maskd.get(0).contains(this.Hand[check]))\n maskd.get(0).add(this.Hand[check]);\n }\n }\n\n //for(int m:maskd.keySet())\n // System.out.print(\"\"+m+\":\"+maskd.get(m));\n //System.out.println(\"\");\n\n if(HandType==0)\n switch (countmatches){ //basically i'm counting the collisions\n case 1: HandType=9;break;//one pair\n case 2: HandType=8;break;//two pair\n case 3: HandType=7;break;//triple\n case 4: HandType=4;break;//boat\n case 6: HandType=3;break;//four of a kind\n case 10: HandType=-1;break;//five of a kind\n }//reorder cards by mask?\n if(countmatches>0){\n Card[] newhand = new Card[5];\n int bigger = 0;\n if(currentmask==3) {//two pair boat\n //two pair\n if (maskd.get(1).get(0).getValue()\n > maskd.get(2).get(0).getValue()) {\n bigger = 1;\n } else {\n bigger = 2;\n }\n\n //boat\n if (maskd.get(1).size() == 3) {\n bigger = 1;\n }\n if (maskd.get(2).size() == 3) {\n bigger = 2;\n }\n }else {\n //one pair???\n bigger = 1;\n }\n\n for(int i = 0; i<5;i++){\n //if(maskd.containsKey(bigger)) {\n if(!maskd.get(bigger).isEmpty()) {\n newhand[i] = maskd.get(bigger).get(0);\n //if (maskd.get(bigger).size() > 0) {\n maskd.get(bigger).remove(0);\n //} else {\n // bigger = Math.abs(bigger - 3);\n //}\n }else{\n if(maskd.containsKey(Math.abs(bigger-3))){\n if(!maskd.get(Math.abs(bigger-3)).isEmpty()){\n bigger = Math.abs(bigger-3);\n }else{\n bigger = 0;\n }\n }else{\n bigger = 0;\n }\n i--;\n }\n //}\n\n }//end for loop\n\n //end pair bits\n\n //System.out.println(newhand);\n this.Hand=newhand;\n }//end reshuffle hand if statement\n //----------checking for straight----------\n //if first card is ace and second card is a 5, treat ace as one\n if(Hand[0].getValue()==14&&Hand[1].getValue()==5) {\n Hand[0] = new Card(\"Ace\", Hand[0].getSuite(), 1);\n //Hand[0].Value=1;\n this.sortHand();\n this.flipHand();\n }\n //go through hand and see if all 5 values are consecutive\n int n = Hand[0].getValue();\n boolean straight = true;\n for(int i = 1;i<Hand.length; i++){\n n--;\n if(!(Hand[i].getValue()==n)){\n straight=false;\n }\n }\n if(straight){\n //if above true\n //--if handtype = 5\n if(HandType==5) {\n //----if card1 is ace\n if (Hand[0].getValue() == 14) {\n //------handtype = 1 //royal flush\n HandType = 1;\n } else {\n //----else\n HandType=2;\n //------handtype = 2 //straight flush\n }\n }else {\n //--else //not a flush\n HandType=6;\n //----handtype = 6 //straight\n }\n }\n\n //----------checking high card----------\n //if handtype = 0\n if(HandType==0) {\n HandType=10;\n //--hand card = 10\n }\n }", "private boolean isStraight(ArrayList<Card> hand) {\n\t\treturn false;\r\n\t}", "public void setHand(ArrayList<Card> hand) {\n this.hand = hand;\n }", "public boolean isFlush(){\n \r\n if(haveSameSuit(cards)){\r\n handValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public static void showOneHand(int[] hand){\n\n for (int i = 0; i < suit.length; i++) {\n System.out.print(suit[i] + \": \");\n for (int k=0; k < hand.length; k++) {\n int card = hand[k];\n int rank = card%13;\n if(card/13 == i) {\n System.out.print(ranks[rank] +\" \");\n }\n }\n System.out.println();\n }\n }", "public void newHand() {\n if(player.getSecondHand().size() > 0){\n player.emptySecondHand(deck);\n shuffle();\n }\n player.resetBet();\n dealer.resetBet();\n errorFlag = false;\n userMessage = \"Place your Bet\";\n againDisabled = true;\n dealDisabled = false;\n hitDisabled = true;\n splitDisabled = true;\n standDisabled = true;\n doubleDisabled = true;\n bettingDisabled = false;\n emptyHands();\n }", "public void setHand(EnumPolicy[] hand)\n {\n this.hand.clear();\n EnumRegion region = getRegion();\n for (EnumPolicy policy : hand)\n {\n PolicyCard policyCard = PolicyCard.create(region, policy);\n// System.out.println(policyCard.toString());\n this.hand.add(policyCard);\n }\n }", "public Hand getHand() {\n return hand;\n }", "public Hand getHand() {\n return hand;\n }", "public Hand() {\n downStack = new ArrayList<>();\n cardsInPlayStack = new Stack<>();\n }", "public static void showHands(){\n Scanner scan=new Scanner(System.in);//call the Scanner constructor\n int Deck[]=new int[52];//set up the array for deck\n String answer=\"\";\n do{\n //store 0 to 51 into the Deck array\n for(int i=0;i<Deck.length;i++){\n Deck[i] = i; \n }\n \n int Hand[]={-1,-1,-1,-1,-1};//set up and initialize the array for hand\n \n Random r = new Random ();//Decalre a instance of the Random generator\n int k = Deck.length;//declare a variable to show the effective length of the Deck array\n //set up a loop to draw cards from the deck ramdomly\n for(int j=0;j<Hand.length;j++){\n int draw = r.nextInt(k-1);\n Hand[j] = Deck[draw];//store the ramdom pick from Deck into Hand\n //set the random pick in Deck to -1 and swap with the last effective number in Deck\n Deck[draw]=Deck[k-1];\n Deck[k-1]= -1;\n k--;//reduce the effective array size\n }\n \n //set up the strings, which will indicate the result\n String Clubs = \"Clubs: \";\n String Diamonds = \"Diamonds: \";\n String Hearts = \"Hearts: \";\n String Spades = \"Spades: \";\n //set up a loop to determine the kind and value of each card in hand\n for(int j=0;j<Hand.length;j++){\n int kind = Hand[j]/13;//calculate the kind of the card\n int rank = Hand[j]%13;//calculete the rank of the card\n switch (kind){\n case 0:\n switch (rank){\n case 0:\n Clubs += \"A \";\n break;\n case 1:\n Clubs += \"K \";\n break; \n case 2:\n Clubs += \"Q \";\n break; \n case 3:\n Clubs += \"J \";\n break; \n case 4:\n Clubs += \"10 \";\n break; \n case 5:\n Clubs += \"9 \";\n break; \n case 6:\n Clubs += \"8 \";\n break; \n case 7:\n Clubs += \"7 \";\n break; \n case 8:\n Clubs += \"6 \";\n break; \n case 9:\n Clubs += \"5 \";\n break; \n case 10:\n Clubs += \"4 \";\n break; \n case 11:\n Clubs += \"3 \";\n break; \n case 12:\n Clubs += \"2 \";\n break; \n } \n break;\n case 1:\n switch (rank){\n case 0:\n Diamonds += \"A \";\n break;\n case 1:\n Diamonds += \"K \";\n break; \n case 2:\n Diamonds += \"Q \";\n break; \n case 3:\n Diamonds += \"J \";\n break; \n case 4:\n Diamonds += \"10 \";\n break; \n case 5:\n Diamonds += \"9 \";\n break; \n case 6:\n Diamonds += \"8 \";\n break; \n case 7:\n Diamonds += \"7 \";\n break; \n case 8:\n Diamonds += \"6 \";\n break; \n case 9:\n Diamonds += \"5 \";\n break; \n case 10:\n Diamonds += \"4 \";\n break; \n case 11:\n Diamonds += \"3 \";\n break; \n case 12:\n Diamonds += \"2 \";\n break; \n } \n break;\n case 2:\n switch (rank){\n case 0:\n Hearts += \"A \";\n break;\n case 1:\n Hearts += \"K \";\n break; \n case 2:\n Hearts += \"Q \";\n break; \n case 3:\n Hearts += \"J \";\n break; \n case 4:\n Hearts += \"10 \";\n break; \n case 5:\n Hearts += \"9 \";\n break; \n case 6:\n Hearts += \"8 \";\n break; \n case 7:\n Hearts += \"7 \";\n break; \n case 8:\n Hearts += \"6 \";\n break; \n case 9:\n Hearts += \"5 \";\n break; \n case 10:\n Hearts += \"4 \";\n break; \n case 11:\n Hearts += \"3 \";\n break; \n case 12:\n Hearts += \"2 \";\n break; \n } \n break;\n case 3:\n switch (rank){\n case 0:\n Spades += \"A \";\n break;\n case 1:\n Spades += \"K \";\n break; \n case 2:\n Spades += \"Q \";\n break; \n case 3:\n Spades += \"J \";\n break; \n case 4:\n Spades += \"10 \";\n break; \n case 5:\n Spades += \"9 \";\n break; \n case 6:\n Spades += \"8 \";\n break; \n case 7:\n Spades += \"7 \";\n break; \n case 8:\n Spades += \"6 \";\n break; \n case 9:\n Spades += \"5 \";\n break; \n case 10:\n Spades += \"4 \";\n break; \n case 11:\n Spades += \"3 \";\n break; \n case 12:\n Spades += \"2 \";\n break; \n } \n break;\n }\n }\n \n //print out the results\n System.out.println(Clubs);\n System.out.println(Diamonds);\n System.out.println(Hearts);\n System.out.println(Spades);\n //ask user for input\n System.out.print(\"Go again? Enter 'y' or 'Y', anything else to quit- \");\n answer=scan.next();\n }while(answer.equals(\"Y\") || answer.equals(\"y\"));\n return;\n }", "public int getHandSize(){\n\t\treturn hand.size();\n\t\t\t\t\n\t}", "public void evaluateAllHands() {\n\t\tPlayer player;\n\t\tresetHandRanks();\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\thand = new Card[5];\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkStrFlush(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkQuads(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkFullHouse(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkFlush(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkStraight(player))\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (player.isTrips())\n\t\t\t\tcontinue;\n\n\t\t\tinitAndSortAllHands();\n\t\t\tif (checkTwoPairs(player))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tinitAndSortAllHands();\n\t\t\tif (player.isPair())\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tinitAndSortAllHands();\n\t\t\tcheckHighCard(player);\n\t\t}\n\t}", "public void clearHand() {\n for (Component c : cardPane.getComponents()) {\n if (c instanceof Card) {\n cardPane.remove(c); //Removes all Cards from card panel\n }\n }\n busted = false; //Hand not busted\n values.clear(); //Removes all Integers from values\n values.add(0); //Sets initial value to 0\n updateValue(); //Updates value\n repaint(); //Redraws hand\n }", "public String showFirstRoundCards() {\n String message = \"[ Unknown \";\n message += personHand.get(1) + \" ]\";\n return message;\n }", "private void openHand() {\r\n\t\tif (!first) {\r\n\t\t\thand.forward();\r\n\t\t\twhile (Math.abs(hand.getTachoCount() - originalHandPosition + 5) > 5) {\r\n\t\t\t}\r\n\t\t\thand.stop();\r\n\t\t} else {\r\n\t\t\tfirst = false;\r\n\t\t}\r\n\t}", "public void initialGame()\t{\n\t\tinput = new Scanner(System.in);\n\t\ttop = deck1.deal();\n\t\tfor(int j=0;j<numPlayers;j++)\t{\n\t\t\tSystem.out.println(\"Enter player\" + (j+1) + \"'s name:\");\n\t\t\thand[j] = new Hand(input.nextLine());\n\t\t\tfor(int i=0;i<INITIAL_DEAL;i++)\t{\n\t\t\t\thand[j].addCard(deck1.deal());\n\t\t\t}\n\t\t\trecord[j] = \"\";\n\t\t}\n\t\tSystem.out.println(\"\\n------------------\\n\");\t\n\t}", "public WeetArray() {\n count = 0;\n nullCount = 0;\n }", "private boolean isFlush(ArrayList<Card> hand) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn false;\r\n\t}", "HandValue(String[] cards) {\n this.cards = cards;\n totalScore = 0;\n combos = Combinations.combinations(cards);\n }", "public void dealInitialPlayerHands() {\n\t\tint temp = 0;\n\t\tSystem.out.println(\"This is the deck size before dealing: \" + this.tileDeck.deckSize());\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tfor (int i = 0; i < 14; i ++) {\n\t\t\t\tp.hand.add(this.tileDeck.dealTile());\n\t\t\t}\n\t\t\tp.sort();\n\t\t\tSystem.out.println(\"Player \" + temp + \"'s hand: \" + p.getHandTiles());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t\t//System.out.println(this.tileDeck.deckSize());\n\t}", "public static boolean isFlush(){\n int rank = hand[0]/13;\n boolean output = true;\n\n for (int i : hand) {\n\n if( (i/13) != rank){\n output = false;\n }\n }\n\n return output;\n }", "void initFirstTower() {\n for (int i = 0; i < numDisks; i++) {\n towers[0].push(numDisks - i + 1);\n }\n }", "public void setAutoHandsForPlayers(){\n\t\tint totSwitch = 0;\n\t\tHands[] allHands = new Hands[this.numberOfPlayers];\n\n\t\tfor(int i = 0 ; i < this.numberOfPlayers; i++){\n\t\t\tallHands[i] = new Hands();\n\t\t}\n\n\t\t// Case for two players\n\t\tswitch (this.numberOfPlayers){\n\t\tcase 2:\n\t\t\ttotSwitch = 1;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\ttotSwitch = 2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\ttotSwitch = 3;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\ttotSwitch = 4;\n\t\t\tbreak;\n\t\t}\n\n\t\tint twist = 0;\n\t\twhile (twist <= totSwitch){\n\t\t\tfor(int i = 0 ; i < 5; i++){\n\t\t\t\tallHands[twist].hands[i] = this.deckOfCards.cards[(twist*5)+i];\n\t\t\t}\t\n\t\t\ttwist = twist + 1;\n\t\t}\n\n\t\tfor(int i = 0; i < this.numberOfPlayers; i++){\n\t\t\tthis.players[i].playerHand.setHands(allHands[i]);\n\t\t}\n\n\t}", "public ArrayList<PlayingCard> getHand();", "public void printHand(){\n System.out.println();\n for(int i = 1 ; i <= 6; i++){\n for(int j = 0 ; j < hand.size(); j++){\n if(j == hand.size()-1){\n System.out.print(hand.get(j).fullRowString(i));\n }\n else{\n System.out.print(hand.get(j).halfRowString(i));\n }\n }\n System.out.println();\n }\n System.out.println();\n for(int k = 0; k < hand.size() ; k++){\n if(k >= 10){\n System.out.print(\" \" + (k+1) + \" \");\n }\n else{\n System.out.print(\" \" + (k+1) + \" \");\n }\n }\n System.out.println();\n }", "public int countHandShakes(){\n\t\tif (this.getNCouples() < 1) {\n\t\t\treturn 0;\n\t\t}else if (this.getNCouples() == 1) {\n\t\t\treturn 1;\n\t\t}else{\n\t\t\tthis.setNCouples(this.getNCouples() - 1);\n\t\t\treturn (this.getNCouples() + 1) * 3 - 2 + countHandShakes();\n\t\t}\n\t}", "public void AddCardToHumanHand(){\n //Add the first card to the human hand\n handHuman.add(deck.get(0));\n\n //Remove card from deck\n deck.remove(0);\n }", "void reset() {\n for (int i = 0; i < array.length; i++) {\n array[i] = -1;\n }\n }", "public String getHand(){\r\n return this.handStr;\r\n }", "public String showInitinalHand() {\n\t\tString string = \"\";\n\t\tstring += \"Player's hand: \" + player.showHand() + \"\\n\";\n\t\tstring += \"Dealer's hand: \" + dealer.showDealerHand() + \"\\n\";\n\t\treturn string;\n\t}", "@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareHoriz()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,10);\n\t\td.set(17,9);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(9);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "Hand getHand() {\n\t\treturn _hand;\n\t}", "public Hand getHand(int k)\n {\n if (k < 0 || k >= numPlayers)\n return new Hand();\n\n return hand[k];\n }", "public Hand getHand() {\n\t\treturn hand;\n\t}", "public BlackjackHand() {\n super(0);\n aceCount = 0;\n cards = new ArrayList<>();\n }", "@Override\r\n\tprotected int giveCardProtected(ArrayList<Card> hand) {\n\t\treturn getRandomCard(hand);\r\n\t}", "public Hand(){\n cards = new ArrayList<Card>();\n }", "public void drawCard(Integer cardLocation){\n Random random = new Random();\n boolean isPlayerHandEmpty = false;\n Integer sizeOfPlayerHand = 4;\n //The reason for this is as follows: we are wanting to keep an array size of 4 consistent for playerHand, however\n //using the .remove() function actually shortens the size. Yet .set(index,null) is still counted as an element, hence\n //isEmpty does not work, and the size() is still 4.\n //Is this the most agile way to do this? I don't know, but this worked.\n\n for (Card s:playerHand){\n if(s == null){\n sizeOfPlayerHand--;\n }\n }\n if (sizeOfPlayerHand == 0){\n isPlayerHandEmpty = true;\n }\n\n\n\n if (playerTempDeck.size() > 0 && (sizeOfPlayerHand < 4 || playerHand.size() < 4)){\n //System.out.println(\"Adding cards from deck.\");\n\n Integer n = random.nextInt(playerTempDeck.size()); //0 to the number in the bracket. Pick a random card from the deck and use it here.\n playerHand.set(cardLocation, playerTempDeck.get(n));\n //System.out.println(\"Now the playerHand is: \" + playerHand.toString());\n //System.out.println(\"Size of deck: \" + playerTempDeck.size());\n //System.out.println(\"Trying to remove: \" + playerTempDeck.get(n).getEffect());\n playerTempDeck.remove(playerTempDeck.get(n));\n }\n\n if (playerTempDeck.size() == 0 && (isPlayerHandEmpty || playerHand.size() == 0)){ //deck is empty and no cards left to play, reshuffle.\n //System.out.println(\"Hand and deck are both empty!\");\n playerTempDeck.addAll(discardedCards);\n discardedCards.clear();\n drawCard(0);\n drawCard(1);\n drawCard(2);\n drawCard(3);\n }\n }", "private static Hand getResults() {\n System.out.println(hands.size());\n Optional<Hand> winner;\n winner = hands.stream()\n .reduce((hand1, hand2)\n -> hand1.compareTo(hand2) == 1 ? hand1 : hand2);\n Hand winningHand = null;\n if (winner.isPresent()) {\n winningHand = winner.get();\n }\n return winningHand;\n\n }", "public ArrayList<Piece> getHand() {\n return this.piecesInHand;\n }", "public HashSet<Card> getHand() {\n\t\treturn hand;\n\t}", "private void init() {\n this.playing = true;\n this.hand.clear();\n this.onTable = 0;\n this.points = 0;\n }", "public void printHand() {\r\n System.out.printf(\"%s's cards:\\n\", name);\r\n for (int n = 0; n < numOfCards; n++) {\r\n System.out.printf(\" %s\\n\", hand[n].toString());\r\n }\r\n }", "private java.util.List<Card> deal(java.util.List<Card> hand, int numCards) {\n for (int i = 0; i < numCards; ++i) {\n hand.add(removeTop(deck));\n }\n return hand;\n }", "public void makeEmpty() {\r\n\t\tArrays.fill(list, -1);\r\n\t}", "public static boolean isHandFullHouse(Hand h, HandScore hs) {\n\r\n\t\tboolean isFullHouse = false;\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.THIRDCARD.getCardNo()).geteRank() && h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t\t\t.get(eCardPlace.FIFTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisFullHouse = true;\r\n\t\t\ths.setHandStrength(eHandStrength.FullHouse.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(null);\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t.get(eCardPlace.SECONDCARD.getCardNo()).geteRank() && h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).geteRank() == h.getCardsInHand()\r\n\t\t\t\t\t\t.get(eCardPlace.FIFTHCARD.getCardNo()).geteRank()) {\r\n\t\t\tisFullHouse = true;\r\n\t\t\ths.setHandStrength(eHandStrength.FullHouse.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(null);\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\treturn isFullHouse;\r\n\r\n\t}", "public void resetActiveHand() {\n\t\tif (activeHand != null) {\n\t\t\tactiveHand.setActive(false);\n\t\t\tactiveHand = null;\n\t\t}\n\n\t}", "public void sortHand(){\n Arrays.sort(Hand);\n }", "static int getHighCardWithinHand(String[] hand) {\n\tint highCard = 1;\n\tfor (int i = 0; i < hand.length; i++) {\n\t if (getNumberOfCard(hand[i]) > highCard) {\n\t\thighCard = getNumberOfCard(hand[i]);\n\t }\n\t}\n\treturn highCard;\n }", "private static short eval_5cards(int[] hand)\n {\n int q = (hand[0] | hand[1] | hand[2] | hand[3] | hand[4]) >> 16;\n\n // This checks for any kind of Flushes\n if ((hand[0] & hand[1] & hand[2] & hand[3] & hand[4] & 0xf000) != 0)\n return flushes.get(q);\n\n // This checks for Straights and High Card hands\n if ( unique5.get(q) != 0)\n return unique5.get(q);\n\n // This performs a perfect-hash lookup for remaining possible hands\n long q1 = (hand[0] & 0xff) * (hand[1] & 0xff) * (hand[2] & 0xff) * (hand[3] & 0xff) * (hand[4] & 0xff);\n return hash_values.get((int)find_fast(q1));\n }", "public boolean hasFlush(Hand handToCheck){\n\t\tHand hand = new FiveCardHand(handToCheck); //Make copy of the object so original doesn't get modified\n\t\tlog.debug(\"hasFlush(hand = \"+hand+\")\");\n\t\tif(hand == null){\n\t\t\tlog.debug(\"Hand was null. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tArrayList<Card> cards = hand.getCards();\n\t\tif(cards == null){\n\t\t\tlog.debug(\"The ArrayList<Card> inside the Hand Object was NULL. Returning false\");\n\t\t\treturn false;\n\t\t}\n\t\tlog.trace(\"Number of cards in Hand: \"+cards.size());\n\t\t\n\t\tList<CardSuit> sorted = CollectionHelper.asSortedList(hand.getSuitValues());\n\t\t\n\t\tint highestNumberInARowThusFar=0;\n\t\tint suitsInARow=0;\n\t\tif(sorted.size()>1){\n\t\t\tsuitsInARow=1;\n\t\t\tfor(int i=1; i<sorted.size();i++){\n\t\t\t\tif(sorted.get(i-1).equals(sorted.get(i))){\n\t\t\t\t\tsuitsInARow++;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t\t\t}\n\t\t\t\t\tsuitsInARow = 1;\n\t\t\t\t}\t\n\t\t\t}\n\t\t\tif(suitsInARow > highestNumberInARowThusFar){\n\t\t\t\thighestNumberInARowThusFar = suitsInARow;\n\t\t\t}\n\t\t}\n\t\tlog.debug(\"Max number of suits found in a row = \"+highestNumberInARowThusFar);\n\t\tif(highestNumberInARowThusFar>4){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public ArrayList<Card> getHand() {\n\t\treturn this.cardsInhand;\n\t}", "public ArrayList<Card> getHand() {\r\n\t\treturn this.Hand;\r\n\t}", "public boolean isStraightFlush(){\n \r\n if(isStraight() && isFlush()){\r\n handValue = cards.get(cards.size()-1).getValue();\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "public void moveFromHandToStartOfWord() {\n\t\t//check letters in hand\n\t\tif(hand.size() == 0) {\n\t\t\treturn;\n\t\t}\n\t\t// remove letter from hand\n\t\tLetter temp = hand.leftmost;\n\t\thand.remove();\n\t\ttemp.next = null;\n\n\t\t// add letter to start of word\n\t\tword.addToStart(temp);\n\t}", "public void fillEreignisLOSArray() {\n\t\tfor(int i=1; i<=55; i++) {\n\t\t\tErgebnisLOSCard c= new ErgebnisLOSCard(i);\n\t\t\teCards.add(c);\n\t\t}\n\t}", "private static void initialise( String booth[] ) {\n\r\n for (int x = 0; x < 6; x++ ) { //Assigning all the 6 booths as \"empty\"\r\n booth[x] = \"empty\";\r\n }\r\n }", "private Location[] overrunLeft () {\n Location nextLocation;\n Location nextCenter;\n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(0, getY());\n nextCenter = new Location(myCanvasBounds.getWidth(), getY());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = getHeading() - ONE_QUARTER_TURN_DEGREES;\n if (getHeading() > HALF_TURN_DEGREES) {\n angle = -(THREE_QUARTER_TURN_DEGREES - getHeading());\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(0, getY() + getX() / Math.tan(angle));\n nextCenter = new Location(myCanvasBounds.getWidth(), getY() + getX() /\n Math.tan(angle));\n \n return new Location[] { nextLocation, nextCenter };\n }", "private AssistantJack()\n\t{\n\t\tthis.timesAsked = 0;\n\t\tthis.correctTheory = null;\n\t}", "public void resetHandRanks() {\n\t\tPlayer player;\n\n\t\tfor (int i = 0; i < table.getTablePlayers().size(); i++) {\n\t\t\tplayer = table.getTablePlayers().get(i);\n\t\t\tplayer.setPair(false);\n\t\t\tplayer.setTwoPairs(false);\n\t\t\tplayer.setTrips(false);\n\t\t\tplayer.setStraight(false);\n\t\t\tplayer.setFlush(false);\n\t\t\tplayer.setFullHouse(false);\n\t\t\tplayer.setQuads(false);\n\t\t\tplayer.setStrFlush(false);\n\t\t}\n\t}", "public void displayHand(int hand)\n {\n System.out.println(highCardGame.getHand(hand).toString());\n }", "public LinkedList<PlayingCard> getHand(){\n\t\treturn hand;\n\t}", "public static boolean isHandStraightFlush(Hand h, HandScore hs) {\n\t\tboolean isStraightFlush = false;\r\n\r\n\t\tif (h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr() == h.getCardsInHand().get(eCardPlace.SECONDCARD.getCardNo()).geteRank().getiRankNbr() + 1 \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr() == h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).geteRank().getiRankNbr() + 2 \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr() == h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).geteRank().getiRankNbr() + 3 \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).geteRank().getiRankNbr() == h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()).geteRank().getiRankNbr() + 4\r\n\t\t\t\t\r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).getCardSuit() == h.getCardsInHand() .get(eCardPlace.SECONDCARD.getCardNo()).getCardSuit() \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).getCardSuit() == h.getCardsInHand().get(eCardPlace.THIRDCARD.getCardNo()).getCardSuit() \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).getCardSuit() == h.getCardsInHand().get(eCardPlace.FOURTHCARD.getCardNo()).getCardSuit() \r\n\t\t\t\t&& h.getCardsInHand().get(eCardPlace.FIRSTCARD.getCardNo()).getCardSuit() == h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()).getCardSuit())\r\n\t\t{\r\n\t\t\tisStraightFlush = true;\r\n\t\t\ths.setHandStrength(eHandStrength.StraightFlush.getHandStrength());\r\n\t\t\ths.setHiHand(h.getCardsInHand().get(eCardPlace.FIFTHCARD.getCardNo()).geteRank().getiRankNbr());\r\n\t\t\ths.setLoHand(0);\r\n\t\t\tArrayList<Card> kickers = new ArrayList<Card>();\r\n\t\t\tkickers.add(null);\r\n\t\t\ths.setKickers(kickers);\r\n\t\t}\r\n\t\t\r\n\t\treturn isStraightFlush;\r\n\t}", "private void setSnake() {\r\n length = 1;\r\n snake = new Location[maxRows*maxColumns];\r\n for (int i = 0; i < snake.length; i++) {\r\n snake[i] = new Location(BLANK,BLANK,STOP);\r\n }\r\n int startRow = maxRows / 2;\r\n int startColumn = maxColumns / 2;\r\n snake[HEAD] = new Location(startRow,startColumn,STOP);\r\n }" ]
[ "0.67210305", "0.6420343", "0.6314217", "0.62929094", "0.62901396", "0.6264463", "0.6237136", "0.6120415", "0.6018863", "0.6004832", "0.5914154", "0.58693784", "0.5860037", "0.5816304", "0.5810383", "0.5801187", "0.5799723", "0.57890004", "0.57505774", "0.5719783", "0.5707962", "0.5704623", "0.56752366", "0.56708294", "0.5648071", "0.5643646", "0.56309277", "0.56103444", "0.55347294", "0.55346173", "0.5526607", "0.54855835", "0.54492164", "0.54416806", "0.5438362", "0.54380816", "0.54321194", "0.5413695", "0.540937", "0.540501", "0.53985286", "0.53753537", "0.5368887", "0.5368887", "0.5365691", "0.5359159", "0.5355633", "0.5332135", "0.5325375", "0.532485", "0.52886516", "0.5283768", "0.5275853", "0.5269647", "0.52685755", "0.52620614", "0.5261658", "0.5249273", "0.5235966", "0.5230536", "0.5224069", "0.5220363", "0.521911", "0.52061224", "0.520325", "0.5196105", "0.5194704", "0.519218", "0.5190429", "0.51733655", "0.516919", "0.5158637", "0.51539385", "0.51471406", "0.5145051", "0.51449126", "0.5121083", "0.5117413", "0.51082796", "0.51044357", "0.51035035", "0.51027924", "0.5102264", "0.5099019", "0.5081348", "0.5080901", "0.5080266", "0.5076615", "0.5076212", "0.50721663", "0.5070234", "0.5068254", "0.50561833", "0.5054111", "0.5050842", "0.50483656", "0.5044713", "0.50317645", "0.50273025", "0.5024572" ]
0.52064997
63
returns false if not enough cards, but deals what it can
public boolean deal() { int k, j; boolean enoughCards; // clear all hands for (j = 0; j < numPlayers; j++) hand[j].resetHand(); enoughCards = true; for (k = 0; k < numCardsPerHand && enoughCards; k++) { for (j = 0; j < numPlayers; j++) if (deck.getNumCards() > 0) hand[j].takeCard(deck.dealCard()); else { enoughCards = false; break; } } return enoughCards; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }", "public boolean deal()\n {\n int k, j;\n boolean enoughCards;\n\n // clear all hands\n for (j = 0; j < numPlayers; j++)\n hand[j].resetHand();\n\n enoughCards = true;\n for (k = 0; k < numCardsPerHand && enoughCards ; k++)\n {\n for (j = 0; j < numPlayers; j++)\n if (deck.getNumCards() > 0)\n hand[j].takeCard( deck.dealCard() );\n else\n {\n enoughCards = false;\n break;\n }\n }\n\n return enoughCards;\n }", "private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean cardsLeft() {\n\t\tif (cards.size() - completedCards > 0) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "public boolean hasBlackjack()\n {\n return getSumOfCards(false) == 21;\n }", "@Override\n\tboolean isValid(){\n\t\tif(size()==5) {\n\t\t\tint suite = getCard(0).suit;\n\t\t\tfor(int i = 1 ; i< size(); i++) {\n\t\t\t\tif(getCard(i).suit != suite) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsort();\n\t\t\tint currRank = (getCard(0).rank +11)%13;\n\t\t\tfor(int i=0; i<size(); i++) {\n\t\t\t\tif((getCard(i).rank+11)%13 != currRank) return false;\n\t\t\t\tcurrRank++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "@Test\n\tpublic void TestDeal() {\n\t\tArrayList<Player> testPlayers = game.getPlayers();\n\t\tArrayList<Card> allCards = new ArrayList<Card>();\n\t\tSet<Card> allCardsSet = new HashSet<Card>();\n\t\tint handSize = testPlayers.get(0).getCards().size();\n\t\tboolean correctSize = true;\n\t\t\n\t\tfor(Player p : testPlayers) {\n\t\t\tallCards.addAll(p.getCards());\n\t\t\tif(Math.abs(p.getCards().size() - handSize) > 1)\n\t\t\t\tcorrectSize = false;\n\t\t}\n\t\tallCardsSet.addAll(allCards);\n\t\t\n\t\tAssert.assertEquals(correctSize, true);\n\t\tAssert.assertEquals(allCards.size(), 21);\n\t\tAssert.assertEquals(allCards.size(), allCardsSet.size());\n\t}", "abstract boolean allowedToAdd(Card card);", "public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }", "private boolean tryPay() {\n return new Random().nextInt(100) + 1 <= 50;\n }", "public boolean hasCardsLeftOver() {\r\n\r\n return !(currentCards.isEmpty());\r\n\r\n }", "private boolean checkMortgageCards(ArrayList<PropertyCard> soloCardsToMortgage,ArrayList<PropertyCard> almostCompleteCards, int debt) {\n\t\tboolean soldEnough = false;\n\t\tif(soloCardsToMortgage.size()>0)\n\t\t\tsoldEnough = mortgageCards(soloCardsToMortgage, debt);\n\t\t\n\t\tif(!soldEnough) {\n\t\t\t\n\t\t\tif(almostCompleteCards.size()>0)\n\t\t\t\tsoldEnough = mortgageCards(almostCompleteCards, debt);\n\t\t}\n\t\t\n\t\tif(!soldEnough) {\n\t\t\trevertMortgage(soloCardsToMortgage);\n\t\t\trevertMortgage(almostCompleteCards);\n\t\t}\n\t\t\n\t\treturn soldEnough;\n\t}", "public boolean addCard(Card hit) {\n if (numOfCards == 10) {\r\n System.err.println(\"You already have 5 cards. \"\r\n + \"Cannot add another. \\n\");\r\n }\r\n //actually adding cards\r\n hand[numOfCards] = hit;\r\n numOfCards++;\r\n\r\n return (getHandSum() <= 21);\r\n }", "public boolean outOfCards() {\n return (this.gameDeck.isEmpty() && this.wonDeck.isEmpty());\n }", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "public boolean hit() {\r\n add(deck.deal());\r\n return getHandValue() <= 21;\r\n }", "public boolean addCard(Card card) {\n int cardCount = 0;\n //Check to see if the deck already has the maximum number of cards\n //of this type.\n for (Card cardInDeck : this.cards)\n if (cardInDeck.equals(card))\n cardCount++;\n //Return false is the card will not fit, or if it is invalid.\n if (cardCount >= this.numPacks || this.topCard >= this.MAX_CARDS || card.errorFlag)\n return false;\n this.topCard++;\n //Add the card object to the deck.\n this.cards[topCard - 1] = new Card(card);\n return true;\n }", "public void dealerAskCard() {\n int dealerScore = this.getDealerHand().getActualValue();\n while (dealerScore < 17) {\n Card card = this.deck.deal(this.getDealerHand());\n dealerScore = this.getDealerHand().getActualValue();\n }\n }", "public boolean canAdd(Card c)\r\n {\r\n int val;\r\n int v;\r\n if(c.getSuit() != suit)\r\n return false;\r\n \r\n v = c.getValue();\r\n if(pile.isEmpty() && v == 12)\r\n return true;\r\n \r\n if(!pile.isEmpty())\r\n {\r\n card = pile.peek();\r\n val = card.getValue();\r\n if (val == 12)\r\n val = -1;\r\n if(v == (val+1))\r\n return true;\r\n }\r\n return false;\r\n }", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "public boolean rulesForAddingCard(Card card)\n\t{\n\t\treturn true;\n\t}", "public boolean takeCard(Card card) {\n if (this.numCards >= MAX_CARDS)\n return false;\n else {\n this.myCards[numCards] = new Card(card);\n this.numCards++;\n return true;\n }\n }", "public boolean checkPayment(int debt) {\n\t\tboolean couldSell = false;\t\n\t\tSystem.out.println(\"here\");\n\t\tcouldSell = checkSellHouses(debt);\n\t\tSystem.out.println(\"here\");\n\t\tSystem.out.println(getMoney());\n\t\tif(!couldSell) {\n\t\t\tArrayList<PropertyCard> soloCardsToMortgage = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\tif(!c.isInMortgage() && !isCollectionFull(c) && !checkCollection(this, c)) {\n\t\t\t\t\tsoloCardsToMortgage.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tArrayList<PropertyCard> almostCompleteCards = new ArrayList<>();\n\t\t\tfor(PropertyCard c: getCards()) {\n\t\t\t\t//still will not get full Collection and in Mortgage but will dodge already taken\n\t\t\t\tif(checkCollection(this, c)) {\n\t\t\t\t\talmostCompleteCards.add(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcouldSell = checkMortgageCards(soloCardsToMortgage, almostCompleteCards, debt);\n\t\t\tif(!couldSell) {\n\t\t\t\tcouldSell = chooseWhatToSell(soloCardsToMortgage, debt);\n\t\t\t\tif(!couldSell) {\n\t\t\t\t\tcouldSell = chooseWhatToSell(almostCompleteCards, debt);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn couldSell;\n\t}", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }", "@Override\n public boolean checkRequirement(PlayerContext playerContext) {\n int sumOfRightColourAndLevelCard = 0;\n for (DevelopmentCard developmentCard : playerContext.getAllDevelopmentCards()){\n if (developmentCard.getColour() == cardColour && developmentCard.getLevel() == cardLevel)\n sumOfRightColourAndLevelCard ++;\n }\n return sumOfRightColourAndLevelCard >= numberOfCards;\n }", "public boolean hit()\n\t{\n\t\taddCardToHand(new BlackJackCard());\n\t\treturn getHandValue() <= 21;\n\t}", "public boolean isValid() {\n\t\tif (this.size() != 5) return false;\n\t\tif (!((this.getCard(0).getSuit() == this.getCard(1).getSuit()) && (this.getCard(1).getSuit() == this.getCard(2).getSuit()) && (this.getCard(2).getSuit() == this.getCard(3).getSuit()) && (this.getCard(3).getSuit() == this.getCard(4).getSuit()))) return false;\n\t\t\n\t\tint[] cardsInHand= {this.getCard(0).getRank(), this.getCard(1).getRank(), this.getCard(2).getRank(), this.getCard(3).getRank(), this.getCard(4).getRank()};\n\t\t\n\t\tfor(int i=0;i<4;i++) {\n\t\t\tif (cardsInHand[i]==0) cardsInHand[i]=13;\n\t\t\telse if (cardsInHand[i]==1) cardsInHand[i]=14;\n\t\t}\n\t\t\n\t\tArrays.sort(cardsInHand);\n\t\tfor(int i=0;i<3;i++) {\n\t\t\tif(cardsInHand[i]!=cardsInHand[i+1]-1) return false;\n\t\t}\n\t\treturn true;\n\t}", "boolean takeCard(int playerIndex)\n {\n if (playerIndex < 0 || playerIndex > numPlayers - 1)\n return false;\n\n // Are there enough Cards?\n if (deck.getNumCards() <= 0)\n return false;\n\n return hand[playerIndex].takeCard(deck.dealCard());\n }", "@Override\n public boolean isBlackjack() {\n return ( (countCards()==2) && (higherScore()==21) );\n }", "public static boolean validateItemCardUsage(Model model, ItemCard card) {\n\n if (model.getCurrentPlayerReference().getCharacter() instanceof Alien) {\n return false;\n }\n\n Human player = (Human) model.getCurrentPlayerReference().getCharacter();\n if (card instanceof AdrenalineCard\n && player.getMaxAllowedMovement() == 2) {\n return false;\n }\n if (card instanceof AttackCard && player.isAttackAllowed()) {\n return false;\n }\n if (card instanceof SedativesCard && !player.hasToDrawSectorCard()) {\n return false;\n }\n Sector playerPosition = model.getMap().getSectors()\n .get(model.getCurrentPlayerReference().getLastPosition());\n if (card instanceof TeleportCard\n && playerPosition instanceof SpawnSector) {\n return false;\n }\n\n List<ItemCard> heldCards = model.getCurrentPlayerReference().getHand()\n .getHeldCards();\n for (ItemCard i : heldCards) {\n if ((card.getClass()).equals(i.getClass())) {\n heldCards.remove(i);\n return true;\n }\n }\n return false;\n\n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "public boolean isEmpty() {\n\t\treturn cards.size() <= 4;\n\t}", "public boolean checkSellCardToPlayer(Player player, PropertyCard card, boolean almostComplete, int timesTried) {\n\t\tint priceToSell = 0;\n\t\tif(almostComplete) {\n\t\t\tif(timesTried==0) {\n\t\t\t\tpriceToSell = card.getPrice()*2;\n\t\t\t}\n\t\t\telse if(timesTried==1){\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.5);\n\t\t\t}\n\t\t\telse if(timesTried==2) {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.25);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpriceToSell = card.getPrice();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(timesTried==0) {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.25);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice());\n\t\t\t}\n\t\t}\n\t\t\n\t\tint choice =-1;\n\t\tboolean soldCard = false;\n\t\tif(player.getType().equals(\"HumanPlayer\")) {\n\t\t\tchoice = JOptionPane.showConfirmDialog(null, player.getName() + \" do you want to buy \" + card.getName() + \" for \" +priceToSell);\n\t\t}\n\t\telse {\n\t\t\tchoice = checkBuyCardFromPlayer(player, card, priceToSell);\n\t\t}\n\t\tif(choice == JOptionPane.YES_OPTION) {\n\t\t\tsellCard(card, player, priceToSell);\n\t\t\tsoldCard = true;\n\t\t}\n\t\t//the player will ask only twice per player and only if they do not have toο much money so that they do not \n\t\t//take advantage of the AI\n\t\telse if((choice == JOptionPane.NO_OPTION) && (player.getMoney() <= (priceToSell*1.5)) && (timesTried<1) ) {\n\t\t\tsoldCard = checkSellCardToPlayer(player, card, almostComplete, timesTried+=1);\n\t\t\t \n\t\t}\n\n\t\treturn soldCard;\n\t}", "boolean haveGame(char suit){\n int suitNum = 0; // number of cards that follow suit\n for (int i=0; i<6; i++)\n if (hand.get(i).suit == suit)\n suitNum++;\n return (suitNum > 3);\n }", "public boolean buyCard(Supply s) {\r\n\t\tboolean wasBought;\r\n\t\tif(s.getQuantity() < 1 || contraband.contains(s.getTopCard())) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tCard c = s.getTopCard();\r\n\t\tbuying = true;\r\n\t\tbought.add(c);\r\n\t\tif(buys > 0 && treasure - c.getCost() >= 0 && c.canBeGained()\r\n\t\t\t\t&& (!c.costsPotion() || potion > 0)) {\r\n\t\t\ttreasure -= c.getCost();\r\n\t\t\tif(c.costsPotion()) potion--;\r\n\t\t\tbuys--;\r\n\t\t\ts.takeCard();\r\n\t\t\tdeck.gain(c);\r\n\t\t\tfor(int i = 0; i < s.getEmbargo(); i++) {\r\n\t\t\t\tbuying = false;\r\n\t\t\t\tdeck.gain(access.board.getCurse().takeCard());\r\n\t\t\t\tbuying = true;\r\n\t\t\t}\r\n\t\t\taccess.gamePhase = 2;\r\n\t\t\twasBought = true;\r\n\t\t\taccess.log(getPlayerName() + \" bought \" + c.getName());\r\n\t\t}\r\n\t\telse {\r\n\t\t\twasBought = false;\r\n\t\t\tbought.remove(bought.size() - 1);\r\n\t\t}\r\n\t\tif(buys < 1) {\r\n\t\t\taccess.gamePhase = 3;\r\n\t\t}\r\n\t\tbuying = false;\r\n\t\tnotifyObservers();\r\n\t\treturn wasBought;\r\n\t}", "public boolean hasBlackjack() {\n\t\treturn this.hand.countValue().lower(22) == 21;\n\t}", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "private boolean faceCard(ArrayList<Card> cards) {\r\n\t\tfor (Card card: cards) {\r\n\t\t\tif (card.getValue() >= 11 && card.getValue() <= 13) \r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean checkSellHouses(int debt) {\n\t\tArrayList<PropertyCard> cardsWithHouses = new ArrayList<>();\n\t\tfor(PropertyCard c: getCards()) {\n\t\t\tif(c.getHouses()>0) {\n\t\t\t\tcardsWithHouses.add(c);\n\t\t\t}\n\t\t}\n\t\tif(cardsWithHouses.size()>0) {\n\t\t\tPropertyCard mostExpensiveHouses = Collections.max(cardsWithHouses);\n\t\t\tif(debt>=mostExpensiveHouses.getHousePrice()) {\n\t\t\t\tCollections.sort(cardsWithHouses, Collections.reverseOrder());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCollections.sort(cardsWithHouses);\n\t\t\t}\n\t\t\twhile(getMoney()<debt) {\n\t\t\t\tfor(PropertyCard c: cardsWithHouses) {\n\t\t\t\t\t\tsellHouse(c);\n\t\t\t\t\t\tif(c.getHouses() == 0) {\n\t\t\t\t\t\t\tcardsWithHouses.remove(c);\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(getMoney()>=debt) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "protected boolean isValidDeck(List<Card> deck) {\n if (deck.size() != 52) { // Deck must be 52 cards\n return false;\n }\n\n Set<Card> cards = new HashSet<Card>();\n cards.addAll(deck);\n return (cards.size() == 52);\n\n }", "public boolean addCard(Card card)\n {\n if (numOccurrences(card) >= numPacks)\n return false;\n\n cards[topCard++] = card;\n return true;\n }", "public boolean isValid() {\n\t\tif (this.size()!=5) {\n\t\t\treturn false;\n\t\t}\n\t\tthis.sort();\n\t\tif (this.getCard(2).getRank()==this.getCard(0).getRank() && this.getCard(3).getRank()==this.getCard(4).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (this.getCard(2).getRank()==this.getCard(4).getRank() && this.getCard(1).getRank()==this.getCard(0).getRank()) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private static boolean handOutCards(Player player){\r\n\t\t/* \r\n\t\t * Seleccionamos una de las cartas restantes\r\n\t\t * en la baraja de forma aleatoria y se la \r\n\t\t * pasamos a la mano del jugador\r\n\t\t */\r\n\t\tint index;\r\n\r\n\t\t// Comprobamos las cartas restantes en la baraja\r\n\t\tif(deckOfCards.size() <= 0 || deckOfCards == null){\r\n\t\t\tSystem.err.println(\"No hay cartas para repartir.\");\r\n\t\t\treturn false;\r\n\t\t}else{\r\n\t\t\t// Seleccionamos una de las cartas de la baraja\r\n\t\t\tindex = (int) (Math.random()*deckOfCards.size());\r\n\t\t\tplayer.addCard(deckOfCards.get(index)); // Agregamos la carta a la mano del jugador\r\n\t\t\t// Eliminamos la carta de la baraja y lo mostramos en la consola\r\n\t\t\tSystem.out.println(player.getName() + \" recibió una carta con valor de \" + deckOfCards.remove(index).getValue() + \" puntos\"); \r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean canProtectPieces() {\r\n\t\treturn (cityCards.stream().anyMatch(c -> (c.isSmallGods() && !c.isDisabled())\r\n\t\t\t\t&& money >= PROTECTION_COST)); \r\n\t}", "private boolean canChooseDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof Draw2Card) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "public boolean hasBust() {\n\t\treturn this.hand.countValue().first() > 21;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "public boolean isValid() {\r\n\t\tif (this.size() == 5) {\r\n\t\t\tthis.sort();\r\n\t\t\tif ((this.getCard(0).getRank() == this.getCard(1).getRank()) && (this.getCard(0).getRank() == this.getCard(2).getRank()) && (this.getCard(0).getRank() == this.getCard(3).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if ((this.getCard(1).getRank() == this.getCard(2).getRank()) && (this.getCard(1).getRank() == this.getCard(3).getRank()) && (this.getCard(1).getRank() == this.getCard(4).getRank())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static boolean checkSequence(String cards){\r\n //split all the cards and store in card array\r\n String[] cardArray = cards.split(\",\");\r\n //convert card array into card object arrayList\r\n ArrayList<Card> cardList = new ArrayList<Card>();\r\n int numCards = cardArray.length;\r\n //if there is less than 3 cards eliminate deck\r\n if(numCards < 3) return false;\r\n //store suit and face value in card object\r\n for(int i=0;i<numCards;i++){\r\n Card c = new Card(cardArray[i].split(\"#\")[0].trim(),cardArray[i].split(\"#\")[1].trim());\r\n cardList.add(c);\r\n }\r\n int i=0;\r\n String cardSuit=\"\",nextCardSuit=\"\";\r\n int cardValue=-1,nextCardValue=-1,prevCardValue = -1;\r\n \r\n //loop till penultimate card\r\n for(i=0; i<numCards-1 ;i++){ \r\n \r\n cardValue = cardList.get(i).value;\r\n nextCardValue = cardList.get(i+1).value;\r\n cardSuit = cardList.get(i).suit;\r\n nextCardSuit = cardList.get(i+1).suit;\r\n \r\n //suit check\r\n if(!cardSuit.equals(nextCardSuit)) return false;\r\n \r\n //card check\r\n if(cardValue != nextCardValue-1){\r\n \r\n //exception only for queen followed by king followed by ace\r\n if(!(prevCardValue==11 && cardValue == 12 && nextCardValue ==0)){\r\n return false;\r\n }\r\n }\r\n //execption for king followed by ace followed by 2\r\n if(prevCardValue == 12 && cardValue == 0 && nextCardValue==1) return false;\r\n prevCardValue = cardValue;\r\n }\r\n \r\n return true;\r\n }", "public int remaining() {\r\n\t\treturn cards.size();\r\n\t}", "public boolean isApplicable(DevelopmentCard card) {\n\t\treturn (this.familyMember.getActionValue()\n\t\t\t\t+ this.getPlayer().getBonuses().getActivationVariation(card.getCardType())\n\t\t\t\t+ paidServants >= card.getActivationCost());\n\t}", "private boolean tieForCards(Card[] cards) {\n int largest = largestCard(cards);\n\n int count = 0;\n\n for (Card card : cards) {\n if (card.getDenomination() == cards[largest].getDenomination())\n count++;\n }\n\n return count > 1;\n }", "public boolean buyCard ( DevCard cardToBuy) {\n for(int i=0;i<4;i++){\n for(int j=0; j<3;j++){\n if(!devDecksOnTable[i][j].littleDevDeck.isEmpty())\n if((devDecksOnTable[i][j].littleDevDeck.get(0)).equals(cardToBuy)){\n devDecksOnTable[i][j].littleDevDeck.remove(0);\n return true;\n }\n }\n }\n return false;\n }", "boolean canCharge(ItemStack stack);", "private boolean offerCard(Player p) {\n\n //Offer card (take or pass)\n p.sendMessage(\"TAKE OR PASS\");\n\n //Wait until they take the card\n waitForPlayerAction(p, \"TAKE\", \"PASS\");\n\n if(actionChosen.equals(\"TAKE\")) {\n\n giveCard(p);\n return true;\n\n } else if(actionChosen.equals(\"PASS\")) {\n //Don't give card\n\n cList.sendToAll(\"Player \" + p.getUsername() + \" passes\");\n return false;\n }\n\n return false;\n }", "private boolean checkStock(){\n int i;\n int inventorySize = inventory.size();\n int count = 0;\n for(i = 0; i < inventorySize; i++){\n count = count + inventory.get(i).getStock();\n\n }\n //System.out.println(\"Count was: \" + count);\n if(count < 1){\n return false;\n }else{\n return true;\n }\n }", "public boolean isSomethingBuyable(GameClient game){\n for(Level l : Level.values()){\n for(ColorDevCard c : ColorDevCard.values()){\n try {\n NumberOfResources cost = dashBoard[l.ordinal()][c.ordinal()].getCost();\n cost = cost.safe_sub(game.getMe().getDiscounted());\n game.getMe().getDepots().getResources().sub(cost);\n return true;\n } catch (OutOfResourcesException | NullPointerException ignored) {}\n }\n }\n return false;\n }", "protected boolean hasFaceDownCard(int playerNo, int cardIndex) {\n return carddowncount[playerNo] >= (3 - cardIndex);\n }", "public Boolean isValidCountWildCard() {\r\n\t\tint count = 0;\r\n\t\tfor (RiskCardModel card : lstTradedCards) {\r\n\t\t\tif (card.card_type.equals(\"WILD\")) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (count > 1 ? false : true);\r\n\t}", "public boolean legalMove(Card last, Card current) {\n // check if a card has been wished for\n if (current.getRank() == CardRank.JACK) {\n return true;\n }\n\n // check if a player has satisfied another's card wish\n if (last.getRank() == CardRank.JACK && current.getSuite() == wishedSuite) {\n additionalCards = 0;\n return true;\n }\n\n // Seven may always be allowed\n System.out.println(additionalCards);\n if (additionalCards > 0){\n return current.getRank() == CardRank.SEVEN;\n }\n\n return last.compareTo(current) == 0;\n }", "public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}", "public boolean canGrabWeapon(CardWeapon cw){\n List<Color> priceTmp;\n if(cw.getPrice().size()>1) {\n priceTmp = new ArrayList<>(cw.getPrice().subList(1, cw.getPrice().size()));\n return controlPayment(priceTmp);\n }\n else\n return true;\n }", "public boolean playCard(Cards card, Players player) {\n boolean higher = false;\n int compare = 0;\n if (playedCards.size() == 0 || this.playAgain(player)) { //to check if it is a new game or this is a new round\n if (card instanceof TrumpCards) { //to check if the first played card is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n }\n higher = true;\n } else {\n if (card instanceof NormCards) { //to check if the played card is a normal card\n if (getLastCard() instanceof NormCards) { //to check whether the last played card is a normal card or a supertrump card\n if (category.equals(\"H\")) {\n Float now = new Float(((NormCards) card).getHardness());\n Float last = new Float(((NormCards) getLastCard()).getHardness());\n compare = now.compareTo(last);\n } else if (category.equals(\"S\")) {\n Float now = new Float(((NormCards) card).getSpecGravity());\n Float last = new Float(((NormCards) getLastCard()).getSpecGravity());\n compare = now.compareTo(last);\n } else if (category.equals(\"C\")) {\n Float now = new Float(((NormCards) card).getCleavageValue());\n Float last = new Float(((NormCards) getLastCard()).getCleavageValue());\n compare = now.compareTo(last);\n } else if (category.equals(\"CA\")) {\n Float now = new Float(((NormCards) card).getCrustalAbunVal());\n Float last = new Float(((NormCards) getLastCard()).getCrustalAbunVal());\n compare = now.compareTo(last);\n } else if (category.equals(\"EV\")) {\n Float now = new Float(((NormCards) card).getEcoValueValue());\n Float last = new Float(((NormCards) getLastCard()).getEcoValueValue());\n compare = now.compareTo(last);\n\n }\n if (compare > 0) {\n higher = true;\n } else {\n System.out.println(\"The selected card does not has higher value!\");\n }\n } else { //or else, the last played card is a supertrump card\n higher = true;\n }\n } else { //or else, the played is a supertrump card\n setCategory(((TrumpCards) card).cardEffect());\n higher = true;\n }\n }\n return higher;\n }", "public boolean checkBlackJack() {\r\n if(cards.size() == 2 && score() == 21){\r\n blackJack = true;\r\n over = true;\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "public boolean isPickItUp(int playerID, Card discard){\n if(turn == playerID && gameStage == 1 && dealer == playerID){\n currentTrumpSuit = middleCardSuit;\n // make dealer discard a card and give them the middle card\n if(dealer == 0){\n //discard card that player taps\n if(player1Hand.get(0) == discard){\n player1Hand.remove(0);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(1) == discard){\n player1Hand.remove(1);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(2) == discard){\n player1Hand.remove(2);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(3) == discard){\n player1Hand.remove(3);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n else if(player1Hand.get(4) == discard){\n player1Hand.remove(4);\n player1Hand.add(middleCard);\n turn++;\n gameStage = 3;\n }\n }\n }\n return false;\n }", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n public boolean canUseCard(){\n return false;\n }", "public boolean isDone(){\n\t\tif(generated)\n\t\t\treturn curr >= deck.size();\n\t\treturn true;\n\t}", "public boolean enoughSpaceToBuy(Player p, int numGoods) {\n // check size of cargoArr\n return numGoods <= p.getShip().numOpenSlots();\n }", "protected abstract boolean isCardActivatable(Card card);", "private static boolean checkIfNeedMore(int[] costToPayToCheck){\n boolean result = false;\n List<PowerUpLM> copyOfPowerUpLMList = copyOf(tmpAmmoInPowerUp);\n\n if(costToPayToCheck[GeneralInfo.RED_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.RED))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.BLUE_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if (power.getGainAmmoColor().equals(AmmoType.BLUE))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n if(costToPayToCheck[GeneralInfo.YELLOW_ROOM_ID] > 0){\n result = true;\n }\n else{\n tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] = 0;\n for(PowerUpLM power: copyOfPowerUpLMList){\n if(power.getGainAmmoColor().equals(AmmoType.YELLOW))\n tmpAmmoInPowerUp.remove(power);\n }\n }\n\n return result;\n }", "public boolean CheckForBlackjack(Player player) {\n\n if (CalcHandSum(player, player.getHand()) == 21 && player.hasAnAce(player.getHand())) {\n return true;\n }\n else{\n return false;\n }\n }", "public boolean hasFlush(ArrayList<Card>cards) {\r\n\t\tCollections.sort(cards);\r\n\t\tfor(int i = 0; i < 4 ; i++) {\r\n\t\t\tif(cards.get(i).getSuit() != cards.get(i+1).getSuit()) {\r\n\t\t\t\treturn false; \r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true; \r\n\t}", "public void dealerTurn() {\r\n boolean dealerContinue = false;\r\n do {\r\n for (int i = 0; i < this.getPlayers().size(); i++) {\r\n BlackjackPlayer player = (BlackjackPlayer) this.getPlayers().get(i);\r\n if (this.getHand().addCards() < player.getHand().addCards() && this.getHand().addCards() < 21 && player.getHand().addCards() <= 21) {\r\n dealerContinue = true;\r\n break;\r\n } else if (this.getHand().addCards() >= player.getHand().addCards() || this.getHand().addCards() == 21) {\r\n dealerContinue = false;\r\n }\r\n }\r\n if (dealerContinue == true) {\r\n addDealerCard();\r\n System.out.println(\"Dealer has: \" + this.getHand().toString());\r\n System.out.println(\"Card Score: \" + this.getHand().addCards());\r\n System.out.println(\"\");\r\n }\r\n } while(dealerContinue == true && this.getHand().addCards() < 21);\r\n }", "@Test\r\n public void testHasAtLeastTwoPlayableCards() {\n Player player2 = new Player(\"Three Playable Cards Test\", true);\r\n Hand threePlayableCardsHand = strategyHand;\r\n player2.setHand(threePlayableCardsHand.getAllCards());\r\n\r\n // Make it harder to find playable cards:\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD, cvm));\r\n player2.getHand().discard(new Card(Card.COLORLESS, Card.WILD_DRAW_FOUR, cvm));\r\n\r\n Card currentPlayedCard_1 = new Card(Card.YELLOW, Card.ONE, cvm);\r\n assertTrue(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_1, Card.BLUE));\r\n\r\n Card currentPlayedCard_2 = new Card(Card.BLUE, Card.SEVEN, cvm);\r\n assertFalse(player2.hasAtLeastTwoPlayableCards(currentPlayedCard_2, Card.BLUE));\r\n }", "public boolean cardsDealt(int players){\n\t\tif(deck.size()==0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\n\t\t//TODO:\n\t\t//Implement for a variable # of players\n\t}", "private boolean canChooseWildDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof WildDrawCard) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }", "public static boolean shouldHit(List<Card> hand) {\n\t\tif (getHandTotalCountAceAsOne(hand) >= 17 || getHandTotalCountAceAsEleven(hand) >=17)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "protected final void hit() throws InsufficientCardsException {\n hand.add(deck.deal());\n update();\n }", "private boolean isValidCard(int index)\n {\n if (index >= cards.size() || index < 0)\n return false;\n \n for (int i = index; i < cards.size() - 1; i++)\n if (!isDifferentColor(cards.get(i), cards.get(i + 1)) ||\n !isOneLess(cards.get(i + 1), cards.get(i)))\n return false;\n\n return true;\n }", "@Override\n public boolean isEffectOnCardPrevented(PhysicalCard card) {\n return _preventedCards.contains(card);\n }", "public static boolean dcheck() {\n if ((card[0][0] == 0 && card[1][1] == 0 && card[2][2] == 0 && card[3][3] == 0 && card[4][4] == 0) || (card[0][4] == 0 && card[1][3] == 0 && card[2][2] == 0 && card[3][1] == 0 && card[4][0] == 0)) {\n System.out.println(\"BINGO\");\n System.out.println(\"The numbers called is \" + called);\n return true;\n } else {\n return false;\n }\n }", "boolean CanBuyDevCard();", "@Test\n\tpublic void testCheckSufficientCredits_False() {\n\n\t\tint creditsRequired = 11;\n\n\t\tboolean sufficientCredits = smsBillingImpl.checkSufficientCredits(\n\t\t\t\taccount.getId(), creditsRequired);\n\t\tAssert.assertFalse(\"Expected insufficient credit\", sufficientCredits);\n\t}", "boolean CanDiscardCards(Resources resources);", "public Boolean balanced() {\r\n\t\tif(allocated() > getAmount()) {\r\n\t\t\treturn false;\r\n\t\t}else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public int canBuy(SimpleResList cardCost) {\r\n\t\tint totalNeeded = cardCost.getTotalRes();\r\n\t\tint numLeft = totalNeeded;\r\n\r\n\t\tif ((numLeft = cardCost.subtract(resList)) == 0)\r\n\t\t\treturn totalNeeded;\r\n\r\n\t\tArrayList<SimpleResList> copySellOrList = new ArrayList<SimpleResList>(\r\n\t\t\t\tsellOrList);\r\n\r\n\t\tboolean listChanged = true;\r\n\t\tint numMatch;\r\n\t\twhile (listChanged) {\r\n\t\t\tlistChanged = false;\r\n\t\t\tfor (SimpleResList srl : copySellOrList) {\r\n\t\t\t\tnumMatch = srl.findNumMatches(cardCost);\r\n\t\t\t\tif (numMatch == 0) {\r\n\t\t\t\t\tcopySellOrList.remove(srl);\r\n\t\t\t\t\tlistChanged = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (numMatch == 1) {\r\n\t\t\t\t\t// int dif = cardCost.getTotalRes();\r\n\t\t\t\t\tnumLeft = cardCost.subtract(srl);\r\n\t\t\t\t\tcopySellOrList.remove(srl);\r\n\t\t\t\t\tlistChanged = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (cardCost.getTotalRes() == 0\r\n\t\t\t\t\t|| cardCost.getTotalRes() <= copySellOrList.size()) {\r\n\t\t\t\treturn totalNeeded;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn totalNeeded - numLeft;\r\n\t}", "private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}", "@Test\n public void testDealerRefusesWhenOutOfCards() {\n }", "public boolean check(ArrayList<Card> cards){\n int val = cards.get(0).getVal();\n if(val == 2 || val == 10)\n return true;\n //sevens are special\n if(topCardVal() == 7)\n return (topCardVal() >= val);\n return (topCardVal() <= val);\n }", "public boolean checkIfPlayerHoldsExplosive () { return noOfExplosives > 0; }" ]
[ "0.75573266", "0.7481898", "0.7202886", "0.7190288", "0.70812535", "0.6978233", "0.69710004", "0.69201803", "0.6900068", "0.68933094", "0.686829", "0.6863743", "0.6854314", "0.6838392", "0.6802944", "0.67970246", "0.67781883", "0.676518", "0.67414284", "0.67396975", "0.6726698", "0.67189527", "0.6705711", "0.6692516", "0.6653735", "0.66508865", "0.66478", "0.6640597", "0.6629236", "0.6620401", "0.66165173", "0.65854895", "0.657907", "0.6567472", "0.65508294", "0.6542276", "0.6530666", "0.65228164", "0.6495934", "0.64911294", "0.6490042", "0.64897054", "0.6482551", "0.647934", "0.64787173", "0.64759874", "0.6473661", "0.6473246", "0.64605844", "0.6456086", "0.6453966", "0.6430408", "0.64236975", "0.6409922", "0.6402734", "0.6402734", "0.63996965", "0.63895035", "0.6374761", "0.6373932", "0.63408864", "0.633848", "0.63358384", "0.6334972", "0.63280934", "0.63274366", "0.6320894", "0.6314134", "0.6312695", "0.631141", "0.6309847", "0.63006", "0.6298494", "0.6290649", "0.62853074", "0.628067", "0.6270174", "0.6267122", "0.62651175", "0.62599194", "0.62529373", "0.62508947", "0.62444896", "0.623802", "0.62276334", "0.62194073", "0.62192506", "0.6211576", "0.6196734", "0.6195268", "0.61919117", "0.6178516", "0.61625904", "0.61624426", "0.61579376", "0.6156571", "0.61434036", "0.61416006", "0.6140863", "0.6139312" ]
0.72341585
2
Adds an event listener allowing to control using the includeExisting if events will be fired for existing space instances as well.
void add(SpaceInstanceAddedEventListener eventListener, boolean includeExisting);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void remove(SpaceInstanceAddedEventListener eventListener);", "public void addScopeRegistrationListener(ScopeEventListener listener);", "public void addGameEventListener(GameEventListener gameEventListener);", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}", "public interface SpaceNavigatorListener {\n\t/** Processes a polled event from the space navigator */\n\tpublic void processSpaceNavEvent();\n\tpublic void processSpaceNavEvent(SpaceNavigatorEvent e);\n}", "private void addNewMember(Event x) {\r\n \r\n \r\n \r\n }", "protected void registerListener() {\r\n\t\t// do nothing\r\n\t}", "@Override\n\tpublic void registerEventListener(IHFModuleEventListener li) {\n\t\tLog.d(\"HFModuleManager\", \"registerEventListener\");\n\t\tthis.eventListenerList.remove(li);\n\t\tthis.eventListenerList.add(li);\n\t}", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "@Override\n\tpublic void addGameEventListener(GameEventListener listener) throws RemoteException {\n\t\t\n\t}", "public abstract void addListener(EventListener eventListener, String componentName);", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvPEC(Event ev);", "public void addEvent(Event event) {\n\t\t\n\t}", "void addListener( AvailabilityListener listener );", "public void addListener(EventListener listener);", "private void apply(ShipArrived event) {\n }", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "@Override\n public Event add(Ec2LaunchConfiguration newResource) {\n return null;\n }", "void addListener(GameEventListener listener);", "@Override\n\tpublic synchronized void registerEventListeners() {\n\t\tif (eventListeners != null) // already called\n\t\t\treturn;\n\t\teventListeners = EventListenerManagers.wrap(this);\n\t\tSelectionUpdateListener selectionUpdateListener = new SelectionUpdateListener();\n\t\tselectionUpdateListener.setHandler(this);\n\t\teventListeners.register(SelectionUpdateEvent.class, selectionUpdateListener);\n\n\t\tSelectionCommandListener selectionCommandListener = new SelectionCommandListener();\n\t\tselectionCommandListener.setHandler(this);\n\t\t// selectionCommandListener.setDataDomainID(dataDomain.getDataDomainID());\n\t\teventListeners.register(SelectionCommandEvent.class, selectionCommandListener);\n\n\t\tsuper.registerEventListeners();\n\n\n\t}", "public void addGameListener(GameListener listener){\r\n super.addGameListener(listener);\r\n\r\n if (listenerList.getListenerCount(GameListener.class) == 1){\r\n setDGState(Datagram.DG_MY_GAME_STARTED, true);\r\n setDGState(Datagram.DG_STARTED_OBSERVING, true);\r\n setDGState(Datagram.DG_ISOLATED_BOARD, true);\r\n setDGState(Datagram.DG_MY_GAME_CHANGE, true);\r\n setDGState(Datagram.DG_MY_GAME_RESULT, true);\r\n setDGState(Datagram.DG_POSITION_BEGIN, true);\r\n setDGState(Datagram.DG_MY_RELATION_TO_GAME, true);\r\n setDGState(Datagram.DG_SEND_MOVES, true);\r\n setDGState(Datagram.DG_MOVE_SMITH, true);\r\n setDGState(Datagram.DG_MOVE_ALGEBRAIC, true);\r\n setDGState(Datagram.DG_IS_VARIATION, true);\r\n setDGState(Datagram.DG_BACKWARD, true);\r\n setDGState(Datagram.DG_TAKEBACK, true);\r\n setDGState(Datagram.DG_ILLEGAL_MOVE, true);\r\n setDGState(Datagram.DG_MSEC, true);\r\n setDGState(Datagram.DG_MORETIME, true);\r\n setDGState(Datagram.DG_FLIP, true);\r\n setDGState(Datagram.DG_KNOWS_FISCHER_RANDOM, true);\r\n setDGState(Datagram.DG_ARROW, true);\r\n setDGState(Datagram.DG_CIRCLE, true);\r\n source.setStyle(13);\r\n }\r\n }", "@Override\n public void addListener(DisplayEventListener listener) {\n listenerList.add(DisplayEventListener.class, listener);\n }", "public void add(GameEvent e);", "protected void addEventListeners()\n {\n // Add them to the contents.\n InteractionFigure interactionLayer =\n view.getEditor().getInteractionFigure();\n\n // let mouseState handle delete key events\n interactionLayer.addKeyListener(mouseState);\n getShell().addShellListener(new ShellAdapter() {\n @Override\n public void shellDeactivated(ShellEvent e)\n {\n mouseState.cancelDynamicOperation();\n }\n });\n }", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void addEventListener(EventListener listener){\n listenerList.add(EventListener.class, listener);\n }", "public void onAdd(TimelineAddEvent e) {\n\t\tevent = new TimelineEvent(new Booking(), e.getStartDate(), e.getEndDate(), true, e.getGroup());\n\n\t\t// add the new event to the model in case if user will close or cancel the \"Add dialog\"\n\t\t// without to update details of the new event. Note: the event is already added in UI.\n\t\tmodel.add(event);\n\t}", "@Override\n\tpublic void addTrigger() {\n\t\tthis.listener = new ObjectListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onEvent(ObjectEvent event) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\tRankTempInfo rankInfo = RankServerManager.getInstance().getRankTempInfo(player.getPlayerId());\n\t\t\t\tif(rankInfo!=null){\n\t\t\t\t\tgetTask().updateProcess((int)rankInfo.getSoul());\n\t\t\t\t}\n\t\t\n\t\t\t\t\n\t\t\t}\n\t\t};\n\t\tplayer.addListener(this.listener, EventNameType.SOUL_FIGHT);\n\t}", "abstract public void addListener(Listener listener);", "@Test\n public void testAddEventListener() {\n List<SimulatorEventListener> eventListeners = eventDispatcher.getSimulatorEventListeners();\n assertTrue(eventListeners.size() == 0);\n SimulatorEventListener listener = new SimulatorEventListener() {\n\n\n public void onNewMessage(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onMatchingScenario(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseBuilt(Exchange exchange, Conversation conversation) {\n\n }\n\n public void onResponseSent(Exchange exchange, Conversation conversation) {\n\n }\n };\n eventDispatcher.addSimulatorEventListener(listener);\n assertTrue(eventListeners.size() == 1);\n }", "@Override\n\tpublic boolean addInstanceListener(\n\t\t\tfinal InstanceTaxonomy.Listener<T, I> listener) {\n\t\treturn true;\n\t}", "void onNewEvent(Event event);", "public void addGameListListener(GameListListener listener){\r\n super.addGameListListener(listener);\r\n\r\n if (listenerList.getListenerCount(GameListListener.class)==1){\r\n setDGState(Datagram.DG_GAMELIST_BEGIN, true);\r\n setDGState(Datagram.DG_GAMELIST_ITEM, true);\r\n }\r\n }", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}", "public synchronized void addEventListener(InputListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void addKernelEventListener( KernelEventListener listener )\n {\n m_state.addKernelEventListener( listener );\n }", "private static void registerEventListener() {\r\n\r\n log.info(\"Registering event listener for Listeners\"); //$NON-NLS-1$\r\n\r\n try {\r\n ObservationManager observationManager = ContentRepository\r\n .getHierarchyManager(ContentRepository.CONFIG)\r\n .getWorkspace()\r\n .getObservationManager();\r\n\r\n observationManager.addEventListener(new EventListener() {\r\n\r\n public void onEvent(EventIterator iterator) {\r\n // reload everything\r\n reload();\r\n }\r\n }, Event.NODE_ADDED\r\n | Event.NODE_REMOVED\r\n | Event.PROPERTY_ADDED\r\n | Event.PROPERTY_CHANGED\r\n | Event.PROPERTY_REMOVED, \"/\" + CONFIG_PAGE + \"/\" + \"IPConfig\", true, null, null, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n }\r\n catch (RepositoryException e) {\r\n log.error(\"Unable to add event listeners for Listeners\", e); //$NON-NLS-1$\r\n }\r\n }", "public void addVectorListener(VOIVectorListener listener) {\r\n\r\n if (listenerList == null) {\r\n listenerList = new EventListenerList();\r\n }\r\n\r\n if (listener == null) {\r\n throw new IllegalArgumentException(\"listener is null\");\r\n }\r\n \r\n \r\n if (listenerList.getListenerCount(VOIVectorListener.class) == 0)\r\n {\r\n listenerList.add(VOIVectorListener.class, listener);\r\n return;\r\n } \r\n // Guaranteed to return a non-null array\r\n Object[] listeners = listenerList.getListenerList();\r\n // Process the listeners last to first, notifying\r\n // those that are interested in this event\r\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\r\n if (listeners[i] == VOIVectorListener.class && \r\n ((VOIVectorListener) listeners[i + 1]) == listener) {\r\n return;\r\n }\r\n }\r\n listenerList.add(VOIVectorListener.class, listener);\r\n }", "@Override\n\tpublic boolean addInstanceListener(final NodeStore.Listener<I> listener) {\n\t\treturn true;\n\t}", "public void addHitListener(HitListener hl) {\nthis.hitListeners.add(hl);\n}", "public final void include(RuntimeEnv env, RuntimeStack stack, Scope3007 scope)\n throws IncludeEventException {\n env.addManualClassLoad(\"Swift_Events_EventListener\");\n }", "public void addIdListener(CardListener listener){\n\t//\tiDListen = listener;\n\t}", "public void add(InputChangedListener listener)\r\n {\r\n\r\n }", "public void addReadyListener(ComponentSystemEventListener listener) {\n listeners.add(listener);\n }", "public interface IOnVenueAddedListener {\n\n void onVenueAdded(Venue venue);\n}", "public synchronized void addWindowListener(WindowListener l) {\n windowListener = AWTEventMulticaster.add(windowListener, l);\n newEventsOnly = true;\n }", "public void addEvent(Event e){\r\n\t\tallEvents.add(e);\r\n\t}", "public static void addApplicationListener (I_ApplicationListener aApplicationListener)\n\t{\n\t\tif (!applicationListeners.contains (aApplicationListener))\n\t\t{\n\t\t\tapplicationListeners.addElement (aApplicationListener);\n\t\t\trebuildApplicationListeners = true;\n\t\t}\n\t}", "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "public interface ApplicationListener extends EventListener {\n\n /**\n * Handle an application event\n *\n * @param e event to respond to\n */\n void onApplicationEvent(ApplicationEvent e);\n\n}", "public void add(InputChangedListener listener)\r\n\t{\r\n\r\n\t}", "<T extends EventDetector> void addEventDetector(T detector);", "public void addListener(ComponentListener listener){\n mouseOverArea.addListener(listener);\n }", "void setAddListener(AddNeededCollaborationListener addNeededCollaborationListener);", "@Override\n\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\tString name=nameField.getText();\n\t\t\tString occupation=occupationField.getText();\n\t\t\t\n\t\t\tFormEvent eve= new FormEvent(this,name,occupation);\n\t\t\t//lista.add(eve);\n\t\t\t\n\t\t\t//if(formListener!=null){\n\t\t\t\t//formListener.formEventOcurred(eve);\n\t\t\t//}\n\t\t\t\n\t\t\tif(formListener!=null){\n\t\t\t\tformListener.formEventOcurred(eve);\n\t\t\t}\n\t\t\t\n\t\t}", "@Override\n public void onApplicationEvent(ApplicationEvent event) {\n if (event instanceof ContextLoadedEvent) {\n //JD: look up GeoServer and register now rather than use constructor injection\n // to avoid circular dependency during service loading startup\n geoServer = GeoServerExtensions.bean(GeoServer.class, \n ((ContextLoadedEvent) event).getApplicationContext());\n listener = new ConfigurationListenerAdapter() {\n @Override\n public void handleServiceChange(ServiceInfo service, List<String> propertyNames, \n List<Object> oldValues, List<Object> newValues) {\n if (service instanceof WPSInfo) {\n resetProcessMappings();\n }\n }\n };\n geoServer.addListener(listener);\n }\n if (event instanceof ContextRefreshedEvent) {\n Processors.addProcessFactory(this);\n } else if (event instanceof ContextClosedEvent) {\n Processors.removeProcessFactory(this);\n }\n }", "public void addSelectionListener( SelectionListener listener ) {\n checkWidget();\n if ( listener == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n // TypedListener typedListener = new TypedListener (listener);\n // addListener (SWT.Selection,typedListener);\n // addListener (SWT.DefaultSelection,typedListener);\n if ( selectionListeners == null ) {\n selectionListeners = new ArrayList();\n }\n selectionListeners.add( listener );\n \n }", "private void registerListener(){\n game.addPropertyChangeListener(PROPERTY_GAME, evt -> {\r\n refresh();\r\n });\r\n }", "@Override\r\n\t\t\t\t\tpublic void addItemEventOccurred(AddItemEvent event) {\n\r\n\t\t\t\t\t}", "void addEventRegistrationCallback(EventRegistrationCallback eventRegistrationCallback);", "void addPresenceEvent(Presence presence)\n {\n storedPresences.add(presence);\n }", "public void addAnotherGame(ChangeListener listener){\n m_addAnotherGame.add(listener);\n }", "public void maybeAdd(Object listener) {\n if (type.isInstance(listener)) {\n add(type.cast(listener));\n }\n }", "public void addVectorListener(final VectorDisplayListener aListener) {\r\n\t\tvectorListeners.add(aListener);\r\n\t}", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "void addHitListener(HitListener hl);", "public void addListener(AwaleListener awaleListener) {\r\n\tthis.listeners.add(awaleListener);\r\n }", "@Override\n public void addedResource( ResourceEvent event )\n {\n }", "@Override\n public void addListener(Class<? extends EventListener> listenerClass) {\n\n }", "@EventName(\"targetCreated\")\n EventListener onTargetCreated(EventHandler<TargetCreated> eventListener);", "private void registerEvents() {\n createRoomBTN.addActionListener(actionEvent -> {\n chatController.createRoom(roomNameIF.getText());\n roomNameIF.setText(\"\");\n });\n\n backBTN.addActionListener(actionEvent -> {\n if (chatController.getJoinedRooms().size() > 0) chatView.renderChatPanel();\n });\n }", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "public void addDirectorToHmiEventListener( DirectorToHmiEventListener listener );", "@Override //to be moved to Cloud service\r\n\tpublic void createEvent(String eventName) {\n\t\t\r\n\t}", "static //@Override\n\tpublic void addListener(final Listener listener) {\n\t\tif (null == stListeners) {\n\t\t\tstListeners = new LinkedList<>();\n\t\t}\n\t\tstListeners.add(listener);\n\t}", "public void addONDEXListener(ONDEXListener l) {\n listeners.add(l);\n }", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "public void processSpaceNavEvent();", "default void addListener(Runnable listener) {\n\t\tthis.getItemListeners().add(listener);\n\t}", "private void addEventListener(IEventListener<T> listener) {\n\t\t\tevent.addEventListener(listener);\n\t\t}", "@Override\n\tpublic void onApplicationEvent(final ContextRefreshedEvent event) {\n\t\ttry {\n\t\t\tQueryService localQueryService = getQueryService(event);\n\n\t\t\tif (localQueryService != null) {\n\t\t\t\tlocalQueryService.createDefinedIndexes();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ignore) {\n\t\t\tlogger.warn(String.format(\"unable to create defined Indexes (if any): %1$s\", ignore.getMessage()));\n\t\t}\n\t}", "protected boolean shouldAddDisplayListener() {\n return true;\n }", "public int addListener(Value listener) {\n\n IApplication adapter = new IApplication() {\n private boolean execute(Value jsObject, String memberName, Object... args) {\n if (jsObject == null)\n return true;\n Value member = jsObject.getMember(memberName);\n if (member == null) {\n return true;\n }\n Value result = plugin.executeInContext(member, app);\n return result != null && result.isBoolean() ? result.asBoolean() : true;\n }\n\n @Override\n public boolean appStart(IScope app) {\n return execute(listener, \"appStart\", app);\n }\n\n @Override\n public boolean appConnect(IConnection conn, Object[] params) {\n return execute(listener, \"appConnect\", conn, params);\n }\n\n @Override\n public boolean appJoin(IClient client, IScope app) {\n return execute(listener, \"appJoin\", client, app);\n }\n\n @Override\n public void appDisconnect(IConnection conn) {\n execute(listener, \"appDisconnect\", conn);\n }\n\n @Override\n public void appLeave(IClient client, IScope app) {\n execute(listener, \"appLeave\", client, app);\n }\n\n @Override\n public void appStop(IScope app) {\n execute(listener, \"appStop\", app);\n }\n\n @Override\n public boolean roomStart(IScope room) {\n return execute(listener, \"roomStart\", room);\n }\n\n @Override\n public boolean roomConnect(IConnection conn, Object[] params) {\n return execute(listener, \"roomConnect\", conn, params);\n }\n\n @Override\n public boolean roomJoin(IClient client, IScope room) {\n return execute(listener, \"roomJoin\", client, room);\n }\n\n @Override\n public void roomDisconnect(IConnection conn) {\n execute(listener, \"roomDisconnect\", conn);\n }\n\n @Override\n public void roomLeave(IClient client, IScope room) {\n execute(listener, \"roomLeave\", client, room);\n }\n\n @Override\n public void roomStop(IScope room) {\n execute(listener, \"roomStop\", room);\n }\n };\n this.app.addListener(adapter);\n this.listeners.add(adapter);\n return this.listeners.indexOf(adapter);\n }", "public void addListener(GridListener listener) {\n listeners.add(listener);\n }", "public void enableMultiTouchElementListeners() {\r\n\t\tif (itemListeners == null) {\r\n\t\t\titemListeners = new ArrayList<ItemListener>();\r\n\t\t}\r\n\t\tif (screenCursorListeners == null) {\r\n\t\t\tscreenCursorListeners = new ArrayList<ScreenCursorListener>();\r\n\t\t}\r\n\t\tif (orthoControlPointRotateTranslateScaleListeners == null) {\r\n\t\t\torthoControlPointRotateTranslateScaleListeners = new ArrayList<OrthoControlPointRotateTranslateScaleListener>();\r\n\t\t}\r\n\t\tif (bringToTopListeners == null) {\r\n\t\t\tbringToTopListeners = new ArrayList<BringToTopListener>();\r\n\t\t}\r\n\t\tif (orthoSnapListeners == null) {\r\n\t\t\torthoSnapListeners = new ArrayList<OrthoSnapListener>();\r\n\t\t}\r\n\t\tif (flickListeners == null) {\r\n\t\t\tflickListeners = new ArrayList<OrthoFlickListener>();\r\n\t\t}\r\n\t\t\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addBringToTopListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addItemListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addOrthoControlPointRotateTranslateScaleListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addSnapListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addFlickListener(this);\r\n\t}", "public abstract void registerListeners();", "public synchronized void addListener(IIpcEventListener listener) {\n\t\tlisteners.add(listener);\n\t}", "@Override\n public void add(Event event) {\n persist(event);\n }", "void addSetupEvent(SetupEvent setupEvent);", "public void addToolListener(ToolListener listener, String toolEvent) {\n\t\t//do nothing\n\t}", "void onApplicationEvent(ApplicationEvent e);", "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "public static void addListener(MetadataListListener listener) {\n if (DEBUG.Enabled) Log.debug(\"listeners no longer allowed, will not report to: \" + Util.tags(listener));\n // listeners.add(listener);\n }", "void addBoardListener(BoardListener boardListener);", "private void addListener(MainFrame mainFrame) {\n this.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n mainFrame.displayCreateWorkoutWindow();\n mainFrame.soundEffect.setFile(mainFrame.SOUND_EFFECT_PATH);\n mainFrame.soundEffect.playSound();\n }\n });\n }" ]
[ "0.6281587", "0.5455265", "0.53735805", "0.5322808", "0.5301918", "0.5299861", "0.5285217", "0.5285122", "0.52802026", "0.5264637", "0.52620083", "0.5237027", "0.5196199", "0.5196199", "0.5190029", "0.51897186", "0.51640016", "0.5145995", "0.5092585", "0.5091604", "0.50904536", "0.50882083", "0.5087542", "0.5071255", "0.50472623", "0.5021215", "0.50208014", "0.5000426", "0.49987411", "0.49774522", "0.49747777", "0.49705777", "0.4966039", "0.49561557", "0.4929897", "0.4922318", "0.48975027", "0.48909923", "0.48858595", "0.48714393", "0.48371172", "0.4837093", "0.48280904", "0.48273674", "0.4813718", "0.48113143", "0.48047313", "0.47997314", "0.4799215", "0.47829753", "0.4777455", "0.47685647", "0.4757052", "0.47541204", "0.4752845", "0.4740535", "0.473148", "0.47304794", "0.47296804", "0.4728008", "0.47208533", "0.47123945", "0.47114283", "0.47004962", "0.4698916", "0.4695646", "0.46897298", "0.46895203", "0.46895203", "0.46895203", "0.46895203", "0.46874368", "0.46870103", "0.46810442", "0.4679476", "0.46757504", "0.46706018", "0.46703726", "0.46701673", "0.4668848", "0.46630427", "0.46580073", "0.46437982", "0.46383786", "0.46370342", "0.46340156", "0.46311685", "0.46277946", "0.46205354", "0.4618066", "0.46173868", "0.46173462", "0.46095878", "0.45985845", "0.4598029", "0.45956418", "0.45909706", "0.4588268", "0.45867985", "0.4577555" ]
0.81633794
0
Removes the event listener.
void remove(SpaceInstanceAddedEventListener eventListener);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void removeListener() {\n this.mListener = null;\n }", "public synchronized void removeEventListener(InputListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void unregisterListener() {\n\t\tthis.listener = null;\n\t}", "public void removeListener(T listener);", "private void removeEventListener(IEventListener<T> listener) {\n\t\t\tevent.removeEventListener(listener);\n\t\t}", "private void removeListener(final @NonNull Consumer<E> listener) {\n eventListeners.remove(listener);\n\n if (eventListeners.isEmpty()) {\n HandlerList.unregisterAll(this);\n LISTENERS_GROUPS.remove(configuration);\n }\n }", "public void removeEventListener(EventListener listener){\n try {\n listenerList.remove(EventListener.class, listener);\n } catch (Exception e) {\n System.out.println(\"[analizadorClient.removeEventListener]\" + e.getMessage());\n }\n \n \n }", "public void removeListener(GrillEventListener listener);", "@Override\r\n\tpublic synchronized void unregisterListener(EventListener<T> listener) {\n\t\tlisteners.removeElement(listener);\r\n\t}", "public synchronized void removeListener(IIpcEventListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "void removeListener(IEventChannelListener<K, V> listener);", "public void removeListener(IEpzillaEventListner listener)\n\t\t\tthrows RemoteException;", "public void removeListener(TransferListener listener) {\n listeners.remove(listener);\n }", "@Override\n public void removeListener(DisplayEventListener listener) {\n listenerList.remove(DisplayEventListener.class, listener);\n }", "public void removeListener(LogListener listener) {\n\t\tthis.eventListeners.remove(listener);\n\t}", "@Override\n public void removeListener(StreamListener listener) {\n streamListeners.remove(listener);\n }", "public void removeKernelEventListener( KernelEventListener listener )\n {\n m_state.removeKernelEventListener( listener );\n }", "public void removeListener(IMXEventListener listener) {\n if (isAlive() && (null != listener)) {\n synchronized (mMxEventDispatcher) {\n mMxEventDispatcher.removeListener(listener);\n }\n }\n }", "public void removeChangeListener(ChangeListener listener) { _changeListeners.remove(listener); }", "@Override\n\tpublic void unregisterEventListener(IHFModuleEventListener li) {\n\t\tLog.d(\"HFModuleManager\", \"unregisterEventListener\");\n\t\tthis.eventListenerList.remove(li);\n\t}", "public void removeListener(ValueChangedListener listener) {\n\t\t_listenerManager.removeListener(listener);\n\t}", "public void removeListener(AudioEventListener handler) {\n if (eventHandlerList.contains(handler)) {\n eventHandlerList.remove(handler);\n }\n }", "public synchronized void removeEventListener(IEventListener listener){\r\n\t\twhile (isBlocked) {\r\n\t\t\tThread.yield();\r\n\t\t}\r\n\t\tlisteners.remove(listener);\r\n\t}", "public void removeListener( JoystickInputListener listener ) {\n if ( listeners != null ) {\n listeners.remove( listener );\n }\n }", "private void unregisterListener() {\n mSensorManager.unregisterListener(this);\n }", "public void removeListenerForType(GrillEventListener listener, Class<? extends GrillEvent> eventType);", "public void removeListener(Listener l) {\n\t\tmListenerSet.remove(l);\n\t}", "public void removeListener(int index) {\n IApplication listener = this.listeners.get(index);\n if (listener == null) {\n return;\n }\n this.app.removeListener(listener);\n this.listeners.set(index, null); // don't remove because that would shift the indexes\n }", "public void removeAmplitudeListener(IDualAmplitudeListener listener)\r\n {\r\n amplitudeListeners.remove(listener);\r\n }", "public void removeTuioListener(TuioListener listener)\n\t{\n\t\tlistenerList.removeElement(listener);\t\n\t}", "public void removeListeners() {\n if ( listeners != null ) {\n listeners.clear();\n }\n }", "void removeListener(BotListener l);", "public void removeChangeListener(ChangeListener<BufferedImage> listener) {\n observer.remove(listener);\n }", "public void unregisterListener(PPGListener listener){\n listeners.remove(listener);\n }", "void removeListener(ChangeListener<? super T> listener);", "public void removeNameChangeListener(NameChangeListener listener) {\n this.listeners.remove(listener);\n }", "public void remove(Object listener) {\n if (!type.isInstance(listener)) {\n return;\n }\n if (listener.equals(logger.getDelegate())) {\n logger = noOpLogger;\n }\n handlers.remove(listener);\n }", "public void removeConnectionEventListener(ConnectionEventListener listener) {\n eventListener.removeConnectorListener(listener);\n }", "public void removeAllListener() {\r\n listeners.clear();\r\n }", "public void removeAnswerListener(AnswerListener anw){\n\t\tlisteners.remove(anw);\n\t}", "public void unregisterListeners(){\n listeners.clear();\n }", "@Override\n\tpublic void removeAllListener() {\n\t\tLog.d(\"HFModuleManager\", \"removeAllListener\");\n\t\tthis.eventListenerList.clear();\n\t}", "public void removeNPTListener(NPTListener l) {}", "default void removeListener(Runnable listener) {\n\t\tthis.getItemListeners().remove(listener);\n\t}", "public void removeListener(final IMemoryViewerSynchronizerListener listener) {\n m_listeners.removeListener(listener);\n }", "public void removeFlickListener(FlickListener l) {\r\n\t\tif (listeners.contains(l)) {\r\n\t\t\tlisteners.remove(l);\r\n\t\t}\r\n\t}", "public void removeListener(final T listener) {\n if (listener == null)\n throw new IllegalArgumentException(\"Parameter 'listener' must not be null!\");\n for (Iterator<T> it = _elements.iterator(); it.hasNext(); ) {\n if (it.next().equals(listener)) {\n it.remove();\n break;\n }\n }\n }", "public void removeGameEventListener(GameEventListener gameEventListener);", "public void removeListener(final IHistoryStringBuilderListener listener) {\n m_listeners.removeListener(listener);\n }", "public void cleanUp() { listener = null; }", "public void removeListener(ActionListener listener){\n\t\tbtn.removeActionListener(listener);\n\t}", "public void unsubscribe(IMouseListener l)\n {\n // ADD new listener to the listeners list:\n _listeners.remove(l);\n }", "public void removeDisconnectedCallback(OctaveReference listener) {\n\t\tlistenerDisconnected.remove(listener);\n\t}", "public void removeListener(final IModuleListener listener) {\n m_listeners.removeListener(listener);\n }", "public void removeSocketNodeEventListener(\n final SocketNodeEventListener l) {\n listenerList.remove(l);\n }", "@Override\n\tpublic void removeActionListener(ActionListener listener) {\n\t\tlisteners.add(listener);\n\t}", "public void removeListener(LineListener listener) {\n\t\tplayer.removeListeners(listener);\n\t}", "public void removeONDEXListener(ONDEXListener l) {\n listeners.remove(l);\n }", "public void removeListener(INotifyChangedListener notifyChangedListener)\n {\n changeNotifier.removeListener(notifyChangedListener);\n }", "void unsubscribe(LogListener listener);", "public void removeOnDataChangedListener(OnDataChangedListener listener) {\n dataChangedListeners.remove(listener);\n }", "public void removeListener(DCCSessionListener listener) {\n while(this.chatListeners.remove(listener)) {\n // just keep removing the listener until we no longer have any more of that type left\n }\n }", "void removeListener(GraphListener listener);", "@Override\r\n public void unregister(L listener) {\r\n synchronized (listeners) {\r\n listeners.remove(listener);\r\n weak.remove(listener);\r\n }\r\n }", "void removeListener( AvailabilityListener listener );", "@SuppressWarnings(\"unused\")\n public void removeAllListeners() {\n eventHandlerList.clear();\n }", "public void removeChangeListener(ChangeListener listener) {\n listenerList.remove(ChangeListener.class, listener);\n }", "public void removeListener(StatisticsListener listener)\r\n\t{\r\n\t\tlisteners.remove(listener);\r\n\t}", "private void unregisterListener() {\n\t\tif (!mHasStarted || mSensorManager == null) {\n\t\t\treturn;\n\t\t}\n\t\tmHasStarted = false;\n\t\tmSensorManager.unregisterListener(mAccListener);\n\t}", "public void removeDeviceListener(DeviceDriverListener device);", "public synchronized void removeButtonListener(ButtonListener l) {\r\n listeners.removeElement(l);\r\n }", "public void removeChessEventListener(ChessEventListener listener){\r\n listenerList.remove(ChessEventListener.class, listener);\r\n\r\n if (listenerList.getListenerCount(ChessEventListener.class)==0){\r\n setDGState(Datagram.DG_TOURNEY, false);\r\n setDGState(Datagram.DG_REMOVE_TOURNEY, false);\r\n }\r\n }", "public void removeInteractionsListener(InteractionsListener l) {\n _listeners.remove(l);\n }", "@Override\n\tpublic void unregistListener(IListener listener) throws RemoteException {\n\t\tremoteCallbackList.unregister(listener);\n\t}", "public void removeChangeListener(ChangeListener listener) {\n\t\tchangeListeners.remove(listener);\n\t}", "@Override\n public void removeHandlerListener(IHandlerListener handlerListener) {\n\n }", "public void removeChangeListener(ChangeListener listener) {\n if (listener == null) {\n return;\n }\n listeners.remove(listener);\n }", "@Override\n public void removeListener(ResourceListener listener) {\n }", "public void removeHitTestListener(HitTestListener l) {\n hitTestListenerList.remove(HitTestListener.class, l);\n }", "private void removeMessageListener(MessageTypeEventHandler<?> messageListener) {\n messageListeners.remove(messageListener);\n }", "public synchronized void removeActionListener(java.awt.event.ActionListener listener) {\n \n myListenerList.remove(java.awt.event.ActionListener.class, listener);\n }", "void removeGestureHandler(GestureEventListener listener);", "public void removeTapListener(ActionListener e) {\n if(tapListener == null) {\n return;\n }\n tapListener.removeListener(e);\n if(!tapListener.hasListeners()) {\n tapListener = null;\n }\n }", "public void removeFileChangeEventListener(final FileChangeEventListener listener) {\r\n\t\tlistenerList.remove(FileChangeEventListener.class, listener);\r\n\t}", "public void removeListener(ICdtVariableChangeListener listener){\n\t\tfListeners.remove(listener);\n\t}", "@Override\r\n\tpublic void removeHandlerListener(IHandlerListener handlerListener) {\n\r\n\t}", "public static void deregisterEventListener(String event, Consumer<Object> listener)\n {\n List<Consumer<Object>> listeners = EVENTS_TO_LISTENERS.get(event);\n\n if (listeners != null)\n {\n listeners.remove(listener);\n }\n }", "public void removeConnectedCallback(OctaveReference listener) {\n\t\tlistenerConnected.remove(listener);\n\t}", "public void removeActionListener(ActionListener listener) {\n\t\tlisteners.remove(listener);\n\t}", "public void removeListener(GazListener listener) {\n this.listeners.remove(GazListener.class, listener);\n }", "public void removeReachabilityListener(Consumer<ReachabilityEvent> reachabilityListener) {\r\n reachabilityListeners.remove(reachabilityListener);\r\n }", "public void unregister(ListenerRegistration listener) {\n if (handlerSlots.get(listener.getOrder()).contains(listener)) {\n dirty();\n handlerSlots.get(listener.getOrder()).remove(listener);\n }\n }", "public void removeFactListener(GenericFactListener<Fact> listener);", "public void removeEnumerateCallback(OctaveReference listener) {\n\t\tlistenerEnumerate.remove(listener);\n\t}", "public void\t\tremoveUCallbackListener(String\t\ttag);", "public void removeScopeRegistrationListener(\n\t\t\tScopeEventListener listener);", "public synchronized void removePropertyChangeListener(PropertyChangeListener listener) {\n if (listeners == null) {\n return;\n }\n listeners.removeElement(listener);\n }", "private void removeListeners() {\n \t\tlistenToTextChanges(false);\n \t\tfHistory.removeOperationHistoryListener(fHistoryListener);\n \t\tfHistoryListener= null;\n \t}", "void removeListener( ConfigurationListener listener );", "public void removeEventListener(OneToOneChatListener listener) throws RcsServiceException {\n\t\tif (api != null) {\n\t\t\ttry {\n\t\t\t\tapi.removeEventListener2(listener);\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new RcsServiceException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RcsServiceNotAvailableException();\n\t\t}\n\t}", "public void removeListener(@NotNull ValueListener<V> listener) {\n\t\tlistener.listenerDetached();\n\t\tvalueListeners.remove(listener);\n\t}" ]
[ "0.8547112", "0.8192288", "0.7965655", "0.795628", "0.78816056", "0.78540725", "0.77792686", "0.77610064", "0.773371", "0.7674351", "0.7599238", "0.75116706", "0.7492932", "0.74914676", "0.7441304", "0.7440949", "0.7434419", "0.73888344", "0.7308889", "0.7291135", "0.7288516", "0.7281241", "0.72724026", "0.72551185", "0.72459847", "0.7245618", "0.72361505", "0.7223657", "0.72227585", "0.72034425", "0.7194243", "0.71746767", "0.71714956", "0.71544373", "0.7147565", "0.714316", "0.7128422", "0.71206856", "0.71181834", "0.71157676", "0.7114472", "0.71047735", "0.70798373", "0.70732373", "0.70680124", "0.7051537", "0.7048484", "0.70478094", "0.70440936", "0.7043925", "0.7042921", "0.70395905", "0.7034651", "0.70291704", "0.70150805", "0.70119965", "0.70033914", "0.6989711", "0.69855815", "0.6979603", "0.6978626", "0.6978618", "0.69525594", "0.6951663", "0.6949088", "0.6943626", "0.6937739", "0.69372404", "0.69333494", "0.69322157", "0.69281477", "0.6925852", "0.69080776", "0.6893404", "0.6893071", "0.6890385", "0.6888645", "0.68679094", "0.6863447", "0.68582934", "0.6855637", "0.68511325", "0.68466896", "0.68412393", "0.68403894", "0.6839038", "0.68371606", "0.68365395", "0.68279064", "0.6823376", "0.6820343", "0.68203056", "0.68177176", "0.68172336", "0.68164706", "0.6816019", "0.6813403", "0.681238", "0.68097866", "0.6806937", "0.6792614" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu( Menu menu ) { getMenuInflater().inflate( R.menu.menu_main, menu ); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected( MenuItem item ) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if ( id == R.id.action_settings ) { return true; } return super.onOptionsItemSelected( item ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904066", "0.7804976", "0.7766218", "0.7726716", "0.7631313", "0.76221544", "0.7584775", "0.7530617", "0.74878734", "0.7457033", "0.7457033", "0.74380976", "0.7421477", "0.7402898", "0.7391322", "0.7386477", "0.73788774", "0.7370012", "0.7362617", "0.73555875", "0.73451835", "0.73418057", "0.73298967", "0.73283297", "0.7325109", "0.7318501", "0.73162323", "0.7313179", "0.7303658", "0.7303658", "0.7301155", "0.7297718", "0.7292956", "0.7286341", "0.72828627", "0.72805357", "0.7278157", "0.72596914", "0.72593665", "0.72593665", "0.72593665", "0.7259005", "0.724937", "0.72248167", "0.7219095", "0.7217289", "0.72042423", "0.7200424", "0.72000813", "0.71935385", "0.71848804", "0.7178161", "0.71682125", "0.71670973", "0.7153767", "0.71535325", "0.7136499", "0.71345866", "0.71345866", "0.7129392", "0.7128763", "0.71239245", "0.7122973", "0.7122687", "0.7122104", "0.71169454", "0.7116821", "0.71165425", "0.71165425", "0.71165425", "0.71165425", "0.71160954", "0.711461", "0.711215", "0.71094537", "0.71084976", "0.7105594", "0.70996004", "0.7098039", "0.7095679", "0.70935696", "0.70935696", "0.70862824", "0.70829386", "0.70803833", "0.70799434", "0.7073132", "0.70682305", "0.7061713", "0.7060338", "0.7060053", "0.70512676", "0.7037155", "0.7037155", "0.7035636", "0.70352966", "0.70352966", "0.70329386", "0.70302224", "0.7029258", "0.70191014" ]
0.0
-1
Show 3 total pages.
@Override public int getCount() { return 3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic int getCount() {\n\t\t\t// Show 3 total pages.\n\t\t\treturn 3;\n\t\t}", "@Override\n // This returns the number of pages we have within our view pager\n public int getCount() {\n return 3;\n }", "int getPagesAmount();", "long getAmountPage();", "int getPagesize();", "private void updateTotalPageNumbers() {\n totalPageNumbers = rows.size() / NUM_ROWS_PER_PAGE;\n }", "public void setPages(int pages) {\n this.pages = pages;\n }", "@Override\n public int getNumOfPageRows() {\n return 10;\n }", "int getPageSize();", "int getPageSize();", "int getPageSize();", "int getPageSize();", "public int getPageCount() { return _pages.size(); }", "public Integer getPerPage();", "@Override\n\tpublic Page showChargeCarByPage() {\n\t\tList<CarInfoDto> carInfolist = chargeCarMapper.selectCarInfoByPage();\n//\t\tint count = chargeCarMapper.selectCarInfoCount();\n\t\t\n\t\tString count = chargeCarMapper.selectCarInfoCount();\n\t\t//要有一个查询总数的sql\n\t\tSystem.out.println(\"----count----\"+count);\n\t\tPage page = new Page(Integer.parseInt(count), 10,\n\t\t\t\t1);\n\t\tpage.setList(carInfolist);\n\t\tSystem.out.println(carInfolist);\n\t\treturn page;\n\t}", "@Test\n public void getListingsPages_3() throws IOException {\n List<String> listingsPages = imobiParser.getListingPages(TEST_URL_PAGINATION_ABSENT);\n\n Assert.assertThat(listingsPages, notNullValue());\n Assert.assertThat(listingsPages.size(), is(1));\n Assert.assertThat(listingsPages, hasItem(is(TEST_URL_PAGINATION_ABSENT.replaceFirst(\"\\\\{pageNumber\\\\}\", String.valueOf(1)))));\n }", "public void setPages(int pages) {\n this.pages = pages;\n }", "public int getPages() {\n return pages;\n }", "public Integer getPageCount();", "public int getPages(){\n return pages;\n }", "int getPage();", "public int getPages()\n {\n return pages;\n }", "@Override\n public int numberOfPages() {\n // TODO Auto-generated method stub\n throw new UnsupportedOperationException(\"Unsupported operation\");\n }", "public void page()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_page=3\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The list of accounts in the page 3 is displayed below:\");\n response.prettyPrint();\n }", "long getPageSize();", "long getPageSize();", "long getPageSize();", "@Override\n\tpublic Integer getTotalPages(ConditionInfo cf) {\n\t\treturn rd.getTotalPages(cf);\n\t}", "@Override\n public int getCount() {\n int TOTAL_PAGES = totalPages;\n return TOTAL_PAGES;\n }", "public int getPages() {\n return pages;\n }", "public int getPages() {\n return pages;\n }", "public int getRowsPerPage();", "public int getTotalPages() {\r\n return totalPages;\r\n }", "private void show(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tInteger page = request.getParameter(\"page\") == \"\" || request.getParameter(\"page\") == null ? 1\r\n\t\t\t\t: Integer.valueOf(request.getParameter(\"page\"));\r\n\t\tint count = service.selectCount();\r\n\t\trequest.setAttribute(\"page\", page);\r\n\t\trequest.setAttribute(\"count\", count);\r\n\t\tList<Notice> list = service.selectAll((page - 1) * 5, 5);\r\n\t\trequest.setAttribute(\"list\", list);\r\n\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/GongGaoGuanLi.jsp\").forward(request, response);\r\n\t}", "default Integer getPageSize() {\n return 10;\n }", "int getNumPages();", "@Override\n public int getCount() {\n return PAGE_COUNT;\n }", "public abstract void onLoadMore(int page, int totalItemsCount);", "public abstract void onLoadMore(int page, int totalItemsCount);", "public void setPage(int value) {\n this.page = value;\n }", "protected int getTotalPages(FacesContext context) {\n String forValue = (String) getAttributes().get(\"for\");\n UIData uiData = (UIData) getForm(context).findComponent(forValue);\n if (uiData == null) {\n return 0;\n }\n int rowsPerPage = uiData.getRows(); \n int totalRows = uiData.getRowCount();\n int result = totalRows / rowsPerPage;\n if (0 != (totalRows % rowsPerPage)) {\n result++;\n }\n return result;\n }", "@Override\n\tpublic ThirdPage getThirdPage(String module) {\n\t\treturn thirdPageMapper.findWithModule(module);\n\t}", "private int getResultsPerPage()\n {\n final int RESULTS_0 = 16;\n final int RESULTS_1 = 32;\n final int RESULTS_2 = 46;\n \n int index = filterNumResults.getSelectedIndex();\n switch(index)\n {\n case 0: return RESULTS_0;\n case 1: return RESULTS_1;\n case 2: return RESULTS_2;\n default: return 0;\n }\n }", "public Integer getCurrentPageSize();", "public static void talk() {\r\n\t\t\r\n\t\tif (ths.page == 3) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "public static void take() {\r\n\t\t\r\n\t\tif (ths.page == 4) {\r\n\t\t\tths.page++;\r\n\t\t}\r\n\t}", "@Override\n public int getCount() {\n return PAGE_COUNT;\n }", "Integer getPage();", "public int getPageTotalNumber(int totalNumber) {\n/* 70 */ int fullPage = totalNumber / 25;\n/* 71 */ return (totalNumber % 25 > 0) ? (fullPage + 1) : ((fullPage == 0) ? 1 : fullPage);\n/* */ }", "int getPageNumber();", "public int getTotalPages()\r\n {\r\n return pageNames.size()-1;\r\n }", "void loadAll(int pageNum, LoadView mLoadView);", "@Override\r\n\tpublic int getPaging() {\n\t\treturn 0;\r\n\t}", "public void setPageInfo(){\n\t\tif(AllP>=1){\n\t\t\tPageInfo=\"<table border='0' cellpadding='3'><tr><td>\";\n\t\t\tPageInfo+=\"Show: \"+PerR+\"/\"+AllR+\" Records!&nbsp;\";\n\t\t\tPageInfo+=\"Current page: \"+CurrentP+\"/\"+AllP;\n\t\t\tPageInfo+=\"</td></tr></table>\";\t\t\t\n\t\t}\t\t\t\t\n\t}", "public void setPage(Integer page) {\n this.page = page;\n }", "Pages getPages();", "public void setPage(int page) {\n this.page = page;\n }", "public static void main(String[] args) throws Exception {\n PdfDocument doc = new PdfDocument();\r\n //Set margin\r\n PdfUnitConvertor unitCvtr = new PdfUnitConvertor();\r\n PdfMargins margin = new PdfMargins();\r\n margin.setTop(unitCvtr.convertUnits(2.54f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setBottom(margin.getTop());\r\n margin.setLeft(unitCvtr.convertUnits(3.17f, PdfGraphicsUnit.Centimeter, PdfGraphicsUnit.Point));\r\n margin.setRight(margin.getLeft());\r\n\r\n drawCover(doc.getSections().add(), margin);\r\n drawContent(doc.getSections().add(), margin);\r\n drawPageNumber(doc.getSections().get(1), margin, 1, doc.getSections().get(1).getCount());\r\n\r\n //Save pdf file.\r\n doc.saveToFile(\"output/pagination.pdf\");\r\n doc.close();\r\n }", "private void pagination(){\n recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {\n super.onScrollStateChanged(recyclerView, newState);\n }\n\n @Override\n public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {\n super.onScrolled(recyclerView, dx, dy);\n\n if (dy>0){\n LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();\n int lastItem = layoutManager.findLastCompletelyVisibleItemPosition(); //finds last visible item\n int currentTotalCount = layoutManager.getItemCount(); //find total number of displayed items\n\n if (mLoadingItems){\n if (currentTotalCount > previousTotal){\n mLoadingItems = false;\n previousTotal = currentTotalCount;\n }\n }\n if (!mLoadingItems && (currentTotalCount <= (lastItem +view_threshold))) {\n mLoadingItems = true;\n //Increment number of items on the list\n firstItemVisible = firstItemVisible+10;\n lastItemVisible = lastItemVisible+10;\n //Update adapter\n jsonParse();\n }\n }\n }\n });\n }", "private void abreContasPagas() {\n FiltroDataListaFornecedor dataListaFornecedor\n = new FiltroDataListaFornecedor(\n new String[]{\n \"/br/rel/caixa/ContasPagas.jasper\",\n \"MES\",\n \"0\"});\n dataListaFornecedor.setVisible(true);\n }", "@Override\r\n\tpublic int nombrePage() {\n\t\treturn 0;\r\n\t}", "public int getPageCount()\n {\n return _pages.size();\n }", "public int getTotalArticle() {\n int listLimit;\n int total;\n int totalPage;\n listLimit = getArticleRowCount();\n clickGoToLastPageBtn();\n // Has to used this method instead of goToPageBtn().size() since the maximum size of the goToPageBtn list is always 10\n totalPage = Integer.parseInt(goToPageBtn().get(goToPageBtn().size() - 1).getText().trim());\n total = getArticleRowCount() + listLimit * totalPage;\n return total;\n }", "PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);", "public int getCount() {\n return 3;\n }", "Optional<Integer> getPageCount();", "void printNumberOfFilteredItems();", "private static void displayBucketCount3() throws IOException {\n\t\tString str=\"\";\n\t\t\n\t\t//bucket count\n\t\tfor(int i:bucketCountT.keySet()){\n\t\t\tstr+=String.valueOf(i)+ \" \" + String.valueOf(bucketCountT.get(i))+\"\\n\";\n\t\t}\n\t\tstr+=\"\\n\";\n\t\twriter3.write(str);\n\t\t\n\t}", "@RequestMapping (\"/members\")\r\n\tpublic String list(@RequestParam(\"page\") int page, Model model) {\n\t\tint pagenumber = page;\r\n\t\tmodel.addAttribute(\"pagenumber\", pagenumber);\r\n\t\t\r\n\t\t//Row count for following calculations\r\n\t\tint maxrows = membersService.getMemberCount();\r\n\t\t\r\n\t\t//Find the Max number of pages and see if an extra page is needed\r\n\t\tif (maxrows >= 7){\r\n\t\t\tint maxpages = maxrows / 7;\r\n\t\t\tint pageTest = maxpages * 7; \r\n\t\t\tint addPage = maxrows - pageTest;\r\n\t\t\tint zero = 0;\r\n\t\t//Add an extra page if TRUE\r\n\t\t\tif (addPage > zero){\r\n\t\t\t\tint extraPage = maxpages + 1;\r\n\t\t\t\tmodel.addAttribute(\"maxpages\", extraPage);\r\n\t\t//Do not add an extra page if FALSE\t\t\r\n\t\t\t}else {\r\n\t\t\t\tmodel.addAttribute(\"maxpages\", maxpages);\r\n\t\t\t}\r\n\t\t//Only one page is needed because at least 7 rows are not available \r\n\t\t}else{\r\n\t\t\tmodel.addAttribute(\"maxpages\", 1);\r\n\t\t }\r\n\t\t//pull the first 7 on page 1\r\n\t\tif (pagenumber <= 1) {\r\n\r\n\t\t\tmodel.addAttribute(\"members\", membersService.getAllMembers(0, 7));\r\n\t\t}else{\r\n\t\t\tint stopSQL = 7; //Offset\r\n\t\t\tint pageNumber = pagenumber - 1; \r\n\t\t\tint startSQL = 7 * pageNumber; //What row should the query start at, e.g. 7 * 2 = 14 (start at row 14 and pull the next 7 rows)\r\n\r\n\t\t\tmodel.addAttribute(\"members\", membersService.getAllMembers(startSQL, stopSQL));\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn \"members\";\r\n\t}", "boolean hasPagesize();", "Long pageCount(Long pageSize, Long...params);", "private void pagination()\n {\n if (value==0)\n {\n aBoolean=true;\n setAdapter(postModels);\n value=1;\n count=count+10;\n }\n else if (value==1)\n {\n if (count<page_count)\n {\n aBoolean=true;\n count=count+10;\n temp_list.addAll(postModels);\n adapter.notifyDataSetChanged();\n }\n }\n }", "List<ProductView> getAllByPage(int pageNumber, int itemsPerPage) throws ProductException;", "protected void showPreviousPage() {\n\t\tshowPage(currPageIndex - 1, Direction.BACKWARD);\n\n\t}", "public void setPageItemCount(Integer pageItemCount) {\n this.pageItemCount = pageItemCount;\n }", "public static int pageCount(int n, int p) {\n // Write your code here\n int pagesToCover = 0;\n int midPage = n/2;\n\n if(p>midPage){\n if(n%2==0){\n pagesToCover = n-p+1;\n }else{\n pagesToCover = n-p;\n }\n }else{\n pagesToCover = p;\n }\n int pagesToTurn = 0;\n for(int i=2, j=1; i<=pagesToCover; i=i+2, j++){\n pagesToTurn = j;\n }\n return pagesToTurn;\n }", "@RequestMapping(value=\"/main1\") \n public String main(Model model,Integer start){\n int count=allpageService.getCount();\n System.out.println(count);\n //List<page> pages1=allpageService.getOne((start-1)*8, 8);//start是页数\n model.addAttribute(\"count\",count);//总数\n //model.addAttribute(\"pages\",pages);\n // model.addAttribute(\"pages1\",pages1);//一页\n return \"main\"; \n }", "public void setTotalPageCount(Integer totalPageCount) {\n this.totalPageCount = totalPageCount;\n }", "static int pageCount(int n, int p) {\n \tint i=1;\n int count=0,mid=0,t=0;\n if(n%2==0)\n {\n t=n;\n\n }\n else\n {\n t=n-1;\n\n }\n \tmid=n/2;\n\n if(n==p)\n return 0;\n if(mid>=p){\n while(i<p){\n i=i+2;\n count++;\n }\n }else{\n while(t>p){\n t=t-2;\n count++;\n }\n }\n return count;\n }", "@Override\n\t\tpublic void onLoadMore() {\n\t\t\tpageIndex++;\n\t\t\tloadInfo(pageIndex, 1);\n\t\t\tif (DzqcStu.isDebug) {\n\t\t\t\tLog.i(\"pageIndex------\", pageIndex+\"\");\n\t\t\t}\n\t\t}", "public static int getTotalPage() {\n List<WebElement> PAGINATION = findElements(pagination);\n int size = PAGINATION.size() - 1;\n //Get the number of the second-last item which next to the \">\" icon\n WebElement lastPage = findElement(By.xpath(String.format(last_page, size)));\n return Integer.parseInt(lastPage.getText());\n }", "@Test\n public void pageSizeTest() {\n // TODO: test pageSize\n }", "@Override\r\n\t\tpublic int getCount() {\n\t\t\treturn mPagers.size();\r\n\t\t}", "public String getTotalPage() {\r\n return totalPage;\r\n }", "@Override\r\n\tpublic List<ReviewVO> listPage(int page) throws Exception {\n\t\tif(page<=0) {\r\n\t\t\tpage=1;\r\n\t\t}\r\n\t\t\r\n\t\tpage = (page-1)*10; // 한 페이지에 10개의 글 보이기\r\n\t\t\r\n\t\treturn ss.selectList(\"listPage\", page);\r\n\t}", "public int getTotalPageCount() {\n try {\n return (int) this.webView.getEngine().executeScript(\"PDFViewerApplication.pagesCount;\");\n } catch (RuntimeException e) {\n e.printStackTrace();\n return 0;\n }\n }", "@Override\n public int doStartTag() throws JspException {\n\n int pageCount = (this.recordCount + this.pageSize - 1) / this.pageSize;\n StringBuilder sb = new StringBuilder();\n\n if (this.recordCount != 0 && this.recordCount > this.pageSize) {\n sb.append(\"<ol class=\\\"paginator\\\">\");\n if (this.pageNo > pageCount) {\n this.pageNo = pageCount;\n }\n if (this.pageNo < 1) {\n this.pageNo = 1;\n }\n HttpServletRequest request = (HttpServletRequest) this.pageContext.getRequest();\n\n url = request.getAttribute(\"originalUrl\").toString();\n url += \"?\";\n if (StringUtil.isNotEmpty(request.getQueryString())) {\n String queryString = request.getQueryString();\n url += queryString.replaceAll(\"page=[0-9]*\", \"\");\n if (!url.endsWith(\"&\") && !url.endsWith(\"?\")) {\n url += \"&\";\n }\n }\n\n if (this.pageNo > 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--prev\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo - 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n int start = 1;\n if (this.pageNo > 4) {\n start = this.pageNo - 1;\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=1'>1</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=2'>2</a></li>\");\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n int end = this.pageNo + 1;\n if (end > pageCount) {\n end = pageCount;\n }\n for (int i = start; i <= end; i++) {\n if (this.pageNo == i) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number paginator__item--current\\\"><span class=\\\"paginator__item__text\\\">\" + i + \"</span></li>\");\n } else {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + i + \"'>\").append(i).append(\"</a></li>\");\n }\n }\n if (end < pageCount - 2) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--ellipsis\\\"><span class=\\\"paginator__item__text\\\"><span class=\\\"paginator__item__text__icon\\\"></span></span></li>\");\n }\n if (end < pageCount - 1) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (pageCount - 1) + \"'>\").append((pageCount - 1) + \"</a></li>\");\n }\n if (end < pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--number\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + pageCount + \"'>\").append(pageCount + \"</a></li>\");\n }\n if (this.pageNo != pageCount) {\n sb.append(\"<li class=\\\"paginator__item paginator__item--next\\\"><a class=\\\"paginator__item__text\\\" href='\" + this.url + \"page=\" + (this.pageNo + 1) + \"'><span class=\\\"paginator__item__text__icon\\\"></span></a></li>\");\n }\n }\n if (anchor != null) {\n sb.append(\"<script type='text/javascript'>$('.paginator a').each(function(){var href=$(this).attr('href');$(this).attr('href',href+'\" + anchor + \"')});</script>\");\n }\n sb.append(\"</ol>\");\n try {\n this.pageContext.getOut().println(sb.toString());\n } catch (IOException e) {\n // TODO Auto-generated catch block\n\n e.printStackTrace();\n }\n return 0;\n }", "public int getTotalPages() {\r\n\t\treturn page.getTotalPages();\r\n\t}", "public void checkCountforButtonNextandPrevious() {\n Cursor coo = SQLAbsensi.fetchDatabaseAll();\n\n //Page Next\n if (firstDigit != 0) {\n pageCountStartAt = firstDigit * 10;\n int save = coo.getCount() / 10;\n if (save < firstDigit) {\n pageCountEndAt = (firstDigit + 1) * 10;\n } else {\n pageCountEndAt = firstDigit * 10 + (coo.getCount() % 10);\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n } else {\n pageCountStartAt = 0;\n if (coo.getCount() > 10) {\n pageCountEndAt = 10;\n myButton = (Button) findViewById(R.id.nextpagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n pageCountEndAt = coo.getCount();\n }\n }\n\n //Page Previous\n if (firstDigit > 0) {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.VISIBLE);\n } else {\n myButton = (Button) findViewById(R.id.previouspagebutton);\n myButton.setVisibility(View.INVISIBLE);\n }\n Refresh();\n\n }", "void showResults() throws IOException{\n\t\tCountService cs = CountService.getInstance();\n\t\t\n\t\tout.write(\"/------------------------Resultado Final------------------------/\" + \"\\n\" );\n\t\tout.write(\"O número total de links pesquisados é:\" + cs.getCount() + \"\\n\");\n\t\tout.write(\"O número de links Quebrados é:\" + cs.getCountQueb() + \"\\n\");\n\t\tout.write(\"O número de links ok é:\" + cs.getCountOk() + \"\\n\");\n\t\tout.write(\"O número de links Proibidos é:\" + cs.getCountProibido()+ \"\\n\");\n\t\tout.write(\"O número de métodos impedidos é:\" + cs.getCountImpedido()+ \"\\n\");\n\t\tout.write(\"O número de redirecionados é:\" + cs.getCountRedirecionado()+ \"\\n\");\n\t\tout.write(\"Erro Server:\" + cs.getCountErroServer()+ \"\\n\");\n\t\tout.write(\"Unknown Host Name:\" + cs.getCountUnknownHost()+ \"\\n\");\n\t\tout.write(\"Bad Gatway:\" + cs.getCount502()+ \"\\n\");\n\t\tout.write(\"O número resposta diferente de 4.. e 200 é:\" + cs.getCountPesq() + \"\\n\");\n\t\tout.write(\"/------------------------------------------------------------------/\" + \"\\n\");\n\t\tString dateTime = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\").format(new Date()); \n\t\tout.write(\"Fim dos testes: \" + dateTime + \"\\n\");\n\t\tSystem.out.println(\"Teste finalizado\");\n\t}", "public int getNumPages()\n {\n return numPages;\n }", "PagingLink(int pageNumber) {\n setText(String.valueOf(pageNumber));\n }", "public String getPage(String targetUrl, String q, Long totalCnt, int rows, int start, int page) {\n String paramStr = \"\";\n String htmlPage = \"\";\n String pageUrl = \"\";\n\n int targetPageValue;\n int pagingMin;\n int pageSeed;\n int pageBlock = page;\n int countInPage = page;\n int loopCnt = 0;\n int currentPage = 0;\n\n try {\n double totalPage;\n switch (rows) {\n case 8:\n currentPage = start / 8;\n break;\n case 16:\n currentPage = start / 16;\n break;\n case 24:\n currentPage = start / 24;\n break;\n\n case 10:\n currentPage = start / 10;\n break;\n case 20:\n currentPage = start / 20;\n break;\n case 50:\n currentPage = start / 50;\n break;\n case 100:\n currentPage = start / 100;\n break;\n default:\n currentPage = start / rows;\n break;\n }\n\n pagingMin = ((currentPage - 1) / countInPage) * countInPage;\n if (currentPage > 5) {\n pageSeed = currentPage - 4;\n } else {\n pageSeed = pagingMin;\n }\n double flTotalPage = Float.parseFloat(totalCnt.toString()) / rows;\n\n totalPage = Math.ceil(flTotalPage);\n\n paramStr = \"q=\" + q;\n\n\n\n\n if (currentPage != 0) { //이전\n pageUrl = targetUrl + \"?\" + paramStr + \"&start=\" + (start - rows);\n htmlPage += \"<li><a href=\\\"\" + pageUrl + \"\\\"></a></li>\\n\";\n }\n\n while (loopCnt < pageBlock && pageSeed < totalPage) {\n if (pageSeed == currentPage) {\n targetPageValue = pageSeed;\n htmlPage += \"<li class=\\\"active\\\"><a href=\\\"javascript:;\\\">\" + (targetPageValue + 1) + \"</a></li>\\n\";\n } else {\n targetPageValue = pageSeed;\n pageUrl = targetUrl + \"?\" + paramStr + \"&start=\" + targetPageValue * rows;\n htmlPage += \"<li><a href=\\\"\" + pageUrl + \"\\\">\" + (targetPageValue + 1) + \"</a></li>\\n\";\n }\n pageSeed++;\n loopCnt++;\n }\n\n if (currentPage < totalPage - 1) { //다음\n pageUrl = targetUrl + \"?\" + paramStr + \"&start=\" + (start + rows);\n htmlPage += \"<li><a href=\\\"\" + pageUrl + \"\\\"></a></li>\";\n }\n\n return htmlPage;\n } catch (Exception e) {\n System.out.println(\"getPage : \" + e.toString());\n return \"\";\n }\n }", "private void nextButtonActionPerformed(ActionEvent e) {\n // TODO add your code here\n int remainItem = this.list.size() - 6 * (this.page + 1);\n\n if(remainItem <= 0){\n Warning.run(\"No more page here.\");\n }\n else{\n this.page++;\n this.update();\n }\n }", "public int getNumberOfPages(HttpServletRequest request,\n SubmissionInfo subInfo) throws ServletException\n {\n // always just one page of initial questions\n return 1;\n }", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tprgDlg.setMax(nTotalPage);\r\n\t\t\t\t\t\t\tprgDlg.setProgress(nPage);\r\n\t\t\t\t\t\t}", "@Override\n public void onPageChanged(int page, int pageCount) {\n }", "public int getPagesDisplayed() {\n return getTableModelSource().getTableModel().getPageCount();\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn 3;\n\t\t}", "public static void main(String[] args) {\n\t\tint k =1;\n\t\twhile(k < 20){\n\t\t\tif ((k % 3)==1){\n\t\t\t\tSystem.out.print(k + \" \");\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t}", "@Override\n\t\tpublic void onLoadMore(int page, int totalItemsCount) {\n\t\t\tpresenter.loadRecordsPage(page);\n\t\t}" ]
[ "0.7318532", "0.66357523", "0.65496594", "0.6074719", "0.6053452", "0.6024778", "0.59702045", "0.5968394", "0.59407145", "0.59407145", "0.59407145", "0.59407145", "0.5938616", "0.59303164", "0.5914587", "0.5895829", "0.5858472", "0.58557075", "0.58179796", "0.5745283", "0.57390004", "0.5710357", "0.5708484", "0.56869525", "0.5682967", "0.5682967", "0.5682967", "0.56799984", "0.56784123", "0.5653454", "0.5653454", "0.5632407", "0.56246775", "0.56187314", "0.5585245", "0.55770224", "0.5570124", "0.5552637", "0.5552637", "0.55474955", "0.553246", "0.5524593", "0.5521382", "0.5505482", "0.5494742", "0.5486211", "0.5479962", "0.54796374", "0.546492", "0.54630417", "0.5417493", "0.5405376", "0.53938454", "0.5391244", "0.5387889", "0.53821146", "0.53554964", "0.5317902", "0.53082865", "0.53002334", "0.5297614", "0.52635336", "0.52619", "0.5258867", "0.5257348", "0.5255805", "0.52501726", "0.52496064", "0.52444845", "0.524434", "0.52436376", "0.5240929", "0.5229373", "0.5215831", "0.52150553", "0.5210661", "0.5210281", "0.5206003", "0.52025247", "0.5198076", "0.5197664", "0.51949114", "0.51946896", "0.51936597", "0.5190856", "0.51899004", "0.5189329", "0.5183741", "0.51823395", "0.5180771", "0.5175356", "0.5168826", "0.51638377", "0.51508284", "0.5148759", "0.51476455", "0.51473665", "0.5138557", "0.5126422", "0.512246", "0.5115218" ]
0.0
-1
Random in a rectangle constructor
public UniformInBoxPointSequence2D(int size, double width, double height) { super((List<T>) generateRandomPoints(size, width, height)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generateNewRect() {\n\t\t\n\t\tif(rectengleList.size() < getLevel()){\n\t\tRandom mRandom = new Random();\n\t\tint height = getHeight();\n\t\tint width = getWidth();\n\n\t\tint cx = (int) ((mRandom.nextInt() % (width * 0.8)) + (width * 0.1));\n\t\tint cy = (int) ((mRandom.nextInt() % (height * 0.8)) + (height * 0.1));\n\t\tint hw = (int) (mRandom.nextInt() % (width * 0.4) + width * 0.2) / 2;\n\t\tint hh = (int) (mRandom.nextInt() % (height * 0.4) + height * 0.2) / 2;\n\n\t\tint color = (0x00252525 | mRandom.nextInt()) & 0x00FFFFFF | 0x77000000;\n\t\t\n\t\t\n\t\trectengleList.add(new ColoredRect(color, cx - hw, cy - hh, cx + hw, cy\n\t\t\t\t+ hh));\n\t\t}\n\t\telse{\n\t\t\trectengleList.clear();\t\t\t\n\t\t}\n\t}", "Rectangle(){\n height = 1;\n width = 1;\n }", "public Critter(){\n\tthis.x_location = (int) (Math.random()*99);\n\tthis.y_location = (int) (Math.random()*99);\n\tthis.wrap();\n\t}", "public Rectangle() {\n this(50, 40);\n }", "Rectangle()\n {\n this(1.0,1.0);\n }", "Rectangle() {\r\n\t\tlength = 1.0;\r\n\t\twidth = 1.0;\r\n\t}", "public CustomRectangle() { }", "public Rectangle()\n {\n length = 1;\n width = 1;\n count++;\n }", "public void makeRandColor(){}", "public PersonalBoard(int width, int height){\n super(width, height);\n this.rand = new Random();\n }", "@Override\n public void relocatedWithinBounds() {\n x = random.nextInt(maxX - width);\n y = random.nextInt(maxY - height);\n }", "void createRectangles();", "public Rectangle () {\n\t\t\n\t}", "public RandomPointGenerator(int width, int height) {\n\t\tmaxX = width;\n\t\tmaxY = height;\n\t}", "public void setCoords() \r\n {\r\n \tthis.coordX = rand.nextInt(10);\r\n \tthis.coordY = rand.nextInt(10);\r\n }", "public Rectangle() {\n }", "public Rectangle() {\n }", "public Ball(int xWall, int yWall, Random rand){\n this(\n rand.nextInt(xWall-2*MAX_RADIUS),//set all to random\n rand.nextInt(yWall-2*MAX_RADIUS),\n rand.nextInt(MAX_RADIUS-MIN_RADIUS)+MIN_RADIUS,\n new Color(\n rand.nextInt(MAX_CHANNEL_VAL),\n rand.nextInt(MAX_CHANNEL_VAL),\n rand.nextInt(MAX_CHANNEL_VAL),\n rand.nextInt(MAX_CHANNEL_VAL-MIN_ALPHA_VAL)+MIN_ALPHA_VAL),\n rand.nextInt(MAX_VELOCITY-MIN_VELOCITY)+MIN_VELOCITY,\n rand.nextInt(MAX_VELOCITY-MIN_VELOCITY)+MIN_VELOCITY,\n xWall,\n yWall\n );\n }", "public Item()\r\n {\r\n gen = new Random();\r\n color = new Color(gen.nextInt());\r\n x = 200;\r\n w = 100;\r\n h = 18;\r\n }", "public Rectangle() {\n\t\twidth = 1;\n\t\theight = 1;\n\t}", "public Rectangle() {\n x = 0;\n y = 0;\n width = 0;\n height = 0;\n }", "public Rectangle() {\n\t\tthis.width = 1;\n\t\tthis.hight = 1;\n\t\tcounter++;\n\t}", "public City(){\n this.x = (int)(Math.random()*200);\n this.y = (int)(Math.random()*200);\n }", "public Rectangle() {\n\t\tthis.corner = new Point();\n\t\tthis.size = new Point();\n\t}", "City(){\n x_coordinate = (int)(Math.random()*200);\n y_coordinate = (int)(Math.random()*200);\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public RandomPointGenerator(int width, int height) {\n\t\tthis(0, 0, width, height);\n\t}", "int randomPoint() { return 1 + (int)Math.round((Math.random()*20) % (size - 2)); }", "public void setRandomShape()\n\t{\n\t\tvar rand = new Random();\n\t\tint x = Math.abs(rand.nextInt())%7 + 1;\n\t\t\n\t\tTetromino[] values = Tetromino.values();\n\t\tsetShape (values[x]);\n\t}", "public void reset() {\n x = random(-2*width, 3*width); // set the x position\n y = random(-height, 2*height); // set the y position\n c[0] = color(random(150, 255), random(150, 255), random(150, 255)); // set the top color (a bit lighter)\n // randomly set the 4 colors in the base of the shape\n for (int i=1; i<5; i++) {\n c[i] = color(random(255), random(255), random(255)); // random RGB color\n }\n }", "public Rng() {\n\t\tr = new Random();\n\t}", "private void posicionInicial(int ancho){\r\n posicionX = ancho;\r\n Random aleatroio = new Random();\r\n int desplazamiento = aleatroio.nextInt(150)+100;\r\n \r\n \r\n cazaTie = new Rectangle2D.Double(posicionX, desplazamiento, anchoEnemigo, alturaEnemigo);\r\n }", "public PositionInTheGameBoard()\r\n\t{\r\n\t\tthis.X = new Random().nextInt(PositionInTheGameBoard.max_X);\r\n\t\tthis.Y = new Random().nextInt(PositionInTheGameBoard.max_Y);\r\n\t}", "private void random() {\n\n\t}", "public Rectangle(int length, int width) {\n }", "public Point() {\n this.x = Math.random();\n this.y = Math.random();\n }", "protected void createRect()\r\n\t{\r\n\t\trect = new Rectangle(getX(),getY(),width,height);\r\n\t}", "Rectangle(int width, int height){\n area = width * height;\n }", "private void drawRectangle(GraphicsContext gc, double x, double y) {\r\n GraphicsContext gc2 = myCanvas.getGraphicsContext2D();\r\n gc2.setFill(randomColor());\r\n gc2.fillRect(x - 20, y - 20, 40, 40);\r\n }", "public void randomize() {\n\t\tx = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t\ty = ThreadLocalRandom.current().nextInt(0, 499 + 1);\n\t}", "public Robots(PApplet p) {\n\t\tbSpeed = 6;\n\t\tbSize = 1;\n\t\tparent = p;\n\t\tx = parent.random (bobWidth, parent.width/2 - bobWidth); // Bob starts in a random place on the screen\n\t\ty = parent.random (bobWidth,parent.width/2 - bobWidth); \n\t}", "public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\n }", "public Asteroid()\r\n\t{\r\n\t\tsuper.setDirection(rn.nextInt(360));\r\n\t\tsuper.setSpeed(rn.nextInt(100));\r\n\t\tsuper.setLocalX(rn.nextFloat() * 1024);\r\n\t\tsuper.setLocalY(rn.nextFloat() * 786);\r\n\t\tsuper.setColor(250);\r\n\t\tsize = rn.nextInt(10);\r\n\t\t\r\n\t}", "public Rectangle() {\n this.length = 0;\n this.width = 0;\n\n }", "Rectangle(double newWidth, double newHeight){\n height = newHeight;\n width = newWidth;\n }", "public Asteroid() {\n\t\t// create, seed random number\n\t\trandomNumber = new Random();\n\n\t\t// random location\n\t\tlocation = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * FIELD_SIZE);\n\n\t\t// random movement vector\n\t\tmovement = new Tuple(\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED,\n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED, \n\t\t\t\t(randomNumber.nextDouble() - 0.5) * MAX_SPEED);\n\t\t\n\t\t// random radius\n\t\tsize = randomNumber.nextInt() % 20 + 1;\n\t\t\n\t\t// create Sphere\n\t\tsphere = new Sphere(size, location);\n\n\t}", "Chromosome getRandom();", "Rectangle(int l, int w)\n {\n\tlength = l;\n\twidth = w;\n }", "public Asteroid makeAsteroid() {\r\n\t\tAsteroid asteroid = new AsteroidImpl(startBounds.x, random(startBounds.y,startBounds.height)\r\n\t\t\t\t\t\t\t\t\t\t\t, random(10,40), random(10,40)\r\n\t\t\t\t\t\t\t\t\t\t\t, random(1,4));\r\n\t\treturn asteroid;\r\n\t}", "public TrollGame () {\n rand = new Random();\n initBoard(ROWS, COLS, rand);\n }", "public PDRectangle()\n {\n this(0.0f, 0.0f, 0.0f, 0.0f);\n }", "public void randomInit() {\n Plain plain = new Plain(width + 2);\n grid = new Living[width + 2][width + 2];\n for (int i = 1; i < grid.length - 1; i++) {\n for (int j = 1; j < grid[i].length - 1; j++) {\n int randomNum = (int) (Math.random() * 5);\n switch (randomNum) {\n case 0:\n grid[i][j] = new Badger(plain, i, j, 0);\n break;\n case 1:\n grid[i][j] = new Empty(plain, i, j);\n break;\n case 2:\n grid[i][j] = new Fox(plain, i, j, 0);\n break;\n case 3:\n grid[i][j] = new Grass(plain, i, j);\n break;\n case 4:\n grid[i][j] = new Rabbit(plain, i, j, 0);\n break;\n }\n }\n }\n }", "public RoomRectangle buildRoom(TETile[][] world, Random r) {\n int w = 0;\n int l = 0;\n if (width > 5) {\n w = r.nextInt(width - 5) + 4;\n }\n if (length > 5) {\n l = r.nextInt(length - 5) + 4;\n }\n // int w = width - 1;\n //int l = length - 1;\n // Coordinate loc = new Coordinate(location.getX() + 1, location.getY() + 1);\n room = new RoomRectangle(w, l, location, direction);\n room.layFloor(world);\n // layBorder(world);\n return room;\n }", "public void newCoord() {\n\t\tx = Data.generateRandomX();\n\t\ty = Data.generateRandomY();\n\t}", "public void fillRectangle(RectangleShape rectangle);", "@Override\n\tpublic void randomRoom() {\n\t\tint randSide = random.nextInt(3) + 1;\n\t\tString side = properties.getSideFromProperties().get(randSide);\n\t\tint randRoom = random.nextInt(6) + 1;\n\t\tthis.room = properties.getRoomFromProperties().get(randRoom);\n\t\tthis.side = this.room.substring(0, 1).toLowerCase() + side;\n\t}", "void createRectangle(Rect r, int[] color){\n noStroke();\n fill(color[0],color[1],color[2]);\n rect(r.x,r.y,r.width,r.height);\n }", "@Override\n public void onDraw(Canvas canvas){\n int width, length;\n // make random amounts for rectangle\n Random rand = new Random();\n // start point of rectangle\n int xStart = rand.nextInt(canvas.getWidth());\n int yStart = rand.nextInt(canvas.getHeight());\n // make rectangles with from 0 to 1/4 of the canvas\n width = rand.nextInt(canvas.getWidth()/4);\n length = rand.nextInt(canvas.getHeight()/4);\n // create rectangle (int left, int top, int right, int bottom)\n Rect rect = new Rect(xStart, yStart, xStart+width, yStart+length);\n // need Paint for Rect, random colors\n Paint recPaint = new Paint();\n // setColor(alpha, red, green, blue);\n recPaint.setARGB(255, rand.nextInt(256), rand.nextInt(256), rand.nextInt(256));\n canvas.drawRect(rect, recPaint); // draws to canvas\n\n }", "@Test\n public void testRectangleConstructor() {\n defaultShape1 = new Rectangle(defaultColor1, defaultPosition1, defaultSize1);\n // If successful the type should be rectangle.\n assertEquals(TypeOfShape.RECTANGLE, defaultShape1.getType());\n assertNotEquals(defaultShape1.getType(), TypeOfShape.OVAL);\n }", "void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }", "private void init() {\r\n\t\tx = (float) (Math.random() * 2 - 1);\r\n\t\ty = (float) (Math.random() * 2 - 1);\r\n\t\tz[0] = (float) (Math.random() * 3f);\r\n\t\tz[1] = z[0];\r\n\t}", "public static void main(String[] args){\n\tRectangle[] RecArray = new Rectangle[10];\n\n\t/* Here are the 10 rectangles\n\tRecArray[0] x[0]\n\tRecArray[1] x[1]\n\tRecArray[2]\n\t....\n\tRecArray[9] */\n\n\n\t//initialize each rectangle with random width and random height\n\t//for (int i=0; i<10; i++)\n\t//RecArray[i] = new\n\t//Rectangle(Math.random()*100, Math.random()*100);\n\n\t//initialize each rectangle with the specified width and height\n\tRecArray[0] = new Rectangle (2,3);\n\tRecArray[1] = new Rectangle (12,33);\n\tRecArray[2] = new Rectangle (20,33);\n\tRecArray[3] = new Rectangle (52,38);\n\tRecArray[4] = new Rectangle (22,37);\n\tRecArray[5] = new Rectangle (223,387);\n\tRecArray[6] = new Rectangle (112,23);\n\tRecArray[7] = new Rectangle (78,78);\n\tRecArray[8] = new Rectangle (23,67);\n\tRecArray[9] = new Rectangle (12,89);\n\n\t//print the ten rectangles and their areas\n\tfor(int i =0; i<10; i++)\n\tSystem.out.println(\"Rectangle \"\n\t+ i + \" is \" + RecArray[i] + \" and its area is \"\n\t+ RecArray[i] .getArea());\n\n\n }", "private Room addRandomRoom(Random random) {\n int width = RandomUtils.uniform(random, MINROOMWIDTH, MAXROOMWIDTH);\n int height = RandomUtils.uniform(random, MINROOMHEIGHT, MAXROOMHEIGHT);\n int xCoordinate = RandomUtils.uniform(random, 0, size.width - width);\n int yCoordinate = RandomUtils.uniform(random, 0, size.height - height);\n Room newRoom = new Room(new Position(xCoordinate, yCoordinate), new Size(width, height));\n drawRoom(newRoom);\n return newRoom;\n }", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "Rectangle(){\n width = 5;\n height = 3;\n area = width * height;\n System.out.println(\"Area of a rectangle = \" +area);\n }", "RedSphere() {\n Random random = new Random();\n for (int i = 0; i < 6; i++) {\n value[i] = random.nextInt(33) + 1;\n }\n }", "public void generateLabyrinth() {\n\n /**\n * Generate some randoms Monsters for rooms\n */\n Monsters[] monster = new Monsters[countRooms];\n for (int i = 0; i < countRooms; i++) {\n monster[i] = new Monsters(\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1,\n rnd.nextDouble() * 10 + 1\n );\n }\n\n /**\n * Genetare random rooms with monsters\n */\n Rooms[] room = new Rooms[countRooms];\n for (int i = 0; i < countRooms; i++) {\n room[i] = new Rooms(\"unknownRoom\" + i);\n room[i].setMonster(monster[i]);\n if (rnd.nextInt(100) < 50) {\n room[i].setItem(shop.getRandomItem());\n }\n }\n\n /**\n * Connecting rooms with each other\n * North to South\n * East to West\n */\n\n //init and connect first room with labyrinth\n currentRoom = new Rooms(\"startRoom\");\n currentRoom.setNorth(room[0]);\n room[0].setSouth(currentRoom);\n\n for (int i = 0; i < countRooms - 1; i++) {\n int rint;\n //North to South\n rint = rnd.nextInt(countRooms);\n if (room[i].getNorth() == null) {\n while (room[rint].getSouth() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setNorth(room[rint]);\n room[rint].setSouth(room[i]);\n }\n //East to West\n rint = rnd.nextInt(countRooms);\n if (room[i].getEast() == null) {\n while (room[rint].getWest() != null) {\n rint = rnd.nextInt(countRooms);\n }\n room[i].setEast(room[rint]);\n room[rint].setWest(room[i]);\n }\n\n }\n\n\n }", "public Room( Rectangle r){\n\t\tthis.r = r;\n\t}", "public void randomY() {\r\n\t\tdouble randomDub = Math.random();\r\n\t\tint randomIntY = (int)randomDub*4;\r\n\t\tthis.ycoord = randomIntY;\r\n\t}", "private RandomLocationGen() {}", "BlueSphere() {\n Random random = new Random();\n value[0] = random.nextInt(16) + 1;\n }", "public Ant(){ // The position and direction of the ant is completely randomizated in it's creation\n this.position[0] = (int)Math.floor(Math.random() * 20); \n this.position[1] = (int)Math.floor(Math.random() * 20);\n this.image = (int)Math.floor(Math.random() * 4);\n }", "public Background() {\n\t\ttime = 0;\n\t\tRandom rand = new Random();\n\t\trandomGrid = new Vector2[101][101];\n\t\tfor (int i = 0; i < randomGrid.length; i++) {\n\t\t\tfor (int j = 0; j < randomGrid[0].length; j++) {\n\t\t\t\trandomGrid[i][j] = new Vector2(rand.nextFloat() - 0.5f, rand.nextFloat() - 0.5f).nor();\n\t\t\t}\n\t\t}\n\n\t\tshapeRenderer = new ShapeRenderer();\n\t}", "public RectangleShape(int xCoord, int yCoord, int widthOfRect, int heightOfRect)\n {\n System.out.println(\"setting x to: \"+ xCoord+\" & setting y to: \"+ yCoord);\n x = xCoord;\n y = yCoord;\n width = widthOfRect;\n height = heightOfRect;\n }", "public static void randomInit(int r) { }", "Rectangle getRect(){\n \treturn new Rectangle(x,y,70,25);\n }", "private Rectangle(Point position, Map<String, Double> properties, Color color, Color fillColor) {\n super(position, color, fillColor);\n this.properties = properties;\n }", "public Rectangle(int x, int y, int width, int height, Color color) {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.color = color;\n }", "void reset(){ \n cueX= width/2 -150;\n cueY= height/2;\n \n \n redX = random(right , middle); redY = random(top, bottom);\n bluX = random(left, middle); bluY= random(top, bottom);\n yelX = random(left, right); yelY= random(top, bottom);\n \n //speed\n redDX = random(1,3); redDY = random(1,3);\n bluDX = random(1,3); bluDY = random(1,3);\n yelDX = random(1,3); yelDY = random(1,3);\n cueDX = random(1,3); cueDY = random(1,3);\n}", "public static Vector2D getRandInPoint(Bounds rect)\n\t{\n\t\tfloat x = getRandomFloat(rect.getX(), rect.getX() + rect.getWidth());\n\t\tfloat y = getRandomFloat(rect.getY(), rect.getY() + rect.getHeight());\n\t\treturn new Vector2D(x, y);\n\t}", "public Rectangle(Integer width, Integer height) {\n super(300, 100, \"red\",null);\n this.width = width;\n this.height = height;\n control = new Control(this);\n }", "private static int getRandomNumberOfRooms(){\r\n return r.nextInt(50)+1;\r\n }", "public void genField() {\n\t\tint mines = (int)(height * width * .1);\r\n\t\tRandom random = new Random();\r\n\t\tint x;\r\n\t\tint y;\r\n\t\tint i = 0;\r\n\t\twhile(i < mines) {\r\n\t\t\tx = random.nextInt(width);\r\n\t\t\ty = random.nextInt(height);\r\n\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\tcells.get(x).get(y).setValue(-1);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor(x = 0; x < width; x++) {\r\n\t\t\tfor(y = 0; y < height; y++) {\r\n\t\t\t\tif(cells.get(x).get(y).getValue() != -1) {\r\n\t\t\t\t\tprocessCell(x, y); //generate cell number\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "MyRectangle(double height, double width, MyColor color) {\n\t\tsuper(color);\n\t\tthis.height=height;\n\t\tthis.width=width;\n\t}", "public MinigameGhost() {\n this(Math.random() * RIGHT_BORDER, Math.random() * LOWER_BORDER);\n }", "private PointF getRandCoordinate() {\n Random r = new Random();\n float xRand = (r.nextInt(getWidth()) / density) + 1;\n float y = 10 / density;\n\n return new PointF(xRand, y);\n }", "public Square(Point start, Point end, Boolean fill){ //constructor for class Rectangle\r\n this.origin = start;\r\n this.start = start;\r\n this.end = end;\r\n this.fill = fill;\r\n }", "public Rectangle(float w, float h, float x, float y, float r, float g, float b, String n, int s, int e) {\n super(x, y, r, g, b, n, s, e);\n this.width = w;\n this.height = h;\n }", "@Override\r\n\tpublic void initialize() {\n\t\tRandom randomGenerator = new Random();\r\n\t\tthis.size = Helper.getRandomInRange(1, 9, randomGenerator);\r\n\t\tif (this.size % 2 == 0)\r\n\t\t\tthis.size--;\r\n\t}", "@Before\r\n\tpublic void setUp() {\r\n\t\tvalidRectangle = new Rectangle(LENGTH, WIDTH);\r\n\t}", "void randomBlock() {\n\t\t// map generate (int map)\n\t\tfor (int i = 0; i < mapX; i += 2) {\n\t\t\tfor (int j = 0; j < mapY; j += 2) {\n\t\t\t\tint r = (int) Math.random() * 4;\n\t\t\t\tif (r == 0) {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 1);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 1);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 1);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 1);\n\n\t\t\t\t} else {\n\t\t\t\t\ttileMap[i][j] = new Tile(i, j, 0);\n\t\t\t\t\ttileMap[i + 1][j] = new Tile(i + 1, j, 0);\n\t\t\t\t\ttileMap[i][j + 1] = new Tile(i, j + 1, 0);\n\t\t\t\t\ttileMap[i + 1][j + 1] = new Tile(i + 1, j + 1, 0);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public Rectangle(int x, int y, int width, int height, Color colour) {\n\t\tsuper(x,y,width,height,colour);\n\t}", "private void createRectangles() {\r\n rectangles.clear();\r\n for (int i = 0; i < gridSize * gridSize; i++) {\r\n Rectangle r = new Rectangle(rectangleSize, rectangleSize, Color.BLUE);\r\n r.setStroke(Color.BLACK);\r\n rectangles.add(r);\r\n }\r\n }", "public Rectangle(int length, int width)\n {\n this.length = length;\n this.width = width;\n\n }", "public void rollRandom() {\n\t\tthis.strength = randomWithRange();\r\n\t\tthis.wisdom = randomWithRange();\r\n\t\tthis.dexterity = randomWithRange();\r\n\t\tthis.constitution = randomWithRange();\r\n\t\tthis.intelligence = randomWithRange();\r\n\t\tthis.charisma = randomWithRange();\r\n\t}", "public Rectangle(double width, double height) {\r\n this.width = width;\r\n this.height = height;\r\n }", "public City() {\r\n\t\tthis.x = (int) (Math.random() * 200);\r\n\t\tthis.y = (int) (Math.random() * 200);\r\n\t}", "MyRectangle (int x, int y, int width, int height, int screenWidth, int screenHeight, int colorIdx)\n {\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.screenWidth = screenWidth;\n this.screenHeight = screenHeight;\n this.color = COLORS[colorIdx];\n }", "public Rectangle(int recLength, int recWidth) {\n super(recLength, recWidth);\n System.out.println(\"\\nA rectangle is being created!\\n\");\n }", "public Ball(Point c)\n\t{\n\t\tcenter = c;\n\t\t// Random velocity\n\t\tvelocity = new Point((int)(Math.random()*20-10), (int)(Math.random()*20-10));\n\t\tradius = 20;\n\t\t//\n\t\trepaint();\n\t}" ]
[ "0.7101882", "0.69259983", "0.6697725", "0.6684571", "0.66689533", "0.6663921", "0.66541356", "0.6627333", "0.65716463", "0.65710723", "0.65674615", "0.65301555", "0.6521405", "0.64998716", "0.64564687", "0.64203405", "0.64203405", "0.6419499", "0.64001966", "0.63969076", "0.6388468", "0.63832635", "0.63568634", "0.6351748", "0.634779", "0.6335728", "0.63256556", "0.63100123", "0.6306762", "0.6305235", "0.6294227", "0.62852395", "0.62175167", "0.6205356", "0.6197282", "0.61959124", "0.61860424", "0.6167712", "0.6150453", "0.61492723", "0.6127977", "0.6108681", "0.6102151", "0.6095076", "0.60834426", "0.6081943", "0.60520923", "0.6036474", "0.6035874", "0.6032227", "0.6029607", "0.60294867", "0.60127705", "0.60016745", "0.59986883", "0.5977366", "0.5975562", "0.5971696", "0.5958549", "0.59525204", "0.59507775", "0.59497243", "0.5939996", "0.591218", "0.591218", "0.59107643", "0.5910683", "0.5908678", "0.5908222", "0.5903653", "0.5903605", "0.59017265", "0.5899085", "0.5896981", "0.58896655", "0.5882436", "0.58670646", "0.58666265", "0.58652896", "0.5860343", "0.5857793", "0.5839622", "0.58136874", "0.5797195", "0.5795214", "0.5789449", "0.5776426", "0.5772972", "0.5768583", "0.5754134", "0.5750777", "0.5749735", "0.57472473", "0.57469255", "0.5742237", "0.57311416", "0.5729527", "0.572821", "0.57264364", "0.57231253" ]
0.57907474
85
Access catalog component and retrieve transportation data from the database
public List searchTransportation(String origin, String destination, Locale locale) throws HTMLActionException { List transportation = null; List transportationBean = new ArrayList(); // call catalog component try { CatalogFacade catalogFacade = new CatalogFacade(); transportation = catalogFacade.getTransportations(origin, destination, locale); // Catch catalog exceptions and re-throw them as // mini-app application defined exceptions. } catch (Exception e) { throw new HTMLActionException( "Transportation Search Exception:: Catalog Exception accessing catalog component: " + e); } for (int i = 0; i < transportation.size(); ++i) { transportationBean .add(new TransportationBean( ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getTransportationId(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getName(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDescription(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getImageURI(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getPrice(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getOrigin(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDestination(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getCarrier(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getDepartureTime(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getArrivalTime(), ((com.sun.j2ee.blueprints.catalog.Transportation) transportation .get(i)).getTravelClass())); } return transportationBean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Catalog getCatalog();", "Catalog getCatalog();", "Catalog getCatalog();", "public IFuture<ItemInfo[]> getCatalog()\n\t{\n\t\tfinal Future<ItemInfo[]> ret = new Future<ItemInfo[]>();\n\t\tShopCapa shop = (ShopCapa)capa.getPojoCapability();\n\t\tret.setResult(shop.getCatalog().toArray(new ItemInfo[shop.getCatalog().size()]));\n\t\treturn ret;\n\t}", "public void consulterCatalog() {\n\t\t\n\t}", "public String catalog() {\n return catalogName;\n }", "public String catalog() {\n return catalogName;\n }", "@Override\n public CatalogDAO getCatalogDao() {\n return daoCatalog;\n }", "public ArrayList<ComProduct> get_all_comproduct() throws Exception {\n\n \t\t log.setLevel(Level.INFO);\n\t log.info(\" service operation started !\");\n\n\t\ttry{\n\t\t\tArrayList<ComProduct> ComProduct_list;\n\n\t\t\tComProduct_list = ComProduct_Default_Activity_dao.get_all_comproduct();\n\n \t\t\tlog.info(\" Object returned from service method !\");\n\t\t\treturn ComProduct_list;\n\n\t\t}catch(Exception e){\n\n\t\t\tSystem.out.println(\"ServiceException: \" + e.toString());\n\t\t\tlog.error(\" service throws exception : \"+ e.toString());\n\n\t\t}\n\t\treturn null;\n\n\n\n\t}", "private void cargarCatalogo() throws DAOException {\n\t\t List<Usuario> usuariosBD = adaptadorUsuario.recuperarTodosUsuarios();\n\t\t for (Usuario u: usuariosBD) \n\t\t\t usuarios.put(u.getTelefono(), u);\n\t}", "protected SystemCatalog getSystemCatalog() {\n return catalog;\n }", "void fetchForSaleHousesData();", "protected abstract void retrievedata();", "public find() {\n initComponents();\n loadTBL(\"select * from before_production order by date\");\n loadSupp();\n }", "private void importCatalogue() {\n\n mAuthors = importModelsFromDataSource(Author.class, getHeaderClass(Author.class));\n mBooks = importModelsFromDataSource(Book.class, getHeaderClass(Book.class));\n mMagazines = importModelsFromDataSource(Magazine.class, getHeaderClass(Magazine.class));\n }", "private void retrieveCurrencyData() {\n Log.d(TAG, \" startService\");\n service = new Intent(this, CurrencyLoaderService.class);\n startService(service); //Starting the service\n bindService(service, mConnection, Context.BIND_AUTO_CREATE);\n\n }", "public abstract co\n\t\t.com\n\t\t.telefonica\n\t\t.atiempo\n\t\t.ejb\n\t\t.eb\n\t\t.Catalogo_causalLocal getCatalogo_causal();", "public EODataSource queryDataSource();", "public void getAll() {\n try {\n\n String sql = \"select * from project_zero.carlot where owner = 'DEALERSHIP';\";\n Statement st = ConnectionUtil.getInstance().getConnection().createStatement();\n ResultSet rs = st.executeQuery(sql);\n\n while(rs.next()) {\n Car c = new Car(rs.getInt(1), rs.getString(2), rs.getString(3),\n rs.getInt(4), rs.getString(5), rs.getString(6), rs.getInt(7));\n System.out.println(c.toString());\n\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public Catalogue getCatalogue() {\n return catalogue;\n }", "@Override\r\n\t\tpublic String getCatalog() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "private void _loadCatalog() {\n if (discoveryEndpoint != null) {\n try {\n ResponseEntity<String> response = restTemplate.getForEntity(discoveryEndpoint, String.class);\n\n if (response.getStatusCode() == HttpStatus.OK) {\n String body = response.getBody();\n this.catalog = CdsHooksUtil.GSON.fromJson(body, CdsHooksCatalog.class);\n startPendingRequests();\n return;\n }\n } catch (Exception e) {\n log.warn(\"Failed to load CDS catalog for \" + discoveryEndpoint\n + \".\\nRetries remaining: \" + retries + \".\");\n }\n\n retry();\n }\n }", "private Transport extractTransport() {\n List<String> names = getNames(\"transport\");\n TransportSelectAsyncTask task = new TransportSelectAsyncTask();\n TransportMapper mapper = new TransportMapper();\n task.setNames(names);\n try {\n List<TransportDb> list = task.execute().get();\n if (list.size() > 0) {\n return mapper.to(list.get(0));\n }\n } catch (InterruptedException | ExecutionException e) {\n Log.e(TAG, \"extractTransports: \" + e.getMessage(), e);\n }\n return null;\n }", "private void loadCatalog() {\n try {\n log.info(\"Attempting to retrieve CDS Hooks catalog from \" + discoveryEndpoint + \"...\");\n ThreadUtil.getApplicationThreadPool().execute(createThread());\n } catch (Exception e) {\n log.error(\"Error attempting to retrieve CDS Hooks catalog from \" + discoveryEndpoint, e);\n retry();\n }\n }", "public ProductCatalog getCatalog() throws RemoteException;", "public interface CatalogueClient {\n\n\tList<Exoplanet> getCatalogue();\n\n}", "public Catalog getCatalogProducts() {\n return catalogProducts;\n }", "public String getDatabaseProduct();", "List<CatalogItem> getAllCatalogItems();", "private ProductCatalog() {\n catalogPresenter = new CatalogPresenter(new CatalogRepositoryDb(), this);\n initComponents();\n fillComboBoxes();\n pagesTextField.setText(String.valueOf(currentPage));\n previousPageButton.setEnabled(false);\n setupTable();\n disableButons();\n catalogPresenter.getCategoriesFromDb();\n addRowSelectionListener();\n setupSearchTextFields();\n lockLowerDate();\n }", "DataProviders retrieveProviders() throws RepoxException;", "DataProviders retrieveProviders() throws RepoxException;", "public List<TransporteTerrestreEntity> getTransportes() {\n LOGGER.log(Level.INFO, \"Inicia proceso de consultar todos los transportes.\");\n List<TransporteTerrestreEntity> transportes = persistence.findAll(); \n LOGGER.log(Level.INFO, \"Termina proceso de consultar todos los transportes\");\n return transportes; \n }", "public Transports getTransports();", "private void getTDP(){\n TDP = KalkulatorUtility.getTDP_ADDB(DP,biayaAdmin,polis,tenor, bungaADDB.size());\n LogUtility.logging(TAG,LogUtility.infoLog,\"getTDP\",\"TDP\",JSONProcessor.toJSON(TDP));\n }", "private void getDepartamentos() {\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n\n String jpql =\"SELECT d FROM Departamento d \"\n + \"WHERE d.estado = 'a'\";\n\n Query query = em.createQuery(jpql);\n List<Departamento> listDepartamentos = query.getResultList();\n ArrayList<Departamento> arrayListDepartamentos = new ArrayList<>();\n for(Departamento d: listDepartamentos){\n arrayListDepartamentos.add(d);\n }\n this.Listdepartamentos = arrayListDepartamentos;\n em.close();\n emf.close();\n }\n catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n }\n }", "DataCollectionInfo getInfo();", "DataSources retrieveDataSources() throws RepoxException;", "List<Transport> getTransports();", "private List<ProductionData> getProdData(LocalDateTime from, LocalDateTime to) {\n List<ProductionData> data = null;\n try {\n data = prodDao.getData(from, to);\n } catch (IOException e) {\n // Throw generic exception\n }\n\n return data;\n }", "@Listen(\"onChange = #txtNombreMostrarTematica,#txtAreaMostrarTematica,#txtDescripcionMostrarTematica\")\r\n\tpublic void filtrarDatosCatalogo() {\r\n\t\tList<Tematica> tematicas1 = servicioTematica.buscarActivos();\r\n\t\tList<Tematica> tematicas2 = new ArrayList<Tematica>();\r\n\r\n\t\tfor (Tematica tematica : tematicas1) {\r\n\t\t\tif (tematica\r\n\t\t\t\t\t.getNombre()\r\n\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t.contains(txtNombreMostrarTematica.getValue().toLowerCase())\r\n\t\t\t\t\t&& tematica\r\n\t\t\t\t\t\t\t.getDescripcion()\r\n\t\t\t\t\t\t\t.toLowerCase()\r\n\t\t\t\t\t\t\t.contains(\r\n\t\t\t\t\t\t\t\t\ttxtDescripcionMostrarTematica.getValue()\r\n\t\t\t\t\t\t\t\t\t\t\t.toLowerCase())) {\r\n\t\t\t\ttematicas2.add(tematica);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tltbTematica.setModel(new ListModelList<Tematica>(tematicas2));\r\n\r\n\t}", "private static void runCatalog() {\r\n\r\n\t\tSystem.out.println(sqlAL.get(0));\r\n\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tString sql = \"\";\r\n\t\tboolean tableExist = true;\r\n\t\tString tname = \"\";\r\n\t\tString cmd = \"\";\r\n\r\n\t\ttry {\r\n\t\t\t// STEP 2: Register JDBC driver\r\n\t\t\tClass.forName(catalogDriver);\r\n\r\n\t\t\t// STEP 3: Open a connection\r\n\t\t\tif (catalogUserName.equals(\" \") && catalogPassword.equals(\" \")) {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName);\r\n\t\t\t} else {\r\n\t\t\t\tconn = DriverManager.getConnection(catalogHostName, catalogUserName, catalogPassword);\r\n\t\t\t}\r\n\r\n\t\t\t// STEP 4: Execute a query\r\n\t\t\tstmt = conn.createStatement();\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tsql = \"SELECT * FROM dtables\";\r\n\t\t\t\tstmt.executeQuery(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table already exists\");\r\n\r\n\t\t\t} catch (SQLException e) {\r\n\r\n\t\t\t\ttableExist = false;\r\n\r\n\t\t\t\tSystem.out.println(\"Catalog table does not exist\");\r\n\t\t\t}\r\n\r\n\t\t\tif (tableExist == false) {\r\n\t\t\t\tsql = \"CREATE TABLE dtables(tname char(32),\" + \"nodedriver char(64),\" + \"nodeurl char(128),\"\r\n\t\t\t\t\t\t+ \"nodeuser char(16),\" + \"nodepasswd char(16),\" + \"partmtd int,\" + \"nodeid int,\"\r\n\t\t\t\t\t\t+ \"partcol char(32),\" + \"partparam1 char(32),\" + \"partparam2 char(32))\";\r\n\r\n\t\t\t\tstmt.executeUpdate(sql);\r\n\r\n\t\t\t\tSystem.out.println(\"SQL table created\");\r\n\t\t\t}\r\n\r\n\t\t\tfor (int x = 0; x < nodeAL.size(); x++) {\r\n\r\n\t\t\t\ttname = parseTname(sqlAL.get(x));\r\n\r\n\t\t\t\tcmd = getCmd(sqlAL.get(x));\r\n\t\t\t\t// System.out.println(cmd);\r\n\r\n\t\t\t\tif (cmd.equals(\"CREATE\")) {\r\n\r\n\t\t\t\t\tsql = \"INSERT INTO dtables VALUES \" + \"('\" + tname + \"', \" + \"'\" + (nodeAL.get(x)).getDriver()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getHostName() + \"', \" + \"'\" + (nodeAL.get(x)).getUserName()\r\n\t\t\t\t\t\t\t+ \"', \" + \"'\" + (nodeAL.get(x)).getPassword() + \"', \" + -1 + \", \" + \"\" + x + \", \" + null\r\n\t\t\t\t\t\t\t+ \", \" + null + \", \" + null + \")\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t} else if (cmd.equals(\"DROP\")) {\r\n\t\t\t\t\tsql = \"DELETE FROM dtables WHERE \" + \"tname = '\" + tname + \"'\" + \"AND nodedriver = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getDriver() + \"' \" + \"AND nodeurl = '\" + (nodeAL.get(x)).getHostName()\r\n\t\t\t\t\t\t\t+ \"' \" + \"AND nodeuser = '\" + (nodeAL.get(x)).getUserName() + \"' \" + \"AND nodepasswd = '\"\r\n\t\t\t\t\t\t\t+ (nodeAL.get(x)).getPassword() + \"' \"\r\n\t\t\t\t\t\t\t// + \"AND partmtd = \" + -1 + \"'\"\r\n\t\t\t\t\t\t\t+ \"AND nodeid = \" + x + \"\"\r\n\t\t\t\t\t\t\t// + \"AND partcol = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam1 = '\" + null + \"'\"\r\n\t\t\t\t\t\t\t// + \"AND partparam2 = '\" + null\r\n\t\t\t\t\t\t\t+ \"\";\r\n\r\n\t\t\t\t\tstmt.executeUpdate(sql);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// rs.close();\r\n\t\t\tstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: Catalog Updated\");\r\n\t\t} catch (SQLException se) {\r\n\t\t\t// Handle errors for JDBC\r\n\t\t\t// se.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} catch (Exception e) {\r\n\t\t\t// Handle errors for Class.forName\r\n\t\t\t// e.printStackTrace();\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"[\" + catalogHostName.substring(0, (catalogHostName.length() - 1)) + \"]: catalog update failed\");\r\n\t\t} finally {\r\n\t\t\t// finally block used to close resources\r\n\t\t\ttry {\r\n\t\t\t\tif (stmt != null)\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t} catch (SQLException se2) {\r\n\t\t\t} // nothing we can do\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException se) {\r\n\t\t\t\tse.printStackTrace();\r\n\t\t\t} // end finally try\r\n\t\t} // end try\r\n\t\t\t// System.out.println(\"Goodbye!\");\r\n\r\n\t}", "public ProductInfo call() throws DataLoadException {\n\t\t\treturn new ProductInfo();\r\n\t\t}", "List<EquipmentCategory> getAllEquipment() throws PersistenceException;", "public RecordSet obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe) throws MareException{\n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Entrada\");\n \n RecordSet rs = new RecordSet();\n StringBuffer query = new StringBuffer();\n BelcorpService bs;\n try\n { bs = BelcorpService.getInstance();\n }\n catch(MareMiiServiceNotFoundException ex)\n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_AL_PEDIR_UN_SERVICIO_MARE));\n }\n\n // gPineda - V-COB006 - 30/01/2007\n //query.append(\" SELECT OID_ETAP_DEUD_TIPO_CARG AS OID, VAL_DESC descripcion \");\n query.append(\" SELECT oid_etap_deud_tipo_carg AS OID, NVL(val_desc, gen.VAL_I18N) descripcion \");\n query.append(\" FROM cob_etapa_deuda_tipo_cargo etapTipoCar, \");\n query.append(\" \t\t ccc_tipo_cargo_abono tipoCar, \");\n query.append(\" \t\t gen_i18n_sicc_pais gen \");\n query.append(\" WHERE ETDE_OID_ETAP_DEUD = \" + dtoe.getOid() );\n query.append(\" \t and etapTipoCar.TCAB_OID_TIPO_CARG_ABON = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.VAL_OID = tipoCar.OID_TIPO_CARG_ABON \");\n query.append(\" \t\t and gen.ATTR_ENTI = 'CCC_TIPO_CARGO_ABONO' \");\n query.append(\" \t\t and gen.ATTR_NUM_ATRI = 1 \");\n query.append(\" ORDER BY descripcion \");\n \n try \n { rs = bs.dbService.executeStaticQuery(query.toString());\n }\n catch (Exception ex) \n { throw new MareException(ex, UtilidadesError.armarCodigoError(CodigosError.ERROR_DE_ACCESO_A_BASE_DE_DATOS));\n }\n \n UtilidadesLog.info(\"DAOParametrizacionCOB.obtenerTiposCargoPorEtapa(es.indra.sicc.util.DTOOID dtoe): Salida\");\n \n return rs; \n }", "private void showCourseCatalogue()\r\n {\r\n \tCourseCatalogue courseCat = this.getDBManager().getCourseCat();\r\n \tthis.getClientOut().printf(\"SUCCESS\\n%s\\n\", courseCat.toString());\r\n \tthis.getClientOut().flush();\r\n }", "private void fetchData() {\r\n RequesterBean requesterBean = new RequesterBean();\r\n requesterBean.setDataObject(hierarchyTitle);\r\n requesterBean.setFunctionType(GET_HIERARCHY_DATA);\r\n AppletServletCommunicator conn = new AppletServletCommunicator(connect,requesterBean);\r\n conn.send();\r\n ResponderBean responderBean = conn.getResponse();\r\n if(responderBean != null) {\r\n if(responderBean.isSuccessfulResponse()) {\r\n queryKey = hierarchyTitle;\r\n Hashtable htData = (Hashtable)responderBean.getDataObject();\r\n extractToQueryEngine(htData);\r\n }\r\n }else {\r\n //Server Error\r\n// throw new CoeusUIException(responderBean.getMessage(),CoeusUIException.ERROR_MESSAGE);\r\n }\r\n }", "public abstract List<TipoActividad> getTiposActividad() throws PersistenceException, ClassNotFoundException;", "public UfficioTecnicoDB() {\n this(ConnectionManager.getInstance());\n }", "public Supplier() {\n initComponents();\n con = DBconnect.connect();\n \n \n getTableDetails();\n \n \n \n }", "protected String loadDocumentDetails()\r\n\t{\r\n\t\tsetC_Currency_ID (NO_CURRENCY);\r\n\t\tX_M_Production prod = (X_M_Production)getPO();\r\n\t\tsetDateDoc (prod.getMovementDate());\r\n\t\tsetDateAcct(prod.getMovementDate());\r\n\t\t//\tContained Objects\r\n\t\tp_lines = loadLines(prod);\r\n\t\tif (log.isLoggable(Level.FINE)) log.fine(\"Lines=\" + p_lines.length);\r\n\t\treturn null;\r\n\t}", "public ColaProdAndes() {\n\t\tdinamicos = new ArrayList();\n\t\tdao = new ConsultaDAO();\n\t\ttry {\n\t\t\t// Inicia el contexto seg�n la interfaz dada por JBOSS.\n\t\t\tHashtable<String, String> env = new Hashtable<String, String>();\n\t\t\tenv.put(Context.INITIAL_CONTEXT_FACTORY,\n\t\t\t\t\t\"org.jnp.interfaces.NamingContextFactory\");\n\t\t\tSystem.out.println(\"CONTEXT FACTORY\");\n\t\t\tenv.put(Context.PROVIDER_URL, \"jnp://localhost:1099\");\n\t\t\tenv.put(Context.URL_PKG_PREFIXES,\n\t\t\t\t\t\"org.jboss.naming:org.jnp.interfaces\");\n\t\t\tSystem.out.println(\"LOCALHOST\");\n\t\t\tctx = new InitialContext(env);\n\t\t\tSystem.out.println(\"CTX \" + ctx);\n\t\t\t// Inicializa los datasource por JNDI.\n\t\t\tds = (DataSource) ctx.lookup(\"java:XAProd\");\n\t\t\tSystem.out.println(\"PASOOOOOO \");\n\t\t\t// Inicializa la fabrica de conexiones JMS.\n\t\t\tconnectionFactory = (SpyConnectionFactory) ctx\n\t\t\t\t\t.lookup(\"ConnectionFactory\");\n\t\t\tSystem.out.println(\"CONNECTION FACTORY\");\n\t\t\t// inicializa la coneccion\n\t\t\tconn = connectionFactory.createConnection();\n\t\t\tSystem.out.println(\"HIZO CONN\");\n\n\t\t\t// inicializa la sesion\n\t\t\tSession session = conn.createSession(false,\n\t\t\t\t\tSession.AUTO_ACKNOWLEDGE);\n\t\t\tSystem.out.println(\"SESSION \");\n\t\t\t// inicializa las colas\n\t\t\tcolaRequests1 = (Queue) ctx.lookup(\"queue/Requests1\");\n\t\t\tMessageConsumer consumer2 = session.createConsumer(colaRequests1);\n\t\t\tconsumer2.setMessageListener(this);\n\n\t\t\tcolaReplies1 = (Queue) ctx.lookup(\"queue/Replies1\");\n\t\t\tMessageConsumer consumer = session.createConsumer(colaReplies1);\n\t\t\tconsumer.setMessageListener(this);\n\n\t\t\tconn.start();\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"ProdAndes - Se cargo el data source & la fabrica de conexiones de forma adecuada..\");\n\n\t\t} catch (Exception e) {\n\t\t\t// Ocurrio un error y se imprimira por consola\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ArrayList<Dado> getCatalogoDadi() throws SQLException,AziendaException,ParseException {\n\t\tUserQuery uq = ProxyDB.getIstance();\n\t\treturn uq.getCatalogoDadi();\n\t}", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "public DBViewAllPilot() {\n\t\ttry {\n\t\tstatement = connection.createStatement(); \n\t\tviewAll(); //call the viewAll function; \n\t\t\n\t}catch(SQLException ex) {\n\t\tSystem.out.println(\"Database connection failed DBViewAllAircraft\"); \n\t}\n}", "@RequestMapping(method = RequestMethod.GET)\n\tpublic ResponseEntity<?> getCatalogItems() {\n\t\tBraveSpanContext openTracingContext = getTracingContext();\n\t\tio.opentracing.Span span = tracer.buildSpan(\"GetCatalogFromService\").asChildOf(openTracingContext)\n\t\t\t\t.withTag(\"Description\", \"Get All Catalogs\")\n\t\t\t\t.withTag(\"http_request_url\", request.getRequestURI()).start();\n\t\tbrave.Span braveSpan = ((BraveSpan) span).unwrap();\n\t\tbraveSpan.kind(Kind.SERVER);\n\n\t\tSummary.Timer requestTimer = Prometheus.requestLatency.startTimer();\n\t\ttry {\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog controller is called\");\n\t\t\tPrometheus.getCounters.inc();\n\t\t\tPrometheus.inProgressRequests.inc();\n\t\t\tio.opentracing.Span mongospan = tracer.buildSpan(\"MongoService\").asChildOf(span)\n\t\t\t\t\t.withTag(\"Description\", \"MongoDB Service Call\").start();\n\t\t\tbrave.Span braveMongoSpan = ((BraveSpan) mongospan).unwrap();\n\t\t\tlog.debug(\"Calling getCatalogItems() method of catalog service\");\n\t\t\tList<Catalog> catalog = service.getCatalogItems(mongospan);\n\t\t\tbraveMongoSpan.finish();\n\t\t\tif (catalog == null) {\n\t\t\t\tlog.debug(\"No records found. Returning NOT_FOUND status.\");\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Returning list of items.\");\n\t\t\t\treturn new ResponseEntity<>(catalog, HttpStatus.OK);\n\t\t\t}\n\t\t} catch (Exception exc) {\n\t\t\tPrometheus.requestFailures.inc();\n\t\t\tlog.error(\"Error in getCatalogItems\", exc);\n\t\t\tspan.setTag(\"error\", exc.getMessage());\n\t\t\treturn new ResponseEntity<>(exc.toString(), HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t} finally {\n\t\t\trequestTimer.observeDuration();\n\t\t\tPrometheus.inProgressRequests.dec();\n\t\t\tspan.finish();\n\t\t}\n\t}", "@Override\r\n\tpublic ArrayList<VendorConfig> extractData(ResultSet rs) throws SQLException, DataAccessException {\n\t\t\r\n\t\tlogger.info(\"extractData()....COUNT of RS:\"+rs.getFetchSize());\r\n\t\tif(rs.next()) {\r\n\t\t\tVendorConfig storeCfg = new VendorConfig();\r\n\t\t\t//String[] categories = rs.getString(i++).split(\",\");\r\n\t\t\t//logger.info(\"categories::\"+categories);\r\n\t\t\tstoreCfg.setVendorId(rs.getString(\"vendor_id\"));\r\n\t\t\tstoreCfg.setCategories(rs.getString(\"categories\"));\r\n\t\t\tstoreCfg.setDeliveryFlag(rs.getByte(\"delivery_flag\"));\r\n\t\t\tstoreCfg.setDeliveryStartTime(rs.getTime(\"delivery_start_time\"));\r\n\t\t\tstoreCfg.setDeliveryEndTime(rs.getTime(\"delivery_end_time\"));\r\n\t\t\tstoreCfg.setStoreStartTime(rs.getTime(\"store_hours_start\"));\r\n\t\t\tstoreCfg.setStoreEndTime(rs.getTime(\"store_hours_end\"));\r\n\t\t\tstoreCfg.setStoreOpenDays(rs.getString(\"store_days\"));\r\n\t\t\tstoreCfg.setShopName(rs.getString(\"shop_name\"));\r\n\t\t\tstoreCfg.setCategoryDescription(rs.getString(\"shop_cat_desc\"));\r\n\t\t\tstoreCfg.setStatus(rs.getString(\"shop_status\"));\r\n\t\t\tstoreCfg.setDeliveryLocationId(rs.getString(\"delivery_loc_id\"));\r\n\t\t\tstoreCfg.setPhone(rs.getString(\"phone\"));\r\n\t\t\tstoreCfg.setEmail(rs.getString(\"email\"));\r\n\t\t\tstoreCfg.setAddress(rs.getString(\"address\"));\r\n\t\t\tstoreCfg.setShopLogoLink(rs.getString(\"shop_logo_link\"));\r\n\t\t\tstoreCfg.setAboutUs(rs.getString(\"about_us\"));\r\n\t\t\tstoreCfg.setFeaturesOne(rs.getString(\"features_one\"));\r\n\t\t\tstoreCfg.setFeaturesTwo(rs.getString(\"features_two\"));\r\n\t\t\tstoreCfg.setFeaturesThree(rs.getString(\"features_three\"));\r\n\t\t\tstoreCfg.setFeaturesFour(rs.getString(\"features_four\"));\r\n\t\t\tstoreCfg.setFeaturesFive(rs.getString(\"features_five\"));\r\n\t\t\tstoreCfg.setFeaturesSix(rs.getString(\"features_six\"));\r\n\t\t\tstoreCfg.setAboutShopLogoLink(rs.getString(\"about_shop_logo_link\"));\r\n\t\t\tstoreCfg.setCountry_code(rs.getString(\"country_code\"));\r\n\t\t\t//delivery_flag, delivery_start_time, delivery_end_time, delivery_loc_id, store_hours_start, store_hours_end, store_days\r\n\t\t\tvendorConfigs.add(storeCfg);\r\n\t\t}\r\n\t\t\r\n\t\treturn vendorConfigs;\r\n\t}", "public void loadContainer() throws SQLException\n\t{\n\n\t\ttry \n\t\t{\n\t\t\tsuper.connect();\n\t\t\tsuper.configuationObjects.clear();\n\n\t\t\tResultSet rs1 = super.pst.executeQuery(sqlSelect1);\n\t\t\twhile (rs1.next())\n\t\t\t{\n\t\t\t\tInteger id \t\t\t= rs1.getInt(\"id\");\n\t\t String descr \t\t\t= rs1.getString(\"descr\");\n\t\t Integer deviceTypeId = rs1.getInt(\"device_type_id\");\n\t\t String ipAddress \t\t= rs1.getString(\"ip_address\");\n\t\t String macAddress \t\t= rs1.getString(\"mac_address\");\n\t\t String serial\t \t\t= rs1.getString(\"serial\");\n\t\t Timestamp timestamp \t= rs1.getTimestamp(\"create_date\");\n\t\t \t\t \n\t\t DeviceType deviceType = (DeviceType) this.getReferencedObject(\"DeviceType\", deviceTypeId);\n\t\t \n\t\t MonitoringDevice object = new MonitoringDevice(id);\n\t\t object.setDescr(descr);\n\t\t object.setIp_address(ipAddress);\n\t\t object.setMac_addres(macAddress);\n\t\t object.setSerial(serial);\n\t\t object.setType(deviceType);\n\t\t object.setCreate_date(timestamp.toLocalDateTime());\n\t\t \n\t\t super.configuationObjects.put(id, object);\n\t\t \n\t\t if (macAddress != null){\n\t\t\t if (!macAddress.isEmpty())\n\t\t\t \tindexByMac.put(macAddress,id);\n\t\t }\n\t\t \n\t\t if (ipAddress != null){\n\t\t\t if (!ipAddress.isEmpty())\n\t\t\t \tindexByIpAddress.put(ipAddress, id);\n\t\t }\n\t\t \n\t\t if (serial != null){\n\t\t\t if (!serial.isEmpty())\n\t\t\t \tindexBySerial.put(serial,id);\n\t\t }\n\t\t\t}\n\t\t\t\n\t\t\trs1.close();\n\t\t\t\n\t\t\tResultSet rs2 = super.pst.executeQuery(sqlSelect2);\n\t\t\twhile (rs2.next())\n\t\t\t{\t\t \n\n\t\t\t\tInteger id \t\t\t= rs2.getInt(\"id\"); \n\t\t String transformation\t= rs2.getString(\"transformation_text\");\n\t\t Integer deviceId \t= rs2.getInt(\"device_id\");\n\t\t Integer signalTypeId\t= rs2.getInt(\"signal_type_id\");\n\t\t String portLabel\t\t= rs2.getString(\"port_label\");\n\t\t Integer refreshTimeMs = rs2.getInt(\"refresh_time_ms\");\n\t\t Integer measuredEntityId = rs2.getInt(\"measured_entity_id\");\n\t\t \t\t \n\t\t MonitoringDevice device= (MonitoringDevice) this.getObject(deviceId);\n\t\t Signal signal = (Signal) this.getReferencedObject(\"Signal\", signalTypeId);\n\t\t \n\t\t InputOutputPort port = new InputOutputPort(id);\n\t\t port.setSignalType(signal);\n\t\t port.setTransformationText(transformation);\n\t\t port.setPortLabel(portLabel);\n\t\t port.setMeasuringEntity(measuredEntityId);\n\t\t port.setRefreshTimeMs(refreshTimeMs);\n\t\t \n\t\t device.putInputOutputPort(port);\n\t\t\t}\n\t\t\t\n\t\t\trs2.close();\n\t\t\t\n\t\t\tsuper.disconnect();\n\t\t\t\n\t\t} catch (ClassNotFoundException e){\n \tString error = \"Could not find the driver class - Error\" + e.getMessage(); \n \tlogger.error(error);\n \te.printStackTrace();\n \tthrow new SQLException(error);\n } catch (SQLException e) {\n \tString error = \"Container:\" + this.getClass().getName() + \"Error connecting to the database - error:\" + e.getMessage();\n \tlogger.error(error);\n \te.printStackTrace(); \t\n \tthrow new SQLException(error);\n }\n\t\t\n\t}", "public ExternalServicesDto getExternalServiceData();", "private String getCatalog(String myURl) throws IOException{\r\n InputStream inputStreamFromServer = null;\r\n String responseAsString = null;\r\n try {\r\n //Creates and configures the HttpURLConnection\r\n URL url = new URL(myURl);\r\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\r\n httpURLConnection.setRequestMethod(\"GET\");\r\n httpURLConnection.setConnectTimeout(15000);\r\n httpURLConnection.setDoInput(true);\r\n\r\n //Starts the query\r\n httpURLConnection.connect();\r\n\r\n //gets response code\r\n int responseCode = httpURLConnection.getResponseCode();\r\n QuantityDictionay.debugLog(\"The response code is: \"+responseCode);\r\n\r\n //gets the connection Input Stream\r\n inputStreamFromServer = httpURLConnection.getInputStream();\r\n\r\n //Convert the input stream to String\r\n responseAsString= inputStreamToString(inputStreamFromServer);\r\n\r\n }catch (IOException e){\r\n\r\n e.printStackTrace();\r\n QuantityDictionay.debugLog(\"Exception thrown on GetProductCatalogTask.getCatalog\");\r\n\r\n }\r\n return responseAsString;\r\n }", "public StoreCatalogTools getCatalogTools() {\n return mCatalogTools;\n }", "List<TransportEntity> getAllEntityOfQuery();", "Product getProductDetails(int idproduct) throws DataBaseException;", "public void retrieveProductFromDatabase(){\r\n // retrieve product from the database here\r\n System.out.println(\"Product Retrieved using ID --> \" + this.productId);\r\n \r\n }", "private void processCDT(Connection conn, AnyCDTs anyCDT) throws SmartServiceException {\n\t\t\n\t\tString userType = anyCDT.getUserDefinedTableType();\n\t\tString storedProcedure = anyCDT.getStoredProcedure();\n\t\tObject anyObj = anyCDT.getAnyCDT();\n\t\tMap<String, Integer> nameType = null;\n\t\tList<String> nodeNames = new ArrayList<String>();\n\t\tSQLServerDataTable userTable = null;\n\t\t\n\t\t\n\t\tif (userType == null || userType.equalsIgnoreCase(\"\")\n\t\t\t|| storedProcedure == null || storedProcedure.equalsIgnoreCase(\"\")) {\n\t\t\tthrow new SmartServiceException.Builder(TestCDTAnyDB.class, new Throwable(\"userType \" + userType + \" or storedProcedure \" + storedProcedure + \" is Invalid\" )).build();\n\t\t}\n\t\t\n\t\tif (anyObj == null ) {\n\t\t\tthrow new SmartServiceException.Builder(TestCDTAnyDB.class, new Throwable(\" cdt value for \" + storedProcedure + \" is null\")).build();\n\t\t}\n\t\t\t\t\n\t\tElement ele = null;\n\t\tif (anyObj instanceof Element) {\n\t\t\tele = (Element)anyObj; // each cdt is org.apache.xerces.dom.ElementNSImpl\n\t\t} \n\t\t\n\t\t\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tString printElement = printElementString(ele);\n\t\t\tLOG.debug(\"CDT content is ======= \" + printElement );\t\t\t\n\t\t}\n\t\t\n\t\t// is there a better way to get node names ?\n\t\tNodeList firstNodes = ele.getFirstChild().getChildNodes();\n\t\tfor (int i=0; i < firstNodes.getLength(); i++ ) {\n\t\t\tnodeNames.add(firstNodes.item(i).getNodeName());\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tnameType = this.getUserTableTypeMetaData(conn, userType);\n\t\t\tuserTable = new SQLServerDataTable();\n\t\t\tfor (String nodeName : nodeNames) {\t\t\t\t\n\t\t\t\tLOG.debug(\"column name \" + nodeName + \" type is \" + nameType.get(nodeName).intValue() );\n\t\t\t\tuserTable.addColumnMetadata(nodeName, nameType.get(nodeName).intValue());\n\t\t\t}\t\t\t\n\t\t} catch (SQLException e) {\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new SmartServiceException.Builder(TestCDTAnyDB.class, new Throwable(\" Can't get and map User-Defined Table type details for \" + userType)).build();\n\t\t}\n\t\t\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tNodeList nl = ele.getChildNodes();\n\t\t\tint len=nl.getLength(); \n\t\t\t\n\t\t\t// should be while loop ?\n\t\t\tfor (int i=0; i < len; i++) {\n\t\t\t\tNode n = nl.item(i);\n\t\t\t\tNodeList nlChild = n.getChildNodes();\n\t\t\t\tint lenChild = nlChild.getLength();\n\t\t\t\tObject[] rowValues = new Object[lenChild];\n\t\t\t\tfor (int j=0; j < lenChild; j++) {\n\t\t\t\t\trowValues[j] = nlChild.item(j).getTextContent();\n\t\t\t\t}\n\t\t\t\tuserTable.addRow(rowValues);\n\t\t\t}\n\t\t} catch (SQLServerException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new SmartServiceException.Builder(TestCDTAnyDB.class, new Throwable(\" Failed to create table in memory for \" + userType)).build();\n\t\t}\n\t\t\n\t\t\n\t\tString sp = \"{call \" + storedProcedure + \"(?)}\";\t\t\t\t\t\t\t\t\t\n\t\tSQLServerPreparedStatement pStmt;\n\t\ttry {\n\t\t\tpStmt = (SQLServerPreparedStatement)conn.prepareStatement(sp);\n\t\t\tpStmt.setStructured(1, userType, userTable);\n\t\t\tpStmt.execute();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new SmartServiceException.Builder(TestCDTAnyDB.class, new Throwable(\" Call Stored Procedure \" + storedProcedure + \" is failed\")).build();\n\t\t}\t\t\t\t\t\t\t\t\n\t\t\n\t\tLOG.debug(\"Store Procedure \" + storedProcedure + \" is executed successfully \");\n\t\t\n\t}", "private static void getTheData()\n {\n try\n {\n ITEMS = getSalesOrderSets();\n }\n catch (OnlineODataStoreException e)\n {\n Log.e(TAG, \"caught OnlineODataStoreException\");\n }\n }", "public String getCatalog()\n\t{\n\t\tif (m_dbName != null)\n\t\t\treturn m_dbName;\n\t//\tlog.severe(\"Database Name not set (yet) - call getConnectionURL first\");\n\t\treturn null;\n\t}", "public abstract StoreInfo getInfo();", "public ObservableList<CatalogPres> getCatalogList() {\n\t\t\n\t\treturn readCatalogsFromDataSource();\n\t\t\n\t}", "public abstract Statement queryToRetrieveData();", "public static DBCatalog getInstance(){\n return instance;\n }", "public void setData(){\n\t\tif(companyId != null){\t\t\t\n\t\t\tSystemProperty systemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"BUSINESS_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tbusinessType = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"MAX_INVALID_LOGIN\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvalidloginMax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SKU_GENFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tformatItemCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"STO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tstockOpnameNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"RN_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptItemNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_GENFLAG\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tautomaticProdCode = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PLU_FORMAT_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tprodCodeFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SOINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tinvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"SORCPT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\treceiptNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DEFAULT_TAX_TYPE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tsalesTax = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"DELIVERY_COST\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tdeliveryCost = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PO_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PINV_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpurchaceInvoiceNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"PAYMENT_NUMBERFORMAT\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\tpaymentNoFormat = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t\t\n\t\t\tsystemProperty = systemPropertyService\n\t\t\t\t\t.searchSystemPropertyNameAndCompany(\"TAX_VALUE\", companyId);\n\t\t\tif(systemProperty!=null){\n\t\t\t\ttaxValue = systemProperty.getSystemPropertyValue();\n\t\t\t}\n\t\t} else {\n\t\t\tbusinessType = null;\n\t\t\tinvalidloginMax = null;\n\t\t\tautomaticItemCode = null;\n\t\t\tformatItemCode = null;\n\t\t\tdeliveryItemNoFormat = null;\n\t\t\tstockOpnameNoFormat = null;\n\t\t\treceiptItemNoFormat = null;\n\t\t\tautomaticProdCode = null;\n\t\t\tprodCodeFormat = null;\n\t\t\tsalesNoFormat = null;\n\t\t\tinvoiceNoFormat = null;\n\t\t\treceiptNoFormat = null;\n\t\t\tsalesTax = null;\n\t\t\tdeliveryCost = null;\n\t\t\tpurchaceNoFormat = null;\n\t\t\tpurchaceInvoiceNoFormat = null;\n\t\t\tpaymentNoFormat = null;\n\t\t\ttaxValue = null;\n\t\t}\n\t}", "String getCatalogName();", "public CPGCommandResult getAllCPGDetails() throws Exception {\n _log.info(\"3PARDriver:getAllCPGDetails enter\");\n ClientResponse clientResp = null;\n\n try {\n clientResp = get(URI_CPGS);\n if (clientResp == null) {\n _log.error(\"3PARDriver:There is no response from 3PAR\");\n throw new HP3PARException(\"There is no response from 3PAR\");\n } else if (clientResp.getStatus() != 200) {\n String errResp = getResponseDetails(clientResp);\n throw new HP3PARException(errResp);\n } else {\n String responseString = clientResp.getEntity(String.class);\n _log.info(\"3PARDriver:getAllCPGDetails 3PAR response is {}\", responseString);\n CPGCommandResult cpgResult = new Gson().fromJson(sanitize(responseString),\n CPGCommandResult.class);\n return cpgResult;\n }\n } catch (Exception e) {\n throw e;\n } finally {\n if (clientResp != null) {\n clientResp.close();\n }\n _log.info(\"3PARDriver:getSystemDetails leave\");\n } //end try/catch/finally\n }", "@GET\n\t\t\t@Path(\"/{id}/record\")\n\t\t\t@Produces({\"application/xml\"})\n\t\t\tpublic Rows getEquipserviceRecord() {\n\t\t\t\tRows rows = null;\n\t\t\t\ttry {\n\t\t\t\t\trows=new EquipserviceDao(uriInfo,header).getEquipserviceRows();\n\t\t\t\t} catch (AuthenticationException e) {\n\t\t\t\t\t rows=new TemplateUtility().getFailedMessage(e.getMessage());\n\t\t\t\t\t e.printStackTrace();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\t logger.info( \"Error calling getEquipserviceRecord()\"+ ex.getMessage());\n\t\t\t\t\t ex.printStackTrace();\n\t\t\t\t}\n\t\t\t\treturn rows;\n\t\t\t}", "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "private java.util.List<pkg.Courses> getData(java.lang.String arg0) {\n pkg.CalWebService port = service.getCalWebServicePort();\r\n return port.getData(arg0);\r\n }", "public List<Catalog> getCatalogs() {\n \t\tList<Catalog> catalogs = new ArrayList<Catalog>();\n \t\tList<CatalogInfo> catalogInfos = getConfiguration().getCatalogInfos();\n \t\tfor (CatalogInfo catalogInfo : catalogInfos) {\n \t\t\tCatalogManager mgr = new CatalogManager(catalogInfo);\n \t\t\tCatalog catalog = mgr.loadCatalog();\n \t\t\t// as catalogInfo is marked as transient, we have to set it\n \t\t\tcatalog.setInfo(catalogInfo);\n \t\t\tif (catalog != null) {\n \t\t\t\tcatalogs.add(catalog);\n \t\t\t}\n \t\t}\n \t\treturn catalogs;\n \t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData();", "TradingProduct getTradingProduct();", "Product getPProducts();", "public Product getProductInfo(int pid) {\nfor (ProductStockPair pair : productCatalog) {\nif (pair.product.id == pid) {\nreturn pair.product;\n}\n}\nreturn null;\n}", "@java.lang.Override\n public com.google.cloud.bigquery.biglake.v1alpha1.Catalog getCatalog() {\n return catalog_ == null\n ? com.google.cloud.bigquery.biglake.v1alpha1.Catalog.getDefaultInstance()\n : catalog_;\n }", "@SuppressWarnings(\"all\")\npublic interface I_HBC_TripAllocation \n{\n\n /** TableName=HBC_TripAllocation */\n public static final String Table_Name = \"HBC_TripAllocation\";\n\n /** AD_Table_ID=1100198 */\n public static final int Table_ID = MTable.getTable_ID(Table_Name);\n\n KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);\n\n /** AccessLevel = 3 - Client - Org \n */\n BigDecimal accessLevel = BigDecimal.valueOf(3);\n\n /** Load Meta Data */\n\n /** Column name AD_Client_ID */\n public static final String COLUMNNAME_AD_Client_ID = \"AD_Client_ID\";\n\n\t/** Get Client.\n\t * Client/Tenant for this installation.\n\t */\n\tpublic int getAD_Client_ID();\n\n /** Column name AD_Org_ID */\n public static final String COLUMNNAME_AD_Org_ID = \"AD_Org_ID\";\n\n\t/** Set Organization.\n\t * Organizational entity within client\n\t */\n\tpublic void setAD_Org_ID (int AD_Org_ID);\n\n\t/** Get Organization.\n\t * Organizational entity within client\n\t */\n\tpublic int getAD_Org_ID();\n\n /** Column name Created */\n public static final String COLUMNNAME_Created = \"Created\";\n\n\t/** Get Created.\n\t * Date this record was created\n\t */\n\tpublic Timestamp getCreated();\n\n /** Column name CreatedBy */\n public static final String COLUMNNAME_CreatedBy = \"CreatedBy\";\n\n\t/** Get Created By.\n\t * User who created this records\n\t */\n\tpublic int getCreatedBy();\n\n /** Column name Day */\n public static final String COLUMNNAME_Day = \"Day\";\n\n\t/** Set Day\t */\n\tpublic void setDay (BigDecimal Day);\n\n\t/** Get Day\t */\n\tpublic BigDecimal getDay();\n\n /** Column name Description */\n public static final String COLUMNNAME_Description = \"Description\";\n\n\t/** Set Description.\n\t * Optional short description of the record\n\t */\n\tpublic void setDescription (String Description);\n\n\t/** Get Description.\n\t * Optional short description of the record\n\t */\n\tpublic String getDescription();\n\n /** Column name Distance */\n public static final String COLUMNNAME_Distance = \"Distance\";\n\n\t/** Set Distance\t */\n\tpublic void setDistance (BigDecimal Distance);\n\n\t/** Get Distance\t */\n\tpublic BigDecimal getDistance();\n\n /** Column name From_PortPosition_ID */\n public static final String COLUMNNAME_From_PortPosition_ID = \"From_PortPosition_ID\";\n\n\t/** Set Port/Position From\t */\n\tpublic void setFrom_PortPosition_ID (int From_PortPosition_ID);\n\n\t/** Get Port/Position From\t */\n\tpublic int getFrom_PortPosition_ID();\n\n\tpublic I_HBC_PortPosition getFrom_PortPosition() throws RuntimeException;\n\n /** Column name FuelAllocation */\n public static final String COLUMNNAME_FuelAllocation = \"FuelAllocation\";\n\n\t/** Set Fuel Allocation\t */\n\tpublic void setFuelAllocation (BigDecimal FuelAllocation);\n\n\t/** Get Fuel Allocation\t */\n\tpublic BigDecimal getFuelAllocation();\n\n /** Column name HBC_BargeCategory_ID */\n public static final String COLUMNNAME_HBC_BargeCategory_ID = \"HBC_BargeCategory_ID\";\n\n\t/** Set Barge Category\t */\n\tpublic void setHBC_BargeCategory_ID (int HBC_BargeCategory_ID);\n\n\t/** Get Barge Category\t */\n\tpublic int getHBC_BargeCategory_ID();\n\n\tpublic I_HBC_BargeCategory getHBC_BargeCategory() throws RuntimeException;\n\n /** Column name HBC_TripAllocation_ID */\n public static final String COLUMNNAME_HBC_TripAllocation_ID = \"HBC_TripAllocation_ID\";\n\n\t/** Set Trip Allocation\t */\n\tpublic void setHBC_TripAllocation_ID (int HBC_TripAllocation_ID);\n\n\t/** Get Trip Allocation\t */\n\tpublic int getHBC_TripAllocation_ID();\n\n /** Column name HBC_TripAllocation_UU */\n public static final String COLUMNNAME_HBC_TripAllocation_UU = \"HBC_TripAllocation_UU\";\n\n\t/** Set HBC_TripAllocation_UU\t */\n\tpublic void setHBC_TripAllocation_UU (String HBC_TripAllocation_UU);\n\n\t/** Get HBC_TripAllocation_UU\t */\n\tpublic String getHBC_TripAllocation_UU();\n\n /** Column name HBC_TripType_ID */\n public static final String COLUMNNAME_HBC_TripType_ID = \"HBC_TripType_ID\";\n\n\t/** Set Trip Type\t */\n\tpublic void setHBC_TripType_ID (String HBC_TripType_ID);\n\n\t/** Get Trip Type\t */\n\tpublic String getHBC_TripType_ID();\n\n /** Column name HBC_TugboatCategory_ID */\n public static final String COLUMNNAME_HBC_TugboatCategory_ID = \"HBC_TugboatCategory_ID\";\n\n\t/** Set Tugboat Category\t */\n\tpublic void setHBC_TugboatCategory_ID (int HBC_TugboatCategory_ID);\n\n\t/** Get Tugboat Category\t */\n\tpublic int getHBC_TugboatCategory_ID();\n\n\tpublic I_HBC_TugboatCategory getHBC_TugboatCategory() throws RuntimeException;\n\n /** Column name Hour */\n public static final String COLUMNNAME_Hour = \"Hour\";\n\n\t/** Set Hour\t */\n\tpublic void setHour (BigDecimal Hour);\n\n\t/** Get Hour\t */\n\tpublic BigDecimal getHour();\n\n /** Column name IsActive */\n public static final String COLUMNNAME_IsActive = \"IsActive\";\n\n\t/** Set Active.\n\t * The record is active in the system\n\t */\n\tpublic void setIsActive (boolean IsActive);\n\n\t/** Get Active.\n\t * The record is active in the system\n\t */\n\tpublic boolean isActive();\n\n /** Column name LiterAllocation */\n public static final String COLUMNNAME_LiterAllocation = \"LiterAllocation\";\n\n\t/** Set Liter Allocation.\n\t * Liter Allocation\n\t */\n\tpublic void setLiterAllocation (BigDecimal LiterAllocation);\n\n\t/** Get Liter Allocation.\n\t * Liter Allocation\n\t */\n\tpublic BigDecimal getLiterAllocation();\n\n /** Column name Name */\n public static final String COLUMNNAME_Name = \"Name\";\n\n\t/** Set Name.\n\t * Alphanumeric identifier of the entity\n\t */\n\tpublic void setName (String Name);\n\n\t/** Get Name.\n\t * Alphanumeric identifier of the entity\n\t */\n\tpublic String getName();\n\n /** Column name Speed */\n public static final String COLUMNNAME_Speed = \"Speed\";\n\n\t/** Set Speed (Knot)\t */\n\tpublic void setSpeed (BigDecimal Speed);\n\n\t/** Get Speed (Knot)\t */\n\tpublic BigDecimal getSpeed();\n\n /** Column name Standby_Hour */\n public static final String COLUMNNAME_Standby_Hour = \"Standby_Hour\";\n\n\t/** Set Standby Hour\t */\n\tpublic void setStandby_Hour (BigDecimal Standby_Hour);\n\n\t/** Get Standby Hour\t */\n\tpublic BigDecimal getStandby_Hour();\n\n /** Column name To_PortPosition_ID */\n public static final String COLUMNNAME_To_PortPosition_ID = \"To_PortPosition_ID\";\n\n\t/** Set Port/Position To\t */\n\tpublic void setTo_PortPosition_ID (int To_PortPosition_ID);\n\n\t/** Get Port/Position To\t */\n\tpublic int getTo_PortPosition_ID();\n\n\tpublic I_HBC_PortPosition getTo_PortPosition() throws RuntimeException;\n\n /** Column name Updated */\n public static final String COLUMNNAME_Updated = \"Updated\";\n\n\t/** Get Updated.\n\t * Date this record was updated\n\t */\n\tpublic Timestamp getUpdated();\n\n /** Column name UpdatedBy */\n public static final String COLUMNNAME_UpdatedBy = \"UpdatedBy\";\n\n\t/** Get Updated By.\n\t * User who updated this records\n\t */\n\tpublic int getUpdatedBy();\n\n /** Column name ValidFrom */\n public static final String COLUMNNAME_ValidFrom = \"ValidFrom\";\n\n\t/** Set Valid from.\n\t * Valid from including this date (first day)\n\t */\n\tpublic void setValidFrom (Timestamp ValidFrom);\n\n\t/** Get Valid from.\n\t * Valid from including this date (first day)\n\t */\n\tpublic Timestamp getValidFrom();\n\n /** Column name ValidTo */\n public static final String COLUMNNAME_ValidTo = \"ValidTo\";\n\n\t/** Set Valid to.\n\t * Valid to including this date (last day)\n\t */\n\tpublic void setValidTo (Timestamp ValidTo);\n\n\t/** Get Valid to.\n\t * Valid to including this date (last day)\n\t */\n\tpublic Timestamp getValidTo();\n\n /** Column name Value */\n public static final String COLUMNNAME_Value = \"Value\";\n\n\t/** Set Search Key.\n\t * Search key for the record in the format required - must be unique\n\t */\n\tpublic void setValue (String Value);\n\n\t/** Get Search Key.\n\t * Search key for the record in the format required - must be unique\n\t */\n\tpublic String getValue();\n}", "public void showCatalogue() {\n for (Record r : cataloue) {\n System.out.println(r);\n }\n }", "@Override\n\t@Transactional\n\tpublic Commodities2 getCommodities2(long idStation) {\n\t\tStation s = stationDAO.getById(idStation);\n\t\tSolarSystem sys = s.getParentSolarSystem();\n\t\tList<Goods> list = goodsDAO.getByStation(s);\n\t\tList<GoodsCategory> listCat = goodsCategoryDAO.getAll();\n\t\tList<GoodsDesignation> listDes = goodsDesignationDAO.getAll();\n\t\tCommodities2 ret = new Commodities2(idStation);\n\t\tret.setIdSolarSystem(sys.getIdSolarSystem());\n\t\tret.setSolarSystemName(sys.getName());\n\t\tret.setStationName(s.getName());\n\t\t// Create a list of categories\n\t\tfor (GoodsCategory gc : listCat) {\n\t\t\tGoodsSubcategory2 gsc = new GoodsSubcategory2();\n\t\t\tgsc.setIdCategory(gc.getIdGoodsCategory());\n\t\t\tret.addSubcategory(gsc);\n\t\t}\n\t\t// Add a list of designations to each category (and fill in with goods' data)\n\t\tfor (int indexDes = 0, index = 0; indexDes < listDes.size(); indexDes++) {\n\t\t\tGoodsSimplified gs = null;\n\t\t\tint indexCat = listDes.get(indexDes).getCategory().getIdGoodsCategory().intValue();\n\t\t\tif (index < list.size()) {\n\t\t\t\tGoods g = list.get(index);\n\t\t\t\tif (g.getGoodsDesignation().getIdGoodsDesignation().intValue() == indexDes+1) {\n\t\t\t\t\t// goods present in the database\n\t\t\t\t\tgs = new GoodsSimplified(g);\n\t\t\t\t\tindex++;\n\t\t\t\t} else {\n\t\t\t\t\t// create empty goods\n\t\t\t\t\tgs = new GoodsSimplified(indexDes+1);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// end of list filled with empty goods\n\t\t\t\tgs = new GoodsSimplified(indexDes+1);\n\t\t\t}\n\t\t\tret.addGoods(indexCat, gs);\n\t\t}\n\t\t// A simple one, only with goods in the database\n\t\t//\t\tfor (Goods g : list) {\n\t\t//\t\t\tGoodsSimplified gs = new GoodsSimplified(g);\n\t\t//\t\t\tint index = g.getGoodsDesignation().getCategory().getIdGoodsCategory().intValue();\n\t\t//\t\t\tret.addGoods(index, gs);\n\t\t//\t\t}\n\t\treturn ret;\n\t}", "public DBCursor exportData() {\n\t\tCalendar startDate = new GregorianCalendar(2012, 9-1, 01, 0, 0, 0);\n\t\tCalendar endDate = new GregorianCalendar(2012, 9-1, 30, 23, 59, 59);\n\n\t\t/*\t*/\n\t\tBasicDBObject query = new BasicDBObject(\"date\", new BasicDBObject(\n\t\t\t\t\"$gte\", startDate.getTime()).append(\"$lte\", endDate.getTime()));\n\t\t//query.append(\"componentName\", \"CONTROL/DV10/FrontEnd/Cryostat\");\n\t\t//query.append(\"monitorPointName\", \"GATE_VALVE_STATE\");\n\t\t//query.append(\"componentName\", \"CONTROL/DV16/LLC\");\n\t\t//query.append(\"monitorPointName\", \"POL_MON4\");\n\n\t\t// Used only when the query take more than 10 minutes.\n\t\t_collection.addOption(Bytes.QUERYOPTION_NOTIMEOUT);\n\n\t\t/*\t*/\n\n\t\t// Registros utilizados para probar la diferencia de la zona horaria \n\t\t// local con la del servidor de mongo\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50528be325d8b6dfbafd7ac2\"));\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50529496a310ecc5da59531c\"));\n\n\t\tcursor = _collection.find(query);\n\n\t\t//System.out.println(\"Collections: \"+_database.getCollectionNames());\n\t\t\n\t\t//System.out.println(\"Error: \"+_database.getLastError());\n\t\treturn cursor;\n\t}", "public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\n \n }", "public java.lang.String getStrCatalog()\n\t{\n\t\treturn strCatalog;\n\t}", "public ArrayList<CategoryData> addData(){\n return databaseManager.retrieveInfo();\n }", "WfCfgModuleCatalog selectByPrimaryKey(Long catalogId);", "private void read(Session session) {\n\t\t\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList<Aluno> AlunoList = session.createQuery(\"FROM Aluno\").getResultList();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Reading Aluno records...\");\n\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", \"Model\", \"Price\");\n\t\tfor (Aluno al : AlunoList) {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.printf(\"%-30.30s %-30.30s%n\", al.getNome(), al.getRa());\n\t\t}\n\t}", "private void retrieve() {\r\n\t\ttry {\r\n\t\t\tif (store == null) {\r\n\t\t\t\tstore = Store.retrieve();\r\n\t\t\t\tif (store != null) {\r\n\t\t\t\t\tSystem.out.println(\" The store has been successfully retrieved from the file StoreData. \\n\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstore = Store.instance();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception cnfe) {\r\n\t\t\tcnfe.printStackTrace();\r\n\t\t}\r\n\t}", "public String getTable()\n {\n return \"coral_resource\";\n }", "public Path getCatalogPath() {\n return getRef().catalogPath;\n }", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "@Test\n public void retrieveDataSourceTest() throws IdfyException, Exception {\n TemplatePreview model = new TemplatePreview.Builder().build();\n String xmlTempalte = new String(\"123\");\n api.retrieveDataSource(model, xmlTempalte);\n }", "public static List<CentroDeCusto> readAll() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto\");\n return query.list();\n }" ]
[ "0.62052625", "0.6121792", "0.6121792", "0.60964054", "0.5865507", "0.5697381", "0.5697381", "0.56874615", "0.5648603", "0.5637222", "0.56167567", "0.5614425", "0.5595588", "0.55684435", "0.5568417", "0.549526", "0.5453166", "0.5445034", "0.5437932", "0.5434837", "0.5417516", "0.54077035", "0.5399509", "0.5388873", "0.5388811", "0.53752565", "0.53747684", "0.53573793", "0.53551424", "0.53452015", "0.5344445", "0.5344445", "0.53379637", "0.53349864", "0.5334862", "0.53065854", "0.5305032", "0.52946305", "0.5283565", "0.52705806", "0.5268329", "0.5266101", "0.52376205", "0.5236406", "0.5226372", "0.51998276", "0.5190533", "0.5189475", "0.51889557", "0.5178622", "0.5169554", "0.5158551", "0.51560354", "0.5150354", "0.51448363", "0.51444733", "0.5133862", "0.5119003", "0.5116132", "0.5115864", "0.51099956", "0.5106027", "0.5102641", "0.5100694", "0.5100002", "0.50991523", "0.5093629", "0.50878257", "0.5081816", "0.5080322", "0.5078603", "0.5071254", "0.5062931", "0.5061827", "0.50554144", "0.5054684", "0.50419766", "0.5038781", "0.50365484", "0.50361", "0.5033631", "0.50281143", "0.50265723", "0.5025427", "0.50209415", "0.502017", "0.5019165", "0.50166047", "0.50123227", "0.50099957", "0.50085115", "0.49941412", "0.49933606", "0.49915424", "0.49877942", "0.4985582", "0.4985582", "0.49847403", "0.49822178", "0.49814546" ]
0.5222284
45
Methode permettant d'enregistrer un article
public int enregistrerArticleService (Articles article);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Article createArticle();", "void addArticle(Article a);", "public Article save(Article article);", "@Override\r\n\tpublic void post(Article article) {\n\t\tarticleDao.post(article);\r\n\t\t\r\n\t}", "@Override\n public void addArticle(Article article) {\n\n remoteDataSource.addArticle(article);\n\n }", "public void saveArticlesList();", "private void addArticle() {\n\t\tAdminComposite.display(\"\", STATUS_SUCCESS, SUCCESS_FONT_COLOR);\n\t\tQuotationDetailsDTO detail = new QuotationDetailsDTO();\n\t\ttry {\n\t\t\tdetail = createQuotationDetail(detail);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (validateMandatoryParameters(detail)) {\n\t\t\taddToArticleTable(detail);\n\t\t}\n\t}", "public boolean createArticle(int sessionId, String articleCode, String articleName, String lagerort);", "@Given(\"an Article exists under the Section\")\r\n\tpublic void createArticle(){\n\t\ttestArticle = new ArticleModel();\r\n\t\ttestArticle.setId(\"3236549\");\r\n\t\ttestArticle.setDefaultValues(baseFeedDomain);\r\n\t\ttestArticle.setTitle(\"automation 3 article title\");\r\n\t\ttestArticle.setState(\"published\");\r\n\t\ttestArticle.setParentName(\"automation3published\");\r\n\t\ttestArticle.setAuthorFirstName(\"tto\");\r\n\t\ttestArticle.setAuthorLastName(\"Administrator\");\r\n\t\t\t\r\n\t\ttestArticle.setStandFirst(\"automation 3 article standfirst\");\r\n\t\ttestArticle.setSectionNameOverride(\"automation 3 article section name override\");\r\n\t\ttestArticle.setTitleprefix(\"automation 3 article times sport title prefix\");\r\n\t\ttestArticle.setHeadlineTitleOverride(\"automation 3 article headline changed\");\r\n\t\ttestArticle.setArticleStandFirstOverride(\"automation 3 article standfirst changed\");\r\n\t\ttestArticle.setArticleBodyOverride(\"automation 3 article body - changed \");\r\n\t\t\r\n\t\ttestArticle.setFeedLink(baseFeedDomain + \"article/\" + 3236549);\r\n\t\ttestArticle.setArticleBodyOverride(\"<p>\\nautomation 3 article body - changed \\n</p>\\n\");\r\n\t\ttestArticle.setBody(\"<p>\\nautomation 3 article body\\n</p>\\n\");\r\n\t\ttestArticle.setCategory(\"article\");\r\n\t\ttestArticle.setAuthorFirstName(\"tto\");\r\n\t\ttestArticle.setAuthorLastName(\"Administrator\");\r\n\t\ttestArticle.setAuthorId(\"2\");\r\n\t\ttestArticle.setFeedLink(baseFeedDomain + \"article/3236549\");\r\n\t\ttestArticle.setHeadline(\"automation 3 article headline\");\r\n\t\ttestArticle.setAuthorUri(baseFeedDomain + \"author/\" + testArticle.getAuthorId());\r\n\t\t\r\n\t\t//TODO re-implement this once cms asset creation/teardown is available\r\n//\t\tString articleId = cmsHelper.createArticle(testArticle);\r\n//\t\ttestArticle.setArticleId(articleId);\r\n\t\t\t\t\r\n\t}", "@Override\r\n\tpublic int insert(Article article) {\n\t\treturn dao.insert(article);\r\n\t}", "@Override\n\tpublic void update(Article article) throws Exception {\n\t\t\n\t}", "public interface ArticleService {\n /**\n * Adds Article <tt>a</tt> to the blog's permanent storage.\n * \n * @param a the Article object to be added\n * @throws IllegalArgumentException if a is null or not ready to be saved\n */\n void addArticle(Article a);\n \n /**\n * Returns a specific Article uniquely identified by <tt>id</tt>. \n * \n * @param id the Article's id\n * @return null if id does not refer to a valid article\n * @throws IllegalArgumentException if id is null\n */\n Article findArticleById(String id);\n\n /**\n * Returns the latest Article (by creation date) in the system.\n * \n * @return null if there is no latest Article\n */\n Article findLatestArticle();\n}", "public String enregistrerAuteur(Auteur a) {\n auteurDao.creerAuteur(a);\n return \"SUCCESS\";\n }", "Article saveArticleFromForm(ArticleForm form) throws ServiceException;", "@Test\n public void addArticle(){\n User user = userDao.load(3);\n Article article = new Article();\n article.setUser(user);\n// article.setTitle(\"1896\");\n articleDao.add(article);\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void deleteArticle(Article article);", "int insert(Article record);", "public interface ArticleDao {\n void save(Article article);\n}", "@Override\n\tpublic void registrarSalida() {\n\n\t}", "Long save(ArticleForm articleForm) throws ServiceException;", "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@PostMapping(\"/rest/articles\")\n public Article createNewArticle(@RequestBody Article article) {\n return articleService.createNewArticle(article);\n }", "public boolean registArticle(BoardBean boardBean) throws Exception{\n\t\t\r\n\t\tboolean isWriteSuccess = false;\r\n\t\tint insertCount = boardDAO.insertArticle(boardBean);\r\n\t\t\r\n\t\tif(insertCount > 0){\r\n\t\t\tisWriteSuccess = true;\r\n\t\t}\r\n\r\n\t\treturn isWriteSuccess;\r\n\t\t\r\n\t}", "void accept(Article article);", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "private void loadArticle() {\n String filename = getFilesDir().getAbsolutePath() + \"/article\" + article.getId();\n if (Build.VERSION.SDK_INT >= 19)\n filename += \".mht\";\n File file = new File(filename);\n if (file.exists()) {\n Log.i(\"loadArticle\", \"Article loaded successfully\");\n // Pro novejsi verze systemu\n if (Build.VERSION.SDK_INT >= 19) {\n webView.loadUrl(\"file://\" + filename);\n return;\n }\n try {\n InputStream is = new FileInputStream(file);\n WebArchiveReader wr = new WebArchiveReader() {\n public void onFinished(WebView v) {\n continueWhenLoaded(v);\n }\n };\n if (wr.readWebArchive(is)) {\n wr.loadToWebView(webView);\n }\n } catch (IOException e) {\n article.setSaved(false);\n db.updateArticle(article);\n webView.loadUrl(article.getLink());\n Toast.makeText(ArticleActivity.this, getResources().getString(R.string.save_not_found), Toast.LENGTH_SHORT).show();\n }\n } else {\n // Ulozeny clanek nenalezen, bude nacten ze site\n article.setSaved(false);\n db.updateArticle(article);\n webView.loadUrl(article.getLink());\n Toast.makeText(ArticleActivity.this, getResources().getString(R.string.save_not_found), Toast.LENGTH_SHORT).show();\n }\n }", "public Article() {\n\t\t/*\n\t\t * This field is updated on insert\n\t\t */\n\t\tthis.articleCreatedDate = new Date(new java.util.Date().getTime());\n\t}", "@Override\n\tpublic void insert(Article article) throws Exception {\n\t\tSystem.out.println(\"Insert Start\");\n\t\tStringBuffer sql = new StringBuffer();\n\t\t\n\t\tsql.append(\"insert into article \");\n\t\tsql.append(\"(group_id,sequence_no,posting_date,read_count,writer_name, \");\n\t\tsql.append(\"password,title,content) \");\n\t\tsql.append(\"values(?,?,?,0,?,?,?,?)\");\n\t\t\n\t\tint groupId = article.getGroupId();\n\t\tif(groupId == 0 ){ //글이 리플이 아닌 경우에는 ID Generator를 생성 해주자.\n\t\t\tgroupId = IdGenerator.getInstance().generateNextId(\"article\",jdbcTemplate);\n\t\t\tarticle.setGroupId(groupId);\n\t\t\t//그리고 해당 글에 대한 레벨 역시 초기화를 필요로 한다.\n\t\t\tDecimalFormat decimalFormat = new DecimalFormat(\"0000000000\");\n\t\t\tarticle.setSequenceNumber(decimalFormat.format(groupId)+\"999999\");\n\t\t}\n\t\t\n\t\tarticle.setPostingDate(new Date());\n\t\t\n\t\t\n\t\tjdbcTemplate.update(sql.toString(),article.getGroupId(),article.getSequenceNumber()\n\t\t\t\t,new Timestamp(article.getPostingDate().getTime())\n\t\t\t\t,article.getWriterName()\n\t\t\t\t,article.getPassword()\n\t\t\t\t,article.getTitle()\n\t\t\t\t,article.getContent());\n\t\t\n\t\t\n\n\t}", "@Override\n\tpublic void saveAnnounce(Announcement a) {\n\t\t\n\t}", "public Article createArticle( Article article) throws ArticleException {\n\t\tOptional<String> articleTitle = Optional.ofNullable(article.getTitle()).filter(s -> !s.isEmpty());\n\t\tOptional<String> articleDesc = Optional.ofNullable(article.getDescription()).filter(s -> !s.isEmpty());\n\t\tOptional<String> articleBody = Optional.ofNullable(article.getBody()).filter(s -> !s.isEmpty());\n\n//\t\tif(!articleTitle.isPresent () || !articleDesc.isPresent () || !articleBody.isPresent ()){\n//\t\t\tthrow new com.article.exception.ArticleException ( \"Please provide all mandatory fields for creating an article!\" );\n//\t\t}\n\n\t\tArticle updateArticle = new Article();\n\t\tupdateArticle.setTitle(articleTitle.get ());\n\t\tupdateArticle.setDescription(articleDesc.get ());\n\t\tupdateArticle.setBody(articleBody.get ());\n\n\t\tString lowercaseSlug = article.getTitle().replace(\" \", \"-\").toLowerCase();\n\t\tupdateArticle.setSlug(lowercaseSlug);\n\n\t\t//business logic\n\t\tlong wordcount = calculateTotalWordCount(article.getTitle(),article.getDescription(),article.getBody());\n\t\tupdateArticle.setWordcount (wordcount);\n\n\t\t//set article timestamp\n\t\tZonedDateTime zdtObj = ZonedDateTime.now();\n\t\tzdtObj.format( java.time.format.DateTimeFormatter.ISO_INSTANT.withZone(ZoneId.systemDefault()) );\n\t\tupdateArticle.setCreatedAt(zdtObj);\n\t\tupdateArticle.setUpdatedAt(zdtObj);\n\t\t\n\t\treturn articleRepository.save(updateArticle);\n\t}", "int insert(ArticleDo record);", "public void setArticleID(int articleID) {\n this.articleID = articleID;\n }", "public abstract void leerPersistencia();", "void entrerAuGarage();", "public void saveAuthor(Author authorObject);", "@Override\r\n\tpublic int upd(Article article) {\n\t\treturn articleMapper.upd(article);\r\n\t}", "void save(JournalPage page);", "@Override\n\tpublic void persist(Recipe entity) {\n\t\t\n\t}", "protected abstract RestClient<Author>.Result persistAuthor(Author author);", "public Article getArticle()\n {\n return article;\n }", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t}", "public int addNews(News news);", "public Article() {\n\t\tthis.nom=\"VIDE\";\n\t\tthis.prix=0.0;\n\t\tthis.categorie= null;\n\t}", "@Override\r\n\tpublic int update(Article article) {\n\t\treturn dao.update(article);\r\n\t}", "public interface ArticleService {\n /**\n * 通过博客文章的id来查找文章\n * @param id 博客文章的id\n * @return Article对象\n */\n public Article getArticle(Integer id);\n\n /**\n * 保存博客文章,并返回保存文章的id\n * @param article\n * @return id 文章id\n */\n public Integer saveArticle(Article article);\n\n /**\n * 根据博客文章的id删除数据库的文章\n * @param id\n */\n public void deleteArticle(Integer id);\n\n /**\n * 更新文章,如果文章存在数据库则更新否则重新保存\n * @param article\n */\n public void saveOrUpdateArticle(Article article);\n\n /**\n * 根据文章的标题查找博客文章(模糊查询待定)\n * @param title\n * @return\n */\n public Article findByTitle(String title);\n\n}", "boolean storeAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "public interface ArticleService {\n\n /**\n * 新增文章\n * @param article 文章内容\n * @param request 当前请求\n * @return\n */\n ResponseResult save(Article article, HttpServletRequest request);\n\n /**\n * 编辑文章\n * @param article 文章内容\n * @param request 当前请求\n * @return\n */\n ResponseResult edit(Article article, HttpServletRequest request);\n\n List<Article> queryPage(ArticleQO articleQO);\n\n Long count(ArticleQO articleQO);\n\n Article getById(Long id);\n\n void delete(Long id);\n\n}", "private void registrarResidencia(Residencias residencia) {\n\t\t\t\t\t\t\t\t\n\t\tResidenciasobservaciones observacion = residencia.getResidenciasobservaciones();\t\n\t\t\t\t\n\t\tif(observacion==null) {\t\t\t\n\t\t\thibernateController.insertResidencia(residencia);\n\t\t\t\n\t\t}else {\t\t\t\n\t\t\thibernateController.insertResidenciaObservacion(residencia, observacion);\t\t\n\t\t}\n\t\t\n\t\tupdateContent();\t\n\t\t\n\t}", "public void einfuegen(Artikel artikel) throws ArtikelExistiertBereitsException {\n\t\tif (!artikelBestand.contains(artikel))\n\t\t\tartikelBestand.add(artikel);\n\t\telse\n\t\t\tthrow new ArtikelExistiertBereitsException(artikel, \" - in 'einfuegen()'\");\n\t}", "public void einfuegen(Artikel einArtikel) throws ArtikelExistiertBereitsException {\n if (artikelBestand.contains(einArtikel)) {\n throw new ArtikelExistiertBereitsException(einArtikel, \" - in 'einfuegen()'\");\n }\n\n artikelBestand.add(einArtikel);\n }", "public interface Article {\n\n\tpublic String getTitle();\n\n\tpublic void setTitle( String title );\n\n\tpublic String getArticleText();\n\n\tpublic void setArticleText( String articleText );\n\n\tpublic List<Comment> getComments();\n\n\tpublic Comment getComment( int commentId );\n\n\tpublic void addComment( String author, String text );\n\n}", "public void enregistreEcPirate(PirateEcouteur ecouteur)\n\t{\n\t\tthis.pirateEcouteurs.add(PirateEcouteur.class, ecouteur);\n\t}", "protected Article(OntologyElement element) {\n\t\tthis.element = element;\n\t\tthis.ontology = element.getOntology();\n\t}", "public Article() {\n }", "public void saveTemplate(ArticleTemplate article, ArticleListTemplate article_list, String website_url) throws StorageException, WebsiteNotFoundException, MalformedURLException, ContextAlreadyExistsException, DataOmittedException {\n\t\t\n\t\t// Validazione url\n\t\tURL.validate(website_url); // throws MalformedURLException\n\t\t\n\t\t\n\t\tWebsite website = this.getWebsite(website_url); // throws StorageException, WebsiteNotFoundException\n\t\t\n\t\t// Controlla se il contesto è già stato inserito\n\t\tSet<ArticleListTemplate> list_templates = website.getArticleListTemplates();\n\t\tfor(ArticleListTemplate list_template: list_templates){\n\t\t\tif(list_template.getContext().equals(article_list.getContext())) throw new ContextAlreadyExistsException();\n\t\t\t\n\t\t}\n\t\t\n\t\t// Se non vengono inseriti il selettore dell'heading o del testo\n\t\tif(article.getHeadingSelector().equals(\"\") || article.getTextSelector().equals(\"\") || article.getHeadingSelector() == null || article.getTextSelector() == null) \n\t\t\t// Solleva eccezione\n\t\t\tthrow new DataOmittedException();\n\t\t\n\t\t// Se non viene inserito il selettore per i link degli articoli\n\t\tif(article_list.getLinkSelector().equals(\"\") || article_list.getLinkSelector() == null)\n\t\t\t// Solleva eccezione\n\t\t\tthrow new DataOmittedException();\n\t\t\t\n\t\t// Inserimento del template list\n\t\tMap<String, Object> data_list = article_list.toMap();\n\t\tdata_list.put(\"fk_website\", website.getId());\n\t\tstorage.save(\"list_templates\", data_list); // throws StorageException\n\t\t\n\t\t// Inserimento del template dell'articolo\n\t\tMap<String, Object> data_article = article.toMap();\n\t\tdata_article.put(\"fk_website\", website.getId());\n\t\tstorage.save(\"article_templates\", data_article); // throws StorageException\n\t\t\n\t\twebsite.addTemplate(article);\n\t\twebsite.addTemplate(article_list);\n\t}", "public int getArticleID() {\n return articleID;\n }", "private void attachEntity(Usuario entity) {\n }", "public static void addNewNote(int tenantID, String noteName, String content) throws NotePersistenceException, RegistryException {\n UserRegistry userRegistry = ServiceHolder.getRegistryService().getConfigSystemRegistry(tenantID);\n createNotesCollectionIfNotExists(userRegistry);\n String noteLocation = getNoteLocation(noteName);\n if (content == null) {\n content = \"[]\";\n }\n\n if (!userRegistry.resourceExists(noteLocation)) {\n Resource resource = userRegistry.newResource();\n resource.setContent(content);\n resource.setMediaType(NoteConstants.NOTE_MEDIA_TYPE);\n userRegistry.put(noteLocation, resource);\n } else {\n log.error(\"Cannot create new note with name \" + noteName +\n \" for tenant with tenant ID \" + tenantID + \" because note already exists\");\n throw new NotePersistenceException(\"Already a note exists with same name : \" + noteName +\n \" for tenantId :\" + tenantID);\n }\n }", "public static boolean addArticle(final ArticleBean newArt) {\n try {\n Session session = driver.session();\n return session.writeTransaction(new TransactionWork<Boolean>() {\n @Override\n public Boolean execute(Transaction tx) {\n return transactionAddArticle(tx, newArt);\n }\n });\n\n\n }\n catch (Exception ex)\n {\n System.err.println(ex.getMessage());\n return false;\n }\n }", "@Override\n\tpublic void insertArticle(BoardVO vo) {\n\t\tarticles.add(vo);\n\t}", "public Retrait(Article article, String rue, String code_postal, String ville) {\n\t\tsuper();\n\t\tthis.article = article;\n\t\tthis.rue = rue;\n\t\tthis.code_postal = code_postal;\n\t\tthis.ville = ville;\n\t}", "int insert(ArticleTag record);", "void create(int id, int authorId, String title);", "@Override\n protected void validateSave(Fornecedor post) {\n\n }", "Documento createDocumento();", "public interface Article {\n void produce();\n}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"article/create/success.jsp\");\n\n Article article = new Article();\n Shelf shelf = new Shelf();\n List<Shelf> shelfs = new ArrayList<>();\n Context context = null;\n ArticleServiceItf articleServices = null;\n ShelfServiceItf shelfService = null;\n\n try {\n context = new InitialContext();\n shelfService = (ShelfServiceItf) context.lookup(\"java:global/ShelfService\");\n shelf = shelfService.findShelfById(Integer.valueOf(request.getParameter(\"productShelf\")));\n shelfs = shelfService.findAll();\n\n article.setName(request.getParameter(\"productName\"));\n article.setPicturelink(request.getParameter(\"productImage\"));\n article.setBrand(request.getParameter(\"productBrand\"));\n article.setPrix(Float.valueOf(request.getParameter(\"productPrice\")));\n article.setShelf(shelf);\n System.out.println(\"DEBUG productBrand set to: \" + request.getParameter(\"productBrand\"));\n articleServices = (ArticleServiceItf) context.lookup(\"java:global/ArticleService\");\n } catch (Exception e) {\n dispatcher = request.getRequestDispatcher(\"article/create/error.jsp\");\n request.setAttribute(\"error\", e);\n dispatcher.forward(request, response);\n }\n\n //On utilise un Validator afin de vérifier que notre objet Article est en phase avec les contraintes\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n Validator validator = factory.getValidator();\n Set<ConstraintViolation<Article>> constraintViolationSet = validator.validate(article);\n\n if(constraintViolationSet.isEmpty()) {\n //Pas d'erreurs après vérification, on peut persister l'objet\n try {\n articleServices.addArticle(article);\n dispatcher.forward(request, response);\n } catch (ArticleException e) {\n dispatcher = request.getRequestDispatcher(\"article/create/error.jsp\");\n request.setAttribute(\"error\", e);\n dispatcher.forward(request, response);\n }\n }\n else {\n //Une ou plusieurs erreurs pendant la vérification. On informe l'utilisateur\n dispatcher = request.getRequestDispatcher(\"admin/create-article.jsp\");\n request.setAttribute(\"errors\", constraintViolationSet);\n request.setAttribute(\"shelfs\", shelfs);\n dispatcher.forward(request, response);\n }\n }", "void SaveBudgetKeyAdditional(BudgetKeyAdditionalEntity budgetKeyAdditionalEntity);", "public void registraPart(Part part) throws RemoteException, PartRegistradaException;", "public void save() {\n\t\tList<EmbeddedEntity> embeddedEntities = new ArrayList<>();\n\t\tfor (FeedItem item : items)\n\t\t\tembeddedEntities.add(item.getEntity());\n\t\tEntity feed = new Entity(getKey());\n\t\tfeed.setUnindexedProperty(\"items\", embeddedEntities); //NOI18N\n\t\tdatastore.put(feed);\n\t}", "public Article() {\n\t}", "public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}", "Article() {\n\t\tthis.title = \"\";\n\t\tthis.firstPage = 0;\n\t\tthis.lastPage = 0;\n\t}", "@Override\r\n\tpublic String registerActor(Actor actor) {\n\t\tActor actor1=template.insert(actor); // creats the collection with the Document class name \"Actor\"\r\n\t\treturn \"Document is saved with the id value:\"+actor1.getActorId();\r\n\t}", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public synchronized void entfernen(int artikelnummer) throws ArtikelExistiertNichtException {\n\t\tint index = -1;\n\n\t\tIterator<Artikel> iter = artikelBestand.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tArtikel artikel = iter.next();\n\t\t\tif (artikel.getArtikelnummer() == artikelnummer)\n\t\t\t\tindex = artikelBestand.indexOf(artikel);\n\t\t}\n\t\t\n\t\tif (index != -1)\n\t\t\tartikelBestand.remove(index);\n\t\telse\n\t\t\tthrow new ArtikelExistiertNichtException(artikelnummer, \" - in 'entfernen()'\");\n\t}", "public void agregarEnfermera(String nombre, String nit, int dpi,double salario, int anos, boolean intensivista){\r\n Enfermera enf = new Enfermera();\r\n enf.setEnfermera(nombre, nit, dpi,salario, anos, intensivista);\r\n medicosenfermeras.add(enf);\r\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName) throws SAXException {\n\n\t\tif (localName.equalsIgnoreCase(\"title\")){\n if (currentArticle.getTitle() != null && currentArticle.getGuid() != null) {\n articleList.add(currentArticle);\n\n currentArticle = new Article();\n\n }\n currentArticle.setTitle(chars.toString());\n\t\t} else if (localName.equalsIgnoreCase(\"guid\")){\n currentArticle.setGuid(chars.toString());\n\t\t} else if (localName.equalsIgnoreCase(\"description\")){\n currentArticle.setDescription(chars.toString());\n\t\t} else if (localName.equalsIgnoreCase(\"url\")){\n try {\n currentArticle.setUrl(new URL(chars.toString()));\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n } else if (localName.equalsIgnoreCase(\"pubDate\")){\n currentArticle.setPubDate(chars.toString());\n\t\t} else if (localName.equalsIgnoreCase(\"author\")){\n currentArticle.setAuthor(chars.toString());\n\t\t}\n\t}", "@Override\r\n\tpublic void insertNews(int uid, String title, String triptime,\r\n\t\t\tString people, String imgpath, String triptype, String content,\r\n\t\t\tString equipment, String notice, String summary, String spot,\r\n\t\t\tTimestamp cdate) {\n\t\tdao.insertNews(uid, title, triptime, people, imgpath, triptype, content, equipment, notice, summary, spot, cdate);\r\n\t\t\r\n\t}", "private void addArticleInPersonalBoard(final Article article, final String boardName) {\n final DatabaseReference database;\n database = FirebaseDatabase.getInstance().getReference();\n\n database.child(\"PersonalBoard\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n DatabaseReference personalBoardDBRef = null;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if(snapshot.hasChild(email.split(\"@\")[0])){\n dataSnapshot = snapshot.child(email.split(\"@\")[0]);\n personalBoardDBRef = database.child(\"PersonalBoard\").child(snapshot.getKey()).child(email.split(\"@\")[0]);\n break;\n }\n }\n Map personalBoardArticle = new HashMap();\n personalBoardArticle.put(\"author\", article.getAuthor());\n personalBoardArticle.put(\"description\", article.getDescription());\n personalBoardArticle.put(\"link\", article.getLink());\n personalBoardArticle.put(\"publishedDate\", article.getPublishedDate());\n personalBoardArticle.put(\"thumbnailLink\", article.getThumbnailLink());\n personalBoardArticle.put(\"title\", article.getTitle());\n if(personalBoardDBRef == null) {\n Map personalBoardArticleKey = new HashMap();\n personalBoardArticleKey.put(\"1\",personalBoardArticle);\n\n Map personalBoard = new HashMap();\n personalBoard.put(boardName, personalBoardArticleKey);\n\n Map personalBoardKey = new HashMap();\n personalBoardKey.put(\"1\", personalBoard);\n\n Map myPersonalBoard = new HashMap();\n myPersonalBoard.put(email.split(\"@\")[0],personalBoardKey);\n\n database.child(\"PersonalBoard\").push().setValue(myPersonalBoard);\n } else {\n Boolean boardExists = false;\n for(DataSnapshot snapshot : dataSnapshot.getChildren()) {\n if(snapshot.child(boardName).exists()){\n boardExists = true;\n personalBoardDBRef = personalBoardDBRef.child(snapshot.getKey()).child(boardName);\n break;\n }\n }\n if(boardExists) {\n personalBoardDBRef.push().setValue(personalBoardArticle);\n } else {\n Map personalBoardArticleKey = new HashMap();\n personalBoardArticleKey.put(\"1\",personalBoardArticle);\n\n Map personalBoard = new HashMap();\n personalBoard.put(boardName, personalBoardArticleKey);\n\n personalBoardDBRef.push().setValue(personalBoard);\n }\n }\n }\n\n @Override\n public void onCancelled(DatabaseError d) {\n Log.d(\"Login DbError Msg ->\", d.getMessage());\n Log.d(\"Login DbError Detail ->\", d.getDetails());\n }\n });\n }", "private ArticleMgr() {\r\n\r\n\t}", "@Override\r\n\tpublic boolean insert(LabelArticle model) {\n\t\treturn false;\r\n\t}", "public abstract boolean testArticle(PubmedArticle article);", "public NodeInformation registerNode(NodeName nodeName) throws IOTException {\n if (nodeCatalog.hasNode(nodeName)) {\n handleError(\"Cannot register node.. node already exists: \" + nodeName);\n return null;\n }\n \n NodeInformation nodeInformation = new NodeInformation(nodeName);\n nodeCatalog.addNode(nodeInformation);\n \n return nodeInformation;\n }", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "@Override\r\n\tpublic void reply(Article article) {\n\t\tarticleDao.reply(article);\r\n\t\t\r\n\t}", "@Override\n\tpublic void registrarEntrada() {\n\n\t}", "void addArt(Art art);", "protected void agregarUbicacion(){\n\n\n\n }", "@Override\n public void beforeShowNewEntity()\n {\n entity = new Aluno();\n entity.setDataNascimento(new GregorianCalendar());\n String senha = CriptografiaLogic.encriptar(\"123\");\n entity.setSenha(senha);\n }", "private void registerNewPub(Pub pub) {\n\n String name = pub.getName();\n double latitude = pub.getLatitude();\n double longitude = pub.getLongitude();\n String token = sm.getSessionToken();\n String url = pub.getUrl();\n\n List<String> photoUrls = new ArrayList<>();\n for (int i = 0; i < pub.getPhotos().size(); i++) {\n String newPhotoUrl = im.getRemoteImageUrl( pub.getPhotos().get(i) );\n photoUrls.add(newPhotoUrl);\n }\n\n final ProgressDialog pDialog = Utils.newProgressDialog(this, getString(R.string.new_pub_activity_registering_pub));\n pDialog.show();\n\n new CreatePubInteractor().execute(this, name, latitude, longitude, url, photoUrls, token, new CreatePubInteractorListener() {\n\n @Override\n public void onCreatePubFail(Exception e) {\n pDialog.dismiss();\n\n Utils.simpleDialog(NewPubActivity.this, getString(R.string.new_pub_activity_create_pub_fail_title),\n e.getMessage());\n }\n\n @Override\n public void onCreatePubSuccess(final Pub createdPub) {\n pDialog.dismiss();\n\n Utils.simpleDialog(NewPubActivity.this,\n getString(R.string.new_pub_activity_new_pub),\n getString(R.string.new_pub_activity_the_pub)\n + createdPub.getName() + getString(R.string.new_pub_activity_pub_registered),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finishActivity(createdPub, null);\n }\n });\n }\n });\n }", "protected void addArticle(NewsArticle art) {\n articles.addElement(art); // add to Vector\n filterAgent.score(art, filterType); // score the article\n refreshTable();\n articleTextArea.setText(art.getBody());\n articleTextArea.setCaretPosition(0); // move cursor to start of article\n addArticleMenuItem.setEnabled(true) ;\n addAllMenuItem.setEnabled(true) ;\n saveArticleMenuItem.setEnabled(true) ;\n }", "@Override\r\n\tpublic boolean update(Article article) {\n\t\treturn articleMapper.update(article)>0;\r\n\t}", "public void mandjeVullen(Artikel artikel) {\r\n // voeg de artikel toe aan het mandje van de klant\r\n artikelen.add(artikel);\r\n\t}", "public void addArticle(Article artic){\n \tString title= artic.title;\n \tint year= Integer.parseInt(artic.year);\n \tString sql= null;\n \ttry{\n \t\tsql= \"insert into article (`title`, g) values('\"+title+\"', GeomFromText('POINT(\"+ year+\" 0)'));\";\n// \t\tsql = \"insert into article(g) values(GeomFromText('POINT(10 0)'));\";\n// \t\tSystem.out.println(sql);\n \t\tstatement.executeUpdate(sql);\n \t\t\n \t}\n \tcatch (SQLException e) {\n \t\te.printStackTrace();\n \t}\n }", "public void enregistrement (double Ox1, double Oy1, double Px1, double Px2, double perim, double aire, String dessin){\n\t}", "public void addArticle(int i, String string, String string2, String string3, Float d) {\n\t\tdb.store(new Article(i, string, string2, string3, d));\n\t\tSystem.out.println(\"\\nAfegit nou article\");\n\t}" ]
[ "0.6656692", "0.66264576", "0.6606174", "0.62208515", "0.61754256", "0.61641866", "0.6161898", "0.6082797", "0.6004809", "0.59706455", "0.5965409", "0.58827925", "0.572729", "0.5716294", "0.5716084", "0.56834406", "0.56571025", "0.5617801", "0.561055", "0.5575123", "0.5573643", "0.5568174", "0.5568174", "0.5558716", "0.55511004", "0.5546247", "0.55403626", "0.5536024", "0.54883164", "0.5474569", "0.5471526", "0.54494566", "0.5423639", "0.5387125", "0.53355366", "0.53278697", "0.5326616", "0.5310488", "0.5293052", "0.5277874", "0.5273097", "0.5269666", "0.5259229", "0.5239428", "0.523888", "0.523293", "0.52295256", "0.52228487", "0.5221276", "0.5188552", "0.5179782", "0.5170847", "0.51700723", "0.5169627", "0.51642704", "0.5158325", "0.5137075", "0.5125546", "0.5123103", "0.51167405", "0.51111186", "0.51094383", "0.51028687", "0.50999415", "0.50938743", "0.5089996", "0.5089088", "0.50853455", "0.5078307", "0.5078306", "0.5074202", "0.5072196", "0.5069203", "0.50688547", "0.5067628", "0.5066463", "0.5065911", "0.506336", "0.5059641", "0.50503224", "0.50475144", "0.50464183", "0.5043376", "0.50433266", "0.5038279", "0.5037507", "0.50362194", "0.50250196", "0.50204504", "0.5020046", "0.50177014", "0.5017571", "0.49973908", "0.49964383", "0.49949396", "0.4984282", "0.4965164", "0.49481252", "0.494375", "0.49428135" ]
0.73849684
0
methode affichant tous les articles
public List<Articles> listArticlesService();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setupArticlesList();", "@Override\n public List<Article> getArticles() {\n List<Article> articles=articleDAO.getArticles();\n knownArticles.addAll(articles);\n return articles;\n }", "private void getArticles() throws Exception {\n\t\t\tHttpClient httpClient = new DefaultHttpClient();\n\n\t\t\tStringBuilder uriBuilder = new StringBuilder(BASE_URL);\n\t\t\turiBuilder.append(mURL);\n\n\t\t\tHttpGet request = new HttpGet(uriBuilder.toString());\n\t\t\tHttpResponse response = httpClient.execute(request);\n\n\t\t\tint status = response.getStatusLine().getStatusCode();\n\n\t\t\tif (status != HttpStatus.SC_OK) {\n\n\t\t\t\t// Log whatever the server returns in the response body.\n\t\t\t\tByteArrayOutputStream ostream = new ByteArrayOutputStream();\n\n\t\t\t\tresponse.getEntity().writeTo(ostream);\n\t\t\t\tmHandler.sendEmptyMessage(0);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tInputStream content = response.getEntity().getContent();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(content));\n\t\t\tStringBuilder result = new StringBuilder();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tresult.append(line);\n\t\t\t}\n\n\t\t\t// Clean up and close connection.\n\t\t\tcontent.close();\n\n\t\t\tString html = result.toString();\n\t\t\t//This is our regex to match each article\n\t\t\t//This website's html is not xml compatible so regex is next best thing\n\t\t\tPattern p = Pattern.compile(\"<td class=\\\"title\\\"><a href=\\\"(.*?)\\\".*?>(.*?)<\\\\/a>(<span class=\\\"comhead\\\">(.*?)<\\\\/span>)?.*?<\\\\/td><\\\\/tr><tr><td colspan=2><\\\\/td><td class=\\\"subtext\\\">.*? by <a href=\\\"user\\\\?.*?\\\">(.*?)<\\\\/a>.*?<a href=\\\"item\\\\?id=(.*?)\\\">\");\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\twhile(m.find()) {\n\t\t\t\tString url = m.group(1);\n\t\t\t\tString title = m.group(2);\n\t\t\t\tString domain = m.group(4);\n\t\t\t\tString author = m.group(5);\n\t\t\t\tString discussionID = m.group(6);\n\t\t\t\tArticle eachArticle = new Article(title, domain, url, author, discussionID);\n\t\t\t\tarticles.add(eachArticle); \n\t\t\t}\n\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tBundle bundle = new Bundle();\n\t\t\tbundle.putParcelableArrayList(\"articles\", (ArrayList<? extends Parcelable>) articles);\n\t\t\tmsg.setData(bundle);\n\t\t\tmHandler.sendMessage(msg);\n\t\t}", "public void listArticles() {\n\t\tSystem.out.println(\"\\nArticles llegits desde la base de dades\");\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "@Override\n\tpublic List<Article> getAllArticles() {\n\t\tArticle[] article = restTemplate.getForObject(serviceUrl+\"/\", Article[].class);\n\t\treturn Arrays.asList(article);\n\t}", "public ArrayList<ListArt> PrintWikiArticles()\r\n\t{\r\n\t\t//----- Declare variables----------//\r\n\t\tfinal String Art = \"Article\";\r\n\t\tint NumberCross = 0;\r\n\t\tfinal Label recordClassLabel = DynamicLabel.label(Art); \r\n\t\tListArt aux = null;\r\n\t\t//---------------------------------//\r\n\r\n\t\ttry (Transaction tx = graphDb.beginTx()) {\r\n\t\t\tResourceIterator<Node> it = graphDb.findNodes(recordClassLabel, \"wikiid\", \"1395966\"); // Node representing a component\r\n\t\t\tNode next = null; \r\n\t\t\twhile( it.hasNext() ) { \r\n\t\t\t\tnext = it.next(); \r\n\t\t\t\tString lang = (String)next.getProperty(\"lang\");\r\n\t\t\t\tif ( lang.equals(\"en\") ) // language of the node\r\n\t\t\t\t\tbreak; \r\n\t\t\t} \r\n\r\n\t\t\tvisit(graphDb, next, /*visited,*/ NumberCross, aux, ListNode);\r\n\t\t\ttx.success(); \r\n\r\n\t\t}\r\n\t\treturn ListNode;\r\n\r\n\t}", "@Override\r\n\tpublic Article[] getArticles() {\n\t\treturn null;\r\n\t}", "public Article getArticle()\n {\n return article;\n }", "public void saveArticlesList();", "@Override\r\n public final List<Article> getArticles() {\r\n final IssueId issueId = getIssueId();\r\n final List<Article> articles = new ArrayList<Article>();\r\n final List<Node> articleNodes = getArticleNodes();\r\n for (final Node articleNode : articleNodes) {\r\n try {\r\n final Article article = getArticle(articleNode, issueId);\r\n if (article != null) {\r\n article.setIssueRef(issueId);\r\n articles.add(article);\r\n }\r\n } catch (Exception e) {\r\n log().warn(\"Error reading article details from \" + issueId, e);\r\n }\r\n }\r\n return articles;\r\n }", "public void articles() throws Exception\r\n\t{\r\n\t\tCommonMethods.wait(driver,articles);\r\n\t\tCommonMethods.click(articles);\r\n\t\tCommonMethods.wait(driver,read);\r\n\t\tCommonMethods.click(read);\r\n\t\tCommonMethods.wait(driver,allArticles);\r\n\t\tCommonMethods.click(allArticles);\r\n\t}", "private static List<Article> createArticleList() {\n List<Article> articles = new ArrayList();\n articles.add(new Article(1l, \"Ball\", new Double(5.5), Type.TOY));\n articles.add(new Article(2l, \"Hammer\", new Double(250.0), Type.TOOL));\n articles.add(new Article(3l, \"Doll\", new Double(12.75), Type.TOY));\n return articles;\n }", "protected abstract List<Sentence> prepareSummary(Article article);", "Article() {\n\t\tthis.title = \"\";\n\t\tthis.firstPage = 0;\n\t\tthis.lastPage = 0;\n\t}", "public List<Article> findAll();", "public void setArticles (java.util.Set _articles) {\n\t\tthis._articles = _articles;\n\t}", "@Override\n\tpublic List<Articles> getArticles() {\n\t\treturn articlesMapper.getArticles();\n\t}", "public java.util.Set getArticles () {\n\t\treturn this._articles;\n\t}", "@Override\n public int getItemCount() {\n return mArticles.size();\n }", "@Override\n public void loadArticles() {\n mUserArticlesDownloaded = false;\n mGroupArticlesDownloaded = false;\n\n //to load user articles\n loadUserArticles();\n\n Log.d(TAG, \"loadArticles: \" + UserManager.getInstance().getUserData().getGroupNow());\n //to load group articles if exist\n if (!UserManager.getInstance().getUserData().getGroupNow().equals(\"\")) {\n loadGroupArticles();\n } else {\n mGroupArticlesDownloaded = true;\n }\n }", "public void filterArticles() {\n filterAgent.score(articles, filterType);\n articles = insertionSort(articles); // sorted articles list\n\n refreshTable();\n if (articles.size() > 0) {\n currentArt = (NewsArticle) articles.elementAt(0);\n }\n }", "public List<Article> processAllArticles(List<ArticleGeneral> allArticles) {\n\t\t\tDocument document;\n\t\t\tList<Article> articles = new ArrayList<Article>();\n\t\t\tfor (ArticleGeneral articleGeneral : allArticles) {\n\t\t\t\tdocument = connectToPage(articleGeneral.getLink());\n\t\t\t\tString nameItem = getNameOfArticle(document);\n\t\t\t\tString color = getColorOfArticle(document);\n\t\t\t\tString price = getPriceOfArticle(document);\n\t\t\t\tList<String> sizes = getSizesOfArticle(document);\n\t\t\t\tboolean isSoldOut = true;\n\t\t\t\tif (!sizes.isEmpty()) {\n\t\t\t\t\tisSoldOut = false;\n\t\t\t\t}\n\t\t\t\tString link = document.baseUri();\n\t\t\t\tArticle article = new Article(nameItem, color, price, sizes, isSoldOut, link);\n\t\t\t\tarticles.add(article);\n\t\t\t\tSystem.out.println(document.select(\"h1\"));\n\t\t\t}\n\t\t\treturn articles;\n\t}", "void addArticle(Article a);", "Article(String title, int firstPage, int lastPage) {\n\t\tthis.title = title;\n\t\tthis.firstPage = firstPage;\n\t\tthis.lastPage = lastPage;\n\t}", "@Override\n public int getCount() {\n return articlesList.size();\n }", "public Article() {\n\t\tthis.nom=\"VIDE\";\n\t\tthis.prix=0.0;\n\t\tthis.categorie= null;\n\t}", "@Override\n public void loadArticles() {\n // start service here => loads articles to DB\n mServiceBinder.startService();\n }", "public int enregistrerArticleService (Articles article);", "@Override\n\tpublic List<BoardVO> getArticle() {\n\t\treturn articles;\n\t}", "public void setArticles(ArrayList<Article> articles_list) {\n Log.d(TAG, \"setArticles: RETURNED: \" + articles_list.toString());\n for (int i=0; i < 10; i++) {\n nu_array.add(articles_list.get(i));\n }\n\n Log.d(TAG, \"setArticles: ARTICLES: \" + nu_array.toString());\n }", "public ArrayList<Article> getUnpublishedArticle(int authorID) throws SQLException {\r\n\t\tConnectionManager conn=null;\r\n\t\tArrayList<Integer> intArtID = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> finalselectedArticleID = new ArrayList<Integer>();\r\n\t\tArrayList<Article> unpubArticle = new ArrayList<Article>();\r\n\t\tString queryArticle = \"select ArticleAuthor.articleID from ArticleAuthor where ArticleAuthor.authorID =\" + authorID;\r\n\t\ttry {\r\n\t\t\tconn = new ConnectionManager();\r\n\t\t\tStatement st = conn.getInstance().getConnection().createStatement();\r\n\t\t\tResultSet rs = st.executeQuery(queryArticle);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tint articleId=rs.getInt(\"ArticleAuthor.articleID\");\r\n\t\t\t\tSystem.out.println(\"articleIDs aayi:\"+articleId);\r\n\t\t\t\tintArtID.add(articleId);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(intArtID);\r\n\t\t\trs.close();\r\n\t\t\tfor(int a: intArtID){\r\n\t\t\t\tStatement st1 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString selectQuery2 = \"Select articleID from Article where articleID!=\"+a;\r\n\t\t\t\tResultSet rs1 = st1.executeQuery(selectQuery2);\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tint articleId=rs1.getInt(\"articleID\");\r\n\t\t\t\t\tif(!intArtID.contains(articleId)){\r\n\t\t\t\t\t\tif(!finalselectedArticleID.contains(articleId)){\r\n\t\t\t\t\t\t\tfinalselectedArticleID.add(articleId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Final ids:\"+finalselectedArticleID);\r\n\t\t\tfor(int autID : finalselectedArticleID ){\r\n\t\t\t\tStatement st2 = conn.getInstance().getConnection().createStatement();\r\n\t\t\t\tString q = \"select articleID, title, summary from Article where articleID=\"+autID;\r\n\t\t\t\tResultSet rs2 = st2.executeQuery(q);\r\n\t\t\t\twhile (rs2.next()) {\r\n\t\t\t\t\tString unpublishedTitle = (String) rs2.getObject(\"title\");\r\n\t\t\t\t\tString unpublishedSummary = (String) rs2.getObject(\"summary\");\r\n\t\t\t\t\tint articeIde=rs2.getInt(\"articleID\");\r\n\t\t\t\t\tArticle article2 = new Article(articeIde, unpublishedTitle, unpublishedSummary);\r\n\t\t\t\t\tunpubArticle.add(article2);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(unpubArticle);\r\n\t\t\t\trs2.close();\r\n\t\t\t\tst2.close();\r\n\t\t\t}\r\n\t\t\tst.close();\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tif (conn!=null){\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn unpubArticle;\r\n\t}", "public List<Article> getArticles() {\n\t\treturn this.articleService.findArticles();\n\t}", "public articlesModify() {\n initComponents();\n }", "@Override\n\t\n\tpublic List<Article> _selectArticles() {\n\t\treturn articleMapper.selectArticles();\n\t}", "public interface Article {\n\n\tpublic String getTitle();\n\n\tpublic void setTitle( String title );\n\n\tpublic String getArticleText();\n\n\tpublic void setArticleText( String articleText );\n\n\tpublic List<Comment> getComments();\n\n\tpublic Comment getComment( int commentId );\n\n\tpublic void addComment( String author, String text );\n\n}", "public List<Articleimage> getArticleImageList(Article article){\n \n UrlGenerator urlGen = new UrlGenerator();\n String imageKeyIdTemp = urlGen.getNewURL();\n \n List<Articleimage> articleimageList = new ArrayList<>();\n Document doc = Jsoup.parse(article.getArtContent());\n Elements elements = doc.getElementsByTag(\"img\");\n \n \n for(int i=0; i< elements.size(); i++){ \n String artImagekeyid = String.valueOf(i)+imageKeyIdTemp;\n \n String artImgsrc=elements.get(i).attr(\"src\");\n String artImgalt=elements.get(i).attr(\"alt\");\n String artImgcssclass=elements.get(i).attr(\"class\");\n String artImgcssstyle=elements.get(i).attr(\"style\");\n \n Articleimage articleimage = new Articleimage( artImgsrc, artImgcssclass,\n \t\t\t artImgcssstyle, artImgalt, artImagekeyid);\n articleimageList.add(articleimage);\n }\n return articleimageList;\n }", "public List<ArticleVo> getAllArticles()\n\t {\n\t List<ArticleVo> articleList = ArticleConverter.toVoList(repository.findAllDistinct());\n\n\t if(articleList.size() > 0) {\n\t return articleList;\n\t } else {\n\t return new ArrayList<ArticleVo>();\n\t }\n\t }", "Article findLatestArticle();", "@Override\n public int getItemCount() {\n return articles.size(); // recyler view need to know amount of items\n }", "public List<Article> generateArticles(Data data) {\n List<Article> articles = new ArrayList<>();\n for (int i = 0; i < Integer.parseInt(data.getArticleNumber()); i++) {\n articles.add(new Article(\n data.getArticle().getTitle() + RandomStringUtils.random(5, false, true),\n data.getArticle().getDescription() + RandomStringUtils.random(5, false, true),\n data.getArticle().getBody(),\n data.getArticle().getTags() + RandomStringUtils.random(5, false, true)\n ));\n }\n return articles;\n }", "public void fetchArticles(int page, boolean newSearch) {\n if(newSearch) { articles.clear(); }\n\n AsyncHttpClient client = new AsyncHttpClient();\n String url;\n RequestParams params = new RequestParams();\n params.put(\"api-key\", \"ed5753fe0329424883b2a07a7a7b4817\");\n params.put(\"page\", page);\n\n // If top stories, different parameters\n if(topStories) {\n url = \"https://api.nytimes.com/svc/topstories/v2/home.json\";\n } else {\n url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n params.put(\"q\",filter.getQuery());\n if(filter.getSort() != null) {\n params.put(\"sort\",filter.getSort());\n }\n if(filter.getBegin_date() != null) {\n params.put(\"begin_date\",filter.getBegin_date());\n }\n if(filter.getNewsDeskOpts().size() > 0) {\n for(int i=0; i<filter.getNewsDeskOpts().size(); i++) {\n params.put(\"fq\",String.format(\"news_desk:(%s)\",filter.getNewsDeskOpts().get(i)));\n }\n }\n Log.d(\"DEBUG\",params.toString());\n }\n\n client.get(url, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"DEBUG\",response.toString());\n JSONArray articleJsonResults = null;\n try {\n if(!topStories) {\n articleJsonResults = response.getJSONObject(\"response\").getJSONArray(\"docs\");\n } else {\n articleJsonResults = response.getJSONArray(\"results\");\n }\n\n // Every time data is changed, notify adapter; can also do by article.addAll and use adapter.notifyDataSetChanged\n articles.addAll(Article.fromJsonArray(articleJsonResults, topStories));\n adapter.notifyDataSetChanged();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\",\"JSON response failed\");\n super.onFailure(statusCode, headers, throwable, errorResponse);\n }\n });\n }", "Article createArticle();", "public List<Article> getList() {\n return list;\n }", "@Override\n public void addArticle(Article article) {\n\n remoteDataSource.addArticle(article);\n\n }", "public List<Articles> RechercheArticlesService(String nomColonne, String valeurRecherchee);", "public abstract boolean testArticle(PubmedArticle article);", "@Override\n public int getCount() {\n return newsArticleList.size();\n }", "public interface ArticleService {\n /**\n * 通过博客文章的id来查找文章\n * @param id 博客文章的id\n * @return Article对象\n */\n public Article getArticle(Integer id);\n\n /**\n * 保存博客文章,并返回保存文章的id\n * @param article\n * @return id 文章id\n */\n public Integer saveArticle(Article article);\n\n /**\n * 根据博客文章的id删除数据库的文章\n * @param id\n */\n public void deleteArticle(Integer id);\n\n /**\n * 更新文章,如果文章存在数据库则更新否则重新保存\n * @param article\n */\n public void saveOrUpdateArticle(Article article);\n\n /**\n * 根据文章的标题查找博客文章(模糊查询待定)\n * @param title\n * @return\n */\n public Article findByTitle(String title);\n\n}", "private void setupViews() {\n this.rvArticles = (RecyclerView) findViewById(R.id.rvArticles);\n this.articles = new ArrayList<>();\n this.articleArrayAdapter = new ArticleArrayAdapter(this, this.articles);\n this.rvArticles.setAdapter(this.articleArrayAdapter);\n StaggeredGridLayoutManager gridLayoutManager =\n new StaggeredGridLayoutManager(GRID_NUM_COLUMNS,\n StaggeredGridLayoutManager.VERTICAL);\n this.rvArticles.setLayoutManager(gridLayoutManager);\n ItemClickSupport.addTo(this.rvArticles).setOnItemClickListener(\n (recyclerView, position, v) -> launchArticleView(position)\n );\n SpacesItemDecoration decoration = new SpacesItemDecoration(GRID_SPACE_SIZE);\n this.rvArticles.addItemDecoration(decoration);\n this.rvArticles.addOnScrollListener(\n new EndlessRecyclerViewScrollListener(gridLayoutManager) {\n @Override\n public void onLoadMore(int page, int totalItemsCount) {\n articleSearch(searchView.getQuery().toString(), page);\n }\n });\n }", "List<Article> selectAll();", "private void readArticle(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\t\n\t}", "private boolean AcquireNYArticles()\n {\n NYArticleLoader articleLoader = new NYArticleLoader(this);\n titles = articleLoader.AcquireAllTitles();\n publishDates = articleLoader.AcquireAllPublishedDates();\n authors = articleLoader.AcquireAllAuthors();\n\n if(titles.size() == 0 || publishDates.size() == 0 || authors.size() == 0)\n {\n Toast.makeText(this,\"Failed to load articles\", Toast.LENGTH_SHORT).show();\n return false;\n }\n else\n {\n return true;\n }\n }", "@Override\n public void crawl() {\n Document doc;\n try {\n\n\n doc = Jsoup.connect(rootURL).userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A\").get();\n\n Elements articles = doc.select(\"section.list article\");\n\n System.out.println(\"Number of articles found:\"+articles.size());\n //list of links found\n for(Element article: articles){\n\n Element titleLink = article.select(\"a\").first();\n System.out.println(titleLink.attr(\"abs:href\"));\n\n //if the url found is in the cache, do not retrieve the url.\n if(urlCache.contains(titleLink.attr(\"abs:href\"))) {\n System.out.println(\"Doucment found in cache, ignoring document\");\n continue;\n }\n\n storeDocument(Jsoup.connect(titleLink.attr(\"abs:href\")).get());\n\n //add the URL to the cache so that we don't retrieve it again.\n urlCache.add(titleLink.attr(\"abs:href\"));\n }\n\n\n } catch (Exception e){\n logger.log(Level.SEVERE, \"Error Retrieving from URL\", e);\n e.printStackTrace();\n }\n }", "public Article getArticleWithImage(Article article, List<String> imageList){ \n if(!article.getArticleArticleimages().isEmpty()){\n List<ArticleArticleimage> artartimage = new ArrayList<ArticleArticleimage>(article.getArticleArticleimages()); \n \n for(int i=0; i<artartimage.size(); i++){ \t\n \t String replace = \"<img src=\\\"\"+artartimage.get(i).getArticleimage().getArtImgsrc()+\"\\\"\"+\n \t\t\t \" alt=\\\"\"+artartimage.get(i).getArticleimage().getArtImgalt()+\"\\\"\"+\n \t\t\t \" style=\\\"\"+artartimage.get(i).getArticleimage().getArtImgcssstyle()+\"\\\"\"+\n \t\t\t \" class=\\\"\"+artartimage.get(i).getArticleimage().getArtImgcssclass()+\"\\\"\"+\n \t\t\t \" ></img>\"; \t \n article.setArtContent(article.getArtContent().replace(artartimage.get(i).getArticleimage().getArtImagekeyid(),replace)); \n }\n }\n return article;\n }", "void accept(Article article);", "private void getByTitle(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString type = request.getParameter(\"type\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tswitch(type){\n\t\tcase \"BigData\":\n\t\t\tlist = artService.getAll(\"atype\", \"辅修\");\n\t\t\tbreak;\n\t\tcase \"Computer\":\n\t\t\tlist = artService.getAll(\"atype\", \"专业\");\n\t\t\tbreak;\n\t\tcase \"Math\":\n\t\t\tlist = artService.getAll(\"atype\", \"留学\");\n\t\t\tbreak;\n\t\tcase \"Economy\":\n\t\t\tlist = artService.getAll(\"atype\", \"考研\");\n\t\t\tbreak;\n\t\tcase \"Psychology\":\n\t\t\tlist = artService.getAll(\"atype\", \"就业\");\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlist=artService.getAll(\"atype\", \"其他\");\n\t\t\t\tbreak;\n\t\t}\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Article() {\n }", "public ArrayList<BlogArticle> gainAll() {\n\t\treturn blogArticleDao.gainAll();\n\t}", "@Override\r\n\tpublic List<News> findAllNews() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<News> newsList = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql = \"select * from news\";\r\n\t\t\tconn = SimpleDBUtil.getConnection();\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\tnewsList = new ArrayList<>();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tNews aNews = new News();\r\n\t\t\t\taNews.setId(rs.getInt(1));\r\n\t\t\t\taNews.setTitle(rs.getString(2));\r\n\t\t\t\taNews.setContent(rs.getString(\"content\"));\r\n\t\t\t\taNews.setCreateTime(rs.getDate(\"createTime\"));\r\n\t\t\t\taNews.setFk_topic_id(rs.getInt(\"fk_topic_id\"));\r\n\t\t\t\t\r\n\t\t\t\tnewsList.add(aNews);\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t} finally {\r\n\t\t\tSimpleDBUtil.closeAll(rs, pstmt, conn);\r\n\t\t}\r\n\t\t\r\n\t\treturn newsList;\r\n\t}", "public void deleteAllArticles();", "public interface ArticleService {\n /**\n * Adds Article <tt>a</tt> to the blog's permanent storage.\n * \n * @param a the Article object to be added\n * @throws IllegalArgumentException if a is null or not ready to be saved\n */\n void addArticle(Article a);\n \n /**\n * Returns a specific Article uniquely identified by <tt>id</tt>. \n * \n * @param id the Article's id\n * @return null if id does not refer to a valid article\n * @throws IllegalArgumentException if id is null\n */\n Article findArticleById(String id);\n\n /**\n * Returns the latest Article (by creation date) in the system.\n * \n * @return null if there is no latest Article\n */\n Article findLatestArticle();\n}", "public interface ArticleService {\n\n /**\n * 新增文章\n * @param article 文章内容\n * @param request 当前请求\n * @return\n */\n ResponseResult save(Article article, HttpServletRequest request);\n\n /**\n * 编辑文章\n * @param article 文章内容\n * @param request 当前请求\n * @return\n */\n ResponseResult edit(Article article, HttpServletRequest request);\n\n List<Article> queryPage(ArticleQO articleQO);\n\n Long count(ArticleQO articleQO);\n\n Article getById(Long id);\n\n void delete(Long id);\n\n}", "@Override\n\tpublic List<String> getTagsByArticle(int aid) {\n\t\tString hql = \"select t.content from TagInfo as t,ArticleInfo as a where a.articleId= ? and a.tags.tagId = t.tagId\";\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\t//Query query = sessionFactory.getCurrentSession().createSQLQuery(sql);\n\t\tquery.setInteger(0, aid);\n\t\treturn query.list();\n\t}", "@Override\r\n\tpublic List<ENews> newsTitle() {\n\t\treturn new ENDaoImpl().newsTitle();\r\n\t}", "public List<MTSDocumentVO> getArticles(String cat, String pubId, int count, boolean isPagePreview) {\n\t\t// Create the structure\n\t\tList<Object> vals = new ArrayList<>();\n\t\tvals.add(cat);\n\n\t\tStringBuilder sql = new StringBuilder(464);\n\t\tsql.append(\"select action_nm, action_desc, a.action_id, document_id, \");\n\t\tsql.append(\"unique_cd, publication_id, direct_access_pth, publish_dt, c.sponsor_id \");\n\t\tsql.append(\"from widget_meta_data_xr a \");\n\t\tsql.append(\"inner join sb_action b on a.action_id = b.action_id and b.pending_sync_flg = 0 \");\n\t\tsql.append(\"inner join document doc on b.action_id = doc.action_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_document c on b.action_group_id = c.document_id \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(getCustomSchema()).append(\"mts_issue d on c.issue_id = d.issue_id \");\n\t\tsql.append(\"where d.approval_flg=1 and widget_meta_data_id=? \"); \n\t\tif (!isPagePreview) {\n\t\t\tsql.append(\" and (c.publish_dt < CURRENT_TIMESTAMP or c.publish_dt is null) and (d.issue_dt < CURRENT_TIMESTAMP or d.issue_dt is null) \");\n\t\t\tsql.append(\"and c.publish_dt > current_date-730 \"); //only show articles newer than 2yrs old - MTS-i36\n\t\t}\n\t\tif (!StringUtil.isEmpty(pubId)) {\n\t\t\tsql.append(\"and publication_id = ? \");\n\t\t\tvals.add(pubId);\n\t\t}\n\t\tsql.append(\"order by random() limit ? \");\n\t\tvals.add(count);\n\t\tlog.debug(sql.length() + \"|\" + sql + \"|\" + vals);\n\n\t\tDBProcessor db = new DBProcessor(getDBConnection(), getCustomSchema());\n\t\tList<MTSDocumentVO> docs = db.executeSelect(sql.toString(), vals, new MTSDocumentVO());\n\t\ttry {\n\t\t\tassignDocumentAsset(docs, cat);\n\t\t} catch (SQLException e) {\n\t\t\tlog.error(\"Unabel to load assets\", e);\n\t\t}\n\n\t\treturn docs;\n\t}", "public int getArticleID() {\n return articleID;\n }", "String getNews();", "public void diaryArticleInflater() {\r\n\r\n\t\tArticleInflater ap = new ArticleInflater();\r\n\t\tfor (int i = 0; i < this.diaries.size(); i++) {\r\n\t\t\tDiary diary = this.diaries.get(i);\r\n\t\t\tList<String> urlsList = diary.getUrls();\r\n\t\t\tfor (int j = 0; j < urlsList.size(); j++) {\r\n\t\t\t\tArticle article = ap.run(urlsList.get(j), diary);\r\n\t\t\t\tarticles.add(article);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tap.close();\r\n\t}", "private void getData() {\n ArticleBean articleBean = new ArticleBean();\n articleBean.setTime(\"1月16日\");\n articleBean.setTitle(\"文章内容\");\n articleBean.setName(\"xzh\");\n mList.add(articleBean);\n mList.add(articleBean);\n mList.add(articleBean);\n }", "@Test\n\t@DisplayName(\"GET /api/article - Success\")\n\tpublic void testGetAllArticles() throws Exception {\n\t\tmockMvc.perform(get(\"/api/article/\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n\t\t.andExpect(jsonPath(\"$.article.length\").value(2));\n\t}", "@Override\r\n\tpublic List<Product> findNews() throws Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void getNewsList(Page page, String query) {\n\t\t\r\n\t}", "public int countByArticle(java.lang.String articleId);", "public int countByArticle(java.lang.String articleId);", "public interface ArticleService {\n public void save(Article article);\n public void update(Article article);\n public List<Article> queryAll();\n public List<Article> queryByPage(@Param(\"pageNow\") Integer pageNow, @Param(\"pageNum\") Integer pageNum);\n}", "public interface ArticleView {\n void setLoadingState(boolean state, int percents);\n void setContent(String title, String author, String source, CharSequence content);\n}", "private static List<ArticleBean> transactionSearchSuggestedArticles(Transaction tx, String username, int limit)\n {\n List<ArticleBean> articles = new ArrayList<>();\n HashMap<String,Object> parameters = new HashMap<>();\n int quantiInflu = 0;\n parameters.put(\"username\", username);\n parameters.put(\"role\", \"influencer\");\n parameters.put(\"limit\", limit);\n\n String conInflu = \"MATCH (u:User{username:$username})-[f:FOLLOW]->(i:User{role:$role})-[p:PUBLISHED]-(a:Article) \" +\n \" RETURN a, i, p ORDER BY p.timestamp LIMIT $limit\";\n\n String nienteInflu = \"MATCH (i:User)-[p:PUBLISHED]->(a:Article)-[r:REFERRED]->(g:Game), (u:User) \" +\n \" WHERE NOT(i.username = u.username) AND \" +\n \" u.username=$username AND ((g.category1 = u.category1 OR g.category1 = u.category2) \" +\n \" OR (g.category2 = u.category1 OR g.category2 = u.category2))\" +\n \" RETURN distinct(a),i,p ORDER BY p.timestamp LIMIT $limit \";\n\n Result result;\n quantiInflu = UsersDBManager.transactionCountUsers(tx,username,\"influencer\");\n if(quantiInflu < 3)\n {\n result = tx.run(nienteInflu, parameters);\n }\n else\n {\n result = tx.run(conInflu, parameters);\n }\n while(result.hasNext())\n {\n Record record = result.next();\n List<Pair<String, Value>> values = record.fields();\n ArticleBean article = new ArticleBean();\n String author;\n String title;\n for (Pair<String,Value> nameValue: values) {\n if (\"a\".equals(nameValue.key())) {\n Value value = nameValue.value();\n title = value.get(\"title\").asString();\n article.setTitle(title);\n article.setId(value.get(\"idArt\").asInt());\n\n }\n if (\"i\".equals(nameValue.key())) {\n Value value = nameValue.value();\n author = value.get(\"username\").asString();\n article.setAuthor(author);\n\n }\n if (\"p\".equals(nameValue.key())) {\n Value value = nameValue.value();\n String timestamp = value.get(\"timestamp\").asString();\n article.setTimestamp(Timestamp.valueOf(timestamp));\n\n }\n }\n articles.add(article);\n }\n\n return articles;\n\n }", "@Given(\"an Article exists under the Section\")\r\n\tpublic void createArticle(){\n\t\ttestArticle = new ArticleModel();\r\n\t\ttestArticle.setId(\"3236549\");\r\n\t\ttestArticle.setDefaultValues(baseFeedDomain);\r\n\t\ttestArticle.setTitle(\"automation 3 article title\");\r\n\t\ttestArticle.setState(\"published\");\r\n\t\ttestArticle.setParentName(\"automation3published\");\r\n\t\ttestArticle.setAuthorFirstName(\"tto\");\r\n\t\ttestArticle.setAuthorLastName(\"Administrator\");\r\n\t\t\t\r\n\t\ttestArticle.setStandFirst(\"automation 3 article standfirst\");\r\n\t\ttestArticle.setSectionNameOverride(\"automation 3 article section name override\");\r\n\t\ttestArticle.setTitleprefix(\"automation 3 article times sport title prefix\");\r\n\t\ttestArticle.setHeadlineTitleOverride(\"automation 3 article headline changed\");\r\n\t\ttestArticle.setArticleStandFirstOverride(\"automation 3 article standfirst changed\");\r\n\t\ttestArticle.setArticleBodyOverride(\"automation 3 article body - changed \");\r\n\t\t\r\n\t\ttestArticle.setFeedLink(baseFeedDomain + \"article/\" + 3236549);\r\n\t\ttestArticle.setArticleBodyOverride(\"<p>\\nautomation 3 article body - changed \\n</p>\\n\");\r\n\t\ttestArticle.setBody(\"<p>\\nautomation 3 article body\\n</p>\\n\");\r\n\t\ttestArticle.setCategory(\"article\");\r\n\t\ttestArticle.setAuthorFirstName(\"tto\");\r\n\t\ttestArticle.setAuthorLastName(\"Administrator\");\r\n\t\ttestArticle.setAuthorId(\"2\");\r\n\t\ttestArticle.setFeedLink(baseFeedDomain + \"article/3236549\");\r\n\t\ttestArticle.setHeadline(\"automation 3 article headline\");\r\n\t\ttestArticle.setAuthorUri(baseFeedDomain + \"author/\" + testArticle.getAuthorId());\r\n\t\t\r\n\t\t//TODO re-implement this once cms asset creation/teardown is available\r\n//\t\tString articleId = cmsHelper.createArticle(testArticle);\r\n//\t\ttestArticle.setArticleId(articleId);\r\n\t\t\t\t\r\n\t}", "public interface HotArticleView {\r\n void hideHeader();\r\n\r\n void refreshHotArticle(List<Article> list);\r\n\r\n void refreshArticle(List<Article> list);\r\n}", "private void updateArticles() {\n progressDialog.show();\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(Constant.API_URL, new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n try {\n JSONArray jsonArray = new JSONArray(response.toString());\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n Article article = new Article();\n article.TITLE = jsonObject.getString(\"TITLE\");\n article.ID = jsonObject.getInt(\"ID\");\n article.URL = jsonObject.getString(\"URL\");\n article.PUBLISHER = jsonObject.getString(\"PUBLISHER\");\n article.CATEGORY = jsonObject.getString(\"CATEGORY\");\n article.HOSTNAME = jsonObject.getString(\"HOSTNAME\");\n article.TIMESTAMP = jsonObject.getLong(\"TIMESTAMP\");\n articles.add(article);\n if (!publisher.contains(jsonObject.getString(\"PUBLISHER\"))) {\n publisher.add(jsonObject.getString(\"PUBLISHER\"));\n }\n //Save publisher locally\n /*if (jsonObject.getString(\"PUBLISHER\") != null) {\n Publisher publisher = new Publisher();\n publisher.setPublisherName(jsonObject.getString(\"PUBLISHER\"));\n try {\n List<Publisher> publisherList = new RushSearch()\n .whereEqual(\"publisherName\", jsonObject.getString(\"PUBLISHER\"))\n .find(Publisher.class);\n if (publisherList.size() == 0) {\n publisher.save();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }*/\n }\n\n refreshList();\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.dismiss();\n }\n });\n\n //submitting request to server\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n requestQueue.add(jsonArrayRequest);\n }", "protected void addArticle(NewsArticle art) {\n articles.addElement(art); // add to Vector\n filterAgent.score(art, filterType); // score the article\n refreshTable();\n articleTextArea.setText(art.getBody());\n articleTextArea.setCaretPosition(0); // move cursor to start of article\n addArticleMenuItem.setEnabled(true) ;\n addAllMenuItem.setEnabled(true) ;\n saveArticleMenuItem.setEnabled(true) ;\n }", "@Override\n\tprotected synchronized void getArticles() throws Exception {\n\t\tif(thread == null || thread.isAlive() == false) {\n\t\t\tWebRunner runner = new WebRunner(mHandler);\n\t\t\tthread = new Thread(runner);\n\t\t\tthread.start();\n\t\t}\n }", "private void LoadItems() {\n\n Call<NewsResponce> callNews = null;\n\n if (SourceId != null && DateTo != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, DateTo, currentPage, SourceId);\n\n } else if (SourceId != null && DateAt != null) {\n callNews = newsApiInterface.GetEverything(NewsClient.API_KEY, DateAt, currentPage, SourceId);\n\n } else if (SourceId != null && DateTo != null) {\n callNews = newsApiInterface.GetEverythingDateTo(NewsClient.API_KEY, DateTo, currentPage, SourceId);\n\n } else {\n DialogAlert(R.string.dialog_title_no_criterias, R.string.dialog_message_no_criterias);\n }\n\n if (callNews != null)\n callNews.enqueue(new Callback<NewsResponce>() {\n @Override\n public void onResponse(Call<NewsResponce> call, final Response<NewsResponce> response) {\n if (response.body() != null) {\n if (response.body().getTotalResults() > articleList.size()) {\n articleList.addAll(response.body().getArticles());\n newsAdapter.notifyDataSetChanged();\n ++currentPage;\n }\n } else\n articleList.clear();\n\n Log.d(TAG, articleList.size() + \"\");\n }\n\n @Override\n public void onFailure(Call<NewsResponce> call, Throwable t) {\n Log.e(TAG, t.getMessage());\n }\n });\n }", "public Article() {\n\t}", "public List<Element> monitorMainPage(){\n\t\tSystem.out.println(\"monitor main Page\");\n\t\tDocument document;\n\t\tList<Element> results = new ArrayList<Element>();\n\t\t// se connecte au site\n\t\tdocument = connectToPage(\"https://www.supremenewyork.com/shop/all\");\n\t\t// liste tous les éléments de la classe inner-article (i.e. tout ce qu'il y a sur la page\n\t\tElements elements = document.getElementsByClass(\"inner-article\");\n\t\tList<Element> articlesGeneral = new ArrayList<Element>();\n\t\tfor (Element element : elements) {\n\t\t\t// extrait chaque link a des articles \n\t\t\tElement link = element.select(\"a\").first();\n\t\t\tarticlesGeneral.add(link);\n\t\t}\n\t\tresults = articlesGeneral;\t\t\n\n\t\treturn results;\n\n\t}", "public void setArticleID(int articleID) {\n this.articleID = articleID;\n }", "public String getArticle() {\t\t\n\t\tif(this.article == null)\n\t\t\tthis.setArticle();\n\t\treturn this.article;\n\t}", "public Article(String author, String title, int publicationYear, String journal, int startingPage, int endingPage){\n super(author, title, publicationYear);\n this.setStartingPage(startingPage);\n this.setEndingPage(endingPage);\n this.setJournal(journal);\n }", "public NewsAdapter(Context context, ArrayList<NewsArticle> newsArticles) {\n super(context, 0, newsArticles);\n }", "public Artikel [] getArticles (Predicate<Artikel> predicate, BiPredicate<Artikel, Artikel> biPredicate){\n Artikel [] sortierteListe = new Artikel[getArtikelAnzahl()];\n int p = 0;\n for (int i = 0; i < key; i++) {\n if (predicate.test(getArtikel(i))) {\n sortierteListe[p] = getArtikel(i);\n p++;\n }\n }\n\n if(p > 1) {\n sortierteListe = sortieren(biPredicate, sortierteListe, p);\n }\n return sortierteListe;\n }", "@PostMapping(\"/showArticlesByTitre\")\n\t\tpublic String showArticleByTitre(@RequestParam String titre, Model model) {\n\t\t\tArrayList <Article> articles = (ArrayList<Article>) articleService.findByTitre(titre);\n\t\t\tmodel.addAttribute(\"articles\", articles);\n\t\t\treturn \"showArticleByTitre\";\n\t\t}", "public WebElement getArticleById(int id) {\n LOGGER.info(\"Getting article Nr.\" + (id + 1));\n // if we use assertions better to initialize \"articles\" before assertions;\n List<WebElement> articles = baseFunc.findElements(ARTICLE);\n\n //if list is not empty, everything is ok;\n Assertions.assertFalse(articles.isEmpty(), \"There are no articles!\");\n //if article count > searched article, everything is ok;\n Assertions.assertTrue(articles.size() > id, \"Article amount is less than id\");\n\n return articles.get(id);\n }", "public Article() {\n\t\t/*\n\t\t * This field is updated on insert\n\t\t */\n\t\tthis.articleCreatedDate = new Date(new java.util.Date().getTime());\n\t}", "Article findArticleById(String id);", "@Override\n\tpublic List<Image> findByIdArticles(long idArticles) {\n\t\treturn imageRepository.findByIdArticles(idArticles);\n\t}", "@Override\n\tprotected List<Resource> extractNeededArticleDetails(List<String> articleIdList) {\n\t\treturn new ArrayList<Resource>();\n\t}", "private void articleSearch(final String query, final int page) {\n Log.d(\"DEBUG\", \"Search query: \" + query + \"; page: \"+ page);\n if (query.isEmpty() || page == PAGE_MAX || !isOnline()) {\n return;\n }\n if (page == FIRST_PAGE) {\n articles.clear();\n articleArrayAdapter.notifyDataSetChanged();\n }\n this.client.getArticles(page, query, this.filterSettings, new JsonHttpResponseHandler\n () {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n JSONArray articleJsonResults = null;\n try {\n articleJsonResults = response.getJSONObject(RESPONSE_KEY)\n .getJSONArray(DOCS_KEY);\n articles.addAll(Article.fromJSONArray(articleJsonResults));\n articleArrayAdapter.notifyDataSetChanged();\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n super.onFailure(statusCode, headers, throwable, errorResponse);\n if (statusCode == 429 && errorResponse.toString().equals(\"{\\\"message\\\":\\\"API rate limit exceeded\\\"}\")) {\n Log.d(\"DEBUG\", \"API rate limit exceeded. Retrying in 2s.\");\n Handler handler = new Handler();\n handler.postDelayed(() -> articleSearch(query, page), RETRY_DELAY_MILLIS);\n }\n }\n });\n }", "@Override\n\tpublic List<BoardVO> getArticle() {\n\t\tString sql = \"SELECT * FROM board ORDER BY board_id ASC\";\n\t\t\n\t\treturn template.query(sql, new BoardMapper());\n\t}", "@Override\n\tpublic void update(Article article) throws Exception {\n\t\t\n\t}", "@Test\n public void modifierArticleKO(){\n String nomArticle = \"short\";\n Article articleBD = daoArticle.findByNom(nomArticle); //peut renvoyer null si l'article \"Chaussons\" n'existe pas en BD \n \n Double prixHT = 6.55;\n Integer delaisAppros = 4;\n Integer delaisDeLivraisonArt =6; \n Integer quantiteStock = 25;\n Article articleAvecModifications = new Article(nomArticle, prixHT, delaisAppros, delaisDeLivraisonArt, quantiteStock); //attributs d'instance ayant @Column(nullable = false)\n articleAvecModifications.setDescription(\"très bonne qualitée\");\n articleS.modifierArticle(articleBD, articleAvecModifications);\n \n if(articleBD == null){\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\");\n System.out.println(\"ARTICLE \" + nomArticle + \" N'EXISTE PAS EN BD : \" + articleBD);\n System.out.println();System.out.println();System.out.println();System.out.println(\"=============================================================\"); \n }\n }" ]
[ "0.7531823", "0.6890471", "0.6810702", "0.6808935", "0.6779658", "0.6739215", "0.6661401", "0.66375303", "0.66054255", "0.6595976", "0.65347564", "0.6529423", "0.64996946", "0.6492299", "0.6446378", "0.6408855", "0.63760704", "0.63101846", "0.6270289", "0.6242385", "0.6229333", "0.62283826", "0.62221396", "0.6217932", "0.62076145", "0.61956704", "0.61782086", "0.6170493", "0.61533946", "0.6146143", "0.6108084", "0.60888344", "0.6085319", "0.6079567", "0.60740924", "0.60523367", "0.60466576", "0.6024361", "0.60125256", "0.60066617", "0.59495324", "0.59430367", "0.5940576", "0.5916569", "0.59045196", "0.5897613", "0.58889735", "0.5872834", "0.58628255", "0.5861643", "0.5859629", "0.5850169", "0.5830245", "0.57985854", "0.57951427", "0.5777119", "0.57629114", "0.57348543", "0.5733957", "0.5733655", "0.572946", "0.572375", "0.57217777", "0.5719468", "0.5715557", "0.57125944", "0.5707271", "0.5706681", "0.5691361", "0.5686605", "0.56805015", "0.56618214", "0.56582713", "0.56564313", "0.56462216", "0.56417423", "0.5639186", "0.5628757", "0.56261384", "0.56253946", "0.5622632", "0.5610192", "0.5598053", "0.55964106", "0.55888844", "0.5587282", "0.55786604", "0.55769116", "0.55705553", "0.55638415", "0.55509394", "0.5546106", "0.55443215", "0.55438536", "0.55181503", "0.551468", "0.550396", "0.5499063", "0.5499029", "0.5492792" ]
0.6610807
8
Methode de recherche d'un article
public List<Articles> RechercheArticlesService(String nomColonne, String valeurRecherchee);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Set<Article> search(String keyworkds) {\n\t\treturn null;\r\n\t}", "private void getBySearch(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString search = request.getParameter(\"search\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tlist = artService.getAll(\"atitle\", search);\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "abstract public void search();", "public void search() {\r\n \t\r\n }", "private void articleSearch(final String query, final int page) {\n Log.d(\"DEBUG\", \"Search query: \" + query + \"; page: \"+ page);\n if (query.isEmpty() || page == PAGE_MAX || !isOnline()) {\n return;\n }\n if (page == FIRST_PAGE) {\n articles.clear();\n articleArrayAdapter.notifyDataSetChanged();\n }\n this.client.getArticles(page, query, this.filterSettings, new JsonHttpResponseHandler\n () {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n JSONArray articleJsonResults = null;\n try {\n articleJsonResults = response.getJSONObject(RESPONSE_KEY)\n .getJSONArray(DOCS_KEY);\n articles.addAll(Article.fromJSONArray(articleJsonResults));\n articleArrayAdapter.notifyDataSetChanged();\n }\n catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n super.onFailure(statusCode, headers, throwable, errorResponse);\n if (statusCode == 429 && errorResponse.toString().equals(\"{\\\"message\\\":\\\"API rate limit exceeded\\\"}\")) {\n Log.d(\"DEBUG\", \"API rate limit exceeded. Retrying in 2s.\");\n Handler handler = new Handler();\n handler.postDelayed(() -> articleSearch(query, page), RETRY_DELAY_MILLIS);\n }\n }\n });\n }", "Search getSearch();", "public void search() {\n }", "void search();", "void search();", "@Override\n public String execute(String request) {\n String author = request.substring(request.indexOf(separator) + 1);\n\n ServiceFactory service = ServiceFactory.getInstance();\n NewsService newsService = service.getNewsService();\n\n String response;\n try {\n newsService.findByAuthor(author);\n response = \"It is search results.\"; ///look it\n } catch (ServiceException e) {\n response = \"News not found.\";\n }\n return response;\n }", "private void getByTitle(HttpServletRequest request, HttpServletResponse response, ArticleService artService) {\n\t\tString type = request.getParameter(\"type\");\n\t\tList<Article> list = new ArrayList<Article>();\n\t\tswitch(type){\n\t\tcase \"BigData\":\n\t\t\tlist = artService.getAll(\"atype\", \"辅修\");\n\t\t\tbreak;\n\t\tcase \"Computer\":\n\t\t\tlist = artService.getAll(\"atype\", \"专业\");\n\t\t\tbreak;\n\t\tcase \"Math\":\n\t\t\tlist = artService.getAll(\"atype\", \"留学\");\n\t\t\tbreak;\n\t\tcase \"Economy\":\n\t\t\tlist = artService.getAll(\"atype\", \"考研\");\n\t\t\tbreak;\n\t\tcase \"Psychology\":\n\t\t\tlist = artService.getAll(\"atype\", \"就业\");\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlist=artService.getAll(\"atype\", \"其他\");\n\t\t\t\tbreak;\n\t\t}\n\t\trequest.setAttribute(\"list\", list);\n\t\ttry {\n\t\t\trequest.getRequestDispatcher(\"/essay/other_essay.jsp\").forward(request, response);\n\t\t} catch (ServletException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void search() {\n\t}", "@Override\r\n\tpublic void search() {\n\r\n\t}", "public List<Article> findAll();", "public String recherche() {\n\n listAnnonce = iServiceGestionAnnonce.findByExampleSql( annonce, adresse );\n\n return \"rechercheResultat\";\n\n }", "public Show search(String title){\n return super.search(title);\n }", "abstract public boolean performSearch();", "@Override\n\tpublic ArrayList<BlogArticle> searchArts(String title) {\n\t\treturn blogArticleDao.searchArts(title);\n\t}", "private void searchFunction() {\n\t\t\r\n\t}", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "@Override\n public SearchResult search_item(String keyword, int page, int rows , int search_type) throws Exception{\n return null;\n }", "public ArrayList<Article> search(String keyword, int pageIndex, int pageSize)\n throws Exception {\n String sql = \"WITH t AS (\\n\"\n + \"SELECT ROW_NUMBER() OVER (ORDER BY [time] DESC) rownum,* \"\n + \"FROM dbo.Article \\n\"\n + \"WHERE title LIKE '%' + ? + '%' OR content LIKE '%' + ? + '%'\\n\"\n + \")\\n\"\n + \"SELECT * FROM t \"\n + \"WHERE t.rownum >= (? - 1) * ? + 1 AND t.rownum <= ? * ?\";\n ArrayList<Article> articles = new ArrayList<>();\n Connection con = null;\n PreparedStatement st = null;\n ResultSet rs = null;\n try {\n con = getConnection();\n st = con.prepareStatement(sql);\n st.setString(1, keyword);\n st.setString(2, keyword);\n st.setInt(3, pageIndex);\n st.setInt(4, pageSize);\n st.setInt(5, pageIndex);\n st.setInt(6, pageSize);\n rs = st.executeQuery();\n while (rs.next()) {\n Article a = new Article();\n a.setId(rs.getInt(\"id\"));\n a.setTitle(rs.getString(\"title\"));\n a.setContent(rs.getString(\"content\"));\n a.setDescription(rs.getString(\"description\"));\n a.setImage(getImgPath() + rs.getString(\"image\"));\n a.setTime(rs.getTimestamp(\"time\"));\n a.setAuthor(rs.getString(\"author\"));\n articles.add(a);\n }\n } catch (Exception ex) {\n throw ex;\n } finally {\n closeResultSet(rs);\n closePreparedStatement(st);\n closeConnection(con);\n }\n return articles;\n }", "public abstract S getSearch();", "@Override\r\n\tpublic void find(HttpServletRequest request, HttpServletResponse response) throws IOException {\n\t\tURL1=\"/admin/xiaoshuolist.jsp\";\r\n\t\tthis.searchFields=\"title,content,categorytitle,author\";\r\n\t\tsuper.find(request, response);\r\n\t}", "@PostMapping(\"/showArticlesByTitre\")\n\t\tpublic String showArticleByTitre(@RequestParam String titre, Model model) {\n\t\t\tArrayList <Article> articles = (ArrayList<Article>) articleService.findByTitre(titre);\n\t\t\tmodel.addAttribute(\"articles\", articles);\n\t\t\treturn \"showArticleByTitre\";\n\t\t}", "@Override\n public List<News> search(String txt, int pageIndex, int pageSize) throws Exception {\n Connection conn = null;\n PreparedStatement statement = null;\n ResultSet result = null;\n List<News> list = new ArrayList<>();\n String query = \"select *from(\"\n + \"select ROW_NUMBER() over (order by ID ASC) as rn, *\\n\"\n + \"from news where title \\n\"\n + \"like ?\"\n + \")as x\\n\"\n + \"where rn between ?*?-2\"\n + \"and ?*?\";\n try {\n conn = getConnection();\n statement = conn.prepareStatement(query);\n statement.setString(1, \"%\" + txt + \"%\");\n statement.setInt(2, pageIndex);\n statement.setInt(3, pageSize);\n statement.setInt(4, pageIndex);\n statement.setInt(5, pageSize);\n result = statement.executeQuery();\n while (result.next()) {\n News news = new News(result.getInt(\"ID\"),\n result.getString(\"title\"),\n result.getString(\"description\"),\n result.getString(\"image\"),\n result.getString(\"author\"),\n result.getDate(\"timePost\"),\n result.getString(\"shortDes\"));\n list.add(news);\n }\n } catch (ClassNotFoundException | SQLException e) {\n throw e;\n } finally {\n closeResultSet(result);\n closePreparedStatement(statement);\n closeConnection(conn);\n }\n return list;\n }", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "Article findLatestArticle();", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "@Override\r\n\tpublic Article findBySid(Article article) {\n\t\treturn articleDao.findBySid(article);\r\n\t}", "List<SearchResult> search(SearchQuery searchQuery);", "private void search(String product) {\n // ..\n }", "private void searchByTitle(String title){\n Query query = null;\n if(mTipoCuenta.equals(\"ADMINISTRADOR\")){\n query = mPostProvider.getPostByTitle(title);\n }else{\n query = mPostProvider.getPostByTitleTipocuenta(mTipoCuenta,title);\n }\n FirestoreRecyclerOptions<Post> options = new FirestoreRecyclerOptions.Builder<Post>()\n .setQuery(query, Post.class)\n .build();\n mPostAdapterSearch = new PostsAdapter(options, getContext());\n mPostAdapter.notifyDataSetChanged();\n mRecycleView.setAdapter(mPostAdapterSearch);\n mPostAdapterSearch.startListening();\n }", "Article findArticleById(String id);", "public List<Recipe> search(String queryText, Category category, CookingMethod cookingMethod);", "@Action\r\n public String search() {\n ServiceFunctions.clearCache();\r\n\r\n if (isAdmin()) {\r\n return adminSearch();\r\n }\r\n\r\n return publicSearch();\r\n }", "@Override\n\tpublic List<BoardVO> searchArticle(String keyword) {\n\t\t\n\t\tString sql = \"SELECT * FROM board WHERE board_writer LIKE ?\";\n\t\treturn template.query(sql,new BoardMapper(), keyword);\n\t}", "public void fetchArticles(int page, boolean newSearch) {\n if(newSearch) { articles.clear(); }\n\n AsyncHttpClient client = new AsyncHttpClient();\n String url;\n RequestParams params = new RequestParams();\n params.put(\"api-key\", \"ed5753fe0329424883b2a07a7a7b4817\");\n params.put(\"page\", page);\n\n // If top stories, different parameters\n if(topStories) {\n url = \"https://api.nytimes.com/svc/topstories/v2/home.json\";\n } else {\n url = \"https://api.nytimes.com/svc/search/v2/articlesearch.json\";\n params.put(\"q\",filter.getQuery());\n if(filter.getSort() != null) {\n params.put(\"sort\",filter.getSort());\n }\n if(filter.getBegin_date() != null) {\n params.put(\"begin_date\",filter.getBegin_date());\n }\n if(filter.getNewsDeskOpts().size() > 0) {\n for(int i=0; i<filter.getNewsDeskOpts().size(); i++) {\n params.put(\"fq\",String.format(\"news_desk:(%s)\",filter.getNewsDeskOpts().get(i)));\n }\n }\n Log.d(\"DEBUG\",params.toString());\n }\n\n client.get(url, params, new JsonHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Log.d(\"DEBUG\",response.toString());\n JSONArray articleJsonResults = null;\n try {\n if(!topStories) {\n articleJsonResults = response.getJSONObject(\"response\").getJSONArray(\"docs\");\n } else {\n articleJsonResults = response.getJSONArray(\"results\");\n }\n\n // Every time data is changed, notify adapter; can also do by article.addAll and use adapter.notifyDataSetChanged\n articles.addAll(Article.fromJsonArray(articleJsonResults, topStories));\n adapter.notifyDataSetChanged();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {\n Log.d(\"DEBUG\",\"JSON response failed\");\n super.onFailure(statusCode, headers, throwable, errorResponse);\n }\n });\n }", "@In String search();", "public void SearchTutor() {\n\t\t\n\t}", "private static List<ArticleBean> transactionSearchSuggestedArticles(Transaction tx, String username, int limit)\n {\n List<ArticleBean> articles = new ArrayList<>();\n HashMap<String,Object> parameters = new HashMap<>();\n int quantiInflu = 0;\n parameters.put(\"username\", username);\n parameters.put(\"role\", \"influencer\");\n parameters.put(\"limit\", limit);\n\n String conInflu = \"MATCH (u:User{username:$username})-[f:FOLLOW]->(i:User{role:$role})-[p:PUBLISHED]-(a:Article) \" +\n \" RETURN a, i, p ORDER BY p.timestamp LIMIT $limit\";\n\n String nienteInflu = \"MATCH (i:User)-[p:PUBLISHED]->(a:Article)-[r:REFERRED]->(g:Game), (u:User) \" +\n \" WHERE NOT(i.username = u.username) AND \" +\n \" u.username=$username AND ((g.category1 = u.category1 OR g.category1 = u.category2) \" +\n \" OR (g.category2 = u.category1 OR g.category2 = u.category2))\" +\n \" RETURN distinct(a),i,p ORDER BY p.timestamp LIMIT $limit \";\n\n Result result;\n quantiInflu = UsersDBManager.transactionCountUsers(tx,username,\"influencer\");\n if(quantiInflu < 3)\n {\n result = tx.run(nienteInflu, parameters);\n }\n else\n {\n result = tx.run(conInflu, parameters);\n }\n while(result.hasNext())\n {\n Record record = result.next();\n List<Pair<String, Value>> values = record.fields();\n ArticleBean article = new ArticleBean();\n String author;\n String title;\n for (Pair<String,Value> nameValue: values) {\n if (\"a\".equals(nameValue.key())) {\n Value value = nameValue.value();\n title = value.get(\"title\").asString();\n article.setTitle(title);\n article.setId(value.get(\"idArt\").asInt());\n\n }\n if (\"i\".equals(nameValue.key())) {\n Value value = nameValue.value();\n author = value.get(\"username\").asString();\n article.setAuthor(author);\n\n }\n if (\"p\".equals(nameValue.key())) {\n Value value = nameValue.value();\n String timestamp = value.get(\"timestamp\").asString();\n article.setTimestamp(Timestamp.valueOf(timestamp));\n\n }\n }\n articles.add(article);\n }\n\n return articles;\n\n }", "ArrayList<News> findByAuthor(String author) throws DAOException, ConnectionPoolDataSourceException;", "SearchResult<TimelineMeta> search(SearchParameter searchParameter);", "public void search() {\n\n lazyModel = new LazyDataModel<Pesquisa>() {\n private static final long serialVersionUID = -6541913048403958674L;\n\n @Override\n public List<Pesquisa> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, String> filters) {\n\n pesquisarBC.searhValidation(searchParam);\n\n int count = pesquisarBC.count(searchParam);\n lazyModel.setRowCount(count);\n\n if (count > 0) {\n if (first > count) {\n // Go to last page\n first = (count / pageSize) * pageSize;\n }\n SearchFilter parameters = new SearchFilter();\n parameters.setFirst(first);\n parameters.setPageSize(pageSize);\n List<Pesquisa> list = pesquisarBC.search(searchParam, parameters);\n\n logger.info(\"END: load\");\n return list;\n } else {\n return null;\n }\n }\n };\n\n }", "@Override\n\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\n\t\t\t\tList<StoreArticle> list = getShop().searchByArticle(filter);\n\t\t\t\tStoreArticle[] array = list.toArray(new StoreArticle[0]);\n\t\t\t\tadapter = new SearchByArticleAdapter(SearchActivity.this, R.layout.search_view, array);\n\t\t\t\treturn null;\n\t\t\t}", "public WebElement getArticleById(int id) {\n LOGGER.info(\"Getting article Nr.\" + (id + 1));\n // if we use assertions better to initialize \"articles\" before assertions;\n List<WebElement> articles = baseFunc.findElements(ARTICLE);\n\n //if list is not empty, everything is ok;\n Assertions.assertFalse(articles.isEmpty(), \"There are no articles!\");\n //if article count > searched article, everything is ok;\n Assertions.assertTrue(articles.size() > id, \"Article amount is less than id\");\n\n return articles.get(id);\n }", "public List<Product> search(String searchString);", "@Override\n public List<Digital> getSearch(String txt, int pageIndex, int pageSize) throws Exception {\n\n Connection con = null;\n ResultSet rs = null;\n PreparedStatement ps = null;\n List<Digital> list = new ArrayList<>();\n String query = \"select *from(\"\n + \"select ROW_NUMBER() over (order by ID ASC) as rn, *\\n\"\n + \"from digital where title \\n\"\n + \"like ?\"\n + \")as x\\n\"\n + \"where rn between ?*?-2\"\n + \"and ?*?\";\n // check connection of db if cannot connect, it will throw an object of Exception\n try {\n con = getConnection();\n ps = con.prepareStatement(query);\n ps.setString(1, \"%\" + txt + \"%\");\n ps.setInt(2, pageIndex);\n ps.setInt(3, pageSize);\n ps.setInt(4, pageIndex);\n ps.setInt(5, pageSize);\n rs = ps.executeQuery();\n while (rs.next()) {\n Digital d = new Digital(rs.getInt(\"id\"),\n rs.getString(\"title\"),\n rs.getString(\"description\"),\n rs.getString(\"images\"),\n rs.getString(\"author\"),\n rs.getTimestamp(\"timePost\"),\n rs.getString(\"shortDes\"));\n list.add(d);\n }\n } catch (Exception e) {\n throw e;\n } finally {\n // close ResultSet, PrepareStatement, Connection\n closeResultSet(rs);\n closePrepareStateMent(ps);\n closeConnection(con);\n }\n return list;\n }", "public String SearchContent()\n\t{\n\t\tSystem.out.println(\"Content:\" + Content);\n\t\tluc = new Lucene_fuction();\n\t\tHttpServletRequest request = ServletActionContext.getRequest();\n\t\tServletContext servletContext = ServletActionContext.getServletContext();\n\t\trequest.getSession();\n\t\tHttpServletResponse response = ServletActionContext.getResponse();\n\t\t// if the tag is empty\n\t\t\n\t\t\tArrayList<Picture> PicList = new ArrayList<>();\n\t\t\tPicList = luc.queryIndex_Content(Content);\n\t\t\trequest.setAttribute(\"PictureList\", PicList);\n\t\t\treturn \"Content_Result\";\n\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n RecyclerView recyclerView = (RecyclerView) findViewById(R.id.search_recycler_view);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mSearchView.getContext(),LinearLayoutManager.VERTICAL,false);\n recyclerView.setLayoutManager(linearLayoutManager);\n List<Article> articleList = DatabaseHelper.getInstance(mSearchView.getContext()).searchArticles(newText);\n mAdapter = new ArticlesVerticalRecyclerAdapter(articleList,false);\n recyclerView.setAdapter(mAdapter);\n\n return true;\n }", "public interface ArticleService {\n /**\n * 通过博客文章的id来查找文章\n * @param id 博客文章的id\n * @return Article对象\n */\n public Article getArticle(Integer id);\n\n /**\n * 保存博客文章,并返回保存文章的id\n * @param article\n * @return id 文章id\n */\n public Integer saveArticle(Article article);\n\n /**\n * 根据博客文章的id删除数据库的文章\n * @param id\n */\n public void deleteArticle(Integer id);\n\n /**\n * 更新文章,如果文章存在数据库则更新否则重新保存\n * @param article\n */\n public void saveOrUpdateArticle(Article article);\n\n /**\n * 根据文章的标题查找博客文章(模糊查询待定)\n * @param title\n * @return\n */\n public Article findByTitle(String title);\n\n}", "List<Card> search(String searchString) throws PersistenceCoreException;", "public interface ArticleRepository extends ElasticsearchRepository<Article, String> {\n\n Page<Article> findByTitle(String title, Pageable pageable);\n\n @Query(\"{\\\"bool\\\": {\\\"must\\\": [{\\\"match\\\": {\\\"title\\\": \\\"?0\\\"}}]}}\")\n Page<Article> findByAuthorsNameUsingCustomQuery(String title, Pageable pageable);\n}", "@Override\n public void search(Uri uri) {\n }", "void searchProbed (Search search);", "@Override\n\tString search(String text) throws Exception {\n\t\tString result = null;\n\t\tthis.text = text;\n\t\tthis.connection = this.getConnection();\n\n\t\tresult = searchRes();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tresult = searchTour();\n\t\tif (result != null)\n\t\t\treturn result;\n\n\t\tconnection.close();\n\t\tthrow new Exception(\"NOT FOUND\");\n\t}", "@Override\n \tpublic ArrayList<Object> searchPostByName(String search) {\n\t\t\n\t\tSystem.out.println(\"i am in service search looking for cool posts\" + search);\n\t\t\n\t\tif(search == null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tArrayList<Object> list = null; //postRepository.findPostByName(search); ****Nick set this to null; otherwise it failed. Needs corrected in future\n\t\t\n\t\t//System.out.println(Arrays.toString(list));\n\t\treturn list;\n\t}", "public void filterArticles() {\n filterAgent.score(articles, filterType);\n articles = insertionSort(articles); // sorted articles list\n\n refreshTable();\n if (articles.size() > 0) {\n currentArt = (NewsArticle) articles.elementAt(0);\n }\n }", "public void doSearch(String searchText){\n }", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "public Vector<Artista> findAllArtisti();", "@Override\r\n\tpublic StringBuffer find(StringBuffer strb) {\n\t\tif (!(recherche.isEmpty())) {\r\n\t\t\trecherche.clear();\r\n\t\t}\r\n\t\tStringBuffer out = new StringBuffer();\r\n\t\tint ctp = 0;\r\n\r\n\t\ttry {\r\n\t\t\tResultSet result = this.connect\r\n\t\t\t\t\t.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE)\r\n\t\t\t\t\t.executeQuery(\"SELECT * FROM cms.commentaire where article = '\" + strb + \"' ORDER BY date DESC\");\r\n\r\n\t\t\tif (!(result.next())) {\r\n\t\t\t\tSystem.out.println(\"pas de comm ici\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tCommentaire com = new Commentaire(++ctp, result.getString(2), result.getTimestamp(5).toLocalDateTime(),\r\n\t\t\t\t\t\tresult.getBoolean(6), new Visiteur(result.getString(3)), new Article(strb.toString()));\r\n\r\n\t\t\t\trecherche.add(com);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"error sql find\");\r\n\t\t}\r\n\t\tout.append(ctp);\r\n\t\treturn out;\r\n\t}", "List<DataTerm> search(String searchTerm);", "public News getByid(News news);", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "Page<NoteDTO> search(String query, Pageable pageable);", "private void searchContext(HttpServletRequest request, HttpServletResponse response, ArticleService artService,QuestionService questionService) throws ServletException, IOException {\n\t\tString text=request.getParameter(\"getText\");\n\t\tString atitle=\"atitle\";\n\t\tString qtitle=\"qtitle\";\n\t\tList<Article> arts=artService.getAll(atitle, text);\n\t\tList<Question> questions=questionService.getAll(qtitle,text);\n\t\trequest.setAttribute(\"arts\", arts);\n\t\trequest.setAttribute(\"questions\", questions);\n\t\trequest.getRequestDispatcher(\"/homepage/afterSearch.jsp\").forward(request, response);\n\t\t\n\t\t\n\t}", "List<AlbumVO> searchAlbum(String searchText) throws Exception;", "@Override\n\tpublic Page<Product> findKeyWordPage(Integer pageint, String searchContent) {\n\t\tPageRequest pageable = PageRequest.of(pageint, 9);\n//\t\tPage<Product> page = productRepository.findBydescriptionLike(pageable, searchContent);\n\t\tPage<Product> page = productRepository.searchAll(pageable, searchContent);\n\t\t\n\t\tSystem.out.println(\"page->\"+page.getContent());\n\t\treturn page;\n\t}", "public interface SearchService {\n\n /**\n * Parameter that is appended to the generated links that contains the positive search terms and phrases of the\n * search expression. For several terms it occurs several times.\n */\n String PARAMETER_SEARCHTERM = \"search.term\";\n\n /**\n * Represents a result of the search consisting of a target page and one or more matching subresources. For use by\n * the search result renderer.\n */\n interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }\n\n /**\n * Fulltext search for resources. The resources are grouped if they are subresources of one target page, as\n * determined by the parameter targetResourceFilter.\n * <p>\n * Limitations: if the searchExpression consists of several search terms (implicitly combined with AND) this finds\n * only resources where a single property matches the whole search condition, i.e., all those terms. If several\n * resources of a page contain different subsets of those terms, the page is not found.\n *\n * @param context The context we use for the search.\n * @param selectors a selector string to determine the right search strategy, e.g. 'page'\n * @param root Optional parameter for the node below which we search.\n * @param searchExpression Mandatory parameter for the fulltext search expression to search for. For the syntax\n * see\n * {@link QueryConditionDsl.QueryConditionBuilder#contains(String)}\n * . It is advisable to avoid using AND and OR.\n * @param searchFilter an optional filter to drop resources to ignore.\n * @return possibly empty list of results\n * @see com.composum.sling.core.mapping.jcr.ResourceFilterMapping\n */\n @NotNull\n List<Result> search(@NotNull BeanContext context, @NotNull String selectors,\n @NotNull String root, @NotNull String searchExpression, @Nullable ResourceFilter searchFilter,\n int offset, @Nullable Integer limit)\n throws RepositoryException, SearchTermParseException;\n\n\n interface LimitedQuery {\n\n /**\n * Executes the query with the given limit; returns a pair of a boolean that is true when we are sure that all\n * results have been found in spite of the limit, and the results themselves.\n */\n Pair<Boolean, List<Result>> execQuery(int matchLimit);\n }\n\n /**\n * Execute the query with raising limit until the required number of results is met. We don't know in advance how\n * large we have to set the limit in the query to get all neccesary results, since each page can have an a priori\n * unknown number of matches. Thus, the query is executed with an estimated limit, and is reexecuted with tripled\n * limit if the number of results is not sufficient and there are more limits.\n *\n * @return up to limit elements of the result list with the offset first elements skipped.\n */\n @NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);\n}", "@GetMapping(\"/_search/affinites\")\n @Timed\n public ResponseEntity<List<Affinite>> searchAffinites(@RequestParam String query, Pageable pageable) {\n log.debug(\"REST request to search for a page of Affinites for query {}\", query);\n Page<Affinite> page = affiniteSearchRepository.search(queryStringQuery(query), pageable);\n HttpHeaders headers = PaginationUtil.generateSearchPaginationHttpHeaders(query, page, \"/api/_search/affinites\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "public int countByArticle(java.lang.String articleId);", "public int countByArticle(java.lang.String articleId);", "public List<Articles> listArticlesService();", "@Override\r\n\tpublic List<Post> searchInfResult(String word) {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\treturn postDao.selectPosts(word);\r\n\t}", "ReagentSearch getReagentSearch();", "@Query(\n \"Select t FROM Ticket t WHERE t.responsible IS NOT NULL \"\n + \"AND (t.isOpen = :isOpen) \"\n + \"AND (LOWER(t.title) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.id) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.client.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.user.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR LOWER(t.category.name) LIKE LOWER(CONCAT('%', :searchTerm, '%')) \"\n + \"OR DATE_FORMAT(t.lastInteration, '%d/%m/%Y') LIKE CONCAT('%', :searchTerm, '%')) \"\n )\n public Page<Ticket> searchType4(@Param(\"isOpen\") Boolean isOpen, @Param(\"searchTerm\") String searchTerm,Pageable pageable);", "@Override\n @Transactional(readOnly = true)\n public Page<Kontrachent> search(String query, Pageable pageable) {\n log.debug(\"Request to search for a page of Kontrachents for query {}\", query);\n return kontrachentSearchRepository.search(queryStringQuery(query), pageable); }", "Page<Tbc_analises_componente> search(String query, Pageable pageable);", "public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}", "public abstract boolean testArticle(PubmedArticle article);", "public interface Search {\n ArrayList<Section> searchSecByTitle(String info);\n\n ArrayList<Section> searchSecByCourse_id(String info);\n}", "List<Corretor> search(String query);", "@Override\n public ArrayList<News> findByAuthor(String foundAuthor) throws DAOException, ConnectionPoolDataSourceException {\n ArrayList<News> news = new ArrayList<>();\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n Connection connection = connectionPool.takeConnection();\n try {\n preparedStatement = connection.prepareStatement(SQL_SELECT_BY_AUTHOR);\n preparedStatement.setString(1, foundAuthor);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n String category = resultSet.getString(2);\n String title = resultSet.getString(3);\n String author = resultSet.getString(4);\n String date = resultSet.getString(5);\n news.add(new News(category, title, author, date));\n }\n if (news == null) {\n throw new DAOException(\"Error in findByAuthor.\");\n }\n connectionPool.closeConnection(connection, preparedStatement, resultSet);\n } catch (SQLException e) {\n throw new DAOException(e);\n }\n return news;\n }", "@Override\n public ArrayList<News> findByTitle(String foundTitle) throws DAOException, ConnectionPoolDataSourceException {\n ArrayList<News> news = new ArrayList<>();\n PreparedStatement preparedStatement = null;\n ResultSet resultSet = null;\n Connection connection = connectionPool.takeConnection();\n try {\n preparedStatement = connection.prepareStatement(SQL_SELECT_BY_TITLE);\n preparedStatement.setString(1, foundTitle);\n resultSet = preparedStatement.executeQuery();\n while (resultSet.next()) {\n String category = resultSet.getString(2);\n String title = resultSet.getString(3);\n String author = resultSet.getString(4);\n String date = resultSet.getString(5);\n news.add(new News(category, title, author, date));\n }\n if (news == null) {\n throw new DAOException(\"Error in findByTitle.\");\n }\n connectionPool.closeConnection(connection, preparedStatement, resultSet);\n } catch (SQLException e) {\n throw new DAOException(e);\n }\n return news;\n }", "@Override\n public Movie search(String title)\n {\n if(this.titles.get(title) != null)\n return this.movies.get((this.titles.get(title)).getKey());\n else\n return null;\n }", "public String getContent() throws SearchResultException;", "void searchView(String name);", "public Vector<Artikel> artikelSuchen(String bezeichnung, Person p) throws ArticleNonexistantException, AccessRestrictedException{\r\n\t\tif(istMitarbeiter(p) || istKunde(p)){\r\n\t\t\treturn av.sucheArtikel(bezeichnung);\r\n\t\t} else {\r\n\t\t\tthrow new AccessRestrictedException(p, \"\\\"Artikel suchen (Bezeichnung)\\\"\");\r\n\t\t}\r\n\t}", "public void llistaArticlesByName(String string) {\n\t\tSystem.out.println(\"\\nArticles anomenats \" + string + \" :\");\n\t\t\n\t\tObjectSet<Article> articles = db.query(new Predicate<Article>() {\n\t\t\tpublic boolean match(Article article) {\n\t\t\t\treturn article.getName().equalsIgnoreCase(string);\n\t\t\t}\n\t\t});\n\t\tarticles.stream()\n\t\t\t\t.forEach(System.out::println);\n\t}", "List<SongVO> searchSong(String searchText) throws Exception;", "ArrayList<News> findByTitle(String title) throws DAOException, ConnectionPoolDataSourceException;", "@Override\r\n\tpublic List<Product> findNews() throws Exception {\n\t\treturn null;\r\n\t}", "List<Cemetery> search(String query);", "public Article getArticle()\n {\n return article;\n }", "entities.Torrent.SearchResponse getSearchResponse();", "@Override\n public boolean search(Movie movieToFind)\n {\n if(movieToFind == null)\n return false;\n else\n return this.search(movieToFind.getTitle()) != null;\n }", "Page<ExamPackage> searchListByTitle(String examPackageTitlte,int categoryID, int pageNo, int pageSize,Sort sort);", "void search( RealLocalizable reference );", "public List<News> query(Route route);" ]
[ "0.6833042", "0.68012106", "0.6753014", "0.6658464", "0.65671915", "0.64542717", "0.6431282", "0.6418926", "0.6418926", "0.64134014", "0.63446", "0.6334951", "0.6328676", "0.62986994", "0.62965757", "0.62397575", "0.62154883", "0.62120056", "0.61448735", "0.61131424", "0.61061275", "0.6103027", "0.61004627", "0.607578", "0.6042989", "0.6020388", "0.5990551", "0.5969172", "0.59675264", "0.59585214", "0.5956574", "0.59481454", "0.59335214", "0.59107286", "0.5910624", "0.59048474", "0.59048253", "0.59008616", "0.5896741", "0.58927083", "0.5890992", "0.58715624", "0.5863459", "0.58501595", "0.58501214", "0.58462787", "0.58394784", "0.5834552", "0.58302957", "0.5828438", "0.5820917", "0.5813056", "0.57970184", "0.57912976", "0.57892483", "0.5783254", "0.5726336", "0.5722937", "0.5712119", "0.5703004", "0.5702776", "0.5700817", "0.56897557", "0.5678007", "0.56758523", "0.5673861", "0.5668022", "0.5665719", "0.5665478", "0.5658528", "0.5654743", "0.56485736", "0.56480813", "0.56478333", "0.56412375", "0.56324023", "0.5630011", "0.562848", "0.560852", "0.56055474", "0.55990314", "0.5598189", "0.55949783", "0.558466", "0.5583864", "0.55779845", "0.5573628", "0.5567516", "0.55593336", "0.5557224", "0.55503863", "0.552985", "0.552678", "0.5524609", "0.5521564", "0.55194944", "0.551619", "0.551591", "0.5511651", "0.5507173" ]
0.6873489
0
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Matricula)) { return false; } Matricula other = (Matricula) object; if ((this.idMatricula == null && other.idMatricula != null) || (this.idMatricula != null && !this.idMatricula.equals(other.idMatricula))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
This endpoint method uses a combination of XPath expressions and marshalling to handle message with a &lt;GetPatientsRequest&gt; payload.
@PayloadRoot(localPart = GET_PATIENTS_REQUEST, namespace = MESSAGES_NAMESPACE) @Namespace(prefix = "m", uri = MESSAGES_NAMESPACE) @ResponsePayload public JAXBElement<id.co.kmn.services.wsdl.server.schema.PatientInfo> getPatients(@XPathParam("//m:reqKeyword") String reqKeyword, @XPathParam("//m:reqClinicId") String reqClinicId, @XPathParam("//m:reqPageNumber") int reqPageNumber, @XPathParam("//m:reqRowPerPage") int reqRowPerPage) throws DatatypeConfigurationException, ParserConfigurationException { if (logger.isDebugEnabled()) { logger.debug("Received GetPatientsRequest '" + reqKeyword + "' id: '" + reqClinicId + "' page: " + reqPageNumber + "reqRowPerPage: " + reqRowPerPage); } PatientInfo patientInfo = kmnServiceMethod.getPatientInfo(reqKeyword, reqClinicId, reqPageNumber, reqRowPerPage); return objectFactory.createGetPatientsResponse(SchemaConversionUtils.toSchemaType(patientInfo)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@POST\n @Path(\"/getRequests\")\n @Produces(MediaType.APPLICATION_JSON)\n public ArrayList<Relative> getRequests(@HeaderParam(\"patientemail\") String patientEmail) {\n\n RequestDaoImpl reqDaoImpl = new RequestDaoImpl();\n ArrayList<Relative> relatives = reqDaoImpl.getRequests(patientEmail);\n System.out.println(\"size of requests\"+relatives.size());\n return relatives;\n }", "@ApiOperation(value = \"Api Endpoint to get the patient details\")\n @GetMapping(path = \"/{patientId}\")\n @LogExecutionTime\n public PatientDto getPatientRecords(@PathVariable long patientId) {\n return patientService.getPatientRecords(patientId);\n }", "@GetMapping(\"/patient\")\r\n\t@ApiOperation(value = \"To list Patient Directory\")\r\n\t// @Cacheable(value = \"getRecordWithDat\", key = \"#root.methodName\")\r\n\tpublic List<PatientRecord> getAllPatientRecords() {\r\n\t\tlogger.info(\"listAllPatient {}\", patientService.getAll());\r\n\t\t// kafkaTemplate.send(\"kafkaExample\",\r\n\t\t// patientService.getAll().stream().findAny());\r\n\t\treturn patientService.getAll();\r\n\t}", "@GetMapping(value = \"/list\", produces = \"application/json\")\n List<Patient> list();", "public List<Patient> getFHIR() {\n IGenericClient client;\n FhirContext ctx;\n ctx = FhirContext.forDstu3();\n ctx.setRestfulClientFactory(new OkHttpRestfulClientFactory(ctx));\n client = ctx.newRestfulGenericClient(\"http://fhirtest.uhn.ca/baseDstu3\");\n\n // .lastUpdated(new DateRangeParam(\"2011-01-01\",\"2018-11-25\")) - to get latest data\n // Not used since unable to get proper records with names\n Bundle bundle = client.search().forResource(Patient.class)\n .where(Patient.NAME.isMissing(false))\n .and(Patient.BIRTHDATE.isMissing(false))\n .and(Patient.GENDER.isMissing(false))\n .sort().ascending(Patient.NAME)\n .count(10)\n .returnBundle(Bundle.class)\n .execute();\n return BundleUtil.toListOfResourcesOfType(ctx, bundle, Patient.class);\n }", "@ApiOperation(value = \"Api Endpoint to retrieve all the Patient details\")\n @GetMapping(\"getAll\")\n @LogExecutionTime\n public List<PatientDto> getAllPatientRecords(@RequestParam(name = \"page\", defaultValue = \"0\") int page,\n @RequestParam(name = \"limit\", defaultValue = \"10\") int limit,\n @RequestParam(name = \"orderBy\", defaultValue = \"asc\") String orderBy) {\n return patientService.getAllPatientRecords(page, limit, orderBy);\n }", "@GET(PATIENT_BY_ID_PATH)\n\tPatient getPatient(\n\t\t\t@Path(PATIENT_ID_PARAM) long patientId);", "@ApiOperation(value = \"Api Endpoint to search for the Patient record - Only using User name\")\n @GetMapping(\"search\")\n @LogExecutionTime\n public List<PatientDto> searchPatientRecords(@RequestParam(name = \"search\") String search,\n @RequestParam(name = \"page\", defaultValue = \"0\") int page,\n @RequestParam(name = \"limit\", defaultValue = \"10\") int limit,\n @RequestParam(name = \"orderBy\", defaultValue = \"asc\") String orderBy) {\n return patientService.searchPatientRecords(search, page, limit, orderBy);\n }", "@GET\n @Path(\"patients/{ipp}\")\n @Produces(\"application/json\")\n public Patient getPatient(@PathParam(\"ipp\") int IPP) {\n return serv.getPatientByIPP(IPP);\n }", "public abstract List<Patient> getAllPatientNode();", "@SystemAPI\n\tPatient getPatient();", "@GET(PATIENT_BY_NAME_PATH)\n\tPatient findPatientByName(\n\t\t\t@Path(PATIENT_NAME_PARAM) String patientName);", "public interface PatientsNoActivityResource {\n\n @Get\n List<PatientRepresentation> getPatientsWithNoActivity() throws NotFoundException, ParseException, IOException;\n}", "@GET\n @Path(\"patients\")\n @Produces(\"application/json\")\n public List<Patient> findPatient(@DefaultValue(\"\") @QueryParam(\"nom\") String nom,@DefaultValue(\"\") @QueryParam(\"prenom\") String prenom,@DefaultValue(\"\") @QueryParam(\"datenaiss\") String dateNaiss){\n if (nom.equals(\"\") && prenom.equals(\"\") && dateNaiss.equals(\"\")){\n return serv.getAllPatient();\n } else {\n return serv.findPatient(nom, prenom, dateNaiss);\n }\n }", "@Override\n public List<PatientCaseDto> getAllByPatient(Long patientId) {\n return null;\n }", "private void getAllPatients () throws MqttException {\n MqttMessage message = new MqttMessage(new Gson().toJson(dao.getAllPatients()).getBytes());\n message.setQos(0);\n publishThread(\"patient\", message, UniMed.mqttClient);\n }", "public abstract List<ClinicalDocumentDto> findClinicalDocumentDtoByPatientId(Long patientId);", "@RequestMapping(value = \"/retrieveInfo\", method = RequestMethod.GET)\n\tpublic ModelAndView retrievePatientsInfo() {\n\t\t\n\t\t\n\t\n\t\t\n\t\tlogger.info(\"Retrieve 1 :\");\n\t\t\n\t\t patientDetailsProcessor.retrieveInfoByEmailId();\n\t\t\n\t\treturn new ModelAndView(\"success\");\n\t}", "@WebMethod\n public void sendPatientMessages(@WebParam(name=\"messages\") PatientMessage[] messages);", "public static final void main(String[] args) {\n\t\t\n\t\tFhirContext context = new FhirContext();\n\t\tfinal FhirOpenemrConn pg = new FhirOpenemrConn();\n\t\tBundle bundle;\n\t\tPatient patient;\n\t\tfinal String outputMediaType = \"application/json+fhir\";\n\t\tfinal String req=\"get_all\";\n\t\tString result = \"\";\n\t\tIParser parser = getParser(context, FHIRMediaType.getType(outputMediaType) );\n\t\tparser.setPrettyPrint(true);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tPatientList patientList=null;\n\t\t\tFile f = new File(\"D:/AllPatients.txt\");\n\t\t\tpatientList = pg.getPatientList(f);\n\t\t\t\n\t\t\tif(req.equalsIgnoreCase(\"get_all\")){\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Patient List... \" + patientList);\n\t\t\t\tbundle = pg.getAllPatients(patientList);\n\t\t\t\tresult = parser.encodeResourceToString(bundle);\t\n\t\t\t}\n\t\t\t/*else if(req.equalsIgnoreCase(\"get_single\")){\n\t\t\t\tpatient = pg.getSinglePatient(patientList,0);\n\t\t\t\tSystem.out.println(\"Patient in main.... \" + patient.getId());\n\t\t\t\tresult = parser.encodeResourceToString(patient);\t\n\t\t\t}\n\t\t\telse\n\t\t\t\tresult = null;*/\n\t\t\t\n\t\t\tSystem.out.println(\"Result.... \"+result);\n\t\t\t\n\t\t\t\n\t\t} catch (JAXBException e) {\n\t\t\te.printStackTrace();\n\t\t }\t \n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*int status_code = 200;\n\t\tString reason = \"OK\";\n\t\tString errorMessage = null;\n\t\tString result = null;\n\t\tPatientList2 patientList;\n\t\tfinal FhirOpenemrConn conn = new FhirOpenemrConn();\n\t\t//String req = messageContext.getVariable(\"req\");\n\t\t// Get the response received from server stored in apigee variable\n\t\t\n\t\t\n\t\t// Get the actual Content type of response and required content type.\n\t\tString outputMediaType = \"application/json+fhir\";\n\n\t\t\n\t\t\n\t\tFhirContext context = new FhirContext();\n\t\ttry \n\t\t{\n\t\t\tFile f = new File(\"D:/patient.xml\");;\n\t\t\tpatientList = conn.getPatientList(f);\n\t\t Bundle bundle;\n\t\t\tPatient patient;\n\t\t\t\n\t\t\tIParser parser = getParser(context, FHIRMediaType.getType(\"application/json+fhir\"));\n\t\t\tparser.setPrettyPrint(true);\n\t\t\t\n\t\t\tpatient = conn.getSinglePatient(patientList,0);\n\t\t\tresult = parser.encodeResourceToString(patient);\n\t\t\t\n\t\t\tbundle = conn.getAllPatients(patientList);\n\t\t\tresult = parser.encodeResourceToString(bundle);\n\t\t\t\n\t\t\tSystem.out.println(\"Result....\" + result);\n\n\t\t}\n\t\tcatch (UnsupportedOperationException e) {\n\t\t\tstatus_code = 415;\n\t\t\treason = \"Unsupported media type\";\n\t\t\terrorMessage = \"Media type not supported.\";\n\t\t} \n\t\tcatch (Throwable e) {\n\t\t\tstatus_code = 500;\n\t\t\treason = \"Internal Server Error\";\n\t\t\terrorMessage = e.getMessage();\n\t\t\tSystem.out.println(\"Error... \" + e);\n\t\t}\n\t\t\n\t\tif (status_code == 200) {\n\t\t\t// Set result and message variables for apigee flow if response converted successfully\n\t\t\tSystem.out.println(\"Valid Result\");\n\t\t} \n\t\telse {\n\t\t\tSystem.out.println(\"Error..!!\");\n\t\t}\n\t\t*/\n\t\t\n\t\t\n\t\t\n\t}", "Reference getPatient();", "@RequestMapping(value = {\"/patients\" }, method = RequestMethod.GET)\r\n\tpublic String listPatients(ModelMap model) {\r\n\t\tList<User> users = service.findAllUsers(Type.patients.getValue());\r\n\t\tmodel.addAttribute(\"users\", users);\r\n\t\tmodel.addAttribute(\"type\", new String(\"patient\"));\r\n\t\treturn \"allusers\";\r\n\t}", "@RequestMapping(method = RequestMethod.GET, path = \"/patients/{userEmail}\")\n @Secured({\"ROLE_DOCTOR\"})\n @ResponseStatus(HttpStatus.OK)\n public List<Result> fetchPatientResults(\n @PathVariable(value = \"userEmail\") String userEmail) {\n log.info(\"Fetching results of patient with Id [{}]\", userEmail);\n return resultService.fetchResultsWithUserEmail(userEmail);\n }", "List<Patient> findAllPatients();", "@Override\n\tpublic List<PatientTelephone> fetchAll(Patient patient) {\n\t\treturn this.sessionFactory.getCurrentSession()\n\t\t\t\t.createCriteria(PatientTelephone.class)\n\t\t\t\t.add(Restrictions.eq(\"patient\", \"patient\"))\n\t\t\t\t.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY)\n\t\t\t\t.list();\n\t\t\n\t}", "List<MedicalRecord> getAllPatientMedicalRecords(HttpSession session, int patientId);", "@Override public ArrayList<Sample> getAllPatientSamples(Patient patient)\n {\n try\n {\n return clientDoctor.getAllPatientSamples(patient);\n }\n catch (RemoteException e)\n {\n throw new RuntimeException(\"Error while fetching samples. Please try again.\");\n }\n }", "PatientInfo getPatientInfo(int patientId);", "@GetMapping(value = \"/selectById\", produces = \"application/json\")\n Patient selectById(@RequestParam int id);", "@GET(PATIENT_PATH)\n\tPatient getCurrentPatient();", "@GET(DOCTOR_PATIENTS_PATH)\n\tCollection<Patient> getPatients(\n\t\t\t@Path(DOCTOR_ID_PARAM) long doctorId);", "public static com.statuspatients.plugins.model.Patients getPatients(\n long fooId)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return getService().getPatients(fooId);\n }", "public String getPatientResponses(){\n \treturn patientResponses;\n }", "@Test\n\tpublic void testGetAllPatients() {\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<String> entity = new HttpEntity<String>(null, headers);\n\t\tResponseEntity<String> response = restTemplate.exchange(getRootUrl() + \"/homepage\",HttpMethod.GET, entity, String.class);\n\t\tassertEquals(200, response.getStatusCodeValue());\n\t}", "private ArrayList<Patient> getPatients(String key) {\n\n BlueCareApolloClient.getBlueCareApolloClient().query(GetPatientsQuery.builder()\n ._authKey(key)\n .build())\n .enqueue(new ApolloCall.Callback<GetPatientsQuery.Data>() {\n\n @Override\n public void onResponse(@Nonnull com.apollographql.apollo.api.Response<GetPatientsQuery.Data> response) {\n\n res1 = response.data().getPatients().toString();\n List res = response.data().getPatients().patientRecords();\n String name;\n String age;\n\n Log.d(\"staff res: \", res1);\n\n\n\n for(int i = 0; i != res.size(); i++) {\n Object obj = (Object) res.get(i);\n Gson gson = new Gson();\n String jsonString = gson.toJson(obj);\n\n try {\n JSONObject patientRecords = new JSONObject(jsonString);\n name = patientRecords.getString(\"name\");\n age = patientRecords.getString(\"age\");\n\n //JSONArray cond = patientRecords.getJSONArray(\"conditions\");\n Patient x = new Patient(name, age);\n\n //x.setCondition(cond);\n patientList.add(x);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n\n\n\n StaffActivity.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // patientList.add(new Patient(name, cName, cStatus));\n thisListView.setAdapter(thisAdapter);\n\n\n thisListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Patient currentPatient = patientList.get(position);\n\n //Log.d(\"clicker: \", patientList.get(position).getCondition().toString());\n\n\n //thisIntent = new Intent(StaffActivity.this, SinglePatientView.class);\n //thisIntent.putExtra(\"patientName\", currentPatient.getpName());\n //thisIntent.putExtra(\"patientConditions\", currentPatient.getCondition().toString());\n //startActivity(thisIntent);\n\n }\n\n });\n\n }\n });\n\n\n }\n\n @Override\n public void onFailure(@Nonnull ApolloException e) {\n Log.d(\"onResponse\", e.toString());\n }\n });\n\n return patientList;\n }", "@Search()\n\t\tpublic List<Patient> getResourceById(@RequiredParam(name = \"_id\") String theId) {\n\t\t\tPatient patient = getIdToPatient().get(theId);\n\t\t\tif (patient != null) {\n\t\t\t\treturn Collections.singletonList(patient);\n\t\t\t} else {\n\t\t\t\treturn Collections.emptyList();\n\t\t\t}\n\t\t}", "public List<Patient> getPatients() {\n List<Patient> patients = new ArrayList<>();\n String query = \"SELECT * FROM PATIENTS\";\n try (PreparedStatement ps = this.transaction.prepareStatement(query); ResultSet rs = ps.executeQuery()) {\n while (rs.next()) {\n patients.add(new Patient(rs));\n }\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n }\n\n return patients;\n }", "public List<Patient> listAllPatient() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Patient> listOfPatients() {\n\t\treturn null;\n\t}", "@RequestMapping(method = RequestMethod.GET, path = \"/patients\")\n @Secured({\"ROLE_DOCTOR\"})\n @ResponseStatus(HttpStatus.OK)\n public List<User> fetchAllPatients(Principal principal) {\n log.info(\"Fetching all patients using user with Id [{}]\", principal.getName());\n return userService.fetchAllPatients(\"ROLE_PATIENT\");\n }", "@RequestMapping(value = \"/getPatientDocumentsData\", method = RequestMethod.POST)\n\t\tpublic @ResponseBody String getPatientDocumentData(@RequestParam(\"draw\") int draw,\n\t\t\t\t@RequestParam(\"start\") int start, @RequestParam(\"length\") int len,\n\t\t\t\t@RequestParam(\"search[value]\") String searchTerm,\n\t\t\t\t@RequestParam(\"order[0][column]\") int orderColumn, @RequestParam(\"order[0][dir]\") String orderDir, @RequestParam(\"columns[0][data]\") String col0Data,\n\t\t\t\t@RequestParam(\"columns[0][name]\") String col0Name, @RequestParam(\"columns[0][searchable]\") String col0Search, @RequestParam(\"columns[0][orderable]\") String col0Order,\n\t\t\t\t@RequestParam(\"columns[0][search][value]\") String col0SearchValue, @RequestParam(\"columns[0][search][regex]\") String col0SearchRegex,\n\t\t\t\t@RequestParam(\"columns[1][data]\") String col1Data, @RequestParam(\"columns[1][name]\") String col1Name, @RequestParam(\"columns[1][searchable]\") String col1Search,\n\t\t\t\t@RequestParam(\"columns[1][orderable]\") String col1Order, @RequestParam(\"columns[1][search][value]\") String col1SearchValue,\n\t\t\t\t@RequestParam(\"columns[1][search][regex]\") String col1SearchRegex,\n\t\t\t\t@RequestParam(\"columns[2][data]\") String col2Data, @RequestParam(\"columns[2][name]\") String col2Name, @RequestParam(\"columns[2][searchable]\") String col2Search,\n\t\t\t\t@RequestParam(\"columns[2][orderable]\") String col2Order, @RequestParam(\"columns[2][search][value]\") String col2SearchValue, @RequestParam(\"columns[2][search][regex]\") String col2SearchRegex,\n\t\t\t\t@RequestParam(\"columns[3][data]\") String col3Data, @RequestParam(\"columns[3][name]\") String col3Name, @RequestParam(\"columns[3][searchable]\") String col3Search,\n\t\t\t\t@RequestParam(\"columns[3][orderable]\") String col3Order, @RequestParam(\"columns[3][search][value]\") String col3SearchValue,\n\t\t\t\t@RequestParam(\"columns[3][search][regex]\") String col3SearchRegex,\n\t\t\t\t@RequestParam(\"columns[4][data]\") String col4Data, @RequestParam(\"columns[4][name]\") String col4Name, @RequestParam(\"columns[4][searchable]\") String col4Search,\n\t\t\t\t@RequestParam(\"columns[4][orderable]\") String col4Order, @RequestParam(\"columns[4][search][value]\") String col4SearchValue,\n\t\t\t\t@RequestParam(\"columns[4][search][regex]\") String col4SearchRegex, @RequestParam(\"p\") String physicianId,\n\t\t\t\tHttpServletRequest request) {\n\t\t\t\n\t\t\treturn patientAccountService.getPatientDocumentDataList(draw, start, len, searchTerm, orderColumn, orderDir, physicianId );\n\t\t}", "@POST\n @Path(\"patients\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(\"application/json\")\n public Patient newPatient(Patient pat){\n serv.editPatient(pat);\n return pat;\n }", "private void getPatientInfo(String patientId){\n mFirestore.collection(\"users\")\n .document(patientId)\n .addSnapshotListener(new EventListener<DocumentSnapshot>() {\n @Override\n public void onEvent(@Nullable DocumentSnapshot snapshot,\n @Nullable FirebaseFirestoreException e) {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n return;\n }\n\n String source = snapshot != null && snapshot.getMetadata().hasPendingWrites()\n ? \"Local\" : \"Server\";\n\n if (snapshot != null && snapshot.exists()) {\n Log.d(TAG, source + \" data: \" + snapshot.getData());\n\n User existingPatient = localUser.getPatientById(snapshot.getId());\n if(existingPatient!=null){\n localUser.changeExistingPatient(existingPatient, setPatientData(snapshot));\n } else {\n localUser.addPatient(setPatientData(snapshot));\n }\n\n // TODO add PatientChangeListener\n //localUser.getIUserDataChangeListener().onUserDataChanged(null);\n\n } else {\n Log.d(TAG, source + \" data: null\");\n }\n }\n });\n }", "List<Patient> findPatients(Employee nurse_id);", "com.google.protobuf.ByteString\n getPatientIdBytes();", "public void getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request,\n io.grpc.stub.StreamObserver<org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList> responseObserver);", "public ArrayList<Patient> getPatients() {\n return this.patients;\n }", "@ApiOperation(value = \"Retourner une liste de Numero de telephone\")\n @GetMapping(\"/phoneAlert\")\n public List<String> getPhoneOfPersonToStationNumber(@RequestParam String firestation){\n log.info(\"Request to: \" + request.getRequestURI(), firestation);\n return firestationService.getPhoneOfPersonToStationNumber(firestation);\n\n }", "@GET(\"user-notification-content?expand=notification,notification.translations,notification.notificationResultType&sort=-time_from\")\n Call<NotificationsResponse> getNotifications(@Query(\"from\") long from,\n @Query(\"to\") long to,\n @Query(\"notification_result_accepted\") int notification_result_accepted,\n @Query(\"per-page\") double per_page);", "@Override\n public Patient findByPatientName(String patient) {\n return null;\n }", "@GetMapping(\"/biometrics/patient/{id}\")\r\n public List<Biometric> findByPatient(@PathVariable Long id) {\r\n return patientRepository.findById(id).map(biometricRepository::findByPatient).orElse(new ArrayList<>());\r\n }", "java.lang.String getPatientId();", "Collection<Patient> findAll();", "public PatientList getPatientList(final File file) throws JAXBException{\n\t\t\n\t\tJAXBContext jaxbContext = JAXBContext.newInstance(PatientList.class);\n\t Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();\n\t PatientList patientList = (PatientList) jaxbUnmarshaller.unmarshal(file);\n\t //System.out.println(\"Patient Data... \" + patientList);\n\t\treturn patientList;\n\t}", "@Override\n public PatientCaseDto getByPatient(Long patientId) {\n return null;\n }", "@PreAuthorize(\"hasAnyRole('PATIENT','EMPLOYEE')\")\n\t@PostMapping(path = \"/getPatientVisits\")\n\tpublic ResponseEntity<MappingJacksonValue> getPatientVisits(@RequestBody VisitData visitData) {\n\t\ttry {\n\t\t\tSimpleBeanPropertyFilter userFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"photo\");\n\t\t\tSimpleBeanPropertyFilter patientFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"medicalDocumentList\");\n\t\t\tSimpleBeanPropertyFilter doctorFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"workingWeek\");\n\t SimpleBeanPropertyFilter visitFilter = SimpleBeanPropertyFilter.serializeAllExcept(\"employee\", \"diagnosis\");\n\t FilterProvider filterProvider = new SimpleFilterProvider()\n\t \t\t.addFilter(\"userFilter\", userFilter)\n\t \t\t.addFilter(\"patientFilter\", patientFilter)\n\t\t\t .addFilter(\"doctorFilter\", doctorFilter)\n\t\t\t .addFilter(\"visitFilter\", visitFilter);\n\t\t\tList<Visit> patientVisits = visitService.getPatientVisits(visitData);\n\t\t\tMappingJacksonValue mappingJacksonValue = new MappingJacksonValue(patientVisits);\n\t\t\tmappingJacksonValue.setFilters(filterProvider);\n\t\t\treturn ResponseEntity.ok(mappingJacksonValue);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"ERROR get patient visits\", e);\n\t\t\treturn new ResponseEntity<MappingJacksonValue>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@POST\n @Path(\"notify\")\n public synchronized void notifyPatient(String contact) {\n }", "public abstract List<ClinicalDocument> findByPatientId(long patientId);", "@POST\n\t@Path(\"/getFriendRequestsService\")\n\tpublic String getFriendRequest() {\n\t\tJSONObject object = new JSONObject();\n\t\tUserEntity user = UserEntity.currentUser;\n\t\tif (user == null) {\n\t\t\tobject.put(\"Status\", \"Failed\");\n\n\t\t} else {\n\t\t\tobject.put(\"Status\", \"OK\");\n\t\t\tList<String> requests = user.getFriendRequests();\n\t\t\t\n\t\t\tobject.put(\"Size\",requests.size());\n\t\t\tfor (int i = 0; i < requests.size(); ++i) {\n\t\t\t\tobject.put(\"friendRequest\" + i, requests.get(i));\n\t\t\t}\n\t\t}\n\t\treturn object.toString();\n\t}", "@GetMapping(\"getpatient\")\n\tpublic CustomResponseBody<List<Doctor>> readRecordById(@PathParam(\"id\") Integer id)\n\t\t\tthrows BusinessException, SystemException {\n\t\tlogger.entry(id);\n\t\tif (id == null) {\n\t\t\tid = 0;\n\t\t}\n\t\tCustomResponseBody<List<Doctor>> response = new CustomResponseBody<List<Doctor>>();\n\t\tresponse.setStatus(HttpStatusConstant.OK);\n\t\tresponse.setMessage(doctorOperationDelegate.readRecordById(id));\n\t\tlogger.traceExit(response);\n\t\treturn response;\n\t}", "public interface PatientService {\n\n /**\n * 新增病人获取ID\n *\n * @return\n */\n Long getNewPid(Patient patient);\n\n /**\n * 新增病人\n *\n * @param patient\n * @return\n */\n JSONObject newPatient(Patient patient);\n\n\n /**\n * 复诊输入病人条件查询\n *\n * @param patient\n * @return\n */\n JSONObject revisit(Patient patient);\n\n\n /**\n * 获取地址列表\n * @return\n */\n JSONObject getPlace();\n\n\n /**\n * 获取病人列表\n * @return\n */\n JSONObject getPatientList(String pName,Integer pageSize,Integer pageNum);\n\n\n /**\n * 获取病人基本信息\n * @param pId\n * @return\n */\n JSONObject getPatientInfo(Long pId);\n\n /**\n * 更新病人基本信息\n * @param patient\n * @return\n */\n JSONObject updatePatientInfo(Patient patient);\n\n\n /**\n * 复诊时,有重复条件者获取病人列表\n */\n JSONObject getRevisitList(Patient patient,Integer pageSize,Integer pageNum);\n\n\n /**\n * 删除病人\n * @param patientId\n * @return\n */\n JSONObject deletePatient(Long patientId);\n\n /**\n * 将选中的病人的病历保存到Word文档\n */\n void saveObjToWord(List<Long> inquiryIdList, boolean all,Long patientId, HttpServletResponse response);\n}", "@RequestMapping(value = \"/v1/getAllPendingRequests\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<List<MyRequestReportResponse>> getAllPendingRequests(\n\t\t\t@RequestParam(value = \"fromDate\", required = false) String fromDate,\n\t\t\t@RequestParam(value = \"toDate\", required = false) String toDate,\n\t\t\t@RequestHeader(\"x-location-name\") String locationName)\n\t\t\tthrows SystemException {\n\t\tLOGGER.info(\"Invoking getAllPendingRequests api...\");\n\t\tLOGGER.info(\"Entered locationName :\" + locationName);\n\t\tErrorMessage errMsg = new ErrorMessage();\n\t\tList<MyRequestReportResponse> myRequestReportResponses = null;\n\n\t\t// validate location name\n\t\tif (!validationUtils.isValidateLocation(locationName, errMsg)) {\n\t\t\tthrow new SystemException(errMsg.getErrCode(), errMsg.getErrMsg(),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\n\t\t// validating dates if passed in request\n\t\tif (!validationUtils.validateDates(fromDate, toDate, errMsg)) {\n\t\t\tthrow new SystemException(errMsg.getErrCode(), errMsg.getErrMsg(),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\n\t\ttry {\n\n\t\t\tmyRequestReportResponses = requestService.getAllPendingRequests(\n\t\t\t\t\tlocationName, fromDate, toDate);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tLOGGER.error(\"Error getting while processing request to get allPendingRequests from inventory \"\n\t\t\t\t\t+ e);\n\t\t\tthrow new SystemException(Constants.FIVE_THOUSAND_SEVEN,\n\t\t\t\t\tConstants.INTERNAL_SERVER_ERROR,\n\t\t\t\t\tHttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\treturn new ResponseEntity<List<MyRequestReportResponse>>(\n\t\t\t\tmyRequestReportResponses, HttpStatus.ACCEPTED);\n\t}", "@Override\n\tpublic Collection<Patient> searchByName(String query) {\n\t\treturn null;\n\t}", "public void setPatientId(String patientId)\n {\n this.patientId = patientId;\n }", "private void getPatient (String id) throws MqttException {\n MqttMessage message = new MqttMessage(new Gson().toJson(dao.getPatient(id)).getBytes());\n message.setQos(0);\n publishThread(\"patient\", message, UniMed.mqttClient);\n }", "@ResponseBody\n @RequestMapping(\"/SearchPersonPopup\")\n public PersonRecordSearch[] personRecordSearchs(HttpServletRequest requestFromDT) {\n\n String persondepartment = requestFromDT.getParameter(\"persondepartment\");\n String personid = requestFromDT.getParameter(\"personid\");\n String personlegalentity = requestFromDT.getParameter(\"personlegalentity\");\n String personname = requestFromDT.getParameter(\"personname\");\n String personnumber = requestFromDT.getParameter(\"personnumber\");\n\n //System.out.println(\"PersonRecordSearch \");\n PersonRecordSearch[] personRecordSearchs = null;\n\n String urlperson = appgateway.getAppgateway() + \"/PersonData/PersonalRecord/getPersonalRecordBySearch\";\n PersonRecordSearch[] mgrObj = null;\n String payLode = \"{\" +\n \"\\\"persondepartment\\\"\" + \":\\\"\" + persondepartment + \"\\\",\" +\n \"\\\"personid\\\"\" + \":\\\"\" + personid + \"\\\",\" +\n \"\\\"personlegalentity\\\"\" + \":\\\"\" + personlegalentity + \"\\\",\" +\n \"\\\"personname\\\"\" + \":\\\"\" + personname + \"\\\",\" +\n \"\\\"personnumber\\\"\" + \":\\\"\" + personnumber + \"\\\"\" +\n \"}\";\n\n //\tSystem.out.println(\"Payload::::\" + payLode);\n\n headers.setContentType(org.springframework.http.MediaType.APPLICATION_JSON);\n\n //headers.add(\"Authorization\", AppConstants.ACCESS_TOKEN);\n HttpEntity < String > request = new HttpEntity < String > (payLode, headers);\n\n ResponseEntity < PersonRecordSearch[] > response = restTemplate.exchange(urlperson, HttpMethod.POST, request, PersonRecordSearch[].class);\n\n if (response.getStatusCode() == HttpStatus.OK) {\n personRecordSearchs = response.getBody();\n\n } else {\n System.out.println(\"Request Failed\");\n System.out.println(response.getStatusCode());\n }\n\n return personRecordSearchs;\n\n }", "@Override\n\tpublic void addPatients(String name, int id, Long mobilenumber, int age) {\n\t\t\n\t}", "@Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number,id_firstcontact_doctor FROM patients \" +\n \"WHERE id_patient = #{patientId}\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n Patient getPatient(int patientId);", "public org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment requestAppointment(\n\n org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment appointment2)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"http://www.PAHospital.org/RadiologyService/RequestAppointment\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n appointment2,\n optimizeContent(new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"requestAppointment\")), new javax.xml.namespace.QName(\"http://www.PAHospital.org/RadiologyService/\",\n \"requestAppointment\"));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (org.pahospital.www.radiologyservice.RadiologyServiceStub.Appointment)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"))){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"));\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(String.class);\n java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(faultElt.getQName(),\"RequestAppointment\"));\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n if (_messageContext.getTransportOut() != null) {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }\n }", "@Override\n\tpublic List<Medicine> getMedicationData(String patientId, String start, String end) {\n\t\treturn null;\n\t}", "@Select(\"SELECT id_patient, first_name, last_name, PESEL, id_address,\" +\n \" email, phone_number, id_firstcontact_doctor, password FROM patients;\")\n @Results({\n @Result(property = \"id\", column = \"id_patient\"),\n @Result(property = \"firstName\", column = \"first_name\"),\n @Result(property = \"lastName\", column = \"last_name\"),\n @Result(property = \"pesel\", column = \"PESEL\"),\n @Result(property = \"address\", column = \"id_address\",\n javaType = Address.class, one = @One(select = \"selectAddress\",\n fetchType = FetchType.EAGER)),\n @Result(property = \"email\", column = \"email\"),\n @Result(property = \"phoneNumber\", column = \"phone_number\"),\n @Result(property = \"password\", column = \"password\"),\n @Result(property = \"firstContactDoctor\", column = \"id_firstcontact_doctor\",\n javaType = Doctor.class, one = @One(select = \"selectFirstcontactDoctor\",\n fetchType = FetchType.EAGER))\n })\n List<Patient> getAllPatientsDataToTable();", "public List<Measurement> findPatientMeasurements(int patientId) {\n return entityManager\n .createQuery(\"SELECT m from Measurement m \" +\n \"WHERE m.patientId.patientId = :patientId\", Measurement.class)\n .setParameter(\"patientId\", patientId)\n .getResultList();\n }", "@GET\n @Path(\"/tree/current-person\")\n @Produces(\"application/x-gedcomx-v1+xml\")\n public Response getCurrentTreePerson() {\n\n String retVal = new String();\n String request = \"https://integration.familysearch.org/platform/tree/current-person\";\n\n try {\n\n //======\n\n URL url = new URL(request);\n try {\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setDoInput(true);\n urlConnection.setRequestMethod(\"GET\"); // default\n urlConnection.setRequestProperty(\"Accept\", \"application/x-gedcomx-v1+xml\");\n urlConnection.setRequestProperty(\"Authorization\", \"Bearer \" + gAccessToken);\n urlConnection.setRequestProperty(\"charset\", \"utf-8\");\n urlConnection.setUseCaches(false);\n\n int responseCode = 0;\n\n try {\n\n responseCode = urlConnection.getResponseCode();\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(urlConnection.getInputStream()));\n String inputLine;\n StringBuilder response = new StringBuilder();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n\n retVal = response.toString();\n\n }\n catch (java.io.IOException ioException) {\n // handle ioException...\n retVal = \"Failed opening post outputstream...response code = \" + responseCode + \" Access token = \" + gAccessToken;\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n }\n catch (java.io.IOException ioException) {\n // handle ioException...\n retVal = \"Failed opening http connection...\";\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n }\n catch (java.net.MalformedURLException urlException) {\n // report bad URL\n retVal = \"Mal-formed URL request...\";\n return Response.status(Response.Status.BAD_REQUEST).entity(retVal).build();\n }\n\n return Response.status(Response.Status.OK).entity(retVal).build();\n\n }", "@WebMethod\n public MessageStatus sendPatientMessage(@WebParam(name=\"messageId\") String messageId, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"personalInfo\") NameValuePair[] personalInfo, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"patientNumber\") String patientNumber, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"patientNumberType\") ContactNumberType patientNumberType, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"langCode\") String langCode, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"mediaType\") MediaType mediaType, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"notificationType\") Long notificationType, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"startDate\")Date startDate, \n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"endDate\")Date endDate,\n \t\t\t\t\t\t\t\t\t\t@WebParam(name=\"recipientId\")String recipientId);", "@Override\n public List<PatientCaseDto> getAll() {\n return null;\n }", "public static com.statuspatients.plugins.model.Patients fetchPatientsByUuidAndCompanyId(\n java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.SystemException {\n return getService().fetchPatientsByUuidAndCompanyId(uuid, companyId);\n }", "List<CustDataNotesResponseDTO> searchForCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;", "public void careForPatient(Patient patient);", "public void registerPatientMethod1(Patient p);", "public static ArrayList<APIAppointment> GetAppointmentsFromSampleData(String nodeFilePath, String nodePath) {\n ArrayList<APIAppointment> API_Appointments = new ArrayList<APIAppointment>();\n\n try {\n // Get the SAXReader object \n SAXReader reader = new SAXReader();\n // Get the xml document object by sax reader. \n Document document = reader.read(nodeFilePath);\n List<Node> nodes = document.selectNodes(nodePath);\n\n // Read all the node inside xpath nodes and print the value of each \n for (Node node : nodes) {\n\n APIAppointment API_Appointment = new APIAppointment();\n API_Appointment.setAltID(\"\".equals(node.valueOf(\"AltID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"AltID\"), \"\".getClass(),\n node.valueOf(\"AltID\")));\n API_Appointment.setAttendees(\"\".equals(node.valueOf(\"Attendees\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Attendees\"), \"\".getClass(),\n node.valueOf(\"Attendees\")));\n API_Appointment.setEnd(\"\".equals(node.valueOf(\"End\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"End\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(API_Helper.ConvertLocalTimeToUTC(node.valueOf(\"End\")))));\n API_Appointment.setEventOrMeeting(\"\".equals(node.valueOf(\"EventOrMeeting\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"EventOrMeeting\"), APIEnumEventOrMeeting.class,\n APIEnumEventOrMeeting.valueOf(APIEnumEventOrMeeting.fromValue(node.valueOf(\"EventOrMeeting\")).toString())));\n API_Appointment.setGWMeetingID(\"\".equals(node.valueOf(\"GW_MeetingID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"GWMeetingID\"), \"\".getClass(),\n node.valueOf(\"GW_MeetingID\")));\n API_Appointment.setIsPrivate(\"\".equals(node.valueOf(\"IsPrivate\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"IsPrivate\"), Boolean.class,\n Boolean.parseBoolean(node.valueOf(\"IsPrivate\"))));\n API_Appointment.setLastModified(\"\".equals(node.valueOf(\"LastModified\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"LastModified\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(node.valueOf(\"LastModified\"))));\n API_Appointment.setLocation(\"\".equals(node.valueOf(\"Location\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Location\"), \"\".getClass(),\n node.valueOf(\"Location\")));\n API_Appointment.setMeetingComment(\"\".equals(node.valueOf(\"MeetingComment\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingComment\"), \"\".getClass(),\n node.valueOf(\"MeetingComment\")));\n API_Appointment.setMeetingSubject(\"\".equals(node.valueOf(\"MeetingSubject\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingSubject\"), \"\".getClass(),\n node.valueOf(\"MeetingSubject\")));\n API_Appointment.setMeetingType(\"\".equals(node.valueOf(\"MeetingType\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"MeetingType\"), APIEnumMeetingType.class,\n APIEnumMeetingType.valueOf(APIEnumMeetingType.fromValue(node.valueOf(\"MeetingType\")).toString())));\n API_Appointment.setNotifyAction(\"\".equals(node.valueOf(\"NotifyAction\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"NotifyAction\"), APIEnumPushNotifyAction.class,\n APIEnumPushNotifyAction.valueOf(APIEnumPushNotifyAction.fromValue(node.valueOf(\"NotifyAction\")).toString())));\n API_Appointment.setOrganizer(\"\".equals(node.valueOf(\"Organizer\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Organizer\"), \"\".getClass(),\n node.valueOf(\"Organizer\")));\n API_Appointment.setRRule(\"\".equals(node.valueOf(\"RRule\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RRule\"), \"\".getClass(),\n node.valueOf(\"RRule\")));\n API_Appointment.setRVMeetingID(\"\".equals(node.valueOf(\"RV_MeetingID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RVMeetingID\"), \"\".getClass(),\n node.valueOf(\"RV_MeetingID\")));\n API_Appointment.setRoomID(\"\".equals(node.valueOf(\"RoomID\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"RoomID\"), \"\".getClass(),\n node.valueOf(\"RoomID\")));\n API_Appointment.setStart(\"\".equals(node.valueOf(\"Start\")) ? null\n : new JAXBElement(new QName(API_Constants.NamespaceURI, \"Start\"), XMLGregorianCalendar.class,\n DatatypeFactory.newInstance().newXMLGregorianCalendar(API_Helper.ConvertLocalTimeToUTC(node.valueOf(\"Start\")))));\n\n API_Appointment.setActions(GetActionsListFromNodeList(node));\n API_Appointment.setPreset(GetPresetFromNodeList(node));\n API_Appointment.setRolesForMeeting(GetRolesForMeetingsListFromNodeList(node));\n\n API_Appointments.add(API_Appointment);\n }\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return API_Appointments;\n }", "public void setPatientName(String patientName)\n {\n this.patientName = patientName;\n }", "@Override\n\tpublic List<BodySign> getBodySignData(String patientId) {\n\t\treturn null;\n\t}", "ObservableList<Patient> getFilteredPatientList();", "public ArrayList<MedicalRecord> getPatientRecords(String patient) {\n if (database.containsKey(patient)) {\n return database.get(patient);\n } else {\n System.out.println(\"No such patient found\");\n return null;\n }\n }", "public org.thethingsnetwork.management.proto.HandlerOuterClass.DeviceList getDevicesForApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);", "@Transactional(readOnly = true)\n public List<Patient> search(String query) {\n log.debug(\"Request to search Patients for query {}\", query);\n List<Patient> result = StreamSupport\n .stream(patientSearchRepository.search(wrapperQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n return result;\n }", "@RequestMapping(value = \"/patients\", method = RequestMethod.GET, headers = {\"patient_id\"})\n public Patient getAPatient(@RequestHeader(\"patient_id\") Long id) {\n return patientRepository.findById(id).orElseThrow(() -> new ResourceNotFoundException(\"Patient\", \"id\" , id));\n }", "public List<Doctor> acceptingNewPatients(String specialty);", "ExternalIdentifiersResponse callExternalIdentifierGetRESTCall(String methodName,\n String urlTemplate,\n Object... params) throws PropertyServerException\n {\n return (ExternalIdentifiersResponse)this.callGetRESTCall(methodName, ExternalIdentifiersResponse.class, urlTemplate, params);\n }", "@Path(\"device\")\n DeviceAPI devices();", "public static void main(String[] args) {\n\t\tString theUrl = HivConst.serverFhirUrl + \"/Patient/\" + \"8\" ;\n\t\tHivPatient bundle = getPatientById(theUrl);\n//\t\tPatient hl7Patient = null;\n//\t\tif (bundle != null && bundle.getEntry() != null && bundle.getEntry().size() > 0) {\n//\t\t\thl7Patient = (Patient) bundle.getEntryFirstRep().getResource();\n//\t\t}\n//\t\tHivPatient response = null;\n//\t\tif (hl7Patient != null) {\n//\t\t\tString json = jsonParser.encodeResourceToString(hl7Patient);\n//\n//\t\t\tresponse = jsonParser.parseResource(HivPatient.class, json);\n//\t\t}\n\t\tMethodOutcome MethodOutcome = HAPIFhirHivPatientService.deletePatient(bundle);\n//\t\tBundle bundle = findPatientDuplicatePatient(\"\",\"594957177\");\n//\t\tIParser parser = ctx.newJsonParser();\n//\t\tString json = parser.encodeResourceToString(bundle);\n//\t\t System.out.println(json);\n//\t\tHAPIFhirService.updateBundle(convertToBundle(qr));\n//\t\tFhirContext ctx = FhirContext.forR4();\n//\t\tIParser parser = ctx.newJsonParser();\n//\t\t// We'll populate this list\n//\t\tList<IBaseResource> patients = new ArrayList<>();\n//\n//\t\t// We'll do a search for all Patients and extract the first page\n//\t\tBundle bundle = new Bundle();\n//\t\tQuestionnaireResponse obj = new QuestionnaireResponse();\n//\t\tobj.setAuthored(new Date());\n//\n//\t\tbundle.setType(Bundle.BundleType.COLLECTION);\n//\n//\n//\t\tbundle.addEntry()\n//\t\t .setFullUrl(obj.getIdElement().getValue())\n//\t\t .setResource(obj);\n//\t\tbundle.addEntry()\n//\t\t .setFullUrl(obj.getIdElement().getValue())\n//\t\t .setResource(obj);\n//\t\tString json = parser.encodeResourceToString(bundle);\n//\t\tSystem.out.println(json);\n//\t\t List<QuestionnaireResponse> list = (List<QuestionnaireResponse>)bundleToList(bundle);\n//\t\t \n//\t\t Bundle bundle1 =listToBundle(list);\n//\t\t String json1= parser.encodeResourceToString(bundle);\n//\t\t System.out.println(json1);\n\t\t// getBundlePatient();\n\n\t}", "@GET(\"device\")\n Call<DevicesResponse> getDevice();", "VerificationToken findByPatient(Patient patient);", "@Override\n @Transactional\n public List<Patient> allPatients() {\n return patientDAO.allPatients();\n }", "@GetMapping(\"/charts/patient/{id}\")\n @Timed\n public Patient getPatientByChart(@PathVariable Long id) {\n log.debug(\"REST request to get Chart : {}\", id);\n Patient patient = chartService.findPatientByChart(id);\n return patient;\n }", "@GetMapping(value=\"/set/{patientId}\")\n\tpublic ResponseEntity<List<MedicalHistory>> getMedicalHistoryByPatientId(@Valid @PathVariable(value = \"patientId\") Integer patientId) throws PatientNotFoundException{\n\t\treturn doctorService.getMedicalHistoryByPatientId(patientId);\n\t}", "public static com.statuspatients.plugins.model.Patients getPatientsByUuidAndCompanyId(\n java.lang.String uuid, long companyId)\n throws com.liferay.portal.kernel.exception.PortalException,\n com.liferay.portal.kernel.exception.SystemException {\n return getService().getPatientsByUuidAndCompanyId(uuid, companyId);\n }", "@GET\r\n @Produces(MediaType.APPLICATION_JSON)\r\n public String getIt() {\r\n // return \"Got it!\";\r\n \treturn appObj.readAppointment();\r\n }", "@GET\r\n @Produces(MediaType.APPLICATION_OCTET_STREAM)\r\n public byte[] getNotifications(@PathParam(\"sessionID\") String sessionID) {\r\n return null;\r\n }", "public void requirePatientId() {\n hasPatientIdParam = true;\n }" ]
[ "0.6143542", "0.5734837", "0.56783193", "0.5543806", "0.55051374", "0.54933226", "0.54809237", "0.5428957", "0.5426681", "0.53851765", "0.531561", "0.52995414", "0.5206264", "0.5184552", "0.5163061", "0.5143694", "0.51237094", "0.51046866", "0.5064082", "0.50426173", "0.5032836", "0.49994034", "0.4991718", "0.4989044", "0.49779966", "0.495491", "0.49441808", "0.4924321", "0.48958513", "0.4847476", "0.48285714", "0.48168993", "0.47836813", "0.4742806", "0.4739403", "0.4731886", "0.46900028", "0.46844447", "0.4678784", "0.4658102", "0.46557996", "0.46487162", "0.46402383", "0.46273145", "0.46220076", "0.4593796", "0.45839363", "0.4577252", "0.45554718", "0.45508745", "0.45483804", "0.45316553", "0.45215777", "0.45205835", "0.45177972", "0.45156145", "0.4509083", "0.45018467", "0.4501139", "0.44972023", "0.44962928", "0.44822922", "0.44596973", "0.44400954", "0.44335777", "0.44325638", "0.4421407", "0.4416565", "0.44165137", "0.441601", "0.44126582", "0.43981755", "0.43944168", "0.43925384", "0.43870726", "0.43867236", "0.43866688", "0.43816236", "0.43727306", "0.4365615", "0.4353136", "0.43531162", "0.43297878", "0.43245918", "0.4321131", "0.43209", "0.4315212", "0.431139", "0.43014657", "0.42975658", "0.42908618", "0.42900565", "0.42813316", "0.4280248", "0.4279363", "0.42721954", "0.4269965", "0.42621487", "0.42531487", "0.42527884" ]
0.6896153
0
Test of isConnected method, of class MarkovModelUtilities.
@Test public void testIsConnected() { assertEquals(MarkovModel.util.isConnected(P1), true); assertEquals(MarkovModel.util.isConnected(P2), false); assertEquals(MarkovModel.util.isConnected(P3), false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test\n public void testConnected() {\n System.out.println(\"**** connected *****\");\n int v = 9;\n int w = 12;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n boolean expResult = true;\n boolean result = instance.connected(v, w);\n assertEquals(expResult, result);\n }", "@Override\n public void testIfConnected() {\n }", "public abstract boolean isConnected(N n1, N n2);", "@Test\n\tpublic void testConnected() {\n\t\tLevel level = new Level(100, 100);\n\t\tassertTrue(LevelGen.connected(level.getGrid()));\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "protected abstract boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "public boolean isConnected();", "boolean isConnected() {\n \t\tif (fConnected == null)\n \t\t\treturn false;\n \t\treturn !fConnected.isEmpty();\n \t}", "public abstract boolean isConnected(N n1, E e, N n2);", "public boolean isConnected() {\n\t\tif (m == null) return false;\n\t\telse return true;\n\t}", "public abstract boolean isConnectedInDirection(N n1, N n2);", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "@Test\n void testIsConnected(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,50);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n assertTrue(ga.isConnected());\n g.removeEdge(7,4);\n g.removeEdge(6,4);\n g.removeEdge(3,4);\n assertFalse(ga.isConnected());\n }", "public boolean isConnected(){\r\n return (id!=-1 && matlabEng!=null); \r\n }", "boolean connected(int p, int q) {return false; /*mock*/}", "@Test\r\n public void test_IsConnected_true() {\r\n System.out.println(\"isConnected\");\r\n int p = 2;\r\n int q = 3;\r\n UnionFind instance = new QuickUnion(100);\r\n instance.unionOf(p, q);\r\n boolean expResult = true;\r\n boolean result = instance.isConnected(p, q);\r\n assertEquals(expResult, result);\r\n }", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n\tpublic void testConnected2() {\n\t\tLevel level = new Level(100, 100);\n\t\tlevel.makeWalls();\n\t\tfor (int i = 1; i < 7; i++) {\n\t\t\tlevel.updateCoords(i, 6, 1);\n\t\t\tlevel.updateCoords(6, i, 1);\n\t\t}\n\t\tlevel.updateCoords(6, 6, 1);\n\t\tassertFalse(LevelGen.connected(level.getGrid()));\n\t}", "boolean connected(String descrip) {\n if (this.hasNeighbor(descrip)) {\n if (descrip.equals(\"right\")) {\n return this.neighbors.get(\"right\").left && this.right;\n }\n else if (descrip.equals(\"up\")) {\n return this.neighbors.get(\"up\").down && this.up;\n }\n else if (descrip.equals(\"down\")) {\n return this.neighbors.get(\"down\").up && this.down;\n }\n else if (descrip.equals(\"left\")) {\n return this.neighbors.get(\"left\").right && this.left;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);", "@Override\n public boolean isConnected()\n {\n return connected;\n }", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "@Override\n public boolean isConnected() { //i got help from the site https://www.geeksforgeeks.org/shortest-path-unweighted-graph/\n if(this.ga.edgeSize()<this.ga.nodeSize()-1) return false;\n initializeInfo();//initialize all the info fields to be null for the algorithm to work\n if(this.ga.nodeSize()==0||this.ga.nodeSize()==1) return true;//if there is not node or one its connected\n WGraph_DS copy = (WGraph_DS) (copy());//create a copy graph that the algorithm will on it\n LinkedList<node_info> qValues = new LinkedList<>();//create linked list that will storage all nodes that we didn't visit yet\n int firstNodeKey = copy.getV().iterator().next().getKey();//first key for get the first node(its doesnt matter which node\n node_info first = copy.getNode(firstNodeKey);//get the node\n qValues.add(first);//without limiting generality taking the last node added to graph\n int counterVisitedNodes = 0;//counter the times we change info of node to \"visited\"\n while (qValues.size() != 0) {\n node_info current = qValues.removeFirst();\n if (current.getInfo() != null) continue;//if we visit we can skip to the next loop because we have already marked\n current.setInfo(\"visited\");//remark the info\n counterVisitedNodes++;\n\n Collection<node_info> listNeighbors = copy.getV(current.getKey());//create a collection for the neighbors list\n LinkedList<node_info> Neighbors = new LinkedList<>(listNeighbors);//create the neighbors list\n if (Neighbors == null) continue;\n for (node_info n : Neighbors) {\n if (n.getInfo() == null) {//if there is a node we didn't visited it yet, we will insert it to the linkedList\n qValues.add(n);\n }\n }\n }\n if (this.ga.nodeSize() != counterVisitedNodes) return false;//check that we visited all of the nodes\n\n return true;\n }", "@Test\r\n public void test_IsConnected_false() {\r\n System.out.println(\"isConnected\");\r\n int p = 1;\r\n int q = 2;\r\n UnionFind instance = new QuickUnion(100);\r\n boolean expResult = false;\r\n boolean result = instance.isConnected(p, q);\r\n assertEquals(expResult, result);\r\n }", "@Override\n public boolean isConnected() {\n return connected;\n }", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "public boolean isConnected() {\n return (chord != null);\n }", "@Override\r\n public boolean isConnected(V start, V destination) {\r\n return !shortestPath(start, destination).isEmpty();\r\n }", "public static boolean isConnected() {\r\n\t\treturn dfl != null;\r\n\t}", "public boolean isConnected() {\n if (this.isEmpty()) return true;\n\n if (this.directed) {\n Deque<Node> toVisit = new LinkedList<>();\n for (Node s : this.nodes.values()) {\n Node current;\n toVisit.addLast(s);\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n if (!allVisited) return false;\n }\n return true;\n }\n else {\n //Perform a DFS from a random start node marking nodes as visited\n Node current;\n Deque<Node> toVisit = new LinkedList<>();\n toVisit.addLast(this.nodes.values().iterator().next());\n while (!toVisit.isEmpty()) {\n current = toVisit.removeLast();\n current.setFlag(\"_visited\");\n for (Edge edge : current.getNeighbours()) {\n Node n = edge.getEnd();\n if (!n.getFlag(\"_visited\")) toVisit.addLast(n);\n }\n }\n\n //Check if all nodes have been visited and remove flags\n boolean allVisited = true;\n for (Node n : nodes.values()) {\n allVisited = allVisited && n.getFlag(\"_visited\");\n n.unsetFlag(\"_visited\");\n }\n\n return allVisited;\n }\n }", "public boolean isConnected() {\n return mConnected;\n }", "public boolean isConnected() {\n \t\treturn connected;\n \t}", "public boolean isConnected() {\r\n\treturn connected;\r\n }", "public static boolean hasConnected() {\n return sHasConnected;\n }", "boolean isConnected(int a, int b) {\n\t\tint nodea = getRoot(a); //logN\r\n\t\tint nodeb = getRoot(b); //logN\r\n\t\tSystem.out\r\n\t\t\t\t.println(a + \" and \" + b + \" CONNECTED?: \" + (nodea == nodeb));\r\n\t\treturn nodea == nodeb;\r\n\t}", "private boolean isConnectable (RoadInterface newObj) {\n boolean result = false;\n if (newObj instanceof Intersection) {\n result = true;\n }\n return (result);\n }", "protected boolean isConnected() {\n/* 160 */ return this.delegate.isConnected();\n/* */ }", "public static boolean isConnected()\r\n\t{\r\n\t\t return Globals.connected ;\r\n\t}", "@Test\r\n\tpublic void testAdjacency00() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(1, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(0, 1)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t}", "public boolean isConnected(){\n return connected;\n }", "public boolean isConnected()\n {\n return connected;\n }", "public boolean isConnected(){\r\n\t\treturn connected;\r\n\t}", "public boolean isConnectedPort() {\n for (Tile t : getTile().getSurroundingTiles(1)) {\n if (!t.isLand() && t.isHighSeasConnected()) return true;\n }\n return false;\n }", "public Boolean getConnected() { return this.connected; }", "private boolean isConnected() {\n if (skylinkConnection != null) {\n return skylinkConnection.isConnected();\n }\n return false;\n }", "public boolean isConnected()\n {\n return isConnected;\n }", "public boolean isConnected(){\n return isConnected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public boolean isConnected() {\n return this.connected;\n }", "public static boolean isConnected() {\n return (getCon() != null);\n }", "public boolean isConnected() {\r\n return connected;\r\n }", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "public boolean isConnected() {\n\t\treturn connected;\n\t}", "@Test\r\n\tpublic void testAdjacency11() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(0, 1)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(2, 1)));\r\n\t\tassertEquals(4, testList.size());\r\n\t}", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "public boolean isConnected() {\n return connected;\n }", "@Test\n public void testNeighborState() throws Exception {\n isisNeighbor.setNeighborState(IsisInterfaceState.DOWN);\n isisInterfaceState = isisNeighbor.neighborState();\n assertThat(isisInterfaceState, is(IsisInterfaceState.DOWN));\n }", "private boolean connected(DepthFirstSearch dfs, Graph G) {\n return dfs.count() == G.V();\r\n }", "@Test\n public void testIsConnected() throws MainException {\n System.out.println(\"isConnected\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.isConnected();\n assertEquals(expResult, result);\n instance.disconnect();\n result = instance.isConnected();\n assertEquals(false, result);\n\n }", "public boolean isConnected() {\n\t\tif (vertices.size() == 0)\n\t\t\treturn false;\n\n\t\tif (vertices.size() == 1)\n\t\t\treturn true;\n\n\t\t// determine if it is connected by using a wave\n\t\tHashSet<E> waveFront = new HashSet<>();\n\t\tHashSet<E> waveVisited = new HashSet<>();\n\n\t\t// grab the first element for the start of the wave\n\t\tE first = vertices.iterator().next();\n\t\t\n\n\t\twaveFront.add(first);\n\n\t\t// continue until there are no more elements in the wave front\n\t\twhile (waveFront.size() > 0) {\n\t\t\t// add all of the wave front elements to the visited elements\n\t\t\twaveVisited.addAll(waveFront);\n\t\t\t\n\t\t\t// if done break out of the while\n\t\t\tif (waveVisited.size() == vertices.size())\n\t\t\t\tbreak;\n\n\t\t\t// grab the iterator from the wave front\n\t\t\tIterator<E> front = waveFront.iterator();\n\n\t\t\t// reset the wave front to a new array list\n\t\t\twaveFront = new HashSet<>();\n\n\t\t\t// loop through all of the elements from the front\n\t\t\twhile (front.hasNext()) {\n\t\t\t\tE next = front.next();\n\n\t\t\t\t// grab all of the neighbors to next\n\t\t\t\tList<E> neighbors = neighbors(next);\n\n\t\t\t\t// add them to the wave front if they haven't been visited yet\n\t\t\t\tfor (E neighbor : neighbors) {\n\t\t\t\t\tif (!waveVisited.contains(neighbor))\n\t\t\t\t\t\twaveFront.add(neighbor);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// return whether all of the nodes have been visited or not\n\t\treturn waveVisited.size() == vertices.size();\n\t}", "public boolean percolates()\n {\n return uf.connected(topVirtualSite, bottomVirtualSite);\n }", "public boolean isConnected()\n {\n return connectionId != GatewayProcess.NO_CONNECTION_ID;\n }", "public void checkConnections() {\n Boolean updateCanvas = false;\n\n // Find new connections set within a node and creates them\n for (DrawableNode node : nodes) {\n if (node instanceof LogicNode) {\n String src = ((LogicNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this LogicNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TestCaseNode) {\n String src = ((TestCaseNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this TestCaseNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) node).getSwitches();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n Boolean enabledConnection = false;\n\n for (Switch aSwitch : aSwitches) {\n if ((aSwitch.getTarget().equals(endNode.getContainedText()))) {\n enabledConnection = aSwitch.isEnabled();\n createConnection = true;\n }\n }\n\n if (createConnection && !connectionExists(node, endNode)) {\n Integer connectionType = NodeConnection.DYNAMIC_CONNECTION;\n if (!enabledConnection) {\n connectionType = NodeConnection.DISABLED_CONNECTION;\n }\n\n NodeConnection newConnection = new NodeConnection(node, endNode, connectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TriggerNode) {\n List<Trigger> triggers = ((TriggerNode) node).getTriggers();\n\n for (Trigger trigger : triggers) {\n String watchName = trigger.getWatch();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n\n if (watchName.equals(endNode.getContainedText())) {\n createConnection = true;\n }\n\n // This connection has the start and end the other way around, the target is specified in the trigger but\n // we want it to look like the watched node is connecting to the trigger as that is the order that they are run\n if (createConnection && !connectionExists(endNode, node)) {\n NodeConnection newConnection = new NodeConnection(endNode, node, NodeConnection.TRIGGER_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n\n // Find connection that are set using the Next node input box\n if (node != null && !node.getNextNodeToRun().isEmpty()) {\n for (DrawableNode endNode : getNodes()) {\n if (node.getNextNodeToRun().equals(endNode.getContainedText())) {\n if (!connectionExists(node, endNode)) {\n NodeConnection newConnection = new NodeConnection(node, endNode, NodeConnection.MAIN_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n }\n\n // Checks old connections and removes ones that don't exist\n List<NodeConnection> listToRemove = new ArrayList<>();\n List<NodeConnection> connectionsLoopTemp = new ArrayList<>(); // We make a copy the list here so that we can the original while iterating over this one\n connectionsLoopTemp.addAll(connections);\n for (NodeConnection nodeConnection : connectionsLoopTemp) {\n if (nodeConnection.getConnectionType().equals(NodeConnection.DYNAMIC_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || !aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create a disabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DISABLED_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.TRIGGER_CONNECTION)) {\n if (nodeConnection.getConnectionEnd() instanceof TriggerNode) { // Here the start and end connections are reversed\n List<Trigger> triggers = ((TriggerNode) nodeConnection.getConnectionEnd()).getTriggers();\n String endContainedText = nodeConnection.getConnectionStart().getContainedText();\n Integer removeCount = 0;\n for (Trigger trigger : triggers) {\n if ((!trigger.getWatch().equals(endContainedText))) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(triggers.size())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.GET_NODE_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.DISABLED_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create an enabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DYNAMIC_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n if (nodeConnection.getConnectionType().equals(NodeConnection.MAIN_CONNECTION)) {\n if (!nodeConnection.getConnectionStart().getNextNodeToRun().equals(nodeConnection.getConnectionEnd().getContainedText())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n connections.removeAll(listToRemove);\n if (updateCanvas) {\n Controller.getInstance().updateCanvasControllerLater();\n }\n }", "private void updateConnectedState() {\n NetworkInfo activeNetworkInfo = this.mConnectivityManager.getActiveNetworkInfo();\n this.mIsNetworkConnected = activeNetworkInfo != null && activeNetworkInfo.isConnected();\n }", "public boolean percolates() {\n return mainObject.connected(vsite1, vsite2);\n }", "public boolean isConnected() {\n return isConnected;\n }", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\r\n\tpublic void testAdjacency30() {\r\n\t\tBoardCell cell = board.getCell(3, 0);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 1)));\r\n\t\tassertEquals(2, testList.size());\r\n\t}", "@Test\r\n\tpublic void testAdjacency22() {\r\n\t\tBoardCell cell = board.getCell(2, 2);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 1)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(2, 3)));\r\n\t\tassertEquals(4, testList.size());\r\n\t}", "void connected(InetAddress address, boolean isMine);", "private void checkConnectivity() throws NotConnected\n\t{\n\t\tif (!s_ctx.isConnected())\n\t\t{\n\t\t\tthrow new NotConnected(\"Cannot operate: not conected to context\");\n\t\t}\n\t}", "public boolean testConnection(int keyToTest){\n if (connectedKeys.contains(keyToTest)){\n return true;\n }\n else{\n return false;\n }\n }", "void connected();", "@Override\r\n\tpublic boolean isConnected() {\n\t\treturn false;\r\n\t}", "public boolean isConnectedWith(Shapes shape){\n if(this.endShapes.length == 2){\n if(endShapes[0].equals(shape) || endShapes[1].equals(shape)){\n return true;\n }\n return false; \n }else{\n return false;\n }\n }", "@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }", "@Test\r\n\tpublic void testAdjacency33() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 2)));\r\n\t\tassertEquals(2, testList.size());\r\n\t}", "public boolean isConnected() {\n HiLog.info(LOG_LABEL, \"isConnected: %{public}b\", new Object[]{Boolean.valueOf(this.mIsConnected)});\n return this.mIsConnected;\n }", "public void setConnected(boolean connected);", "public boolean isConnected() {\n if (mState == STATE_CONNECTED) {\n return true;\n }\n return false;\n }", "public boolean getIsConnected() {\n return isConnected;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\treturn false;\n\t}" ]
[ "0.71300125", "0.70772636", "0.6927711", "0.6890222", "0.6792548", "0.6787096", "0.6772003", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.67700887", "0.65796477", "0.65796477", "0.65796477", "0.65796477", "0.65796477", "0.6557023", "0.6542229", "0.65280527", "0.65067583", "0.64843583", "0.6440613", "0.64350003", "0.6297662", "0.62773895", "0.6249087", "0.6239181", "0.6207864", "0.61774504", "0.6123809", "0.6088081", "0.60750026", "0.60523146", "0.60373735", "0.6031727", "0.59887934", "0.59752554", "0.59750885", "0.5969293", "0.59622335", "0.59520817", "0.59273255", "0.5897505", "0.5896061", "0.58761805", "0.586536", "0.58554685", "0.58492535", "0.5847538", "0.5825834", "0.5793413", "0.57858354", "0.57667625", "0.57369685", "0.57063365", "0.57022935", "0.5700311", "0.5693377", "0.5693377", "0.5677112", "0.56696314", "0.5667813", "0.5667813", "0.5664783", "0.56631017", "0.56631017", "0.56631017", "0.56631017", "0.56631017", "0.5659311", "0.5650592", "0.5636166", "0.56346595", "0.5621241", "0.5616752", "0.56040835", "0.5603957", "0.5596777", "0.5595369", "0.558895", "0.5583712", "0.55825293", "0.5580806", "0.55780613", "0.55773294", "0.55747896", "0.5541499", "0.5541319", "0.55312604", "0.5527796", "0.55149204", "0.551022", "0.5505712", "0.5504072", "0.5502481", "0.549084" ]
0.83215606
0
Test of connectedComponents method, of class MarkovModelUtilities.
@Test public void testConnectedComponents() { Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1); assertTrue(cc1.containsAll(C1)); assertEquals(cc1.size(), C1.size()); Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2); assertTrue(cc2.containsAll(C2)); assertEquals(cc2.size(), C2.size()); Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3); assertTrue(cc3.containsAll(C3)); assertEquals(cc3.size(), C3.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testConnected() {\n System.out.println(\"**** connected *****\");\n int v = 9;\n int w = 12;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n boolean expResult = true;\n boolean result = instance.connected(v, w);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testConnected() {\n\t\tLevel level = new Level(100, 100);\n\t\tassertTrue(LevelGen.connected(level.getGrid()));\n\t}", "@Test\n public void testIsConnected()\n {\n assertEquals(MarkovModel.util.isConnected(P1), true);\n assertEquals(MarkovModel.util.isConnected(P2), false);\n assertEquals(MarkovModel.util.isConnected(P3), false);\n }", "@Test\n void test014_testGetConnectedComponents() {\n try {\n christmasBuddENetwork.addFriendship(\"Harry\", \"Prancer\");\n\n christmasBuddENetwork.addFriendship(\"Santa\", \"Rudolph\");\n christmasBuddENetwork.addFriendship(\"Comet\", \"Santa\");\n christmasBuddENetwork.addFriendship(\"Rudolph\", \"Comet\");\n christmasBuddENetwork.addFriendship(\"Grinch\", \"Comet\");\n\n // There should be 2 connected components.\n Set<Graph> christmasComponents =\n christmasBuddENetwork.getConnectedComponents();\n int numComponents = christmasComponents.size();\n //\n if (numComponents != 2) {\n fail(\"\");\n }\n Iterator<Graph> christmasGraphIterator = christmasComponents.iterator();\n\n boolean firstCompFound = false;\n boolean secondCompFound = false;\n int componentsFound = 0;\n while (christmasGraphIterator.hasNext()) {\n Graph christmasGraph = christmasGraphIterator.next();\n componentsFound = componentsFound + 1;\n //\n if (christmasGraph.size() == 1) {\n if (firstCompFound == true) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Duplicate \"\n + \"component (size 1) found! :(\");\n }\n Set<User> oneConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList = new ArrayList<String>();\n for (User userName : oneConnectedComponentVertices) {\n componentUsersList.add(userName.getName());\n System.out.println(userName.getName());\n }\n if ((!componentUsersList.contains(\"Harry\"))\n || (!componentUsersList.contains(\"Prancer\"))) {\n fail(\"test014_testGetConnectedComponents(): Failed! :( Did NOT \"\n + \"have Harry and Prancer\");\n } else {\n firstCompFound = true;\n\n }\n }\n\n if (christmasGraph.size() == 4) {\n if (secondCompFound == true) {\n fail(\"test014_testGetConnectedComponents: FAILED! Duplicate \"\n + \"component (size 4) found! :(\");\n }\n Set<User> secondConnectedComponentVertices =\n christmasGraph.getAllVertices();\n ArrayList<String> componentUsersList2 = new ArrayList<String>();\n for (User userName : secondConnectedComponentVertices) {\n componentUsersList2.add(userName.getName());\n }\n if ((!componentUsersList2.contains(\"santa\"))\n || (!componentUsersList2.contains(\"rudolph\"))\n || (!componentUsersList2.contains(\"comet\"))\n || (!componentUsersList2.contains(\"grinch\"))) {\n fail(\"test014_testGetConnectedComponents(): FAILED! Did NOT have \"\n + \"Santa, Rudolph, Comet, and Grinch!\");\n } else {\n secondCompFound = true;\n }\n }\n }\n\n if (componentsFound != 2) {\n fail(\"test014_testGetConnectedComponents(): Did NOT return 2 for the \"\n + \"connected components but instead returned: \" + componentsFound);\n }\n } catch (Exception e) {\n fail(\"test014_testGetConnectedComponents(): Failed! :(. Threw unexpected \"\n + \"exception\");\n }\n\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testConnected2() {\n\t\tLevel level = new Level(100, 100);\n\t\tlevel.makeWalls();\n\t\tfor (int i = 1; i < 7; i++) {\n\t\t\tlevel.updateCoords(i, 6, 1);\n\t\t\tlevel.updateCoords(6, i, 1);\n\t\t}\n\t\tlevel.updateCoords(6, 6, 1);\n\t\tassertFalse(LevelGen.connected(level.getGrid()));\n\t}", "@Test\r\n\tpublic void testAdjacency00() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(1, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(0, 1)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t}", "private void compConnectInfo() {\n int compIdCounter = 0;\n int connectQty[] = new int[mTokens.size()];\n \n for (int i = 0; i < mTokens.size(); ++i) {\n if (!mEdges.get(i).isEmpty()) {\n int compId = mComponentId.get(i);\n if (compId < 0) {\n // Haven't computed connectedness and haven't assigned component id\n HashSet<Integer> visited = new HashSet<Integer>();\n if (!visited.contains(i)) {\n doVisit(compIdCounter, i, visited);\n mConnectQty.set(i, visited.size());\n connectQty[compIdCounter] = visited.size();\n compIdCounter++;\n }\n } else {\n // Connectedness is computed and component id is already assigned\n mConnectQty.set(i, connectQty[compId]);\n }\n } else {\n mComponentId.set(i, compIdCounter);\n compIdCounter++;\n }\n }\n }", "@Test\r\n\tpublic void testAdjacency11() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(0, 1)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(2, 1)));\r\n\t\tassertEquals(4, testList.size());\r\n\t}", "@Override\n public boolean isConnected() {\n for (node_data n : G.getV()) {\n bfs(n.getKey());\n for (node_data node : G.getV()) {\n if (node.getTag() == 0)\n return false;\n }\n }\n return true;\n }", "@Override\n\tpublic boolean isConnected() {\n\t\tif(this.GA.nodeSize() ==1 || this.GA.nodeSize()==0) return true;\n\t\tgraph copied = this.copy();\n\t\ttagZero(copied);\n\t\tCollection<node_data> s = copied.getV();\n\t\tIterator it = s.iterator();\n\t\tnode_data temp = (node_data) it.next();\n\t\tDFSUtil(copied,temp);\n\t\tfor (node_data node : s) {\n\t\t\tif (node.getTag() == 0) return false;\n\t\t}\n\t\ttransPose(copied);\n\t\ttagZero(copied);\n\t Collection<node_data> s1 = copied.getV();\n\t\tIterator it1 = s1.iterator();\n\t\tnode_data temp1 = (node_data) it1.next();\n\t\tDFSUtil(copied,temp1);\n\t\tfor (node_data node1 : s1) {\n\t\t\tif (node1.getTag() == 0) return false;\n\t\t}\n\n\t\treturn true;\n\t}", "@Test\r\n\tpublic void testAdjacency30() {\r\n\t\tBoardCell cell = board.getCell(3, 0);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 1)));\r\n\t\tassertEquals(2, testList.size());\r\n\t}", "@Test\r\n\tpublic void testAdjacency33() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 2)));\r\n\t\tassertEquals(2, testList.size());\r\n\t}", "@Test\r\n\tpublic void testAdjacency13() {\r\n\t\tBoardCell cell = board.getCell(1, 3);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(0, 3)));\r\n\t\tassertTrue(testList.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 2)));\r\n\t\tassertEquals(3, testList.size());\r\n\t}", "@Test\r\n\tpublic void testAdjacency22() {\r\n\t\tBoardCell cell = board.getCell(2, 2);\r\n\t\tSet<BoardCell> testList = board.getAdjList(cell);\r\n\t\tassertTrue(testList != null);\r\n\t\tassertTrue(testList.contains(board.getCell(2, 1)));\r\n\t\tassertTrue(testList.contains(board.getCell(1, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(3, 2)));\r\n\t\tassertTrue(testList.contains(board.getCell(2, 3)));\r\n\t\tassertEquals(4, testList.size());\r\n\t}", "@Override\n\tpublic boolean isConnected() {\n\t\tif(dwg.getV().size()==0) return true;\n\n\t\tIterator<node_data> temp = dwg.getV().iterator();\n\t\twhile(temp.hasNext()) {\n\t\t\tfor(node_data w : dwg.getV()) {\n\t\t\t\tw.setTag(0);\n\t\t\t}\n\t\t\tnode_data n = temp.next();\n\t\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\t\tn.setTag(1);\n\t\t\tq.add(n);\n\t\t\twhile(!q.isEmpty()) {\n\t\t\t\tnode_data v = q.poll();\n\t\t\t\tCollection<edge_data> arrE = dwg.getE(v.getKey());\n\t\t\t\tfor(edge_data e : arrE) {\n\t\t\t\t\tint keyU = e.getDest();\n\t\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\t\tif(u.getTag() == 0) {\n\t\t\t\t\t\tu.setTag(1);\n\t\t\t\t\t\tq.add(u);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tv.setTag(2);\n\t\t\t}\n\t\t\tCollection<node_data> col = dwg.getV();\n\t\t\tfor(node_data n1 : col) {\n\t\t\t\tif(n1.getTag() != 2) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public void testIfConnected() {\n }", "@Test\n void testIsConnected(){\n weighted_graph g = new WGraph_DS();\n for(int i = 1; i <= 7; i++){\n g.addNode(i);\n }\n g.connect(1,2,20);\n g.connect(1,5,15);\n g.connect(2,3,20);\n g.connect(5,6,15);\n g.connect(3,4,20);\n g.connect(6,4,15);\n g.connect(1,7,2);\n g.connect(7,4,50);\n weighted_graph_algorithms ga = new WGraph_Algo();\n ga.init(g);\n assertTrue(ga.isConnected());\n g.removeEdge(7,4);\n g.removeEdge(6,4);\n g.removeEdge(3,4);\n assertFalse(ga.isConnected());\n }", "public abstract boolean isConnected(N n1, N n2);", "public abstract boolean isConnected(N n1, E e, N n2);", "@Test\n public void testGiantComponent()\n {\n assertEquals(MarkovModel.util.giantComponent(P1), giant1);\n assertEquals(MarkovModel.util.giantComponent(P2), giant2);\n assertEquals(MarkovModel.util.giantComponent(P3), giant3);\n }", "public Vector<ConnectionPoint> findConnectionPoints(LayeredComponent lc) {\n \tVector<ConnectionPoint> result = new Vector<ConnectionPoint>();\n \t\n \tfor (int i = 0; i < layers.size(); i++) {\n \t\tHashSet<String> layer = layers.get(i); \n \t\tfor (String v : layer) {\n \t\t\tfor (int j = 0; j < lc.numberOfLayers(); j++) {\n \t\t\t\tSet<String> anotherLayer = lc.getLayer(j);\n \n \t\t\t\tfor (String v2 : anotherLayer) {\n \t\t\t\t\tif (v.equals(v2))\n \t\t\t\t\t\tresult.add(new ConnectionPoint(v, i, j)); \n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn result;\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "@DisplayName(\"Has neighbours?\")\n @Test\n public void testGetNeighbours() {\n Assertions.assertTrue(graph.getNeighbours(0).size() > 1);\n }", "public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}", "private void verifyCoFactors(CyNetwork cyNetwork) {\n\t\t// First, find the Target Interaction: protein45.\n\t\tint targetNodeIndex = 0;\n\t\tRootGraph rootGraph = cyNetwork.getRootGraph();\n\t\tIterator nodeIterator = cyNetwork.nodesIterator();\n\n\t\twhile (nodeIterator.hasNext()) {\n\t\t\tCyNode node = (CyNode) nodeIterator.next();\n\t\t\tString uri = Cytoscape.getNodeAttributes()\n\t .getStringAttribute(node.getIdentifier(), MapBioPaxToCytoscape.BIOPAX_RDF_ID);\n\t\t\tif (uri.equals(\"smallMolecule99-Mg2+\")) {\n\t\t\t\ttargetNodeIndex = node.getRootGraphIndex();\n\t\t\t}\n\t\t}\n\n\t\t// Get All Edges Adjacent to this Node\n\t\tint[] edgeIndices = rootGraph.getAdjacentEdgeIndicesArray(targetNodeIndex, true, true, true);\n\n\t\t// There should only be two edges; one for controller, and\n\t\t// one for cofactor.\n\t\tassertEquals(2, edgeIndices.length);\n\t}", "@Test\r\n public void test_IsConnected_true() {\r\n System.out.println(\"isConnected\");\r\n int p = 2;\r\n int q = 3;\r\n UnionFind instance = new QuickUnion(100);\r\n instance.unionOf(p, q);\r\n boolean expResult = true;\r\n boolean result = instance.isConnected(p, q);\r\n assertEquals(expResult, result);\r\n }", "@Test\n\t\tpublic void walkwayAdjacencyTests() {\n\t\t\t//Tests a walkway space that should have 4 surrounding walkway spaces\n\t\t\tSet<BoardCell> testList = board.getAdjList(11, 10);\n\t\t\tassertEquals(4, testList.size());\n\t\t\tassertTrue(testList.contains(board.getCellAt(11, 9)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(11, 11)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(10, 10)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(12, 10)));\n\t\t\t//Tests a walkway space that is against a room space with 3 surrounding walkway spaces\n\t\t\ttestList = board.getAdjList(11, 7);\n\t\t\tassertEquals(3, testList.size());\n\t\t\tassertTrue(testList.contains(board.getCellAt(11, 8)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(10, 7)));\n\t\t\tassertTrue(testList.contains(board.getCellAt(12, 7)));\n\t\t\n\t\t}", "@Override\r\n\tpublic boolean isConnected(GraphStructure graph) {\r\n\t\tgetDepthFirstSearchTraversal(graph);\r\n\t\tif(pathList.size()==graph.getNumberOfVertices()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private static void dfsComponents() {\r\n\t\tprintThis(\"Standard DFS Demo (the input graph must be UNDIRECTED)\");\r\n\t\tfor (int i = 0; i < V; i++) { // for each vertex i in [0..V-1]\r\n\t\t\tif (dfs_num[i] == DFS_WHITE) { // if that vertex is not visited yet\r\n\t\t\t\tSystem.out.printf(\"Component %d:\", ++numComp);\r\n\t\t\t\tdfs(i);\r\n\t\t\t\tSystem.out.printf(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.printf(\"There are %d connected components\\n\", numComp);\r\n\t}", "private boolean connected(DepthFirstSearch dfs, Graph G) {\n return dfs.count() == G.V();\r\n }", "boolean connected(int p, int q) {return false; /*mock*/}", "@Test\n public void testElementCounts() {\n assertEquals(0, model3d.getBlocks().size());\n\n assertEquals(28, model3d.getEdges().size());\n assertEquals(16, model3d.getFaces().size());\n assertEquals(14, model3d.getPoints().size());\n }", "public boolean IsConnected() {\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tint counter = 0;\r\n\r\n\t\tArrayList<String> vnames = new ArrayList<>(vces.keySet());\r\n\t\tfor (String vname : vnames) {\r\n\t\t\tif (processed.containsKey(vname)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t\tPair rootpair = new Pair(vname, vname);\r\n\t\t\tqueue.addLast(rootpair);\r\n\t\t\twhile (queue.size() != 0) {\r\n\t\t\t\t// 1. removeFirst\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\t// 2. check if processed, mark if not\r\n\t\t\t\tif (processed.containsKey(rp.vname)) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tprocessed.put(rp.vname, true);\r\n\r\n\t\t\t\t// 3. Check, if an edge is found\r\n\t\t\t\tSystem.out.println(rp.vname + \" via \" + rp.psf);\r\n\r\n\t\t\t\t// 4. Add the unprocessed nbrs back\r\n\t\t\t\tArrayList<String> nbrnames = new ArrayList<>(rp.vtx.nbrs.keySet());\r\n\t\t\t\tfor (String nbrname : nbrnames) {\r\n\t\t\t\t\tif (!processed.containsKey(nbrname)) {\r\n\t\t\t\t\t\tPair np = new Pair(nbrname, rp.psf + nbrname);\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn counter == 1;\r\n\t}", "@Test\n public void testCount() {\n System.out.println(\"**** count *****\");\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 3;\n int result = instance.count();\n assertEquals(expResult, result);\n }", "@Test\n\tvoid test2ConstructorWithList() {\n\t\t// comp1.setHeight(500); this is now component 4\n\t\tlistItems.add(comp1);\n\t\t// comp3.setWidth(678); now component 5\n\t\tlistItems.add(comp2);\n\t\tlistItems.add(comp3);\n\t\tlistItems.add(comp4);\n\t\tlistItems.add(comp5);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tassertEquals(comp5, vc.getComponentsList().get(4));\n\t\tassertTrue(this.x == vc.getX() && this.y == vc.getY() && 678 == vc.getWidth()\n\t\t\t\t&& (comp1.getHeight() + comp2.getHeight() + comp3.getHeight()) + comp4.getHeight()\n\t\t\t\t\t\t+ comp5.getHeight() == vc.getHeight());\n\t}", "int countComponents() throws Exception;", "public abstract boolean isConnectedInDirection(N n1, N n2);", "@Test\n\tvoid test4AddComponentToList() {\n\t\tlistItems.add(comp1);\n\t\tlistItems.add(comp2);\n\t\tvc = new VerticalComponentList(x, y, listItems,0);\n\t\tvc.addComponent(comp3);\n\t\tassertEquals(comp3.hashCode(), vc.getComponentsList().get(vc.getComponentsList().size() - 1).hashCode());\n\t}", "boolean connected(String descrip) {\n if (this.hasNeighbor(descrip)) {\n if (descrip.equals(\"right\")) {\n return this.neighbors.get(\"right\").left && this.right;\n }\n else if (descrip.equals(\"up\")) {\n return this.neighbors.get(\"up\").down && this.up;\n }\n else if (descrip.equals(\"down\")) {\n return this.neighbors.get(\"down\").up && this.down;\n }\n else if (descrip.equals(\"left\")) {\n return this.neighbors.get(\"left\").right && this.left;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "public void checkAndSetStart() {\r\n\t\tSystem.out.println(\"\t\tcheckAndSetStart \"+this.id +\" size:\"+this.components.size());\r\n\t\tif(hasNoStart()) {\t\t\r\n\t\t\tList<ComponentConfig> longestVisitedComps = new ArrayList<ComponentConfig>();\r\n\t\t\tComponentConfig longestVisitedComp = null;\r\n\t\t\tint longestVisited = 0;\r\n\t\t\tfor(ComponentConfig comp: components) {\r\n\t\t\t\tint visited = traverseModel(0,comp);\r\n\t\t\t\tSystem.out.println(\"\t\t\ttraverse\"+comp.getId()+\" v:\"+visited);\r\n\t\t\t\tif(visited > longestVisited) {\r\n\t\t\t\t\tlongestVisited = visited;\r\n\t\t\t\t\tlongestVisitedComps.clear();\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t} else if(visited == longestVisited) {\r\n\t\t\t\t\tlongestVisitedComps.add(comp);\r\n\t\t\t\t}\r\n\t\t\t\t// catch deadloop, if all component are visisted\r\n\t\t\t\tif(longestVisited == components.size())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(ComponentConfig st: longestVisitedComps) {\r\n\t\t\t\tst.setIsstartcaller(true);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}\r\n\t\t// find other component that call to the same component that start component calls within model\r\n\t\tList<ComponentConfig> startComps = new ArrayList<ComponentConfig>();\r\n\t\tfor(ComponentConfig st: components) {\r\n\t\t\tif(st.isIsstartcaller())\r\n\t\t\t\tstartComps.add(st);\r\n\t\t}\r\n\t\tList<Integer> calls = new ArrayList<Integer>();\r\n\t\tfor(ComponentConfig st: startComps) {\r\n\t\t\tif(st.isIsstartcaller() && st.getCalls()!=null) {\r\n\t\t\t\tfor(int i: st.getCalls())\r\n\t\t\t\t\tfor(ComponentConfig eachComp: components) {\r\n\t\t\t\t\t\tSystem.out.println(\"\tfind comp that call \"+i+\" \"+eachComp.getCalls());\r\n\t\t\t\t\t\tif(eachComp.getCalls()!=null)\r\n\t\t\t\t\t\t\tfor(int callee: eachComp.getCalls()) {\r\n\t\t\t\t\t\t\t\t// found component that call to the same target\r\n\t\t\t\t\t\t\t\tif(callee == i)\r\n\t\t\t\t\t\t\t\t\teachComp.setIsstartcaller(true);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void checkConnections() {\n Boolean updateCanvas = false;\n\n // Find new connections set within a node and creates them\n for (DrawableNode node : nodes) {\n if (node instanceof LogicNode) {\n String src = ((LogicNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this LogicNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TestCaseNode) {\n String src = ((TestCaseNode) node).getLogic().getLogic();\n\n for (DrawableNode endNode : getNodes()) {\n int nodeConnectionType = NodeConnection.NO_CONNECTION;\n\n // Here we are checked to see if any connections are linked from this TestCaseNode\n if (src.contains(\"run(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndWait(\\\"\" + endNode.getContainedText() + \"\\\"\") ||\n src.contains(\"runAndJoin(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.DYNAMIC_CONNECTION;\n } else if (src.contains(\"getNode(\\\"\" + endNode.getContainedText() + \"\\\"\")) {\n nodeConnectionType = NodeConnection.GET_NODE_CONNECTION;\n }\n\n // If we find a possible connection and it doesn't already exist, we create that connection with the correct type\n if (!connectionExists(node, endNode) && nodeConnectionType != -1) {\n NodeConnection newConnection = new NodeConnection(node, endNode, nodeConnectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) node).getSwitches();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n Boolean enabledConnection = false;\n\n for (Switch aSwitch : aSwitches) {\n if ((aSwitch.getTarget().equals(endNode.getContainedText()))) {\n enabledConnection = aSwitch.isEnabled();\n createConnection = true;\n }\n }\n\n if (createConnection && !connectionExists(node, endNode)) {\n Integer connectionType = NodeConnection.DYNAMIC_CONNECTION;\n if (!enabledConnection) {\n connectionType = NodeConnection.DISABLED_CONNECTION;\n }\n\n NodeConnection newConnection = new NodeConnection(node, endNode, connectionType);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n } else if (node instanceof TriggerNode) {\n List<Trigger> triggers = ((TriggerNode) node).getTriggers();\n\n for (Trigger trigger : triggers) {\n String watchName = trigger.getWatch();\n\n for (DrawableNode endNode : getNodes()) {\n Boolean createConnection = false;\n\n if (watchName.equals(endNode.getContainedText())) {\n createConnection = true;\n }\n\n // This connection has the start and end the other way around, the target is specified in the trigger but\n // we want it to look like the watched node is connecting to the trigger as that is the order that they are run\n if (createConnection && !connectionExists(endNode, node)) {\n NodeConnection newConnection = new NodeConnection(endNode, node, NodeConnection.TRIGGER_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n\n // Find connection that are set using the Next node input box\n if (node != null && !node.getNextNodeToRun().isEmpty()) {\n for (DrawableNode endNode : getNodes()) {\n if (node.getNextNodeToRun().equals(endNode.getContainedText())) {\n if (!connectionExists(node, endNode)) {\n NodeConnection newConnection = new NodeConnection(node, endNode, NodeConnection.MAIN_CONNECTION);\n connections.add(newConnection);\n updateCanvas = true;\n }\n }\n }\n }\n }\n\n // Checks old connections and removes ones that don't exist\n List<NodeConnection> listToRemove = new ArrayList<>();\n List<NodeConnection> connectionsLoopTemp = new ArrayList<>(); // We make a copy the list here so that we can the original while iterating over this one\n connectionsLoopTemp.addAll(connections);\n for (NodeConnection nodeConnection : connectionsLoopTemp) {\n if (nodeConnection.getConnectionType().equals(NodeConnection.DYNAMIC_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"run(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndWait(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"runAndJoin(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n }\n } else if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || !aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create a disabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DISABLED_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.TRIGGER_CONNECTION)) {\n if (nodeConnection.getConnectionEnd() instanceof TriggerNode) { // Here the start and end connections are reversed\n List<Trigger> triggers = ((TriggerNode) nodeConnection.getConnectionEnd()).getTriggers();\n String endContainedText = nodeConnection.getConnectionStart().getContainedText();\n Integer removeCount = 0;\n for (Trigger trigger : triggers) {\n if ((!trigger.getWatch().equals(endContainedText))) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(triggers.size())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.GET_NODE_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof LogicNode) {\n if (!((LogicNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n } else if (nodeConnection.getConnectionStart() instanceof TestCaseNode) {\n if (!((TestCaseNode) nodeConnection.getConnectionStart()).getLogic().getLogic().contains(\"getNode(\\\"\" + nodeConnection.getConnectionEnd().getContainedText() + \"\\\"\")) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n } else if (nodeConnection.getConnectionType().equals(NodeConnection.DISABLED_CONNECTION)) {\n if (nodeConnection.getConnectionStart() instanceof SwitchNode) {\n List<Switch> aSwitches = ((SwitchNode) nodeConnection.getConnectionStart()).getSwitches();\n String endContainedText = nodeConnection.getConnectionEnd().getContainedText();\n Integer removeCount = 0;\n for (Switch aSwitch : aSwitches) {\n if ((!aSwitch.getTarget().equals(endContainedText) || aSwitch.isEnabled())) {\n removeCount++;\n }\n }\n\n if (removeCount.equals(aSwitches.size())) {\n // Create an enabled connection between these two nodes to give appearance of toggling\n NodeConnection newConnection = new NodeConnection(nodeConnection.getConnectionStart(), nodeConnection.getConnectionEnd(), NodeConnection.DYNAMIC_CONNECTION);\n connections.add(newConnection);\n\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n if (nodeConnection.getConnectionType().equals(NodeConnection.MAIN_CONNECTION)) {\n if (!nodeConnection.getConnectionStart().getNextNodeToRun().equals(nodeConnection.getConnectionEnd().getContainedText())) {\n listToRemove.add(nodeConnection);\n updateCanvas = true;\n }\n }\n }\n\n connections.removeAll(listToRemove);\n if (updateCanvas) {\n Controller.getInstance().updateCanvasControllerLater();\n }\n }", "public static void compare () {\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++) {\r\n if (d[i][j] != adjacencyMatrix[i][j])// here \r\n {\r\n System.out.println(\"Comparison failed\");\r\n \r\n return;\r\n }\r\n }\r\n }\r\n System.out.println(\"Comparison succeeded\");\r\n }", "private static int findConnectedComponents(Map<Integer, Set<Integer>> graph, boolean[] visited) {\n int count = 0;\n for (int u : graph.keySet()) {\n if (!visited[u]) {\n dfs(u, graph, visited);\n count++;\n }\n }\n return count;\n }", "private static int isValidSubmarine(@NotNull HashSet<Index> connectedComponent) {\n // the component should contain at least two elements (indices)\n if (connectedComponent.size() < 2) {\n return 0;\n }\n // find the edges of the component to check if it is a rectangle\n // Credit to stackoverflow\n int rightEdge = Collections.max(connectedComponent, Comparator.comparingInt(Index::getColumn)).getColumn();\n int leftEdge = Collections.min(connectedComponent, Comparator.comparingInt(Index::getColumn)).getColumn();\n int bottomEdge = Collections.max(connectedComponent, Comparator.comparingInt(Index::getRow)).getRow();\n int topEdge = Collections.min(connectedComponent, Comparator.comparingInt(Index::getRow)).getRow();\n\n // calculate the number of expected element of the rectangle\n int numOfExpectedElements = (rightEdge - leftEdge + 1) * (bottomEdge - topEdge + 1);\n\n // If the expected number of element equals to number of the element in the component (size)\n // so its a valid submarine\n if (connectedComponent.size() == numOfExpectedElements) {\n return 1;\n }\n return 0;\n }", "public void testDifferentClusters() throws Exception {\n JChannel first1 = new JChannel(\"stacks/tcp_mping/tcp1.xml\");\n JChannel first2 = new JChannel(\"stacks/tcp_mping/tcp1.xml\");\n JChannel first3 = new JChannel(\"stacks/tcp_mping/tcp1.xml\");\n initiChannel(first1);\n initiChannel(first2);\n initiChannel(first3);\n\n expectView(first1, first2, first3);\n\n JChannel second1 = new JChannel(\"stacks/tcp_mping/tcp2.xml\");\n JChannel second2 = new JChannel(\"stacks/tcp_mping/tcp2.xml\");\n JChannel second3 = new JChannel(\"stacks/tcp_mping/tcp2.xml\");\n initiChannel(second1);\n initiChannel(second2);\n initiChannel(second3);\n\n expectView(first1, first2, first3);\n expectView(second1, second2, second3);\n success = true;\n }", "@Test public void testPublic11() {\n Graph<Character> graph= TestGraphs.testGraph3();\n\n for (Character ch : graph.getVertices())\n assertFalse(graph.isInCycle(ch));\n }", "private boolean isValidConnectors() {\n\n\t\tint countBoardCardInConnectors = 0;\n\n\t\tfor (CardModel cardModel : boardModel.getCards()) {\n\t\t\tif (connectors.contains(cardModel)) {\n\t\t\t\tcountBoardCardInConnectors++;\n\t\t\t}\n\t\t}\n\n\t\treturn (countBoardCardInConnectors == 2);\n\t}", "@Test public void testPublic4() {\n Graph<Character> graph= TestGraphs.testGraph1();\n\n assertEquals(\"B\", TestGraphs.collToString(graph.getNeighbors('A')));\n }", "private boolean [][] buildConnectionMatrix(ArrayList<Integer> st) throws Exception{\n \tboolean [][] canReach=new boolean[st.size()][st.size()]; //initial values of boolean is false in JAVA\n\t\tfor(int i=0;i<st.size();i++) canReach[i][i]=true;\n\t\t//build connection matrix\n \tfor(TreeAutomaton ta:lt)\n \t\tfor(Transition tran:ta.getTrans()){\n \t\t\tint topLoc=st.indexOf(tran.getTop());\n \t\t\tfor(SubTerm t:tran.getSubTerms()){\n \t\t\t\tif(boxes.containsKey(t.getSubLabel())){//the case of a box transition\n \t\t\t\t\tBox box=boxes.get(t.getSubLabel());\n \t\t\t\t\tfor(int i=0;i<box.outPorts.size();i++){\n\t\t\t\t\t\t\tint botLoc_i=st.indexOf(t.getStates().get(i));\n \t\t\t\t\tfor(int j=0;j<box.outPorts.size();j++){\n \t\t\t\t\t\t\tint botLoc_j=st.indexOf(t.getStates().get(j));\n \t\t\t\t\t\tif(box.checkPortConnections(box.outPorts.get(i), box.outPorts.get(j)))//handle outport->outport\n \t\t\t\t\t\t\tcanReach[botLoc_i][botLoc_j]=true;\n \t\t\t\t\t}\n \t\t\t\t\t\tif(box.checkPortConnections(box.outPorts.get(i), box.inPort))//handle outport->inport\n \t\t\t\t\t\t\tcanReach[botLoc_i][topLoc]=true;\n \t\t\t\t\t\tif(box.checkPortConnections(box.inPort, box.outPorts.get(i)))//handle inport->outport\n \t\t\t\t\t\t\tcanReach[topLoc][botLoc_i]=true;\n \t\t\t\t\t}\n \t\t\t\t}else{ \n \t\t\t\t\tint rootRef=ta.referenceTo(tran.getTop());\n \t\t\t\t\tif(rootRef!=-1){//root reference\n \t\t \t\t\tint refLoc=st.indexOf(rootRef);\n \t\t\t\t\t\tcanReach[topLoc][refLoc]=true;\n\t \t\t\t\t}else{//normal transition\n\t \t\t\t\t\n\t \t\t\t\t\tfor(int bot:t.getStates()){\n\t \t\t \t\t\tint botLoc=st.indexOf(bot);\n\t \t\t\t\t\t\tcanReach[topLoc][botLoc]=true;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \treturn canReach;\n }", "@Test\n public void testIsValidonContinentNotConnectedMap() {\n // Create a new continent ContinentC which is not connected\n mapModel.addContinent(\"ContinentC\", 3);\n mapModel.getGraphTerritories()\n .get(\"TerritoryA\").setContinentName(\"ContinentC\");\n mapModel.getGraphTerritories()\n .get(\"TerritoryE\").setContinentName(\"ContinentC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "public boolean isConnected() {\r\n\r\n\t\tHashMap<String, Boolean> processed = new HashMap<>();\r\n\t\tLinkedList<Pair> queue = new LinkedList<>();\r\n\t\tArrayList<String> list = new ArrayList<>(vtces.keySet());\r\n\t\tint count = 0;\r\n\t\tfor (String key : list) {\r\n\t\t\tif (processed.containsKey(key))\r\n\t\t\t\tcontinue;\r\n\t\t\tcount++;\r\n\t\t\t// Create a new pair\r\n\t\t\tPair npr = new Pair();\r\n\t\t\tnpr.vname = key;\r\n\t\t\tnpr.psf = key;\r\n\r\n\t\t\t// put pair queue\r\n\t\t\tqueue.addLast(npr);\r\n\r\n\t\t\t// Work while queue is not empty\r\n\t\t\twhile (!queue.isEmpty()) {\r\n\r\n\t\t\t\t// Remove a pair from queue\r\n\t\t\t\tPair rp = queue.removeFirst();\r\n\r\n\t\t\t\tif (processed.containsKey(rp.vname))\r\n\t\t\t\t\tcontinue;\r\n\r\n\t\t\t\t// Put in processed hashmap\r\n\t\t\t\tprocessed.put(rp.vname, True);\r\n\r\n\t\t\t\t// nbrs\r\n\t\t\t\tVertex rpvertex = vtces.get(rp.vname);\r\n\t\t\t\tArrayList<String> nbrs = new ArrayList<>(rpvertex.nbrs.keySet());\r\n\r\n\t\t\t\tfor (String nbr : nbrs) {\r\n\t\t\t\t\t// Process only unprocessed vertex\r\n\t\t\t\t\tif (!processed.containsKey(nbr)) {\r\n\t\t\t\t\t\t// Create a new pair and put in queue\r\n\t\t\t\t\t\tPair np = new Pair();\r\n\t\t\t\t\t\tnp.vname = nbr;\r\n\t\t\t\t\t\tnp.psf = rp.psf + nbr;\r\n\r\n\t\t\t\t\t\tqueue.addLast(np);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif (count > 1)\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Test\n public void runContinuousTestCornerAlive() throws Exception {\n Cell[][] f = new Cell[15][15];\n\n /*\n Pattern of starting grid:\n XX...\n X....\n .....\n .....\n .....\n */\n for (int i = 0; i < f.length; i++) {\n for (int j = 0; j < f[i].length; j++) {\n if ((i == 0 && (j == 0 || j == 1)) || (i == 1 && j == 0)) {\n f[i][j] = new Cell(true);\n } else {\n f[i][j] = new Cell(false);\n }\n }\n }\n mainPanel.setCells(f);\n final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(2);\n executor.schedule(new Runnable() {\n @Override\n public void run() {\n mainPanel.stop();\n }\n }, 2, TimeUnit.SECONDS);\n mainPanel.runContinuous();\n\n /*\n Pattern of resulting grid:\n XX...\n XX...\n .....\n .....\n .....\n */\n boolean[][] c = mainPanel.convertToBoolean(mainPanel.getCells());\n for (int i = 0; i < c.length; i++) {\n for (int j = 0; j < c[i].length; j++) {\n if ((i == 0 && (j == 0 || j == 1)) || (i == 1 && (j == 0 || j == 1))) {\n if (!c[i][j]) {\n fail();\n }\n } else if (c[i][j]) {\n fail();\n }\n }\n }\n }", "@Test\n public void testNeighbors() {\n\n // Make a bigger nanoverse.runtime.geometry than the one from setUp\n Lattice lattice = new TriangularLattice();\n hex = new Hexagon(lattice, 3);\n Boundary boundary = new Arena(hex, lattice);\n Geometry geometry = new Geometry(lattice, hex, boundary);\n\n Coordinate query;\n\n // Check center\n query = new Coordinate2D(2, 2, 0);\n assertNeighborCount(6, query, geometry);\n\n // Check corner\n query = new Coordinate2D(0, 0, 0);\n assertNeighborCount(3, query, geometry);\n\n // Check side\n query = new Coordinate2D(1, 0, 0);\n assertNeighborCount(4, query, geometry);\n }", "public boolean percolates() {\n\t\treturn linearGrid.connected(0, 1);\n\t}", "@Override\r\n\t\t\tpublic void connectedComponentStarted(ConnectedComponentTraversalEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Test\r\n public void test_IsConnected_false() {\r\n System.out.println(\"isConnected\");\r\n int p = 1;\r\n int q = 2;\r\n UnionFind instance = new QuickUnion(100);\r\n boolean expResult = false;\r\n boolean result = instance.isConnected(p, q);\r\n assertEquals(expResult, result);\r\n }", "public int getNumberOfComponents();", "public static boolean isAllVertexConnected(ArrayList<Edge>[] graph)\n {\n int count = 0;\n int n = graph.length;\n boolean[] vis = new boolean[n];\n\n for(int v = 0; v < n; v++) {\n if(vis[v] == false) {\n count++;\n\n //if number of connected components is greater than 1 then graph is not connected\n if(count > 1) {\n return false;\n }\n gcc(graph, v, vis);\n }\n }\n return true;\n\n }", "public boolean connectsVertices(Collection<V> vs);", "@Test public void testPublic5() {\n Graph<Character> graph= TestGraphs.testGraph1();\n\n assertEquals(\"\", TestGraphs.collToString(graph.getNeighbors('B')));\n }", "@Test\n public void runContinuousTestPlusShapeAlive() throws Exception {\n mainPanel = new MainPanel(5);\n Cell[][] f = new Cell[5][5];\n\n /*\n Pattern of starting grid:\n .....\n ..X..\n .XXX.\n ..X..\n .....\n */\n for (int i = 0; i < f.length; i++) {\n for (int j = 0; j < f[i].length; j++) {\n if ((i == 2 && (j == 1 || j == 2 || j == 3) || (i == 1 && j == 2) || (i == 3 && j == 2))) {\n f[i][j] = new Cell(true);\n } else {\n f[i][j] = new Cell(false);\n }\n }\n }\n mainPanel.setCells(f);\n\n final ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(2);\n executor.schedule(new Runnable() {\n @Override\n public void run() {\n mainPanel.stop();\n }\n }, 2, TimeUnit.SECONDS);\n mainPanel.runContinuous();\n\n boolean[][] c = mainPanel.convertToBoolean(mainPanel.getCells());\n for (int i = 0; i < c.length; i++) {\n for (int j = 0; j < c[i].length; j++) {\n if (c[i][j]) {\n fail();\n }\n }\n }\n }", "@Test\n\tpublic void verifyCombosOnBoard() {\n\t\tBoard board = boardFactory.fromTextGenerateBoard(\"/boards/1LineOf3.txt\", mockGroup);\n\t\tassertFalse(board.outOfMoves());\n\n\t}", "private void checkLabelTextComponentPairs(){\n Iterator i = labelForPointingComponents.iterator();\n while(i.hasNext()){\n Component component = (Component)(i.next());\n Iterator j = labels.iterator();\n \n while(j.hasNext()){\n Component labelFor = ((JLabel)(j.next())).getLabelFor();\n if ((labelFor != null) && (labelFor == component)){\n i.remove();\n break;\n }\n }\n }\n }", "@Test public void testPublic12() {\n Graph<Integer> graph= new Graph<Integer>();\n int i;\n\n // note this adds the adjacent vertices in the process\n for (i= 0; i < 10; i++)\n graph.addEdge(i, i + 1, 1);\n graph.addEdge(10, 0, 1);\n\n for (Integer vertex : graph.getVertices())\n assertTrue(graph.isInCycle(vertex));\n }", "public boolean percolates() {\n \treturn weigtedJoin.connected(N * N, N * N + 1);\n }", "@Test\r\n\tpublic void testAdjacencyWalkways()\r\n\t{\r\n\t\t// Test on top edge of board, two walkway pieces\r\n\t\tSet<BoardCell> testList = board.getAdjList(0, 7);\r\n\t\tassertTrue(testList.contains(board.getCellAt(0, 8)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(1, 7)));\r\n\t\tassertEquals(2, testList.size());\r\n\t\t\r\n\t\t// Test on left edge of board, one walkway piece\r\n\t\ttestList = board.getAdjList(8, 0);\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 0)));\r\n\t\tassertEquals(1, testList.size());\r\n\r\n\t\t// Test a walkway next to closet, 2 walkway pieces\r\n\t\ttestList = board.getAdjList(12, 9);\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 10)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(13, 9)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t\t// Test surrounded by 4 walkways\r\n\t\ttestList = board.getAdjList(11,4);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 5)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 3)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 4)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(10, 4)));\r\n\t\tassertEquals(4, testList.size());\r\n\t\t\r\n\t\t// Test on bottom edge of board, next to 1 room piece\r\n\t\ttestList = board.getAdjList(24, 18);\r\n\t\tassertTrue(testList.contains(board.getCellAt(23, 18)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(24, 17)));\r\n\t\tassertEquals(2, testList.size());\r\n\t\t\r\n\t\t// Test on right edge of board, next to 1 room piece\r\n\t\ttestList = board.getAdjList(10, 24);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 24)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(10, 23)));\r\n\t\tassertEquals(2, testList.size());\r\n\r\n\t\t// Test on walkway next to door that is not in the needed\r\n\t\t// direction to enter\r\n\t\ttestList = board.getAdjList(12, 21);\r\n\t\tassertTrue(testList.contains(board.getCellAt(11, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(13, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(12, 20)));\r\n\t\tassertEquals(3, testList.size());\r\n\t}", "public boolean percolates() {\n return myUF.connected(n*n, n*n + 1);\n }", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "boolean detectCycledirected(ArrayList<Integer> G[]) {\n\t\tint[] vis = new int[G.length];\n\t\tint[] ancestor = new int[G.length];\n\t\tfor (int i = 0; i < G.length; i++) {\n\t\t\tif (vis[i] == 0) {\n\t\t\t\tif (detectCycleUtil(G, i, vis, ancestor))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public static ArrayList<Set<String>> getConnectedComponentsInDistrict(\n District district,\n HashMap<String, PrecinctNeighborRelation> precinctNeighborRelationMap) {\n // ( precinctGeoId : PrecinctNeighborRelation } pair in precinctNeighborRelationMap\n\n // first, build from -> to_list hash map\n HashMap<String, ArrayList<String>> fromToList = new HashMap<>();\n for(PrecinctNeighborRelation pnr : precinctNeighborRelationMap.values()) {\n ArrayList<NeighborData> ndList = pnr.getNeighborDataList();\n ArrayList<String> toGeoidList = new ArrayList<>();\n for(NeighborData nd : ndList)\n toGeoidList.add(nd.getToGeoId());\n fromToList.put(pnr.getFromGeoId(), toGeoidList);\n }\n\n Set<Precinct> precinctsOfDistrict = district.getPrecincts();\n\n ArrayList<String> pgeoidsOfDistrict = new ArrayList<>();\n ArrayList<Set<String>> connectedComponentList = new ArrayList<>();\n HashMap<String, Set<String>> referenceToItsSet = new HashMap<>();\n\n for(Precinct p : precinctsOfDistrict) {\n Set<String> connectedComponent = new HashSet<>();\n connectedComponent.add(p.getGeoId());\n connectedComponentList.add(connectedComponent);\n referenceToItsSet.put(p.getGeoId(), connectedComponent);\n pgeoidsOfDistrict.add(p.getGeoId());\n }\n\n for(Precinct p : precinctsOfDistrict) {\n ArrayList<String> toGeoidList = fromToList.get(p.getGeoId());\n Set<String> itsSet = referenceToItsSet.get(p.getGeoId());\n for(String neighborGeoid : toGeoidList) {\n // if the neighbor is in same district\n // if itsSet not yet contains the neighbor\n if(pgeoidsOfDistrict.contains(neighborGeoid)\n && !itsSet.contains(neighborGeoid)) {\n // neighbors set will be removed from the memory\n Set<String> neighborsSet = referenceToItsSet.get(neighborGeoid);\n for(String elementFromNeighborSet : neighborsSet) {\n referenceToItsSet.put(elementFromNeighborSet, itsSet);\n itsSet.add(elementFromNeighborSet);\n }\n connectedComponentList.remove(neighborsSet);\n }\n }\n }\n\n // stubbed\n// Set<Precinct> oneset = new HashSet<>();\n// ArrayList<Set<Precinct>> listSizeOne = new ArrayList<>();\n// listSizeOne.add(oneset);\n if(connectedComponentList.size() > 1) {\n //System.out.println(\"District: \" + district.getGeoId() + \" has \" + connectedComponentList.size() + \" components\");\n }\n return connectedComponentList;\n }", "private int numberOfComponents(ArrayList<Integer>[] adj) {\n\t\t\t\t\n\t\tint n = adj.length;\n\t\tvisited = new boolean[n]; //default is false\n\t\tCCnum = new int[n];\n\t\tDFS(adj);\n\t\t\n\t\treturn cc;\n }", "@Override\n public int getNumComponents()\n {\n return components.size();\n }", "@Override\n public Boolean colisionoCon(MV gr) {\n return true;\n }", "@Test\n\tpublic void testAdjacencyDoorways()\n\t{\n\t\t// Test beside a door direction RIGHT\n\t\tSet<BoardCell> testList = board.getAdjList(18, 18);\n\t\tassertTrue(testList.contains(board.getCellAt(18, 17)));\n\t\tassertTrue(testList.contains(board.getCellAt(19, 18)));\n\t\tassertTrue(testList.contains(board.getCellAt(18, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(17, 18)));\n\t\tassertEquals(4, testList.size());\n\t\t// Test beside a door direction DOWN\n\t\ttestList = board.getAdjList(5, 17);\n\t\tassertTrue(testList.contains(board.getCellAt(6, 17)));\n\t\tassertTrue(testList.contains(board.getCellAt(4, 17)));\n\t\tassertTrue(testList.contains(board.getCellAt(5, 16)));\n\t\tassertTrue(testList.contains(board.getCellAt(5, 18)));\n\t\tassertEquals(4, testList.size());\n\t\t// Test beside a door direction LEFT\n\t\ttestList = board.getAdjList(11, 18);\n\t\tassertTrue(testList.contains(board.getCellAt(11, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(11, 17)));\n\t\tassertTrue(testList.contains(board.getCellAt(10, 18)));\n\t\tassertTrue(testList.contains(board.getCellAt(12, 18)));\n\t\tassertEquals(4, testList.size());\n\t\t// Test beside a door direction UP\n\t\ttestList = board.getAdjList(8, 4);\n\t\tassertTrue(testList.contains(board.getCellAt(8, 5)));\n\t\tassertTrue(testList.contains(board.getCellAt(8, 3)));\n\t\tassertTrue(testList.contains(board.getCellAt(7, 4)));\n\t\tassertTrue(testList.contains(board.getCellAt(9, 4)));\n\t\tassertEquals(4, testList.size());\n\t}", "@Test\n public void testOneStep1() {\n board sol = new board(3);\n assertEquals(-2, sol.neighbors(1,2));\n }", "private ArrayList<Cell> createSuccesors(Cell current, boolean makeConnected) {\r\n\t\t\tint r = current.row;\r\n\t\t\tint c = current.col;\r\n\t\t\t// We create an empty list for the successors of the current cell.\r\n\t\t\tArrayList<Cell> temp = new ArrayList<>();\r\n\t\t\t// With diagonal movements priority is:\r\n\t\t\t// 1: Up 2: Up-right 3: Right 4: Down-right\r\n\t\t\t// 5: Down 6: Down-left 7: Left 8: Up-left\r\n\r\n\t\t\t// Without diagonal movements the priority is:\r\n\t\t\t// 1: Up 2: Right 3: Down 4: Left\r\n\r\n\t\t\t// If not at the topmost limit of the grid\r\n\t\t\t// and the up-side cell is not an obstacle ...\r\n\t\t\tif (r > 0 && grid[r - 1][c] != OBST &&\r\n\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t// not already belongs neither to the OPEN SET nor to the\r\n\t\t\t\t\t// CLOSED SET ...\r\n\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t: isInList(openSet, new Cell(r - 1, c)) == -1 && isInList(closedSet, new Cell(r - 1, c)) == -1)) {\r\n\t\t\t\tCell cell = new Cell(r - 1, c);\r\n\t\t\t\t// In the case of Dijkstra's algorithm we can not append to\r\n\t\t\t\t// the list of successors the \"naked\" cell we have just created.\r\n\t\t\t\t// The cell must be accompanied by the label 'dist',\r\n\t\t\t\t// so we need to track it down through the list 'graph'\r\n\t\t\t\t// and then copy it back to the list of successors.\r\n\t\t\t\t// The flag makeConnected is necessary to be able\r\n\t\t\t\t// the present method createSuccesors() to collaborate\r\n\t\t\t\t// with the method findConnectedComponent(), which creates\r\n\t\t\t\t// the connected component when Dijkstra's initializes.\r\n\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// ... update the pointer of the up-side cell so it points\r\n\t\t\t\t\t// the current one ...\r\n\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t// ... and add the up-side cell to the successors of the\r\n\t\t\t\t\t// current one.\r\n\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t// If we are not even at the topmost nor at the rightmost border\r\n\t\t\t\t// of the grid\r\n\t\t\t\t// and the up-right-side cell is not an obstacle ...\r\n\t\t\t\tif (r > 0 && c < columns - 1 && grid[r - 1][c + 1] != OBST &&\r\n\t\t\t\t\t\t// ... and one of the upper side or right side cells are\r\n\t\t\t\t\t\t// not obstacles ...\r\n\t\t\t\t\t\t// (because it is not reasonable to allow\r\n\t\t\t\t\t\t// the robot to pass through a \"slot\")\r\n//\t\t\t\t(grid[r - 1][c] != OBST || grid[r][c + 1] != OBST) &&\r\n\t\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t\t// not already belongs neither to the OPEN SET nor\r\n\t\t\t\t\t\t// CLOSED SET ...\r\n\t\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t\t: isInList(openSet, new Cell(r - 1, c + 1)) == -1\r\n\t\t\t\t\t\t\t\t&& isInList(closedSet, new Cell(r - 1, c + 1)) == -1)) {\r\n\t\t\t\t\tCell cell = new Cell(r - 1, c + 1);\r\n\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// ... update the pointer of the up-right-side cell so\r\n\t\t\t\t\t\t// it points the current one ...\r\n\t\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t\t// ... and add the up-right-side cell to the successors\r\n\t\t\t\t\t\t// of the current one.\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If not at the rightmost limit of the grid\r\n\t\t\t// and the right-side cell is not an obstacle ...\r\n\t\t\tif (c < columns - 1 && grid[r][c + 1] != OBST &&\r\n\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t// not already belongs neither to the OPEN SET nor to the\r\n\t\t\t\t\t// CLOSED SET ...\r\n\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t: isInList(openSet, new Cell(r, c + 1)) == -1 && isInList(closedSet, new Cell(r, c + 1)) == -1)) {\r\n\t\t\t\tCell cell = new Cell(r, c + 1);\r\n\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// ... update the pointer of the right-side cell so it\r\n\t\t\t\t\t// points the current one ...\r\n\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t// ... and add the right-side cell to the successors of the\r\n\t\t\t\t\t// current one.\r\n\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t// If we are not even at the lowermost nor at the rightmost\r\n\t\t\t\t// border of the grid\r\n\t\t\t\t// and the down-right-side cell is not an obstacle ...\r\n\t\t\t\tif (r < rows - 1 && c < columns - 1 && grid[r + 1][c + 1] != OBST &&\r\n\t\t\t\t\t\t// ... and one of the down-side or right-side cells are\r\n\t\t\t\t\t\t// not obstacles ...\r\n//\t\t\t\t(grid[r + 1][c] != OBST || grid[r][c + 1] != OBST) &&\r\n\t\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t\t// not already belongs neither to the OPEN SET nor to\r\n\t\t\t\t\t\t// the CLOSED SET ...\r\n\t\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t\t: isInList(openSet, new Cell(r + 1, c + 1)) == -1\r\n\t\t\t\t\t\t\t\t&& isInList(closedSet, new Cell(r + 1, c + 1)) == -1)) {\r\n\t\t\t\t\tCell cell = new Cell(r + 1, c + 1);\r\n\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// ... update the pointer of the downr-right-side cell\r\n\t\t\t\t\t\t// so it points the current one ...\r\n\t\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t\t// ... and add the down-right-side cell to the\r\n\t\t\t\t\t\t// successors of the current one.\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If not at the lowermost limit of the grid\r\n\t\t\t// and the down-side cell is not an obstacle ...\r\n\t\t\tif (r < rows - 1 && grid[r + 1][c] != OBST &&\r\n\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t// not already belongs neither to the OPEN SET nor to the\r\n\t\t\t\t\t// CLOSED SET ...\r\n\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t: isInList(openSet, new Cell(r + 1, c)) == -1 && isInList(closedSet, new Cell(r + 1, c)) == -1)) {\r\n\t\t\t\tCell cell = new Cell(r + 1, c);\r\n\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// ... update the pointer of the down-side cell so it points\r\n\t\t\t\t\t// the current one ...\r\n\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t// ... and add the down-side cell to the successors of the\r\n\t\t\t\t\t// current one.\r\n\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t// If we are not even at the lowermost nor at the leftmost\r\n\t\t\t\t// border of the grid\r\n\t\t\t\t// and the down-left-side cell is not an obstacle ...\r\n\t\t\t\tif (r < rows - 1 && c > 0 && grid[r + 1][c - 1] != OBST &&\r\n\t\t\t\t\t\t// ... and one of the down-side or left-side cells are\r\n\t\t\t\t\t\t// not obstacles ...\r\n//\t\t\t\t(grid[r + 1][c] != OBST || grid[r][c - 1] != OBST) &&\r\n\t\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t\t// not already belongs neither to the OPEN SET nor to\r\n\t\t\t\t\t\t// the CLOSED SET ...\r\n\t\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t\t: isInList(openSet, new Cell(r + 1, c - 1)) == -1\r\n\t\t\t\t\t\t\t\t&& isInList(closedSet, new Cell(r + 1, c - 1)) == -1)) {\r\n\t\t\t\t\tCell cell = new Cell(r + 1, c - 1);\r\n\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// ... update the pointer of the down-left-side cell so\r\n\t\t\t\t\t\t// it points the current one ...\r\n\t\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t\t// ... and add the down-left-side cell to the successors\r\n\t\t\t\t\t\t// of the current one.\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If not at the leftmost limit of the grid\r\n\t\t\t// and the left-side cell is not an obstacle ...\r\n\t\t\tif (c > 0 && grid[r][c - 1] != OBST &&\r\n\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t// not already belongs neither to the OPEN SET nor to the\r\n\t\t\t\t\t// CLOSED SET ...\r\n\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t: isInList(openSet, new Cell(r, c - 1)) == -1 && isInList(closedSet, new Cell(r, c - 1)) == -1)) {\r\n\t\t\t\tCell cell = new Cell(r, c - 1);\r\n\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// ... update the pointer of the left-side cell so it points\r\n\t\t\t\t\t// the current one ...\r\n\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t// ... and add the left-side cell to the successors of the\r\n\t\t\t\t\t// current one.\r\n\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (diagonal.isSelected()) {\r\n\t\t\t\t// If we are not even at the topmost nor at the leftmost border\r\n\t\t\t\t// of the grid\r\n\t\t\t\t// and the up-left-side cell is not an obstacle ...\r\n\t\t\t\tif (r > 0 && c > 0 && grid[r - 1][c - 1] != OBST &&\r\n\t\t\t\t\t\t// ... and one of the up-side or left-side cells are not\r\n\t\t\t\t\t\t// obstacles ...\r\n//\t\t\t\t(grid[r - 1][c] != OBST || grid[r][c - 1] != OBST) &&\r\n\t\t\t\t\t\t// ... and (only in the case are not running the A* or\r\n\t\t\t\t\t\t// Greedy)\r\n\t\t\t\t\t\t// not already belongs neither to the OPEN SET nor to\r\n\t\t\t\t\t\t// the CLOSED SET ...\r\n\t\t\t\t((aStar.isSelected() || guloso.isSelected() || dijkstra.isSelected()) ? true\r\n\t\t\t\t\t\t: isInList(openSet, new Cell(r - 1, c - 1)) == -1\r\n\t\t\t\t\t\t\t\t&& isInList(closedSet, new Cell(r - 1, c - 1)) == -1)) {\r\n\t\t\t\t\tCell cell = new Cell(r - 1, c - 1);\r\n\t\t\t\t\tif (dijkstra.isSelected()) {\r\n\t\t\t\t\t\tif (makeConnected) {\r\n\t\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tint graphIndex = isInList(graph, cell);\r\n\t\t\t\t\t\t\tif (graphIndex > -1) {\r\n\t\t\t\t\t\t\t\ttemp.add(graph.get(graphIndex));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// ... update the pointer of the up-left-side cell so it\r\n\t\t\t\t\t\t// points the current one ...\r\n\t\t\t\t\t\tcell.prev = current;\r\n\t\t\t\t\t\t// ... and add the up-left-side cell to the successors\r\n\t\t\t\t\t\t// of the current one.\r\n\t\t\t\t\t\ttemp.add(cell);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// When DFS algorithm is in use, cells are added one by one at the\r\n\t\t\t// beginning of the\r\n\t\t\t// OPEN SET list. Because of this, we must reverse the order of\r\n\t\t\t// successors formed,\r\n\t\t\t// so the successor corresponding to the highest priority, to be\r\n\t\t\t// placed\r\n\t\t\t// the first in the list.\r\n\t\t\t// For the Greedy, A* and Dijkstra's no issue, because the list is\r\n\t\t\t// sorted\r\n\t\t\t// according to 'f' or 'dist' before extracting the first element\r\n\t\t\t// of.\r\n\t\t\tif (dfs.isSelected()) {\r\n\t\t\t\tCollections.reverse(temp);\r\n\t\t\t}\r\n\t\t\treturn temp;\r\n\t\t}", "@Test\n\tpublic void testGet() {\n\t\tassertTrue(LevelGen.connected(LevelGen.get(100, 100)));\n\t}", "public boolean percolates(){\r\n\t\treturn uf.connected(N * N, N * N + 1);\r\n\t}", "@Override\n public boolean connected(Station station1, Station station2) {\n if (station1.id() >= links.length || station2.id() >= links.length) {\n return station1.id() == station2.id();\n }\n return links[station1.id()] == links[station2.id()];\n }", "@Ignore\n\t@Test(expected=UnsupportedOperationException.class)\n\tpublic void testcClusterSpecIterator()\n\t{\n\t\tfinal DCRGraph graph = DCRGraphTest.randomGraph();\n\n\t\tAssert.assertTrue(0 < graph.getClusterCount());\n\t\tfinal OrdinaryCluster cl = graph.getGroundTruth().getCluster(0);\n\t\tfinal OrdinaryCluster other = graph.getGroundTruth().getCluster(1);\n\n\t\tcl.interClusterEdgeIterator(other).remove();\n\t}", "@Test\n\tpublic void testComputer1() {\n\t\tPlayer ai1 = game.getComps().get(0);\n\t\tassertEquals(ai1.getName(), \"Reverend Green\");\n\t\tassertEquals(ai1.getColor(), \"Green\");\n\t\tassertEquals(ai1.getIndex(), 0*NUM_COLUMNS + 13);\n\t}", "public void dfs(LinkedList<Node>[] adjList){\n Set<Integer> visited = new HashSet<>();\n\n for(LinkedList<Node> node: adjList){\n Node curr = node.getFirst();\n if(!visited.contains(curr)){\n ArrayList<Integer> components = new ArrayList<>();\n components = getConnectedComponets(curr, visited, components);\n System.out.printf(\"do something %s\", components.toString());\n }\n }\n }", "@Test\n public void test_05() {\n Maze maze = new Maze(tinyBoard, new Location(0, 0));\n maze.moveChip(Direction.NORTH);\n assertTrue(maze.getChipLocation().equals(new Location(0, 0)));\n }", "@Test\r\n\tpublic void testAdjacencyDoorways()\r\n\t{\r\n\t\t// Test beside a door direction DOWN\r\n\t\tSet<BoardCell> testList = board.getAdjList(9, 2);\r\n\t\tassertTrue(testList.contains(board.getCellAt(10, 2)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 3)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 1)));\r\n\t\tassertEquals(4, testList.size());\r\n\t\t// Test beside a door direction RIGHT\r\n\t\ttestList = board.getAdjList(19, 7);\r\n\t\tassertTrue(testList.contains(board.getCellAt(19, 8)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(19, 6)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(20, 7)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(18, 7)));\r\n\t\tassertEquals(4, testList.size());\r\n\t\t// Test beside a door direction LEFT\r\n\t\ttestList = board.getAdjList(8, 21);\r\n\t\tassertTrue(testList.contains(board.getCellAt(9, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(7, 21)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(8, 22)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(8, 20)));\r\n\t\tassertEquals(4, testList.size());\r\n\t\t// Test beside a door direction UP\r\n\t\ttestList = board.getAdjList(16, 10);\r\n\t\tassertTrue(testList.contains(board.getCellAt(17, 10)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(15, 10)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(16, 9)));\r\n\t\tassertTrue(testList.contains(board.getCellAt(16, 11)));\r\n\t\tassertEquals(4, testList.size());\r\n\t}", "public boolean percolates() {\n if (mGridSize == 1 && !isOpen(1, 1))\n return false;\n //return mUnionFind.connected(0, mGridSize * mGridSize + 1);\n return mUnionFind.find(0) == mUnionFind.find(mGridSize * mGridSize + 1);\n\n }", "@Test\n\tpublic void testAdjacenciesInsideRooms()\n\t{\n\t\t// Test a corner\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that has walkway above\n\t\ttestList = board.getAdjList(7, 19);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one that is in middle of room\n\t\ttestList = board.getAdjList(20, 3);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one beside a door\n\t\ttestList = board.getAdjList(18, 11);\n\t\tassertEquals(0, testList.size());\n\t\t// Test one in a edge of board\n\t\ttestList = board.getAdjList(11, 24);\n\t\tassertEquals(0, testList.size());\n\t}", "@Test\n @NavigateTo(\"/group/dp/common-components\")\n public void testListingComponents() {\n // #action: Navigate to the common-components landing page.\n // #expects: There is at least one component listed.\n assertThat(driver.findElements(By.cssSelector(\".categories li\")).size()).isGreaterThan(0);\n }", "private void matchOnlyCurrentGraphState(TaskMonitor monitor) {\r\n\t\t// make a new list of the matched nodes, to avoid concurrent\r\n\t\t// modification problems\r\n\t\tList matchedNodes = getMatchedNodesOrdered();\r\n\r\n\t\tint total = matchedNodes.size();\r\n\t\tint count = 0;\r\n\r\n\t\tfor (Iterator nodeIt = matchedNodes.iterator(); nodeIt.hasNext();) {\r\n\t\t\tcount++;\r\n\t\t\tmonitor.report(count, total, \"Paths tested\");\r\n\t\t\tif (monitor.isCancelRequested())\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tRoadNode subNode = (RoadNode) nodeIt.next();\r\n\t\t\tif (subNode.isMatched()) {\r\n\t\t\t\tRoadNode matchNode = subNode.getMatch();\r\n\t\t\t\tNodeMatching matching = subNode.getMatching();\r\n\t\t\t\tmatchPathsFromNodes(matching);\r\n\t\t\t}\r\n\t\t}\r\n\t\tDebugFeature.saveFeatures(MATCH,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathMatches.jml\");\r\n\t\tDebugFeature.saveFeatures(SPLIT,\r\n\t\t\t\t\"Y:\\\\jcs\\\\testUnit\\\\roads\\\\pathSplits.jml\");\r\n\t\tDebug.println(\"paths matched = \" + pathMatchCount);\r\n\t\tDebug.println(\"splits matched = \" + splitMatchCount);\r\n\t}", "@Test\r\n\tpublic void testAdjacenciesInsideRooms()\r\n\t{\r\n\t\t// Test a corner\r\n\t\tSet<BoardCell> testList = board.getAdjList(0, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway underneath\r\n\t\ttestList = board.getAdjList(7, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that has walkway above\r\n\t\ttestList = board.getAdjList(13, 0);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one that is in middle of room\r\n\t\ttestList = board.getAdjList(14, 17);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one beside a door\r\n\t\ttestList = board.getAdjList(6, 16);\r\n\t\tassertEquals(0, testList.size());\r\n\t\t// Test one in a corner of room\r\n\t\ttestList = board.getAdjList(10, 15);\r\n\t\tassertEquals(0, testList.size());\r\n\t}", "private void initComponents(int[][] edges, int[] vOrder){\r\n\t\r\n\tconDisplay = new ConDisplayPanel(edges, vOrder);\r\n\t\r\n\tgetContentPane().remove(0);\r\n\ttitleLabel.setText(\"Connected Components\"); \r\n\ttitleLabel.setFont(new java.awt.Font(\"Tahoma\", 1, 24));\r\n\tgetContentPane().add(titleLabel,\r\n\t\t\t new AbsoluteConstraints(145,10,-1,-1));\r\n\t\r\n\tconDisplay.setLayout(new AbsoluteLayout());\r\n\tgetContentPane().add(conDisplay, \r\n\t\t\t new AbsoluteConstraints(320,220,250,190));\r\n\tpack();\r\n }", "public abstract boolean isConnectedInDirection(N n1, E edgeValue, N n2);", "@Test\n public void tr2()\n {\n Graph graph = new Graph(2);\n Set<Integer> sources = new TreeSet<Integer>();\n Set<Integer> targets = new TreeSet<Integer>();\n sources.add(0);\n targets.add(1);\n graph.addEdge(0,1);\n assertTrue(graph.reachable(sources, targets));\n\n\n }", "public void connectClusters()\n\t{\n//\t\tfor(int i = 0; i<edges.size();i++)\n//\t\t{\n//\t\t\tEdgeElement edge = edges.get(i);\n//\t\t\tString fromNodeID = edge.fromNodeID;\n//\t\t\tNodeElement fromNode = findSubNode(fromNodeID);\n//\t\t\tString toNodeID = edge.toNodeID;\n//\t\t\tNodeElement toNode = findSubNode(toNodeID); \n//\t\t\t\n//\t\t\tif(fromNode != null && toNode != null)\n//\t\t\t{\n//\t\t\t\tPortInfo oport = new PortInfo(edge, fromNode);\n//\t\t\t\tfromNode.addOutgoingPort(oport);\n//\t\t\t\tedge.addIncomingPort(oport);\n//\t\t\t\tPortInfo iport = new PortInfo(edge, toNode);\n//\t\t\t\ttoNode.addIncomingPort(iport);\n//\t\t\t\tedge.addOutgoingPort(iport);\n//\t\t\t}\n//\t\t}\n\t}", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "@Test\n\tpublic void testAdjacencyWalkways()\n\t{\n\t\t// Test on top edge of board, just one walkway piece\n\t\tSet<BoardCell> testList = board.getAdjList(22, 9);\n\t\tassertTrue(testList.contains(board.getCellAt(21, 9)));\n\t\tassertEquals(1, testList.size());\n\n\t\t// Test left edge of board, edge of room\n\t\ttestList = board.getAdjList(16, 0);\n\t\tassertTrue(testList.contains(board.getCellAt(17, 0)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 1)));\n\t\tassertEquals(2, testList.size());\n\n\t\t// Test on left edge of board, three walkway pieces\n\t\ttestList = board.getAdjList(6, 0);\n\t\tassertTrue(testList.contains(board.getCellAt(5, 0)));\n\t\tassertTrue(testList.contains(board.getCellAt(6, 1)));\n\t\tassertTrue(testList.contains(board.getCellAt(7, 0)));\n\t\tassertEquals(3, testList.size());\n\n\t\t// Test surrounded by 4 walkways\n\t\ttestList = board.getAdjList(16,19);\n\t\tassertTrue(testList.contains(board.getCellAt(15, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(17, 19)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 20)));\n\t\tassertTrue(testList.contains(board.getCellAt(16, 18)));\n\t\tassertEquals(4, testList.size());\n\n\t\t// Test on bottom edge of board, next to 1 room piece\n\t\ttestList = board.getAdjList(22, 15);\n\t\tassertTrue(testList.contains(board.getCellAt(21, 15)));\n\t\tassertTrue(testList.contains(board.getCellAt(22, 16)));\n\t\tassertEquals(2, testList.size());\n\n\n\t\t// Test on walkway next to door that is not in the needed\n\t\t// direction to enter\n\t\ttestList = board.getAdjList(9, 6);\n\t\tassertTrue(testList.contains(board.getCellAt(8, 6)));\n\t\tassertTrue(testList.contains(board.getCellAt(9, 7)));\n\t\tassertTrue(testList.contains(board.getCellAt(10, 6)));\n\t\tassertEquals(3, testList.size());\n\t}", "public final Set<MindObject> getComponents(){\n Set<MindObject> components = new HashSet<>();\n\n components.add(this);\n\n for (MindObject subComponent: getDirectSubComponents()){\n components.add(subComponent);\n components.addAll(subComponent.getDirectSubComponents());\n }\n\n return components;\n }", "@Test\n public void tae3()\n {\n Graph graph = new Graph(3);\n graph.addEdge(0,0);\n graph.addEdge(0,1);\n graph.addEdge(1,1);\n System.out.println(graph);\n assertEquals(graph.toString(), \"numNodes: 3\\nedges: [[true, true, false], [false, true, false], \" +\n \"[false, false, false]]\");\n }", "@Test\n public void graphfromBoggleBoard_mn() {\n Graph testgraph = new AdjacencyMatrixGraph();\n BoggleBoard board = new BoggleBoard(20,20);\n Permeate.boggleGraph(board, testgraph);\n /*System.out.println(testgraph.getVertices());\n for (Vertex vertex : testgraph.getVertices()) {\n System.out.println(vertex + \": \" + testgraph.getNeighbors(vertex));\n }*/\n }" ]
[ "0.67552066", "0.6620726", "0.6540942", "0.6509026", "0.64283943", "0.62315524", "0.5980144", "0.5909983", "0.5846662", "0.5763573", "0.5756352", "0.57287776", "0.5717743", "0.57047963", "0.5691166", "0.5622625", "0.55941814", "0.5566277", "0.55284333", "0.5518904", "0.54919416", "0.5466594", "0.5443918", "0.54204977", "0.5418418", "0.5398881", "0.5396393", "0.53715354", "0.53649867", "0.5358069", "0.53355587", "0.5289179", "0.5282526", "0.5268608", "0.5227541", "0.5220332", "0.52123713", "0.51954067", "0.51750976", "0.5166965", "0.514863", "0.51192796", "0.5118794", "0.5116344", "0.51113486", "0.5103194", "0.5087646", "0.5087318", "0.5077886", "0.50761855", "0.5056704", "0.505201", "0.50400084", "0.5035352", "0.50317705", "0.50286776", "0.5025451", "0.5021395", "0.50175154", "0.50160855", "0.49992573", "0.499531", "0.4993716", "0.4990812", "0.49903375", "0.49753878", "0.49626622", "0.49591187", "0.4956522", "0.4954052", "0.49507117", "0.49381217", "0.49378157", "0.49315384", "0.493069", "0.49241957", "0.49158472", "0.48998803", "0.48974958", "0.48970747", "0.48956215", "0.48940194", "0.48878878", "0.4884181", "0.48811758", "0.4877933", "0.48732454", "0.48673338", "0.486464", "0.48629415", "0.48625928", "0.48620254", "0.48613235", "0.48608288", "0.48606682", "0.48571092", "0.4856463", "0.4851205", "0.4843577", "0.48429874" ]
0.8467201
0
Test of giantComponent method, of class MarkovModelUtilities.
@Test public void testGiantComponent() { assertEquals(MarkovModel.util.giantComponent(P1), giant1); assertEquals(MarkovModel.util.giantComponent(P2), giant2); assertEquals(MarkovModel.util.giantComponent(P3), giant3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus();\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times getConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n public void testComponent() {\n System.out.println(\"**** component ****\");\n int v = 7;\n ConnectedComponentsDepthSearch instance = new ConnectedComponentsDepthSearch(g);\n int expResult = 1;\n int result = instance.component(v);\n assertEquals(expResult, result);\n }", "@Test\n public void testLargeSize(){\n assertEquals(25, largeMaze.size());\n }", "@Test\n\t@Ignore\n\tpublic void bigTest() throws GeoTessException, IOException\n\t{\n\t\tFile gridFile = new File(\"src/test/resources/permanent_files/geotess_grid_16000.geotess\");\n\n\t\tFile dir = new File(\"bigTest/cpp\");\n\t\tdir.mkdirs();\n\n\t\tdir = new File(\"bigTest/java\");\n\t\tdir.mkdirs();\n\n\t\t// load the grid that will be used for all models generated during this\n\t\t// test.\n\t\tGeoTessGrid grid = new GeoTessGrid()\n\t\t.loadGrid(gridFile.getCanonicalPath());\n\n\t\t// specify some radii that will be used\n\t\tfloat radiusBottom = 6000F;\n\t\tfloat radiusTop = 6300F;\n\t\tfloat[] radii = new float[] { 6000F, 6100F, 6200F, 6300F };\n\n\t\t// build an array of Profiles that are independent of any model.\n\t\t// These profiles have no Data since the data will be replaced below.\n\t\t// They just have a ProfileType and some radii.\n\t\tProfile[][] profiles = new Profile[grid.getNVertices()][1];\n\t\tfor (int vertex = 0; vertex < grid.getNVertices(); ++vertex)\n\t\t{\n\t\t\t// loop over the vertices. Get the latitude of the vertex and\n\t\t\t// determine the ProfileType based on the latitude. This will\n\t\t\t// results in 5 bands of different ProfileTypes.\n\t\t\tdouble lat = VectorGeo.getLatDegrees(grid.getVertex(vertex));\n\n\t\t\tint band = (int) Math.floor((lat + 90) / 180. * 3.999999);\n\n\t\t\tProfileType pType = ProfileType.values()[band];\n\n\t\t\tswitch (pType)\n\t\t\t{\n\t\t\t\tcase CONSTANT:\n\t\t\t\t\tprofiles[vertex][0] = new ProfileConstant(radiusBottom,\n\t\t\t\t\t\t\tradiusTop, null);\n\t\t\t\t\tbreak;\n\t\t\t\tcase EMPTY:\n\t\t\t\t\tprofiles[vertex][0] = new ProfileEmpty(radiusBottom, radiusTop);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NPOINT:\n\t\t\t\t\tprofiles[vertex][0] = new ProfileNPoint(radii, getDoubles(lat,\n\t\t\t\t\t\t\tradii.length, 1));\n\t\t\t\t\tbreak;\n\t\t\t\tcase THIN:\n\t\t\t\t\tprofiles[vertex][0] = new ProfileThin(radiusTop, null);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new GeoTessException(band\n\t\t\t\t\t\t\t+ \" is not a recognized ProfileType\");\n\t\t\t}\n\n\t\t}\n\n\t\tHashMap<String, Long> timers = new HashMap<String, Long>();\n\t\t//timers.put(\"nc\", 0L);\n\t\ttimers.put(\"ascii\", 0L);\n\t\ttimers.put(\"geotess\", 0L);\n\n\t\t// for each data type (double, float, etc) and for single values or\n\t\t// array of values\n\t\tfor (DataType dataType : DataType.values())\n\t\t\tif (dataType != DataType.CUSTOM)\n\t\t\t\tfor (int nAttributes = 1; nAttributes <= 2; ++nAttributes)\n\t\t\t\t{\n\t\t\t\t\t// figure out the file name of this test.\n\t\t\t\t\tString name = (nAttributes > 1 ? \"ArrayOf\"\n\t\t\t\t\t\t\t+ dataType.toString() + \"s\" : dataType.toString())\n\t\t\t\t\t\t\t.toLowerCase();\n\n\t\t\t\t\t//System.out.println(name);\n\n\t\t\t\t\t// set up the metadata for the model\n\t\t\t\t\tGeoTessMetaData md = new GeoTessMetaData();\n\t\t\t\t\tmd.setDescription(\"name\");\n\t\t\t\t\tmd.setLayerNames(\"testLayer\");\n\t\t\t\t\tmd.setDataType(dataType);\n\t\t\t\t\tif (nAttributes == 1)\n\t\t\t\t\t\tmd.setAttributes(\"value1\", \"na\");\n\t\t\t\t\telse\n\t\t\t\t\t\tmd.setAttributes(\"value1;value2\", \"na1;na2\");\n\t\t\t\t\tmd.setModelSoftwareVersion(\"TestAll 1.0.0\");\n\t\t\t\t\tmd.setModelGenerationDate(new Date().toString());\n\n\t\t\t\t\t// build the model with the specified DataType, single value\n\t\t\t\t\t// or array.\n\t\t\t\t\tGeoTessModel model = new GeoTessModel(grid, md);\n\n\t\t\t\t\t// Specify the Profiles in the model. These are references\n\t\t\t\t\t// to the independent Profiles defined outside this loop, \n\t\t\t\t\t// only with the Data objects replaced.\n\t\t\t\t\tfor (int vertex = 0; vertex < model.getNVertices(); ++vertex)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble[] u = model.getGrid().getVertex(vertex);\n\t\t\t\t\t\tdouble value = u[0] * u[1] * u[2];\n\t\t\t\t\t\t//value = value > 0 ? 1-value : -1-value;\n\n\t\t\t\t\t\tProfile p = profiles[vertex][0];\n\t\t\t\t\t\tswitch (dataType)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase DOUBLE:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getDoubles(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase FLOAT:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getFloats(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase LONG:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getLongs(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase INT:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getInts(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase SHORT:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getShorts(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase BYTE:\n\t\t\t\t\t\t\t\tprofiles[vertex][0].setData(getBytes(value,\n\t\t\t\t\t\t\t\t\t\tp.getNData(), nAttributes));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// set the Profile in the model to a reference to the\n\t\t\t\t\t\t// computed value.\n\t\t\t\t\t\tmodel.setProfile(vertex, 0, p);\n\t\t\t\t\t}\n\n\t\t\t\t\t// now for each output file format write the model to a\n\t\t\t\t\t// file,read in the model back in to a new model, and \n\t\t\t\t\t// compare them.\n\t\t\t\t\tfor (String frmt : new String[] { \"geotess\", \"ascii\" /*, \"nc\" */ })\n\t\t\t\t\t{\n\t\t\t\t\t\t// figure out the file name for the output file\n\t\t\t\t\t\tFile outFile = new File(dir, String.format(\"%s.%s\",\n\t\t\t\t\t\t\t\tname, frmt));\n\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// save the model to file\n\t\t\t\t\t\t\tmodel.writeModel(outFile, gridFile.getName());\n\n\t\t\t\t\t\t\tlong timer = System.nanoTime();\n\n\t\t\t\t\t\t\t// read the model back in\n\t\t\t\t\t\t\tGeoTessModel test_model = new GeoTessModel(outFile, \"../\", OptimizationType.MEMORY);\n\n\t\t\t\t\t\t\ttimer = System.nanoTime() - timer;\n\t\t\t\t\t\t\ttimers.put(frmt, timers.get(frmt) + timer);\n\n\t\t\t\t\t\t\tassertTrue(test_model.equals(model));\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (Exception e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t}", "@Test\r\n\tpublic void testLargeNumberOfPeople() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"150\"), 1000, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"2059.31\"));\r\n\t}", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(expected=IndexOutOfBoundsException.class)\n\tpublic void testCoordinatesWithTheLargeIndex()\n\t{\n\t\tData d = new Data();\n\t\t\n\t\tCoordinate c = d.getCoordinate(1000);//the index is 1000, way more than the number of pieces\n\t}", "@Test\n public void testSize(){\n assertEquals(25, largeMaze.size());\n }", "public void testSetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.setConformingStimulus(stimulus);\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times setConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n\tpublic void testNormalPuzzleGeneration() {\n\t}", "@Test\n @org.junit.Ignore\n public void shouldConstructDetachedVertex() {\n }", "@LargeTest\n public void testMandelbrot() {\n TestAction ta = new TestAction(TestName.MANDELBROT_FLOAT);\n runTest(ta, TestName.MANDELBROT_FLOAT.name());\n }", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "@Test\r\n\tpublic void testLargeNumberOfPeopleAndLargeBasePrice() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"150000\"), 2000, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"3949312.50\"));\r\n\t}", "@Override\n protected long getTestSolution() {\n return 100024;\n }", "@Test\n public void Test05() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n component.setDamage(10);\n double currentDamage = component.getDamage();\n assertTrue(currentDamage == 10);\n }", "@Test\n public void testSmallSize(){\n assertEquals(9, smallMaze.size());\n }", "@Test\n public void testWithDeadlyParams() {\n HashSet<ComplexOomage> oomages = new HashSet<ComplexOomage>();\n int N = 10000;\n ArrayList<Integer> params;\n\n for (int oom = 0; oom < N; oom += 1) {\n params = new ArrayList<Integer>(N);\n for (int i = 0; i < 10; i += 1) {\n params.add(255);\n }\n oomages.add(new ComplexOomage(params));\n }\n assertTrue(haveNiceHashCodeSpread(oomages));\n }", "private void tests(Component comp){\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - ======= Tested component=\"+comp.getClass().getName());\n \n \n testContainer(comp);\n \n /* H1 -> Hack for JLabels - JLabel isn't focusTraversable, but If we want test labelFor pointing we must have all JLabels. */\n if (testSettings.AP_noLabelFor) {\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - Label For => NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n if(comp instanceof JLabel) {\n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(Component)> - \\t -add label =\"+comp);\n \n labels.add(comp);\n }\n }\n \n /* Check Labels which have set labelFor have mnemonics */\n if ((comp instanceof JLabel) && testSettings.AP_mnemonics && testSettings.AP_m_label) {\n JLabel label = (JLabel) comp;\n int mnemonic = label.getDisplayedMnemonic();\n \n // LOG ONLY -/\n if(debugLog) System.err.print(LOG_CAPTION+\" - <tests(Component)> - \\t - label Mnemonic=\"+mnemonic+\" label.getLabelFor()=\"+label.getLabelFor()+\" label.getDisplayedMnemonic()=\"+label.getDisplayedMnemonic());\n \n Component labelF = label.getLabelFor();\n \n if (labelF != null){\n // hack for JDK1.4 or higher if((labelF.isFocusTraversable()) && (label.getDisplayedMnemonic() <= 0))\n if(testFocusability(labelF) && (mnemonic <= 0))\n noMnemonic.add(comp);\n \n if(label.isShowing())\n testMnemonics(label.getText(), mnemonic, comp);\n \n }\n }\n \n \n // Test implement Accessible\n testImplementAccessible(comp);\n \n /* Test parent (Window) although will not test non-showed or non-traversable*/\n if(!comp.equals(parent)){\n if (testSettings.AP_showingOnly && !comp.isShowing()){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_showingOnly=\"+testSettings.AP_showingOnly+\" && !!comp.isShowing()=\"+!comp.isShowing());\n return;\n }\n \n // hack for JDK 1.4 or higner if (testSettings.AP_focusTraversableOnly && !comp.isFocusTraversable()){\n if (testSettings.AP_focusTraversableOnly && !testFocusability(comp)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : testSettings.AP_focusTraversableOnly=\"+testSettings.AP_focusTraversableOnly+\" && !testFocusability(comp)=\"+!testFocusability(comp));\n return;\n }\n }\n \n /* Check if class is excluded from the test */\n String classname = comp.getClass().toString();\n if (classname.startsWith(\"class \")){\n classname = classname.substring(6);\n }\n if (excludedClasses.contains(classname)){\n if(debugLog) System.err.println(LOG_CAPTION+\" - <tests(\"+comp.getClass().getName()+\")> - NOT TESTED - because : Excluded classes contains this class.\");\n return;\n }\n \n \n // Test Accessible Name and Accessible Description\n if(comp instanceof Accessible){\n AccessibleContext comp_AC = comp.getAccessibleContext();\n \n if(comp_AC != null) {\n testAccessibleName(comp, comp_AC);\n testAccessibleDescription(comp, comp_AC);\n } else {\n noName.add(comp);\n noDesc.add(comp);\n }\n }\n \n \n // Test Label For set\n testLabelForSet(comp);\n \n // Test Buttons Mnemonics\n testButtonsMnemonics(comp);\n \n // Test Component Name\n if(testSettings.test_name){\n testComponentName(comp);\n }\n \n }", "public boolean isSuperGiant(){\r\n\t\tboolean flag = false;\r\n\t\tif ((getMass() >100) && (getSize()>100)){\r\n\t\t\tflag = true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Test\r\n public void Test010MakeLiveCellWithMoreThan20Column()\r\n {\r\n\r\n assertFalse(gol.makeLiveCell(3, 20));\r\n\r\n }", "@Test\r\n public void Test026GetTotalAliveCells()\r\n {\r\n gol.makeLiveCell(2, 5);\r\n gol.makeLiveCell(2, 6);\r\n gol.makeLiveCell(2, 7);\r\n gol.makeLiveCell(3, 5);\r\n assertEquals(4, gol.getTotalAliveCells());\r\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n\tpublic void testLargeBasePrice() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"10000000\"), 1, \"drugs\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"11413500.00\"));\r\n\t}", "@Test\n public void largePicTest() {\n // TODO: test largePic\n }", "@Override\r\n public void ontTest( OntModel m ) throws Exception {\r\n Profile prof = m.getProfile();\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n Individual y = m.createIndividual( A );\r\n Individual z = m.createIndividual( A );\r\n\r\n x.addSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be the same as y\", y, x.getSameAs() );\r\n assertTrue( \"x should be the same as y\", x.isSameAs( y ) );\r\n\r\n x.addSameAs( z );\r\n assertEquals( \"Cardinality should be 2\", 2, x.getCardinality( prof.SAME_AS() ) );\r\n iteratorTest( x.listSameAs(), new Object[] {z,y} );\r\n\r\n x.setSameAs( z );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be same indiv. as z\", z, x.getSameAs() );\r\n\r\n x.removeSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n x.removeSameAs( z );\r\n assertEquals( \"Cardinality should be 0\", 0, x.getCardinality( prof.SAME_AS() ) );\r\n }", "@Test\n public void testIndexWithMiltiComponentItem() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/C.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"C.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement gElem = sm.findByNameAndType(\"C000\", GlobalElement.class);\n assertNotNull(gElem);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n GlobalComplexType gType = sm.findByNameAndType(\"C000\", GlobalComplexType.class);\n assertNotNull(gType);\n //\n GlobalAttribute gAttr = sm.findByNameAndType(\"C000\", GlobalAttribute.class);\n assertNotNull(gAttr);\n //\n GlobalAttributeGroup gAttrGroup =\n sm.findByNameAndType(\"C000\", GlobalAttributeGroup.class);\n assertNotNull(gAttrGroup);\n //\n GlobalGroup gGroup = sm.findByNameAndType(\"C000\", GlobalGroup.class);\n assertNotNull(gGroup);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexWithMiltiComponentItem \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@Test\n public void testElementCounts() {\n assertEquals(0, model3d.getBlocks().size());\n\n assertEquals(28, model3d.getEdges().size());\n assertEquals(16, model3d.getFaces().size());\n assertEquals(14, model3d.getPoints().size());\n }", "@Test(timeout = 4000)\n public void test32() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n Capabilities capabilities0 = naiveBayesMultinomialText0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n double[] doubleArray0 = new double[7];\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(1462.22924304, doubleArray0);\n instances0.add((Instance) binarySparseInstance0);\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: IndexOutOfBoundsException\");\n \n } catch(IndexOutOfBoundsException e) {\n //\n // Index: 5, Size: 5\n //\n verifyException(\"java.util.ArrayList\", e);\n }\n }", "@Test\n public void Test12() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n ManaEffectComponent another = new ManaEffectComponent(EffectEnum.MANA_BUFF, 3, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test\n public void Test13_3() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 50);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test78() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.globalInfo();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(\"Multinomial naive bayes for text data. Operates directly (and only) on String attributes. Other types of input attributes are accepted but ignored during training and classification\", string0);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test12() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.getRevision();\n assertEquals(\"8964\", string0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\r\n public void testCreateShortestTour_idxSlightlyTooBig() {\r\n Tour tour = new Tour(new int[][]{{10, 10}, {1, 1}, {22, 22}, {3, 3}});\r\n Tour result = tour.createShortestTour(4);\r\n Tour expected = new Tour();\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "@Test\r\n public void Test008MakeLiveCell()\r\n {\r\n\r\n assertTrue(gol.makeLiveCell(3, 4));\r\n\r\n }", "@Test\n public void pictureLargeTest() {\n // TODO: test pictureLarge\n }", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>(linkedList0);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances(instances0);\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n SparseInstance sparseInstance1 = new SparseInstance((Instance) sparseInstance0);\n instances0.add((Instance) sparseInstance1);\n Discretize discretize0 = new Discretize(\"@attribute\");\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.setMakeBinary(true);\n assertTrue(discretize0.getMakeBinary());\n \n Discretize discretize1 = new Discretize();\n boolean boolean0 = discretize1.setInputFormat(instances1);\n assertFalse(boolean0);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void Test011MakeLiveCellWithMoreThan20RowColumn()\r\n {\r\n\r\n assertFalse(gol.makeLiveCell(20, 20));\r\n\r\n }", "@Test(timeout = 4000)\n public void test168() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n StringSelectModel stringSelectModel0 = new StringSelectModel();\n ElExpression elExpression0 = new ElExpression(\"P9E)sdEA%r\\\"6\");\n CheckboxGroup checkboxGroup0 = new CheckboxGroup(errorPage0, \"P9E)sdEA%r\\\"6\", \"P9E)sdEA%r\\\"6\", stringSelectModel0, elExpression0);\n Integer integer0 = new Integer((-1));\n Link link0 = new Link(checkboxGroup0, integer0);\n TableBlock tableBlock0 = new TableBlock(link0);\n Any any0 = tableBlock0.col();\n // Undeclared exception!\n try { \n any0.big((Object) link0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test(timeout = 4000)\n public void test56() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.toString();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"NaiveBayesMultinomialText: No model built yet.\\n\", string0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "void testBigBang(Tester t) {\r\n initData();\r\n FloodItWorld g = this.runGame;\r\n int worldWidth = 1000;\r\n int worldHeight = 1000;\r\n double tickRate = .012;\r\n g.bigBang(worldWidth, worldHeight, tickRate);\r\n }", "@Test(timeout = 4000)\n public void test70() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n \n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.setNormalizeDocLength(true);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n DenseInstance denseInstance0 = new DenseInstance(0);\n naiveBayesMultinomialText0.distributionForInstance(denseInstance0);\n assertTrue(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "@Test\n public void Test13_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 4, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test(timeout = 4000)\n public void test253() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.ol();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertEquals(\"Block_1\", component0.getComponentId());\n }", "public LinkedList<Integer> hasGiantConnectedComponent(Graph G)\r\n\t{\r\n\t\treturn new LinkedList<Integer>();\r\n\t}", "@Test\n\tpublic void testNoCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in nowhere near the ED\n\t\t// result has 2 different bases for the two pileups.\n\t\tString molBC2 = \"ZZZZZZZZ\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 2);\n\t\tAssert.assertEquals(new Byte((byte) 31), qualResult2.get(0));\n\t\tAssert.assertEquals(new Byte((byte) 5), qualResult2.get(1));\n\t}", "@Test\n public void testASSY1HasNoSubComponents() {\n assertThat( hasSubComponents( ASSY1_WITHOT_SUB_COMP ), is( false ) );\n }", "@Test(timeout = 4000)\n public void test44() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n boolean boolean0 = naiveBayesMultinomialText0.getNormalizeDocLength();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(boolean0);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "public void checkComponent() {\r\n Component component = ViewToEntityConverter.view2Model(view);\r\n validate(component);\r\n }", "@Test(timeout = 4000)\n public void test39() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertNull(standaloneComponent0);\n }", "@Test\n public void Test14() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertEquals(54760, component.hashCode());\n }", "public void testPaintComponent_Stress() throws Exception {\n // the test start time.\n long startTime = System.currentTimeMillis();\n\n // run the test for RUN_TIMES times.\n for (int i = 0; i < StressTestsHelper.RUN_TIMES; i++) {\n\n TestImagePrinter printer = new TestImagePrinter(\"test_files/stress_test_lifelineSegment.jpg\");\n lifelineSegment.setRenderScheme(RenderScheme.TopCoderScheme);\n lifelineSegment.setSize(100, 100);\n lifelineSegment.setShadowColor(Color.BLACK);\n lifelineSegment.setStrokeColor(Color.RED);\n lifelineSegment.setShadowLength(2);\n lifelineSegment.paintComponent(printer.initImage());\n printer.print();\n }\n // output the time used.\n long endTime = System.currentTimeMillis();\n System.out.println(\"Run \" + StressTestsHelper.RUN_TIMES + \" LifeLine#paintComponent(Graphics g) method takes \"\n + (endTime - startTime) + \"ms\");\n\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(29, 13, 1.7976931348623157E308, 1.7976931348623157E308, 1.7976931348623157E308, 0.0);\n assertEquals(\"id=29 modelOptComp: vol = N/A delta = N/A: modelPrice = N/A: pvDividend = 0.0\", string0);\n }", "@Test\n public void Test10() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n // Then test the method\n assertTrue(component.equals(another));\n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test\n public void testWidth(){\n assertEquals(5, largeMaze.width());\n }", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n ErrorPage errorPage0 = new ErrorPage();\n dynamicSelectModel0.setTopLevelComponent(errorPage0);\n StandaloneComponent standaloneComponent0 = dynamicSelectModel0.getTopLevelComponent();\n assertFalse(standaloneComponent0._isBuilt());\n }", "private void checkRep() {\n for (Ball ball : balls) {\n assert ball.getPosition().d1 >= 0\n && ball.getPosition().d1 <= WIDTH - 1;\n assert ball.getPosition().d2 >= 0\n && ball.getPosition().d2 <= HEIGHT - 1;\n }\n for (Gadget gadget : gadgets) {\n assert gadget.getPosition().d1 >= 0\n && gadget.getPosition().d1 <= WIDTH - 1;\n assert gadget.getPosition().d2 >= 0\n && gadget.getPosition().d2 <= HEIGHT - 1;\n }\n\n assert GRAVITY > 0 && MU2 > 0 && MU > 0;\n }", "@Test\n\tpublic void testIfKingIsCaptureBySpecialSquareVert()\n\t{\n\t\tData d=new Data();\n\t\td.set(0,100);\n\t\td.set(29,89);\n\t\tArrayList<Coordinate> test_arr=d.pieceLost(89);\n\t\tassertEquals(test_arr.size(),0);\n\t}", "@Test(timeout = 4000)\n public void test008() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.small();\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test\r\n public void Test009MakeLiveCellWithMoreThan20Row()\r\n {\r\n\r\n assertFalse(gol.makeLiveCell(20, 4));\r\n\r\n }", "private boolean isExplodedGraphTooBig(ProgramState programState) {\n return steps + workList.size() > MAX_STEPS / 2 && programState.constraintsSize() > 75;\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testGeneration() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader\n .getResource(\"builder/generation/testpkg/ComponentBase.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n File baseDir = parentDir.getParentFile();\n List sourceDirs = new ArrayList();\n sourceDirs.add(baseDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/generation-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/generation/goodfile.xml\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.m_leplace = (double) (-1);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test(timeout = 4000)\n public void test112() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Hidden hidden0 = new Hidden(errorPage0, \"!\", \"J]'z8)\");\n // Undeclared exception!\n try { \n hidden0.img(\"J]'z8)\", \"LhtX\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test\n public void buildNotDome() {\n nextWorkerCell.setLevel(1);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(2, nextWorkerCell.getLevel());\n }", "@Test(timeout = 4000)\n public void test09() throws Throwable {\n Discretize discretize0 = new Discretize(\"*W5D<hSCW|8@I\");\n int[] intArray0 = new int[9];\n intArray0[0] = (-1405);\n intArray0[1] = (-2938);\n intArray0[2] = (-1954);\n intArray0[3] = 9;\n intArray0[4] = 66;\n intArray0[5] = 573;\n intArray0[6] = 0;\n intArray0[7] = (-71);\n intArray0[8] = 99;\n discretize0.setAttributeIndicesArray(intArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test(timeout = 4000)\n public void test75() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.useStopListTipText();\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(\"If true, ignores all words that are on the stoplist.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"M\", \"JU_kvUQ\");\n Image image0 = new Image(checkbox0, \"JU_kvUQ\", \"JU_kvUQ\");\n Component component0 = errorPage0.code((Object) image0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickOptionComputation(29, 13, 1.7976931348623157E308, 1.7976931348623157E308, 0.0, 0.0);\n assertEquals(\"id=29 modelOptComp: vol = N/A delta = N/A: modelPrice = 0.0: pvDividend = 0.0\", string0);\n }", "@Test(timeout = 4000)\n public void test374() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n Component component0 = xmlEntityRef0.clasS((CharSequence) null);\n assertEquals(\"wheel_components_XmlEntityRef\", component0.getComponentId());\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test217() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox1 = (Checkbox)checkbox0.addInternalRenderHint(\"z%+/0u:g&ib%-bQ:\");\n assertEquals(\"Col component ca be added only to a TableBlock.\", checkbox1.getFormElementName());\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getNorm();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, double0, 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n }", "@Test\n public void buildDomeTrue() {\n nextWorkerCell.setLevel(3);\n workerHephaestus.setCurrentWorkerCell(baseWorkerCell);\n workerHephaestus.build(nextWorkerCell);\n assertEquals(4, nextWorkerCell.getLevel());\n assertTrue(nextWorkerCell.getIsOccupied());\n }", "@Test(timeout = 4000)\n public void test196() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Hidden hidden1 = (Hidden)hidden0.attribute(\"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n assertTrue(hidden1.isValid());\n }", "@DisplayName(\"Get the size and test if it is correct\")\n @Test\n public void testGetSize() {\n Assertions.assertEquals(5, graph.getNumberVertices());\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setLNorm(551.149718887);\n assertEquals(551.149718887, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test\n public void capacityTest() {\n // TODO: test capacity\n }", "@Test\n @Tag(\"bm1000\")\n public void testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n double[] doubleArray0 = new double[8];\n doubleArray0[1] = 20.0;\n SparseInstance sparseInstance0 = new SparseInstance(20.0, doubleArray0);\n instances0.add((Instance) sparseInstance0);\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 20\n //\n verifyException(\"weka.classifiers.bayes.NaiveBayesMultinomialText\", e);\n }\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testByteSizeTooBig() {\n ds.setMaxDocumentBytes(150);\n putD1();\n putD2();\n \n assertEquals(true, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n putD3();\n System.out.println(\"hey\");\n assertEquals(false, docExists(testStringNumber.STRING1));\n assertEquals(true, docExists(testStringNumber.STRING2));\n assertEquals(true, docExists(testStringNumber.STRING3));\n \n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.attributeIndicesTipText();\n assertEquals(\"Specify range of attributes to act on. This is a comma separated list of attribute indices, with \\\"first\\\" and \\\"last\\\" valid values. Specify an inclusive range with \\\"-\\\". E.g: \\\"first-3,5,6-10,last\\\".\", string0);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, double0, 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test221() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n MockDate mockDate0 = new MockDate((-800), (-800), (-707), 75, 43);\n Label label0 = new Label(errorPage0, mockDate0);\n Component component0 = label0.b();\n component0._getVisibleForm(false);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(component0._isGeneratedId());\n }", "private void d() {\n/* 287 */ int tIdx = getTileIdx();\n/* */ \n/* 289 */ if (this.e.getNumComps() < 3) {\n/* 290 */ throw new IllegalArgumentException();\n/* */ }\n/* */ \n/* 293 */ if (this.e.getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 1) || this.e\n/* 294 */ .getTileCompWidth(tIdx, 0) != this.e.getTileCompWidth(tIdx, 2) || this.e\n/* 295 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 1) || this.e\n/* 296 */ .getTileCompHeight(tIdx, 0) != this.e.getTileCompHeight(tIdx, 2)) {\n/* 297 */ throw new IllegalArgumentException(\"Can not use ICT on components with different dimensions\");\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 303 */ int[] utd = new int[this.e.getNumComps()];\n/* 304 */ for (int i = utd.length - 1; i >= 0; i--) {\n/* 305 */ utd[i] = this.e.getNomRangeBits(i);\n/* */ }\n/* 307 */ this.i = a(utd, 2, (int[])null);\n/* */ }", "@Test\n\tpublic void shouldGenerateSomeStuff() {\n\t\tString applicationName = \"cool-application-name\";\n\t\tEngagement engagement = buildSingleClusterMultiProjectEngagementNoBuildTool(applicationName);\n\t\tGson gson = new GsonBuilder().create();\n\t\tString output = gson.toJson(engagement);\n\t\tLOGGER.info(\"{}{}{}\",\"\\n\\n\", output, \"\\n\\n\");\n\t}", "public void testChangeOfSpecies() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n oManager = new GUIManager(null);\n sFileName = writeValidXMLFile();\n oManager.inputXMLParameterFile(sFileName);\n \n //Now change the species\n String[] sNewSpecies = new String[] {\n \"Species 3\",\n \"Species 2\",\n \"Species 1\",\n \"Species 4\",\n \"Species 5\",\n \"Species 6\"};\n \n oManager.getTreePopulation().setSpeciesNames(sNewSpecies);\n ManagementBehaviors oManagementBeh = oManager.getManagementBehaviors();\n ArrayList<Behavior> p_oBehs = oManagementBeh.getBehaviorByParameterFileTag(\"QualityVigorClassifier\");\n assertEquals(1, p_oBehs.size());\n QualityVigorClassifier oQual = (QualityVigorClassifier) p_oBehs.get(0);\n \n assertEquals(3, oQual.mp_oQualityVigorSizeClasses.size());\n \n QualityVigorSizeClass oClass = oQual.mp_oQualityVigorSizeClasses.get(0);\n assertEquals(10, oClass.m_fMinDbh, 0.0001);\n assertEquals(20, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.78, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.88, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.61, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.55, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(1);\n assertEquals(20, oClass.m_fMinDbh, 0.0001);\n assertEquals(30, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.33, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.81, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.64, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.32, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.69, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.33, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.58, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n \n oClass = oQual.mp_oQualityVigorSizeClasses.get(2);\n assertEquals(30, oClass.m_fMinDbh, 0.0001);\n assertEquals(40, oClass.m_fMaxDbh, 0.0001);\n \n assertEquals(0.34, ((Float)oClass.mp_fProbVigorous.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.57, ((Float)oClass.mp_fProbVigorous.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.26, ((Float)oClass.mp_fProbVigorous.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oClass.mp_fProbVigorous.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oClass.mp_fProbSawlog.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oClass.mp_fProbSawlog.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.66, ((Float)oClass.mp_fProbSawlog.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.45, ((Float)oClass.mp_fProbSawlog.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta0Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(2.35, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(2.43, ((Float)oQual.mp_fQualVigorBeta11Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-2.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.12, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.32, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.3, ((Float)oQual.mp_fQualVigorBeta12Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.13, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta13Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-1, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta14Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(-0.45, ((Float)oQual.mp_fQualVigorBeta15Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.46, ((Float)oQual.mp_fQualVigorBeta16Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.01, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.04, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta2Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.001, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta3Vig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.25, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(1.13, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(1.15, ((Float)oQual.mp_fQualVigorBeta0Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.36, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.4, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta11Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.02, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta12Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.2, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.3, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta13Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(-0.4, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta14Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(-0.2, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta2Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(10, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.1, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(30, ((Float)oQual.mp_fQualVigorBeta3Qual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.1, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.5, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsVig.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(0.9, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(1)).floatValue(), 0.0001);\n assertEquals(0.25, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(0)).floatValue(), 0.0001);\n assertEquals(0.3, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(3)).floatValue(), 0.0001);\n assertEquals(0.74, ((Float)oQual.mp_fQualVigorProbNewAdultsQual.getValue().get(4)).floatValue(), 0.0001);\n \n assertEquals(6, oQual.mp_iQualVigorDeciduous.getValue().size());\n for (int i = 0; i < oQual.mp_iQualVigorDeciduous.getValue().size(); i++)\n assertNotNull(oQual.mp_iQualVigorDeciduous.getValue().get(i));\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(1)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(0)).getValue());\n assertEquals(1, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(3)).getValue());\n assertEquals(0, ((ModelEnum)oQual.mp_iQualVigorDeciduous.getValue().get(4)).getValue());\n\n System.out.println(\"Change of species test succeeded.\");\n }\n catch (ModelException oErr) {\n fail(\"Change of species test failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n resultMatrixGnuPlot0.getStdDev(1766, 1766);\n int[] intArray0 = new int[2];\n intArray0[0] = 2;\n intArray0[1] = 2;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n resultMatrixPlainText0.setRowNameWidth(13);\n resultMatrixPlainText0.getOptions();\n assertEquals(13, resultMatrixPlainText0.getRowNameWidth());\n \n resultMatrixGnuPlot0.m_Mean = null;\n resultMatrixGnuPlot0.getColHidden(47);\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n }", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }" ]
[ "0.61025536", "0.5821381", "0.564987", "0.55952024", "0.55868876", "0.55392677", "0.5526498", "0.54585916", "0.54564625", "0.543615", "0.5392976", "0.5391787", "0.5372625", "0.53592974", "0.5339858", "0.5334331", "0.5314421", "0.5305266", "0.52997833", "0.5299271", "0.52917767", "0.5290327", "0.5282082", "0.52808225", "0.5280302", "0.5276906", "0.5259947", "0.5243499", "0.5237469", "0.52219695", "0.52056736", "0.5202833", "0.51965475", "0.5195068", "0.5193576", "0.51903737", "0.5179899", "0.5168055", "0.51523614", "0.51463085", "0.514482", "0.5139394", "0.5139098", "0.5135356", "0.5133081", "0.5132539", "0.51102525", "0.51070285", "0.51033473", "0.510205", "0.5099371", "0.5092121", "0.50903684", "0.5089993", "0.5089863", "0.50818866", "0.5078379", "0.50744444", "0.5072084", "0.50681347", "0.5064521", "0.5051564", "0.5051363", "0.5047105", "0.50460714", "0.50457007", "0.50455153", "0.5043139", "0.5040867", "0.5040008", "0.50358206", "0.50320554", "0.50318396", "0.50306475", "0.50285983", "0.50255096", "0.50254023", "0.50249857", "0.5024353", "0.5020418", "0.50199527", "0.5018777", "0.50177276", "0.50148195", "0.50133675", "0.5012961", "0.5012279", "0.5011142", "0.50083965", "0.50062793", "0.5003965", "0.5003719", "0.5000926", "0.50008243", "0.49985564", "0.49954098", "0.49880853", "0.49876902", "0.49848512", "0.4981904" ]
0.8315709
0
Test of estimateC method, of class MarkovModelUtilities.
@Test public void testEstimateC_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateC(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void test03() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[19];\n evaluation0.updateMargins(doubleArray0, 0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "double[] predictWithContextual(String testUser, OrienteeringEnvironment environment) throws IOException {\n loadData(Paths.get(this.path.toString(), \"userSequencesFile\", this.testSequenceNumber + \".txt\").toString());\r\n loadUserVisitedPOIs(Paths.get(this.path.toString(), \"userAllPOIsFile\", this.testSequenceNumber + \".txt\").toString());\r\n trainWithContextual();\r\n double[] userInt = new double[this.numOfItems];\r\n double z = 0.0;\r\n Integer[] contextPOIs = {environment.start, environment.end};\r\n double[] userContextVector = aggregate(contextPOIs, this.userMatrix[Integer.parseInt(testUser)]);\r\n for (int i = 0; i < this.itemMatrix.length; i++) {\r\n userInt[i] = multiple(userContextVector, this.itemMatrix[i])+this.itemBias[i];\r\n z += Math.exp(userInt[i]);\r\n }\r\n for (int i = 0; i < userInt.length; i++) {\r\n userInt[i] = Math.exp(userInt[i])/z;\r\n }\r\n\r\n\r\n double z2 = 0;\r\n for (int i = 0; i < this.numOfItems; i++) {\r\n if (i != environment.start && i != environment.end){\r\n for (int j = 0; j < this.itemMatrix.length; j++) {\r\n if (i != j && j != environment.start && j != environment.end) {\r\n environment.cooccurrTable[i][j] = multiple(this.itemMatrix[i], this.itemMatrix[j]);\r\n z2 += Math.exp(environment.cooccurrTable[i][j]);\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n for (int i = 0; i < this.numOfItems; i++) {\r\n if(i!=environment.start && i!=environment.end) {\r\n for (int j = 0; j < this.numOfItems; j++) {\r\n if (i != j && j != environment.start && j != environment.end) {\r\n environment.cooccurrTable[i][j] = Math.exp(environment.cooccurrTable[i][j]) / z2;;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for (int i = 0; i < userInt.length; i++) {\r\n System.out.print(\"[\"+i+\"] \"+ userInt[i]+\" \");\r\n }\r\n\r\n System.out.println();\r\n return userInt;\r\n\r\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testBackwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.backwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testGetSetTemperaturaInterior() {\n System.out.println(\"getSetTemperaturaInterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInterior(expResult);\n double result = instance.getTemperaturaInterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public int perform_GIS(int C) {\n // cerr << \"C = \" << C << endl;\n C = 1;\n // cerr << \"performing AGIS\" << endl;\n ArrayList<Double> pre_v = newArrayList(_vl.size(), 0.0); // jenia: same size as _vl's because later it can set _vl\n double pre_logl = -999999;\n for (int iter = 0; iter < 200; iter++) {\n double logl = update_model_expectation();\n // fprintf(stderr, \"iter = %2d C = %d f = %10.7f train_err = %7.5f\", iter, C, logl, _train_error);\n if (_heldout.size() > 0) {\n // double hlogl = heldout_likelihood();\n // fprintf(stderr, \" heldout_logl(err) = %f (%6.4f)\", hlogl, _heldout_error);\n }\n // cerr << endl;\n \n if (logl < pre_logl) {\n C += 1;\n _vl = pre_v;\n iter--;\n continue;\n }\n \n if (C > 1 && iter % 10 == 0) C--;\n \n pre_logl = logl;\n pre_v = _vl; // TODO jenia this doesn't have any effect\n assert (_vl.size() >= _fb.Size());\n for (int i = 0; i < _fb.Size(); i++) {\n double coef = _vee.get(i) / _vme.get(i);\n plusEq(_vl, i, log(coef) / C);\n }\n }\n // cerr << endl;\n return 0; // jenia: the original didn't return anything explicitly\n }", "@Test\n public void testVirement3() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(0.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 8000.0;\n double excepted_solde_cpt1 = 0.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Override\n\tpublic double[][] calc() {\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\n\t\t\t\tthis.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length];\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (this.det != 0) {\t//if determinant is not 0.\n\t\t\t\n\t\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\t\n\t\t\t\t\n\t\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tthis.cT = new double[this.singleMatrix.length][this.singleMatrix[i].length];\t//declare the size of co-factor matrix transposed\n\n\t\t\t\t\tthis.cT[i][j] = this.coFactor[j][i];\t//the rows of cT = the cols of coFactor matrix. the cols of cT = the rows of coFactor matrix\n\t\t\t\t\t\n\t\t\t\t\t/* # you might want to initialize this.inverse and calculate right after the above cT calculation done as follow,\n\t\t\t\t\t \n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \t- this.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length]; -\n\t\t\t\t\t \t- this.inverse[i][j] = 1 / this.det * this.cT[i][j]; -\n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \n\t\t\t\t\t technically, it's not really a problem when it comes to initializing one more variable in the same loop.\n\t\t\t\t\t however, this specific situation, that three variables (coFacotr, cT and inverse) and their values are involved in, occurs an unexpected result which is still not an error.\n\t\t\t\t\t \n\t\t\t\t\t this.coFactor is done in a loop in initializing and calculating \n\t\t\t\t\t this.cT and this.inverse are done in a loop in initializing and calculating\n\t\t\t\t\t \n\t\t\t\t\t # thus, calculation goes as it goes and this.inverse will be kept initializing until the loop ends.\n\t\t\t\t\t this.inverse will then always & only store its running value at a current location depending on increment of i and j.\n\t\t\t\t\t you will see only one result at the last index and won't see all the values stored correctly.\n\t\t\t\t\t (all of the values will be zero except the last value at the last index)\n\t\t\t\t\t \n\t\t\t\t\t # one simple solution is to initialize and calculate a variable -inverse in this case- in a separate for-loop\n\t\t\t\t\t \n\t\t\t\t\t */\n\n\t\t\t\t\t//calculate inverse here but initialize it in another for-loop\n\t\t\t\t\tthis.inverse[i][j] = 1 / this.det * this.cT[i][j]; //formula: A-1 = 1 / det * cT\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}else {\t//det is 0\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe matrix is a singular. singular matrices can not have inverses.\");\n\t\t}\n\t\t\n\t\t//print\n\t\tSystem.out.println(\"\\nInverse of the current matrix is: \");\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t \t\t\n\t\t\t\tSystem.out.print(String.format(\"%.2f\", this.inverse[i][j]) + \" \");\t//display the result with a space between value representing as two decimal point\n//\t\t\t\tSystem.out.print(this.inverse[i][j] + \" \");\t//display the result with a space between value representing as two decimal point\n\t\t\t}\n\t\tSystem.out.println();\t//a new line for the next row and cols\n\t\t}\n\t\t\n\t\treturn inverse;\t//return the value of inverse\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testCase3(){\n\t\t\n\t\tmastercard mc1 = new mastercard(\"Mastercard\", 100);\n\t\tvisa visa1 = new visa(\"Visa\", 100);\n\t\t\n\t\tdouble mcInterest1 = mc1.simpleInterest(mc1.getBalance(), mc1.getInterestRate());\n\t\tdouble visaInterest1 = visa1.simpleInterest(visa1.getBalance(), visa1.getInterestRate());\n\t\t\n\t\t\tassertEquals(15, mcInterest1+visaInterest1, DELTA);\n\t\t\n\t\tvisa visa2 = new visa(\"Visa\", 100);\n\t\tmastercard mc2 = new mastercard(\"Mastercard\", 100);\n\t\n\t\tdouble mcInterest2 = mc2.simpleInterest(mc2.getBalance(), mc2.getInterestRate());\n\t\tdouble visaInterest2 = visa2.simpleInterest(visa2.getBalance(), visa2.getInterestRate());\n\t\t\t\n\t\tassertEquals(15, mcInterest2+visaInterest2, DELTA);\n\t}", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetSetTemperaturaExteriorMinima() {\n System.out.println(\"getSetTemperaturaExteriorMinima\");\n double expResult = 10.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMinima(expResult);\n double result = instance.getTemperaturaExteriorMinima();\n assertEquals(expResult, result, 0.0);\n }", "static void playC45() throws IOException {\n\t\tRealVector[] data = NNDataset.getData(NNDataset.HOME);\n\t\tRealVector[] label = NNDataset.getLabel(NNDataset.HOME);\n\t\tRealMatrix d = MatrixUtils.createRealMatrix(data.length, data[0].getDimension());\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\td.setRowVector(i, data[i]);\n\t\t}\n\t\td = d.transpose(); // data = column vector\n\n\t\tRealVector l = MatrixUtils.createRealVector(new double[label.length]);\n\t\tfor (int i = 0; i < l.getDimension(); i++) {\n\t\t\tl.setEntry(i, label[i].getEntry(0));\n\t\t}\n\n\t\tDecisionNode root = training(d, l);\n\t\tString[] header = NNDataset.getHeader(NNDataset.HOME);\n\t\tprintTree(root, header);\n\n\t\tInteger lb = predict(root, data[0]);\n\t\tSystem.out.println(lb);\n\n\t\tdouble ok = MSE(root, data, label);\n\t\tSystem.out.println(\"total hit: \" + ok);\n\t}", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetTemperaturaInteriorAlvo() {\n System.out.println(\"getSetTemperaturaInteriorAlvo\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInteriorAlvo(expResult);\n double result = instance.getTemperaturaInteriorAlvo();\n assertEquals(expResult, result, 0.0);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }", "@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "@Test\n public void testVirement1() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 28000.0;\n double excepted_solde_cpt1 = 35000.0;\n double excepted_solde_cpt2 = 71000.0;\n\n //Act\n assertEquals(true, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_C() {\n CuteNetlibCase.doTest(\"CRE-C.SIF\", \"2.996133067602781E7\", \"2.996133067602781E7\", NumberContext.of(7, 4));\n }", "@Test\n public void testGetSetTemperaturaExterior() {\n System.out.println(\"getSetTemperaturaExterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExterior(expResult);\n double result = instance.getTemperaturaExterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "@Test\n\tpublic void testGetConsensus() {\n\t\tint[][] profile = {\n\t\t/* A */{ 2, 0, 0, 0, 9, 0, 2, 2, 0 },\n\t\t/* C */{ 1, 1, 1, 1, 0, 0, 2, 2, 0 },\n\t\t/* G */{ 1, 2, 0, 2, 0, 0, 2, 2, 0 },\n\t\t/* T */{ 1, 0, 0, 3, 0, 0, 2, 2, 0 }};\n\t\tint[] c = testme1.getConsensus(profile);\n\t\tassertEquals(1, c[0]);\n\t\tassertEquals(3, c[1]);\n\t\tassertEquals(2, c[2]);\n\t\tassertEquals(4, c[3]);\n\t\tassertEquals(1, c[4]);\n\t}", "private Matriks MatriksCofactor(Matriks M){\r\n\t\tMatriks Mcofactor = new Matriks(BrsEff, KolEff);\r\n\t\tfor(int i=0; i<BrsEff; i++){\r\n\t\t\tfor(int j=0;j<KolEff; j++){\r\n\t\t\t\tMatriks temp = M.Cofactor(M,i,j);\r\n\t\t\t\tMcofactor.Elmt[i][j] = temp.DetCofactor(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mcofactor;\r\n\t}", "@Test\n\tpublic void testGetterCoefficient() {\n\t\tf.ajouterMatiere(\"Français\", 3);\n\t\tf.ajouterMatiere(\"Mathématiques\", 5);\n\t\t\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 3\", 3, f.getCoefficient(\"Français\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 5, f.getCoefficient(\"Mathématiques\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 0, f.getCoefficient(\"Maths\"), 5);\n\t}", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.matthewsCorrelationCoefficient((-2935));\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int[][] intArray0 = new int[0][1];\n // Undeclared exception!\n try { \n resultMatrixLatex0.setSummary((int[][]) null, (int[][]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "public static final void testAnnuity (\n double C,\n double r,\n double T )\n //////////////////////////////////////////////////////////////////////\n {\n double FV = futureValueAnnuity ( C, r, T );\n System.out.println ( FV );\n System.out.println ( presentValue ( FV, r, T ) );\n System.out.println ( presentValueAnnuity ( C, r, T ) );\n double [ ] c = new double [ ( int ) T ];\n for ( int i = 0; i < T; i++ ) c [ i ] = C;\n System.out.println ( presentValue ( c, r ) );\n }", "@Test\r\n\tpublic void testGetCMLVector3() {\r\n\t\tCMLVector3 v = lattice1.getCMLVector3(0);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\",\r\n\t\t\t\tnew double[] { 10.0, 6.0, 4.0 }, v, EPS);\r\n\t\tv = lattice1.getCMLVector3(1);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\",\r\n\t\t\t\tnew double[] { 7.0, 11.0, 5.0 }, v, EPS);\r\n\t\tv = lattice1.getCMLVector3(2);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\", new double[] { 6.8, -4.0,\r\n\t\t\t\t-9.0 }, v, EPS);\r\n\t}", "@Test\n public void test38() throws Throwable {\n String[] stringArray0 = new String[9];\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n Capabilities capabilities0 = costSensitiveClassifier0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate(\"um.#R$qWe&4`>*V\");\n Evaluation evaluation0 = new Evaluation(instances0);\n try {\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) costSensitiveClassifier0, instances0, (Object[]) stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n }\n }", "@Test\n public void presentValueCurveSensitivity() {\n final MultipleCurrencyParameterSensitivity pvpsDepositExact = PSC.calculateSensitivity(CPN_ON_COMPOUNDED, MULTICURVES,\n MULTICURVES.getAllNames());\n final MultipleCurrencyParameterSensitivity pvpsDepositFD = PSC_DSC_FD.calculateSensitivity(CPN_ON_COMPOUNDED, MULTICURVES);\n AssertSensitivityObjects.assertEquals(\"CouponONCompoundedDiscountingMethod: presentValueCurveSensitivity \", pvpsDepositExact,\n pvpsDepositFD, TOLERANCE_PV_DELTA);\n }", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess3() {\n\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B17DCCN123\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString tktMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Toán kinh tế\")) {\n\t\t\t\ttktMark = result.getMarkToChar();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\ttktMark.equals(\"C\") && \n\t\t\t\tpassedCreditsTillNow == 18 && \n\t\t\t\tdf.format(gpaTillNow).equals(\"3.19\")\n\t\t\t\t);\n\t}", "@Test\n public void testVerser1() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(5000.0);\n double montant_a_verser = 1000.0;\n double excepted = 6000.0;\n\n //Act\n assertEquals(true, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n }", "@Test\n public void test28() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n CostMatrix costMatrix0 = costSensitiveClassifier0.getCostMatrix();\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0, costMatrix0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Cost matrix not compatible with data!\n //\n }\n }", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.matthewsCorrelationCoefficient(5);\n assertEquals(0.0, double0, 0.01);\n }", "public static double calcDiscrim( double coef_A, double coef_B, double coef_C )\r\n {\n return 0;\r\n }", "@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }", "@Test\n public void test_0040() {\n AutoCovariance instance = new AutoCovariance(\n new ARIMAModel(new double[]{0.3, -0.2, 0.05, 0.04}, 0, new double[]{0.2, 0.5}),\n 1, 10);\n\n assertEquals(1.461338, instance.evaluate(0), 1e-5);\n assertEquals(0.764270, instance.evaluate(1), 1e-5);\n assertEquals(0.495028, instance.evaluate(2), 1e-5);\n assertEquals(0.099292, instance.evaluate(3), 1e-5);\n assertEquals(0.027449, instance.evaluate(4), 1e-5);\n assertEquals(0.043699, instance.evaluate(5), 1e-5);\n assertEquals(0.032385, instance.evaluate(6), 1e-5);\n assertEquals(0.006320, instance.evaluate(7), 1e-5);\n assertEquals(-0.001298186, instance.evaluate(8), 1e-5);\n assertEquals(0.001713744, instance.evaluate(9), 1e-5);\n assertEquals(0.002385183, instance.evaluate(10), 1e-5);\n }", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "@Test\n public void testAnalyseConcealed() {\n System.out.println(\"analyse (hidden case)\");\n\n // Setup test objects\n Environment env = new Environment(new RigidBody(0, 0, 500, 500));\n Collection<Robot> robots = new LinkedList<Robot>();\n Collection<Cup> things = new LinkedList<Cup>();\n\n // Make an impassable rectangle\n RigidBody shape = new RigidBody(0, 25, 20, 15);\n\n env.createNewImpassableTerrain(shape);\n\n // Put a cup on the far side of the rectangle\n things.add(new Cup(10, 60, false));\n\n // Make a robot to hold the sensor and put it on the close side of the rectangle\n SensorTestingRobot robot = new SensorTestingRobot(0, new XPoint(10, 10), 0);\n\n // Set the parameters of the sensor\n double offsetAngle = 0;\n double max = 500;\n\n // Make the sensor\n CupSensor instance = new CupSensor(offsetAngle, max);\n\n instance.setObject(robot);\n\n // Look for cup\n instance.analyse(env, robots, things);\n\n // The cup should not be seen\n assertEquals(false, instance.getOutput());\n }", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "public void calculate() {\n taskC();\n }", "@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testFingerprintCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.fingerprintCorrelation(M, observable1, observable2);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void controlPointsChanged(List<Coordinates> lcp) {\n // sort the control points by x position.\n // this makes things easier later when we paint the function.\n lcp.sort(\n (point1,point2) -> Integer.compare(point1.getX(),point2.getX())\n );\n\n // collect the points in an array before doing the calculations.\n // again, this makes things easier for us.\n controlPoints=lcp.toArray(new Coordinates[0]);\n n=controlPoints.length;\n if(n<2) {\n // nothing to do here\n return;\n }\n double []X = new double[n];\n double []Y = new double[n];\n for(int i =0;i<n;i++){\n \tX[i]=controlPoints[i].getX();\n \tY[i]=controlPoints[i].getY();\n }\n // Construct the linear system S*C=T with n-2 equations.\n // The matrix S contains the left hand side of the equations on slide 13.\n // The matrix Z contains the right hand side of the equations on slide 13.\n double[][] S=new double[n-2][n-2];\n double[] Z=new double[n-2];\n \n // Fill the matrix S and the vector Z and solve S*C=T to get c_2 to c_{n-1}.\n for(int i = 0; i< n-3;i++){\n \tS[i][i]=2*delta(X,i+1,0);\n \tS[i+1][i]=delta(X,i+2,-1);\n \tS[i][i+1]=delta(X,i+1,1);\n \tZ[i]=z(Y,X,i);\n }\n S[n-2][n-2]=2*delta(X,n-1,0);\n \n C= EliminationGaussLegendre.solve(S, Z);\n \n // Calculate the n-1 coefficients b_i and d_i.\n // Note that you need all c_i here (but you know that c_1 and c_n are zero).\n //a_i = y_i;\n for(int i=1 ; i<n ; i++){\n \tD[i-1]=d(Y,X,i-1);\n \tB[i-1]=b(Y,C,X,i-1);\n }\n \n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n int[] intArray0 = new int[2];\n intArray0[0] = 0;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(166, 0);\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(166, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(166, resultMatrixSignificance0.getColCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n int int0 = ResultMatrix.SIGNIFICANCE_LOSS;\n assertEquals(2, int0);\n \n int int1 = resultMatrixSignificance0.getDefaultRowNameWidth();\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(166, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(166, resultMatrixSignificance0.getColCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(40, int1);\n assertFalse(int1 == int0);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test200() throws Throwable {\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n Vector<Integer> vector0 = new Vector<Integer>();\n vector0.add((Integer) 0);\n resultMatrixSignificance0.getDefaultMeanWidth();\n resultMatrixSignificance0.getRevision();\n int int0 = resultMatrixSignificance0.getVisibleRowCount();\n assertEquals(1, int0);\n \n int[] intArray0 = new int[3];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 0;\n resultMatrixSignificance0.m_RowOrder = intArray0;\n resultMatrixSignificance0.getSignificance(0, 322);\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n }", "public abstract double test(ClassifierData<U> testData);", "public double getC() {\n return c;\n }", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n final public void computeTransform()\n {\n // PCA\n IDoubleArray Cov = moments.getCov();\n IEigenvalueDecomposition evd = alg.evd(Cov);\n IDoubleArray evalPCA = evd.getEvalNorm();\n IDoubleArray evecPCA = evd.getRightEigenvectorMatrix().viewReal();\n \n // normalize principal components\n IDoubleArray S = doublesNew.array(evalPCA.size());\n for (int i=0; i<S.size(); i++)\n S.set(i, 1.0*Math.sqrt(evalPCA.get(i)));\n // normalize weights by dividing by the standard deviation of the pcs \n IDoubleArray evecPCAscaled = alg.product(evecPCA, doublesNew.diag(S));\n\n // time-lagged covariance matrix\n this.CovTauSym = moments.getCovLagged();\n // symmetrize\n CovTauSym = alg.addWeightedToNew(0.5, CovTauSym, 0.5, alg.transposeToNew(CovTauSym)); // symmetrize\n\n // TICA weights\n IDoubleArray pcCovTau = alg.product(alg.product(alg.transposeToNew(evecPCAscaled), CovTauSym), evecPCAscaled);\n\n IEigenvalueDecomposition evd2 = alg.evd(pcCovTau);\n this.evalTICA = evd2.getEvalNorm();\n this.evecTICA = alg.product(evecPCAscaled, evd2.getRightEigenvectorMatrix().viewReal()); \n }" ]
[ "0.7009995", "0.63965464", "0.6255407", "0.6167512", "0.6111849", "0.5991579", "0.5817513", "0.5549115", "0.5527761", "0.54302907", "0.53835", "0.5354121", "0.52574354", "0.525396", "0.52325606", "0.51910627", "0.5172708", "0.5146926", "0.5145967", "0.5142142", "0.51306146", "0.5108248", "0.5102459", "0.507226", "0.50460106", "0.50446045", "0.5030283", "0.5008383", "0.50076956", "0.49717087", "0.4933408", "0.49306482", "0.49192885", "0.49155518", "0.49152216", "0.49038807", "0.49016747", "0.4892713", "0.48820472", "0.4881788", "0.48762915", "0.48711798", "0.48554465", "0.48521626", "0.4850632", "0.4843764", "0.48307112", "0.4830547", "0.48244756", "0.4816695", "0.48113602", "0.47961769", "0.47904325", "0.4767839", "0.47659913", "0.47604963", "0.47514555", "0.47454318", "0.47438106", "0.47433287", "0.47405672", "0.4736013", "0.47245294", "0.47158295", "0.47121447", "0.47069484", "0.47022104", "0.4697871", "0.46879554", "0.46761036", "0.46734613", "0.46709594", "0.4662493", "0.46583313", "0.46519482", "0.46486762", "0.4647999", "0.46459895", "0.46368426", "0.46356428", "0.46344277", "0.46338898", "0.46281207", "0.46280283", "0.46242303", "0.46235356", "0.46226686", "0.46206486", "0.46161076", "0.46155012", "0.46145502", "0.46128443", "0.4610988", "0.46104383", "0.46075103", "0.4606365", "0.45983478", "0.45952788", "0.45942888", "0.4592938" ]
0.703813
0
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_3args_1() { Iterable<IIntArray> trajs = null; Iterable<IIntArray> cores = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public void kolmogorovSmirnovTest(double cutoff, MWBMatchingAlgorithm mwbm) {\n double p = 0;\n\n KolmogorovSmirnovTest t = new KolmogorovSmirnovTest();\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexs in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // this may invoke exactP on small sample sizes which will not terminate in all\n // cases\n // p = t.kolmogorovSmirnovTest(this.train_values.get(i),\n // this.test_values.get(j), false);\n\n // this uses approximateP everytime\n p = t.approximateP(\n t.kolmogorovSmirnovStatistic(this.train_values.get(i),\n this.test_values.get(j)),\n this.train_values.get(i).length,\n this.test_values.get(j).length);\n if (p > cutoff) {\n mwbm.setWeight(i, j, p);\n }\n }\n }\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMMI() {\n System.out.println(\"MMI\");\n int a = 0;\n int m = 0;\n int expResult = 0;\n int result = utilsHill.MMI(a, m);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testJuvenilesSpreadFromCellsWithCorrespondingMatureLctFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(3, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 6);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 9);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 3);\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n discretize0.binsTipText();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning(25);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetImportanceStats() {\n System.out.println(\"getImportanceStats\");\n MDA instance = new MDA();\n\n // make the circles close to force tree to do lots of splits / make it harder\n ClassificationDataSet train = getHarderC(10000, RandomUtil.getRandom());\n int good_featres = 2;\n\n DecisionTree tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n double[] importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n // categorical features, make space wider b/c we lose resolution\n train = getHarderC(10000, RandomUtil.getRandom());\n\n train.applyTransform(new NumericalToHistogram(train, 7));\n tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Before\n\tpublic void iniciaDisciplinaConvencional() {\n\t\tList<String> pos = new ArrayList<String>();\n\t\tList<String> pos1 = new ArrayList<String>();\n\t\tpos1.add(\"Disciplina 3\");\n\t\tpos1.add(\"Disciplina 4\");\n\t\tpos1.add(\"Disciplina 5\");\n\n\t\tminitElimBai_1 = new MinitestesEliminandoBaixa(\"Disciplina 1\", 5, pos,\n\t\t\t\t1);\n\t\tminitElimBai_2 = new MinitestesEliminandoBaixa(\"Disciplina 2\", 10,\n\t\t\t\tpos1, 2);\n\t}", "@Test\n public void test13() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 1));\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testLargeValues() {\n double x = 123;\n double dof = 6.4;\n double nonCent = 100.34;\n NonCentralChiSquaredDistribution dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.7930769).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 455.038;\n dof = 12;\n nonCent = 444.44;\n\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.4961805).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 999400;\n dof = 500;\n nonCent = 1000000;\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.2913029).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n\tpublic void testCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in that's within ed=1 and incorporates an error.\n\t\t// result has only a single base because two UMIs are merged.\n\t\tString molBC2 = \"AGGGGCTC\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 1);\n\t\tAssert.assertEquals(new Byte((byte) 8), qualResult2.get(0));\n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void percentiles(double cutoff, MWBMatchingAlgorithm mwbm) {\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexes in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // get percentiles\n double trainvals[] = this.train_values.get(i);\n double testvals[] = this.test_values.get(j);\n\n Arrays.sort(trainvals);\n Arrays.sort(testvals);\n\n // percentiles\n double train_p;\n double test_p;\n double score = 0.0;\n for (int p = 1; p <= 9; p++) {\n train_p = trainvals[(int) Math.ceil(trainvals.length * (p / 100))];\n test_p = testvals[(int) Math.ceil(testvals.length * (p / 100))];\n\n if (train_p > test_p) {\n score += test_p / train_p;\n }\n else {\n score += train_p / test_p;\n }\n }\n\n if (score > cutoff) {\n mwbm.setWeight(i, j, score);\n }\n }\n }\n }", "public double[] monteCarloPercentiles(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesPercentiles;\n }", "@Test\n public void test10() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 3));\n }", "@Test\n public void testMesurerDistanceCoordonnees() {\n System.out.println(\"MesurerDistanceCoordonnees\");\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = 0.0;\n double expResult = 0.0;\n double result = Utils.MesurerDistanceCoordonnees(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n\tpublic void evalCrispDistanceWithCrisp1(){\n\t\tFuzzySet res = (CrispSet)cs1.distance(cs2);\n\t\tassertTrue(res instanceof CrispSet);\n\t\tCrispSet resCrisp = (CrispSet)res;\n\t\t//Puntos limite\t\t\n\t\tassertTrue(resCrisp.getLeftBoundary()==3);\n\t\tassertTrue(resCrisp.getRightBoundary()==6);\n\t\t//Valores extremos\n\t\tassertTrue(resCrisp.getMembershipValue(0)==0);\n\t\tassertTrue(resCrisp.getMembershipValue(3)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4.5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6.01)==0);\n\t}", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "public int getCostPerMile() {\n return costPerMile;\n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "@Test\n public void testGetProjectileSpeedMultiplier() {\n assertEquals(1.3, proj.getProjectileSpeedMultiplier(), 0.001);\n }", "public void testConcurrency() throws InterruptedException {\n initCache();\n\n final ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n final ArrayList<Integer> test = new ArrayList<Integer>();\n final LinkedBlockingQueue<Integer> idxs = new LinkedBlockingQueue<Integer>();\n\n Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n\n for (int i = 0; i < 30000; i++) {\n wcos.add(getDefaultWMSCacheObject(\"q\" + i, 50, true));\n test.add(-1);\n idxs.put(i);\n\n //put and get task\n tasks.add(new Callable<Integer>() {\n\n public Integer call() throws Exception {\n //put\n int i = idxs.take();\n boolean ok = wmsCache.put(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1, wcos.get(i));\n\n //get\n if (ok) {\n WMSTile wco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (wco.getCached()) {\n if (compareWMSObjects(wco, wcos.get(i))) {\n test.set(i, 1);\n } else {\n test.set(i, 0);\n }\n }\n }\n return i;\n }\n });\n }\n ExecutorService executorService = Executors.newFixedThreadPool(100);\n executorService.invokeAll(tasks);\n\n //test cache cleaner operated correctly\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test for presence of invalid test comparisons\n int invalid = 0;\n int valid = 0;\n for (int i = 0; i < test.size(); i++) {\n if (test.get(i) == 0) {\n invalid++;\n } else if (test.get(i) == 1) {\n valid++;\n }\n }\n assertTrue(valid > 0);\n assertTrue(invalid == 0);\n }", "@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tcompute(\"12-10-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"10-09-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"11-08-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"03-05-17\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"09-03-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"01-02-17\",\"[email protected]\", null, 22,20);\r\n\t}", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\r\n //assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testNumCellsColonisedFromOutsideGrid() {\n CompletelySpatiallyRandomParams params1 = new CompletelySpatiallyRandomParams(0.1, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params1);\n assertEquals(1, coloniser.getNumCellsColonisedFromOutsideGrid());\n\n // if baseRate = 0.5 then 9 * 0.5 = 4.5 ~ 5 cells colonised from outside grid\n CompletelySpatiallyRandomParams params2 = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params2);\n assertEquals(5, coloniser.getNumCellsColonisedFromOutsideGrid());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[1];\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n double[] doubleArray0 = new double[7];\n doubleArray0[0] = (double) 0;\n doubleArray0[1] = (double) 2;\n doubleArray0[2] = (double) 0;\n doubleArray0[3] = (double) 1;\n doubleArray0[4] = (double) 2;\n doubleArray0[5] = (double) 0;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex(resultMatrixPlainText0);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n String string0 = resultMatrixPlainText0.getSummaryTitle(216);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"i\", string0);\n \n int[][] intArray1 = new int[8][0];\n intArray1[0] = intArray0;\n intArray1[1] = intArray0;\n intArray1[2] = intArray0;\n intArray1[3] = intArray0;\n intArray1[4] = intArray0;\n intArray1[5] = intArray0;\n intArray1[6] = intArray0;\n intArray1[7] = intArray0;\n resultMatrixLatex0.setSummary(intArray1, intArray1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(8, intArray1.length);\n \n ResultMatrixCSV resultMatrixCSV1 = new ResultMatrixCSV();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(resultMatrixCSV1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n int[] intArray2 = resultMatrixCSV1.getColOrder();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNull(intArray2);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n boolean boolean0 = resultMatrixLatex0.getDefaultPrintColNames();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(boolean0);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance(resultMatrixSignificance0);\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n String string1 = resultMatrixCSV1.toStringSummary();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(string1);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"-summary data not set-\", string1);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n assertFalse(string1.equals((Object)string0));\n \n boolean boolean1 = resultMatrixPlainText0.isRowName(1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int0 = resultMatrixLatex0.getDefaultColNameWidth();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, int0);\n }", "int getN_estimators();", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(resultMatrixCSV0);\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[0][9];\n // Undeclared exception!\n try { \n resultMatrixCSV0.setSummary(intArray0, intArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "@Test\r\n\tpublic void testGetReducedCell() {\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 10., 6., 4. }, lattice1\r\n\t\t\t\t.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 12.328828005937952, lattice1.getCMLVector3(\r\n\t\t\t\t0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 7., 11., 5. }, lattice1\r\n\t\t\t\t.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 13.96424004376894, lattice1\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 6.8, -4., -9. },\r\n\t\t\t\tlattice1.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 11.968291440301744, lattice1.getCMLVector3(\r\n\t\t\t\t2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", -619.2, lattice1.getVolume(), EPS);\r\n\t\tdouble[] params = lattice1.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] {\r\n\t\t\t\t12.328828005937952, 13.96424004376894, 11.968291440301744,\r\n\t\t\t\t104.34229064539636, 86.89206686722031, 25.025508299339933 },\r\n\t\t\t\tparams, EPS);\r\n\r\n\t\tCMLLattice reducedLattice = lattice1.getReducedCell();\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 3.0, -5.0, -1.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 5.916079783099616, reducedLattice\r\n\t\t\t\t.getCMLVector3(0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 3.8, 1.0, -8.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 8.912911982062877, reducedLattice\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 10.0, 6.0, 4.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 12.328828005937952, reducedLattice\r\n\t\t\t\t.getCMLVector3(2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", 619.2, reducedLattice.getVolume(), EPS);\r\n\t\tparams = reducedLattice.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] { 5.916079783099616,\r\n\t\t\t\t8.912911982062877, 12.328828005937952, 83.73054962879554,\r\n\t\t\t\t93.14372638090103, 74.15166267765416 }, params, EPS);\r\n\r\n\t}", "public double[] jacobi_iter(double[] x, double tolerance, int M) {\n double[][] sContent = {{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}};\n Matrix s = new Matrix(sContent);\n\n double[][] tContent = {{0, -0.5, -0.33333333}, {-0.5, 0, -0.25}, {-0.3333333333, -0.25, 0}};\n Matrix t = new Matrix(tContent);\n\n //keep track of the number of iterations\n\n int counter = 0;\n double tol = 10000; //initial\n double[] tempXVector;\n Matrix firstFirst;\n double[] firstPart; //s^-1(-T)(Xn)\n double[] secondPart; //s^-1(b)\n String output = \"\";\n\n double tempXVectorNorm;\n double xVectorNorm;\n\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"x(0): \" + output);\n while (tol > tolerance && counter < M) {\n //perform the jacobi iterations\n firstFirst = s.multiply(t);\n firstPart = Matrix.matrixVectorMultiply(firstFirst, x);\n secondPart = Matrix.matrixVectorMultiply(s, bVector);\n tempXVector = Matrix.plus(firstPart, secondPart);\n\n //find norm of vectors and then subtract the\n tempXVectorNorm = Matrix.norm(tempXVector);\n xVectorNorm = Matrix.norm(x);\n tol = tempXVectorNorm - xVectorNorm;\n tol = Math.abs(tol);\n counter++;\n numOfIterations++;\n x = tempXVector;\n }\n\n output = \"\";\n if (counter == M) {\n System.out.println(\"Jacobi Output for x(N): null\");\n System.out.println(\"Too many iterations without reaching a accurate answer.\");\n return null;\n }\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"Jacobi Output for x(N): \" + output);\n System.out.println(\"Number of Iterations using Jacobi Algorithm: \" + counter + \"\\n\");\n return x;\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Before\n public void setup() {\n threeByTwo = new Matrix(new int[][] {{1, 2, 3}, {2, 5, 6}});\n compareTwoByThree = new Matrix(new int[][] {{1, 42, 32}, {2, 15, 65}});\n oneByOne = new Matrix(new int[][] {{4}});\n rightOneByOne = new Matrix(new int[][] {{8}});\n twoByFour = new Matrix(new int[][] {{1, 2, 3, 4}, {2, 5, 6, 8}});\n twoByThree = new Matrix(new int[][] {{4, 5}, {3, 2}, {1, 1}});\n threeByThree = new Matrix(new int[][] {{4, 5, 6}, {3, 2, 0}, {1, 1, 1}});\n rightThreeByThree = new Matrix(new int[][] {{1, 2, 3}, {5, 2, 0}, {1, 1, 1}});\n emptyMatrix = new Matrix(new int[0][0]);\n // this is the known correct result of multiplying M1 by M2\n twoByTwoResult = new Matrix(new int[][] {{13, 12}, {29, 26}});\n threeByThreeResult = new Matrix(new int[][] {{35, 24, 18}, {13, 10, 9}, {7, 5, 4}});\n oneByOneSum = new Matrix(new int[][] {{12}});\n oneByOneProduct = new Matrix(new int[][] {{32}});\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void testNoCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in nowhere near the ED\n\t\t// result has 2 different bases for the two pileups.\n\t\tString molBC2 = \"ZZZZZZZZ\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 2);\n\t\tAssert.assertEquals(new Byte((byte) 31), qualResult2.get(0));\n\t\tAssert.assertEquals(new Byte((byte) 5), qualResult2.get(1));\n\t}", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testQuantile() {\n System.out.println(\"quantile\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0, instance.quantile(0), 1E-7);\n assertEquals(0, instance.quantile(0.001), 1E-7);\n assertEquals(0, instance.quantile(0.01), 1E-7);\n assertEquals(2, instance.quantile(0.1), 1E-7);\n assertEquals(3, instance.quantile(0.2), 1E-7);\n assertEquals(13, instance.quantile(0.9), 1E-7);\n assertEquals(22, instance.quantile(0.99), 1E-7);\n assertEquals(30, instance.quantile(0.999), 1E-7);\n }", "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus();\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times getConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test\n void checkChangeImage() {\n ImageViewModel imageModel = new ImageViewModel();\n int countUp = 10;\n int totalTime = 70;\n\n int i = imageModel.checkChangeImage(countUp, totalTime);\n\n assertEquals(1, i);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "private void findAbdomenCM(int sliceNum) {\r\n \r\n // load up the sliceBuffer with the appropriate slice from the abdomen label image\r\n try {\r\n abdomenImage.exportData(sliceNum * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"findAbdomenCM(...) Error exporting data on slice: \" +sliceNum);\r\n return;\r\n }\r\n\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n // set the centerOfMass to an generate an obvious error \r\n centerOfMass[0] = (short)-1;\r\n centerOfMass[1] = (short)-1;\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[3][0];\n int[] intArray1 = new int[1];\n intArray1[0] = 1;\n intArray0[0] = intArray1;\n int[] intArray2 = new int[9];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray2[0] = 1;\n intArray2[1] = 2;\n intArray2[2] = 2;\n intArray2[3] = 0;\n intArray2[4] = 3;\n intArray2[6] = 2;\n intArray2[7] = 1;\n intArray2[8] = 2;\n intArray0[1] = intArray2;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String string0 = resultMatrixSignificance0.getRevision();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(string0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(\"8034\", string0);\n \n resultMatrixSignificance0.setColHidden(1003, false);\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n ResultMatrixSignificance resultMatrixSignificance2 = new ResultMatrixSignificance();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotNull(resultMatrixSignificance2);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n int int0 = resultMatrixSignificance2.getVisibleColCount();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance0);\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(1, int0);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixLatex0.isSignificance((-1));\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n String string0 = resultMatrixCSV0.toString();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"Dataset,[1]\\nrow0,''\\n'[v/ /*]',''\\n\", string0);\n \n String[] stringArray0 = new String[4];\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n resultMatrixGnuPlot0.setSize(0, 0);\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int int0 = resultMatrixGnuPlot0.getDefaultColNameWidth();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(50, int0);\n }", "@Test\n public void testMedian() {\n System.out.println(\"median\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.median();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCompute() {\n System.out.println(\"compute\");\n ParallelMergeSort instance = null;\n instance.compute();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void estimatedMonthlyCostTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertEquals(6.475, pb1.estimatedMonthlyCost(), 0.00001);\n }" ]
[ "0.76359123", "0.73141825", "0.65835816", "0.57383484", "0.56049335", "0.5368913", "0.5366745", "0.53475344", "0.5276815", "0.5211457", "0.51922", "0.5185153", "0.51824313", "0.5180554", "0.51034254", "0.50930893", "0.50909305", "0.5089265", "0.508482", "0.50655603", "0.50131375", "0.4967044", "0.49259824", "0.49166456", "0.49056277", "0.4897456", "0.48964065", "0.4878053", "0.48741156", "0.48628837", "0.48621482", "0.4857977", "0.4856882", "0.4843203", "0.4839442", "0.48388618", "0.48254445", "0.48191392", "0.48160744", "0.48117122", "0.48064062", "0.48031175", "0.48019585", "0.47925425", "0.47874644", "0.47844023", "0.4783126", "0.47804153", "0.47622862", "0.4751772", "0.47323477", "0.472947", "0.4725859", "0.4717567", "0.4714627", "0.4706283", "0.46862835", "0.46653253", "0.46588334", "0.46533224", "0.46517122", "0.46484607", "0.46459064", "0.46393064", "0.46359068", "0.46323836", "0.460578", "0.46015692", "0.46007916", "0.46004763", "0.4596998", "0.459289", "0.45927462", "0.4591392", "0.45903093", "0.45902893", "0.45858636", "0.45837918", "0.45836726", "0.45825702", "0.45811412", "0.4581066", "0.4577238", "0.45733365", "0.45690647", "0.45689315", "0.4568545", "0.45649377", "0.45623296", "0.45590258", "0.4556435", "0.45536804", "0.45520693", "0.4550323", "0.45498943", "0.45419466", "0.45397726", "0.4532619", "0.45256138", "0.45127285" ]
0.7719333
0
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public void kolmogorovSmirnovTest(double cutoff, MWBMatchingAlgorithm mwbm) {\n double p = 0;\n\n KolmogorovSmirnovTest t = new KolmogorovSmirnovTest();\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexs in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // this may invoke exactP on small sample sizes which will not terminate in all\n // cases\n // p = t.kolmogorovSmirnovTest(this.train_values.get(i),\n // this.test_values.get(j), false);\n\n // this uses approximateP everytime\n p = t.approximateP(\n t.kolmogorovSmirnovStatistic(this.train_values.get(i),\n this.test_values.get(j)),\n this.train_values.get(i).length,\n this.test_values.get(j).length);\n if (p > cutoff) {\n mwbm.setWeight(i, j, p);\n }\n }\n }\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMMI() {\n System.out.println(\"MMI\");\n int a = 0;\n int m = 0;\n int expResult = 0;\n int result = utilsHill.MMI(a, m);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testJuvenilesSpreadFromCellsWithCorrespondingMatureLctFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(3, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 6);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 9);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 3);\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n discretize0.binsTipText();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning(25);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetImportanceStats() {\n System.out.println(\"getImportanceStats\");\n MDA instance = new MDA();\n\n // make the circles close to force tree to do lots of splits / make it harder\n ClassificationDataSet train = getHarderC(10000, RandomUtil.getRandom());\n int good_featres = 2;\n\n DecisionTree tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n double[] importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n // categorical features, make space wider b/c we lose resolution\n train = getHarderC(10000, RandomUtil.getRandom());\n\n train.applyTransform(new NumericalToHistogram(train, 7));\n tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Before\n\tpublic void iniciaDisciplinaConvencional() {\n\t\tList<String> pos = new ArrayList<String>();\n\t\tList<String> pos1 = new ArrayList<String>();\n\t\tpos1.add(\"Disciplina 3\");\n\t\tpos1.add(\"Disciplina 4\");\n\t\tpos1.add(\"Disciplina 5\");\n\n\t\tminitElimBai_1 = new MinitestesEliminandoBaixa(\"Disciplina 1\", 5, pos,\n\t\t\t\t1);\n\t\tminitElimBai_2 = new MinitestesEliminandoBaixa(\"Disciplina 2\", 10,\n\t\t\t\tpos1, 2);\n\t}", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Test\n public void test13() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 1));\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testLargeValues() {\n double x = 123;\n double dof = 6.4;\n double nonCent = 100.34;\n NonCentralChiSquaredDistribution dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.7930769).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 455.038;\n dof = 12;\n nonCent = 444.44;\n\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.4961805).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 999400;\n dof = 500;\n nonCent = 1000000;\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.2913029).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n\tpublic void testCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in that's within ed=1 and incorporates an error.\n\t\t// result has only a single base because two UMIs are merged.\n\t\tString molBC2 = \"AGGGGCTC\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 1);\n\t\tAssert.assertEquals(new Byte((byte) 8), qualResult2.get(0));\n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void percentiles(double cutoff, MWBMatchingAlgorithm mwbm) {\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexes in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // get percentiles\n double trainvals[] = this.train_values.get(i);\n double testvals[] = this.test_values.get(j);\n\n Arrays.sort(trainvals);\n Arrays.sort(testvals);\n\n // percentiles\n double train_p;\n double test_p;\n double score = 0.0;\n for (int p = 1; p <= 9; p++) {\n train_p = trainvals[(int) Math.ceil(trainvals.length * (p / 100))];\n test_p = testvals[(int) Math.ceil(testvals.length * (p / 100))];\n\n if (train_p > test_p) {\n score += test_p / train_p;\n }\n else {\n score += train_p / test_p;\n }\n }\n\n if (score > cutoff) {\n mwbm.setWeight(i, j, score);\n }\n }\n }\n }", "public double[] monteCarloPercentiles(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesPercentiles;\n }", "@Test\n public void testMesurerDistanceCoordonnees() {\n System.out.println(\"MesurerDistanceCoordonnees\");\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = 0.0;\n double expResult = 0.0;\n double result = Utils.MesurerDistanceCoordonnees(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test10() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 3));\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n\tpublic void evalCrispDistanceWithCrisp1(){\n\t\tFuzzySet res = (CrispSet)cs1.distance(cs2);\n\t\tassertTrue(res instanceof CrispSet);\n\t\tCrispSet resCrisp = (CrispSet)res;\n\t\t//Puntos limite\t\t\n\t\tassertTrue(resCrisp.getLeftBoundary()==3);\n\t\tassertTrue(resCrisp.getRightBoundary()==6);\n\t\t//Valores extremos\n\t\tassertTrue(resCrisp.getMembershipValue(0)==0);\n\t\tassertTrue(resCrisp.getMembershipValue(3)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4.5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6.01)==0);\n\t}", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "public int getCostPerMile() {\n return costPerMile;\n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "@Test\n public void testGetProjectileSpeedMultiplier() {\n assertEquals(1.3, proj.getProjectileSpeedMultiplier(), 0.001);\n }", "public void testConcurrency() throws InterruptedException {\n initCache();\n\n final ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n final ArrayList<Integer> test = new ArrayList<Integer>();\n final LinkedBlockingQueue<Integer> idxs = new LinkedBlockingQueue<Integer>();\n\n Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n\n for (int i = 0; i < 30000; i++) {\n wcos.add(getDefaultWMSCacheObject(\"q\" + i, 50, true));\n test.add(-1);\n idxs.put(i);\n\n //put and get task\n tasks.add(new Callable<Integer>() {\n\n public Integer call() throws Exception {\n //put\n int i = idxs.take();\n boolean ok = wmsCache.put(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1, wcos.get(i));\n\n //get\n if (ok) {\n WMSTile wco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (wco.getCached()) {\n if (compareWMSObjects(wco, wcos.get(i))) {\n test.set(i, 1);\n } else {\n test.set(i, 0);\n }\n }\n }\n return i;\n }\n });\n }\n ExecutorService executorService = Executors.newFixedThreadPool(100);\n executorService.invokeAll(tasks);\n\n //test cache cleaner operated correctly\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test for presence of invalid test comparisons\n int invalid = 0;\n int valid = 0;\n for (int i = 0; i < test.size(); i++) {\n if (test.get(i) == 0) {\n invalid++;\n } else if (test.get(i) == 1) {\n valid++;\n }\n }\n assertTrue(valid > 0);\n assertTrue(invalid == 0);\n }", "@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tcompute(\"12-10-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"10-09-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"11-08-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"03-05-17\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"09-03-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"01-02-17\",\"[email protected]\", null, 22,20);\r\n\t}", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\r\n //assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testNumCellsColonisedFromOutsideGrid() {\n CompletelySpatiallyRandomParams params1 = new CompletelySpatiallyRandomParams(0.1, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params1);\n assertEquals(1, coloniser.getNumCellsColonisedFromOutsideGrid());\n\n // if baseRate = 0.5 then 9 * 0.5 = 4.5 ~ 5 cells colonised from outside grid\n CompletelySpatiallyRandomParams params2 = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params2);\n assertEquals(5, coloniser.getNumCellsColonisedFromOutsideGrid());\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[1];\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n double[] doubleArray0 = new double[7];\n doubleArray0[0] = (double) 0;\n doubleArray0[1] = (double) 2;\n doubleArray0[2] = (double) 0;\n doubleArray0[3] = (double) 1;\n doubleArray0[4] = (double) 2;\n doubleArray0[5] = (double) 0;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex(resultMatrixPlainText0);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n String string0 = resultMatrixPlainText0.getSummaryTitle(216);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"i\", string0);\n \n int[][] intArray1 = new int[8][0];\n intArray1[0] = intArray0;\n intArray1[1] = intArray0;\n intArray1[2] = intArray0;\n intArray1[3] = intArray0;\n intArray1[4] = intArray0;\n intArray1[5] = intArray0;\n intArray1[6] = intArray0;\n intArray1[7] = intArray0;\n resultMatrixLatex0.setSummary(intArray1, intArray1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(8, intArray1.length);\n \n ResultMatrixCSV resultMatrixCSV1 = new ResultMatrixCSV();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(resultMatrixCSV1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n int[] intArray2 = resultMatrixCSV1.getColOrder();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNull(intArray2);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n boolean boolean0 = resultMatrixLatex0.getDefaultPrintColNames();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(boolean0);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance(resultMatrixSignificance0);\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n String string1 = resultMatrixCSV1.toStringSummary();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(string1);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"-summary data not set-\", string1);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n assertFalse(string1.equals((Object)string0));\n \n boolean boolean1 = resultMatrixPlainText0.isRowName(1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int0 = resultMatrixLatex0.getDefaultColNameWidth();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, int0);\n }", "int getN_estimators();", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(resultMatrixCSV0);\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[0][9];\n // Undeclared exception!\n try { \n resultMatrixCSV0.setSummary(intArray0, intArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "@Test\r\n\tpublic void testGetReducedCell() {\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 10., 6., 4. }, lattice1\r\n\t\t\t\t.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 12.328828005937952, lattice1.getCMLVector3(\r\n\t\t\t\t0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 7., 11., 5. }, lattice1\r\n\t\t\t\t.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 13.96424004376894, lattice1\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 6.8, -4., -9. },\r\n\t\t\t\tlattice1.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 11.968291440301744, lattice1.getCMLVector3(\r\n\t\t\t\t2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", -619.2, lattice1.getVolume(), EPS);\r\n\t\tdouble[] params = lattice1.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] {\r\n\t\t\t\t12.328828005937952, 13.96424004376894, 11.968291440301744,\r\n\t\t\t\t104.34229064539636, 86.89206686722031, 25.025508299339933 },\r\n\t\t\t\tparams, EPS);\r\n\r\n\t\tCMLLattice reducedLattice = lattice1.getReducedCell();\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 3.0, -5.0, -1.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 5.916079783099616, reducedLattice\r\n\t\t\t\t.getCMLVector3(0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 3.8, 1.0, -8.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 8.912911982062877, reducedLattice\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 10.0, 6.0, 4.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 12.328828005937952, reducedLattice\r\n\t\t\t\t.getCMLVector3(2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", 619.2, reducedLattice.getVolume(), EPS);\r\n\t\tparams = reducedLattice.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] { 5.916079783099616,\r\n\t\t\t\t8.912911982062877, 12.328828005937952, 83.73054962879554,\r\n\t\t\t\t93.14372638090103, 74.15166267765416 }, params, EPS);\r\n\r\n\t}", "public double[] jacobi_iter(double[] x, double tolerance, int M) {\n double[][] sContent = {{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}};\n Matrix s = new Matrix(sContent);\n\n double[][] tContent = {{0, -0.5, -0.33333333}, {-0.5, 0, -0.25}, {-0.3333333333, -0.25, 0}};\n Matrix t = new Matrix(tContent);\n\n //keep track of the number of iterations\n\n int counter = 0;\n double tol = 10000; //initial\n double[] tempXVector;\n Matrix firstFirst;\n double[] firstPart; //s^-1(-T)(Xn)\n double[] secondPart; //s^-1(b)\n String output = \"\";\n\n double tempXVectorNorm;\n double xVectorNorm;\n\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"x(0): \" + output);\n while (tol > tolerance && counter < M) {\n //perform the jacobi iterations\n firstFirst = s.multiply(t);\n firstPart = Matrix.matrixVectorMultiply(firstFirst, x);\n secondPart = Matrix.matrixVectorMultiply(s, bVector);\n tempXVector = Matrix.plus(firstPart, secondPart);\n\n //find norm of vectors and then subtract the\n tempXVectorNorm = Matrix.norm(tempXVector);\n xVectorNorm = Matrix.norm(x);\n tol = tempXVectorNorm - xVectorNorm;\n tol = Math.abs(tol);\n counter++;\n numOfIterations++;\n x = tempXVector;\n }\n\n output = \"\";\n if (counter == M) {\n System.out.println(\"Jacobi Output for x(N): null\");\n System.out.println(\"Too many iterations without reaching a accurate answer.\");\n return null;\n }\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"Jacobi Output for x(N): \" + output);\n System.out.println(\"Number of Iterations using Jacobi Algorithm: \" + counter + \"\\n\");\n return x;\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Before\n public void setup() {\n threeByTwo = new Matrix(new int[][] {{1, 2, 3}, {2, 5, 6}});\n compareTwoByThree = new Matrix(new int[][] {{1, 42, 32}, {2, 15, 65}});\n oneByOne = new Matrix(new int[][] {{4}});\n rightOneByOne = new Matrix(new int[][] {{8}});\n twoByFour = new Matrix(new int[][] {{1, 2, 3, 4}, {2, 5, 6, 8}});\n twoByThree = new Matrix(new int[][] {{4, 5}, {3, 2}, {1, 1}});\n threeByThree = new Matrix(new int[][] {{4, 5, 6}, {3, 2, 0}, {1, 1, 1}});\n rightThreeByThree = new Matrix(new int[][] {{1, 2, 3}, {5, 2, 0}, {1, 1, 1}});\n emptyMatrix = new Matrix(new int[0][0]);\n // this is the known correct result of multiplying M1 by M2\n twoByTwoResult = new Matrix(new int[][] {{13, 12}, {29, 26}});\n threeByThreeResult = new Matrix(new int[][] {{35, 24, 18}, {13, 10, 9}, {7, 5, 4}});\n oneByOneSum = new Matrix(new int[][] {{12}});\n oneByOneProduct = new Matrix(new int[][] {{32}});\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void testNoCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in nowhere near the ED\n\t\t// result has 2 different bases for the two pileups.\n\t\tString molBC2 = \"ZZZZZZZZ\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 2);\n\t\tAssert.assertEquals(new Byte((byte) 31), qualResult2.get(0));\n\t\tAssert.assertEquals(new Byte((byte) 5), qualResult2.get(1));\n\t}", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testQuantile() {\n System.out.println(\"quantile\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0, instance.quantile(0), 1E-7);\n assertEquals(0, instance.quantile(0.001), 1E-7);\n assertEquals(0, instance.quantile(0.01), 1E-7);\n assertEquals(2, instance.quantile(0.1), 1E-7);\n assertEquals(3, instance.quantile(0.2), 1E-7);\n assertEquals(13, instance.quantile(0.9), 1E-7);\n assertEquals(22, instance.quantile(0.99), 1E-7);\n assertEquals(30, instance.quantile(0.999), 1E-7);\n }", "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus();\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times getConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "@Test\n void checkChangeImage() {\n ImageViewModel imageModel = new ImageViewModel();\n int countUp = 10;\n int totalTime = 70;\n\n int i = imageModel.checkChangeImage(countUp, totalTime);\n\n assertEquals(1, i);\n }", "private void findAbdomenCM(int sliceNum) {\r\n \r\n // load up the sliceBuffer with the appropriate slice from the abdomen label image\r\n try {\r\n abdomenImage.exportData(sliceNum * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"findAbdomenCM(...) Error exporting data on slice: \" +sliceNum);\r\n return;\r\n }\r\n\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n // set the centerOfMass to an generate an obvious error \r\n centerOfMass[0] = (short)-1;\r\n centerOfMass[1] = (short)-1;\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[3][0];\n int[] intArray1 = new int[1];\n intArray1[0] = 1;\n intArray0[0] = intArray1;\n int[] intArray2 = new int[9];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray2[0] = 1;\n intArray2[1] = 2;\n intArray2[2] = 2;\n intArray2[3] = 0;\n intArray2[4] = 3;\n intArray2[6] = 2;\n intArray2[7] = 1;\n intArray2[8] = 2;\n intArray0[1] = intArray2;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String string0 = resultMatrixSignificance0.getRevision();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(string0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(\"8034\", string0);\n \n resultMatrixSignificance0.setColHidden(1003, false);\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n ResultMatrixSignificance resultMatrixSignificance2 = new ResultMatrixSignificance();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotNull(resultMatrixSignificance2);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n int int0 = resultMatrixSignificance2.getVisibleColCount();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance0);\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(1, int0);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixLatex0.isSignificance((-1));\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n String string0 = resultMatrixCSV0.toString();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"Dataset,[1]\\nrow0,''\\n'[v/ /*]',''\\n\", string0);\n \n String[] stringArray0 = new String[4];\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n resultMatrixGnuPlot0.setSize(0, 0);\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int int0 = resultMatrixGnuPlot0.getDefaultColNameWidth();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(50, int0);\n }", "@Test\n public void testMedian() {\n System.out.println(\"median\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.median();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCompute() {\n System.out.println(\"compute\");\n ParallelMergeSort instance = null;\n instance.compute();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void estimatedMonthlyCostTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertEquals(6.475, pb1.estimatedMonthlyCost(), 0.00001);\n }" ]
[ "0.7720083", "0.7637022", "0.6585873", "0.5737402", "0.5602599", "0.53692174", "0.536536", "0.53475755", "0.5277167", "0.5211567", "0.519184", "0.51858693", "0.51833606", "0.518084", "0.5102803", "0.5094376", "0.50911736", "0.508913", "0.50863725", "0.50679743", "0.5012965", "0.4966622", "0.49264756", "0.49177474", "0.49067655", "0.48965126", "0.48962805", "0.4877167", "0.48750746", "0.48647997", "0.4863377", "0.4856634", "0.48550257", "0.4843627", "0.48407435", "0.48398933", "0.48246908", "0.4821173", "0.4815787", "0.48121312", "0.48063993", "0.48019508", "0.48013297", "0.47930098", "0.4787796", "0.4785286", "0.47843617", "0.47831392", "0.4765197", "0.47507918", "0.47348163", "0.47291443", "0.4724374", "0.47184768", "0.47142696", "0.47079116", "0.46852624", "0.4664668", "0.46582597", "0.46524817", "0.46522936", "0.46487767", "0.464478", "0.46384192", "0.46343386", "0.46341854", "0.46041864", "0.46014804", "0.45995316", "0.4599179", "0.45964336", "0.4591912", "0.45918345", "0.45907772", "0.45888308", "0.45884085", "0.45868", "0.4585779", "0.45837352", "0.45831555", "0.45828146", "0.4580521", "0.45774642", "0.457274", "0.45703942", "0.45697343", "0.45681095", "0.45646283", "0.4563152", "0.45579967", "0.45545128", "0.45544857", "0.45527256", "0.4551391", "0.45478672", "0.45405352", "0.45397732", "0.45318818", "0.45263207", "0.45149556" ]
0.7315861
2
Test of estimateC method, of class MarkovModelUtilities.
@Test public void testEstimateC_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateC(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test03() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[19];\n evaluation0.updateMargins(doubleArray0, 0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "double[] predictWithContextual(String testUser, OrienteeringEnvironment environment) throws IOException {\n loadData(Paths.get(this.path.toString(), \"userSequencesFile\", this.testSequenceNumber + \".txt\").toString());\r\n loadUserVisitedPOIs(Paths.get(this.path.toString(), \"userAllPOIsFile\", this.testSequenceNumber + \".txt\").toString());\r\n trainWithContextual();\r\n double[] userInt = new double[this.numOfItems];\r\n double z = 0.0;\r\n Integer[] contextPOIs = {environment.start, environment.end};\r\n double[] userContextVector = aggregate(contextPOIs, this.userMatrix[Integer.parseInt(testUser)]);\r\n for (int i = 0; i < this.itemMatrix.length; i++) {\r\n userInt[i] = multiple(userContextVector, this.itemMatrix[i])+this.itemBias[i];\r\n z += Math.exp(userInt[i]);\r\n }\r\n for (int i = 0; i < userInt.length; i++) {\r\n userInt[i] = Math.exp(userInt[i])/z;\r\n }\r\n\r\n\r\n double z2 = 0;\r\n for (int i = 0; i < this.numOfItems; i++) {\r\n if (i != environment.start && i != environment.end){\r\n for (int j = 0; j < this.itemMatrix.length; j++) {\r\n if (i != j && j != environment.start && j != environment.end) {\r\n environment.cooccurrTable[i][j] = multiple(this.itemMatrix[i], this.itemMatrix[j]);\r\n z2 += Math.exp(environment.cooccurrTable[i][j]);\r\n }\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n for (int i = 0; i < this.numOfItems; i++) {\r\n if(i!=environment.start && i!=environment.end) {\r\n for (int j = 0; j < this.numOfItems; j++) {\r\n if (i != j && j != environment.start && j != environment.end) {\r\n environment.cooccurrTable[i][j] = Math.exp(environment.cooccurrTable[i][j]) / z2;;\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n for (int i = 0; i < userInt.length; i++) {\r\n System.out.print(\"[\"+i+\"] \"+ userInt[i]+\" \");\r\n }\r\n\r\n System.out.println();\r\n return userInt;\r\n\r\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testBackwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.backwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testGetSetTemperaturaInterior() {\n System.out.println(\"getSetTemperaturaInterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInterior(expResult);\n double result = instance.getTemperaturaInterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public int perform_GIS(int C) {\n // cerr << \"C = \" << C << endl;\n C = 1;\n // cerr << \"performing AGIS\" << endl;\n ArrayList<Double> pre_v = newArrayList(_vl.size(), 0.0); // jenia: same size as _vl's because later it can set _vl\n double pre_logl = -999999;\n for (int iter = 0; iter < 200; iter++) {\n double logl = update_model_expectation();\n // fprintf(stderr, \"iter = %2d C = %d f = %10.7f train_err = %7.5f\", iter, C, logl, _train_error);\n if (_heldout.size() > 0) {\n // double hlogl = heldout_likelihood();\n // fprintf(stderr, \" heldout_logl(err) = %f (%6.4f)\", hlogl, _heldout_error);\n }\n // cerr << endl;\n \n if (logl < pre_logl) {\n C += 1;\n _vl = pre_v;\n iter--;\n continue;\n }\n \n if (C > 1 && iter % 10 == 0) C--;\n \n pre_logl = logl;\n pre_v = _vl; // TODO jenia this doesn't have any effect\n assert (_vl.size() >= _fb.Size());\n for (int i = 0; i < _fb.Size(); i++) {\n double coef = _vee.get(i) / _vme.get(i);\n plusEq(_vl, i, log(coef) / C);\n }\n }\n // cerr << endl;\n return 0; // jenia: the original didn't return anything explicitly\n }", "@Test\n public void testVirement3() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(0.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 8000.0;\n double excepted_solde_cpt1 = 0.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Override\n\tpublic double[][] calc() {\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\n\t\t\t\tthis.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length];\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (this.det != 0) {\t//if determinant is not 0.\n\t\t\t\n\t\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\t\n\t\t\t\t\n\t\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t\t\t\t\n\t\t\t\t\tthis.cT = new double[this.singleMatrix.length][this.singleMatrix[i].length];\t//declare the size of co-factor matrix transposed\n\n\t\t\t\t\tthis.cT[i][j] = this.coFactor[j][i];\t//the rows of cT = the cols of coFactor matrix. the cols of cT = the rows of coFactor matrix\n\t\t\t\t\t\n\t\t\t\t\t/* # you might want to initialize this.inverse and calculate right after the above cT calculation done as follow,\n\t\t\t\t\t \n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \t- this.inverse = new double[this.singleMatrix.length][this.singleMatrix[i].length]; -\n\t\t\t\t\t \t- this.inverse[i][j] = 1 / this.det * this.cT[i][j]; -\n\t\t\t\t\t \t--------------------------------------------------------------------------------------\n\t\t\t\t\t \n\t\t\t\t\t technically, it's not really a problem when it comes to initializing one more variable in the same loop.\n\t\t\t\t\t however, this specific situation, that three variables (coFacotr, cT and inverse) and their values are involved in, occurs an unexpected result which is still not an error.\n\t\t\t\t\t \n\t\t\t\t\t this.coFactor is done in a loop in initializing and calculating \n\t\t\t\t\t this.cT and this.inverse are done in a loop in initializing and calculating\n\t\t\t\t\t \n\t\t\t\t\t # thus, calculation goes as it goes and this.inverse will be kept initializing until the loop ends.\n\t\t\t\t\t this.inverse will then always & only store its running value at a current location depending on increment of i and j.\n\t\t\t\t\t you will see only one result at the last index and won't see all the values stored correctly.\n\t\t\t\t\t (all of the values will be zero except the last value at the last index)\n\t\t\t\t\t \n\t\t\t\t\t # one simple solution is to initialize and calculate a variable -inverse in this case- in a separate for-loop\n\t\t\t\t\t \n\t\t\t\t\t */\n\n\t\t\t\t\t//calculate inverse here but initialize it in another for-loop\n\t\t\t\t\tthis.inverse[i][j] = 1 / this.det * this.cT[i][j]; //formula: A-1 = 1 / det * cT\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t}else {\t//det is 0\n\t\t\t\n\t\t\tSystem.out.println(\"\\nThe matrix is a singular. singular matrices can not have inverses.\");\n\t\t}\n\t\t\n\t\t//print\n\t\tSystem.out.println(\"\\nInverse of the current matrix is: \");\n\t\tfor (int i=0; i<this.singleMatrix.length; i++) {\n\t\t\t\t\t\n\t\t\tfor (int j=0; j<this.singleMatrix[i].length; j++) {\n\t\t \t\t\n\t\t\t\tSystem.out.print(String.format(\"%.2f\", this.inverse[i][j]) + \" \");\t//display the result with a space between value representing as two decimal point\n//\t\t\t\tSystem.out.print(this.inverse[i][j] + \" \");\t//display the result with a space between value representing as two decimal point\n\t\t\t}\n\t\tSystem.out.println();\t//a new line for the next row and cols\n\t\t}\n\t\t\n\t\treturn inverse;\t//return the value of inverse\n\t}", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testCase3(){\n\t\t\n\t\tmastercard mc1 = new mastercard(\"Mastercard\", 100);\n\t\tvisa visa1 = new visa(\"Visa\", 100);\n\t\t\n\t\tdouble mcInterest1 = mc1.simpleInterest(mc1.getBalance(), mc1.getInterestRate());\n\t\tdouble visaInterest1 = visa1.simpleInterest(visa1.getBalance(), visa1.getInterestRate());\n\t\t\n\t\t\tassertEquals(15, mcInterest1+visaInterest1, DELTA);\n\t\t\n\t\tvisa visa2 = new visa(\"Visa\", 100);\n\t\tmastercard mc2 = new mastercard(\"Mastercard\", 100);\n\t\n\t\tdouble mcInterest2 = mc2.simpleInterest(mc2.getBalance(), mc2.getInterestRate());\n\t\tdouble visaInterest2 = visa2.simpleInterest(visa2.getBalance(), visa2.getInterestRate());\n\t\t\t\n\t\tassertEquals(15, mcInterest2+visaInterest2, DELTA);\n\t}", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetSetTemperaturaExteriorMinima() {\n System.out.println(\"getSetTemperaturaExteriorMinima\");\n double expResult = 10.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMinima(expResult);\n double result = instance.getTemperaturaExteriorMinima();\n assertEquals(expResult, result, 0.0);\n }", "static void playC45() throws IOException {\n\t\tRealVector[] data = NNDataset.getData(NNDataset.HOME);\n\t\tRealVector[] label = NNDataset.getLabel(NNDataset.HOME);\n\t\tRealMatrix d = MatrixUtils.createRealMatrix(data.length, data[0].getDimension());\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\td.setRowVector(i, data[i]);\n\t\t}\n\t\td = d.transpose(); // data = column vector\n\n\t\tRealVector l = MatrixUtils.createRealVector(new double[label.length]);\n\t\tfor (int i = 0; i < l.getDimension(); i++) {\n\t\t\tl.setEntry(i, label[i].getEntry(0));\n\t\t}\n\n\t\tDecisionNode root = training(d, l);\n\t\tString[] header = NNDataset.getHeader(NNDataset.HOME);\n\t\tprintTree(root, header);\n\n\t\tInteger lb = predict(root, data[0]);\n\t\tSystem.out.println(lb);\n\n\t\tdouble ok = MSE(root, data, label);\n\t\tSystem.out.println(\"total hit: \" + ok);\n\t}", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetTemperaturaInteriorAlvo() {\n System.out.println(\"getSetTemperaturaInteriorAlvo\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInteriorAlvo(expResult);\n double result = instance.getTemperaturaInteriorAlvo();\n assertEquals(expResult, result, 0.0);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }", "@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "@Test\n public void testVirement1() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 28000.0;\n double excepted_solde_cpt1 = 35000.0;\n double excepted_solde_cpt2 = 71000.0;\n\n //Act\n assertEquals(true, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testCRE_C() {\n CuteNetlibCase.doTest(\"CRE-C.SIF\", \"2.996133067602781E7\", \"2.996133067602781E7\", NumberContext.of(7, 4));\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n public void testGetSetTemperaturaExterior() {\n System.out.println(\"getSetTemperaturaExterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExterior(expResult);\n double result = instance.getTemperaturaExterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "private Matriks MatriksCofactor(Matriks M){\r\n\t\tMatriks Mcofactor = new Matriks(BrsEff, KolEff);\r\n\t\tfor(int i=0; i<BrsEff; i++){\r\n\t\t\tfor(int j=0;j<KolEff; j++){\r\n\t\t\t\tMatriks temp = M.Cofactor(M,i,j);\r\n\t\t\t\tMcofactor.Elmt[i][j] = temp.DetCofactor(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Mcofactor;\r\n\t}", "@Test\n\tpublic void testGetConsensus() {\n\t\tint[][] profile = {\n\t\t/* A */{ 2, 0, 0, 0, 9, 0, 2, 2, 0 },\n\t\t/* C */{ 1, 1, 1, 1, 0, 0, 2, 2, 0 },\n\t\t/* G */{ 1, 2, 0, 2, 0, 0, 2, 2, 0 },\n\t\t/* T */{ 1, 0, 0, 3, 0, 0, 2, 2, 0 }};\n\t\tint[] c = testme1.getConsensus(profile);\n\t\tassertEquals(1, c[0]);\n\t\tassertEquals(3, c[1]);\n\t\tassertEquals(2, c[2]);\n\t\tassertEquals(4, c[3]);\n\t\tassertEquals(1, c[4]);\n\t}", "@Test\n\tpublic void testGetterCoefficient() {\n\t\tf.ajouterMatiere(\"Français\", 3);\n\t\tf.ajouterMatiere(\"Mathématiques\", 5);\n\t\t\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 3\", 3, f.getCoefficient(\"Français\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 5, f.getCoefficient(\"Mathématiques\"), 5);\n\t\tassertEquals(\"Le coefficient de la matiere devrait etre de 5\", 0, f.getCoefficient(\"Maths\"), 5);\n\t}", "@Test(timeout = 4000)\n public void test033() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.matthewsCorrelationCoefficient((-2935));\n assertEquals(0.0, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0, doubleArray0.length);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test036() throws Throwable {\n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int[][] intArray0 = new int[0][1];\n // Undeclared exception!\n try { \n resultMatrixLatex0.setSummary((int[][]) null, (int[][]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\r\n\tpublic void testGetCMLVector3() {\r\n\t\tCMLVector3 v = lattice1.getCMLVector3(0);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\",\r\n\t\t\t\tnew double[] { 10.0, 6.0, 4.0 }, v, EPS);\r\n\t\tv = lattice1.getCMLVector3(1);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\",\r\n\t\t\t\tnew double[] { 7.0, 11.0, 5.0 }, v, EPS);\r\n\t\tv = lattice1.getCMLVector3(2);\r\n\t\tCMLVector3Test.assertEquals(\"cml vector\", new double[] { 6.8, -4.0,\r\n\t\t\t\t-9.0 }, v, EPS);\r\n\t}", "public static final void testAnnuity (\n double C,\n double r,\n double T )\n //////////////////////////////////////////////////////////////////////\n {\n double FV = futureValueAnnuity ( C, r, T );\n System.out.println ( FV );\n System.out.println ( presentValue ( FV, r, T ) );\n System.out.println ( presentValueAnnuity ( C, r, T ) );\n double [ ] c = new double [ ( int ) T ];\n for ( int i = 0; i < T; i++ ) c [ i ] = C;\n System.out.println ( presentValue ( c, r ) );\n }", "@Test\n public void test38() throws Throwable {\n String[] stringArray0 = new String[9];\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n Capabilities capabilities0 = costSensitiveClassifier0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate(\"um.#R$qWe&4`>*V\");\n Evaluation evaluation0 = new Evaluation(instances0);\n try {\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) costSensitiveClassifier0, instances0, (Object[]) stringArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n }\n }", "@Test\n public void presentValueCurveSensitivity() {\n final MultipleCurrencyParameterSensitivity pvpsDepositExact = PSC.calculateSensitivity(CPN_ON_COMPOUNDED, MULTICURVES,\n MULTICURVES.getAllNames());\n final MultipleCurrencyParameterSensitivity pvpsDepositFD = PSC_DSC_FD.calculateSensitivity(CPN_ON_COMPOUNDED, MULTICURVES);\n AssertSensitivityObjects.assertEquals(\"CouponONCompoundedDiscountingMethod: presentValueCurveSensitivity \", pvpsDepositExact,\n pvpsDepositFD, TOLERANCE_PV_DELTA);\n }", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess3() {\n\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B17DCCN123\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString tktMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Toán kinh tế\")) {\n\t\t\t\ttktMark = result.getMarkToChar();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\ttktMark.equals(\"C\") && \n\t\t\t\tpassedCreditsTillNow == 18 && \n\t\t\t\tdf.format(gpaTillNow).equals(\"3.19\")\n\t\t\t\t);\n\t}", "@Test\n public void testVerser1() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(5000.0);\n double montant_a_verser = 1000.0;\n double excepted = 6000.0;\n\n //Act\n assertEquals(true, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n }", "@Test\n public void test28() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n CostMatrix costMatrix0 = costSensitiveClassifier0.getCostMatrix();\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0, costMatrix0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Cost matrix not compatible with data!\n //\n }\n }", "@Test\r\n\tpublic void testInput3() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"12456.95\"), 4, \"books\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"13707.63\"));\r\n\t}", "@Test(timeout = 4000)\n public void test032() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.matthewsCorrelationCoefficient(5);\n assertEquals(0.0, double0, 0.01);\n }", "public static double calcDiscrim( double coef_A, double coef_B, double coef_C )\r\n {\n return 0;\r\n }", "@Test\n public void whenComputingBillForPeopleOver70WithDiagnosisXRayAndECG() {\n double result = billingService.computeBill(1);\n // 90% discount on Diagnosis (60£) = 6\n // 90% discount on X-RAY (150£) = 15\n // 90% discount on ECG (200.40£) = 20.04\n Assert.assertEquals(41.04, result, 0);\n }", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "@Test\n public void test_0040() {\n AutoCovariance instance = new AutoCovariance(\n new ARIMAModel(new double[]{0.3, -0.2, 0.05, 0.04}, 0, new double[]{0.2, 0.5}),\n 1, 10);\n\n assertEquals(1.461338, instance.evaluate(0), 1e-5);\n assertEquals(0.764270, instance.evaluate(1), 1e-5);\n assertEquals(0.495028, instance.evaluate(2), 1e-5);\n assertEquals(0.099292, instance.evaluate(3), 1e-5);\n assertEquals(0.027449, instance.evaluate(4), 1e-5);\n assertEquals(0.043699, instance.evaluate(5), 1e-5);\n assertEquals(0.032385, instance.evaluate(6), 1e-5);\n assertEquals(0.006320, instance.evaluate(7), 1e-5);\n assertEquals(-0.001298186, instance.evaluate(8), 1e-5);\n assertEquals(0.001713744, instance.evaluate(9), 1e-5);\n assertEquals(0.002385183, instance.evaluate(10), 1e-5);\n }", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "@Test\n public void testAnalyseConcealed() {\n System.out.println(\"analyse (hidden case)\");\n\n // Setup test objects\n Environment env = new Environment(new RigidBody(0, 0, 500, 500));\n Collection<Robot> robots = new LinkedList<Robot>();\n Collection<Cup> things = new LinkedList<Cup>();\n\n // Make an impassable rectangle\n RigidBody shape = new RigidBody(0, 25, 20, 15);\n\n env.createNewImpassableTerrain(shape);\n\n // Put a cup on the far side of the rectangle\n things.add(new Cup(10, 60, false));\n\n // Make a robot to hold the sensor and put it on the close side of the rectangle\n SensorTestingRobot robot = new SensorTestingRobot(0, new XPoint(10, 10), 0);\n\n // Set the parameters of the sensor\n double offsetAngle = 0;\n double max = 500;\n\n // Make the sensor\n CupSensor instance = new CupSensor(offsetAngle, max);\n\n instance.setObject(robot);\n\n // Look for cup\n instance.analyse(env, robots, things);\n\n // The cup should not be seen\n assertEquals(false, instance.getOutput());\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "public void calculate() {\n taskC();\n }", "@Test\n public void testFingerprintCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.fingerprintCorrelation(M, observable1, observable2);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "public void controlPointsChanged(List<Coordinates> lcp) {\n // sort the control points by x position.\n // this makes things easier later when we paint the function.\n lcp.sort(\n (point1,point2) -> Integer.compare(point1.getX(),point2.getX())\n );\n\n // collect the points in an array before doing the calculations.\n // again, this makes things easier for us.\n controlPoints=lcp.toArray(new Coordinates[0]);\n n=controlPoints.length;\n if(n<2) {\n // nothing to do here\n return;\n }\n double []X = new double[n];\n double []Y = new double[n];\n for(int i =0;i<n;i++){\n \tX[i]=controlPoints[i].getX();\n \tY[i]=controlPoints[i].getY();\n }\n // Construct the linear system S*C=T with n-2 equations.\n // The matrix S contains the left hand side of the equations on slide 13.\n // The matrix Z contains the right hand side of the equations on slide 13.\n double[][] S=new double[n-2][n-2];\n double[] Z=new double[n-2];\n \n // Fill the matrix S and the vector Z and solve S*C=T to get c_2 to c_{n-1}.\n for(int i = 0; i< n-3;i++){\n \tS[i][i]=2*delta(X,i+1,0);\n \tS[i+1][i]=delta(X,i+2,-1);\n \tS[i][i+1]=delta(X,i+1,1);\n \tZ[i]=z(Y,X,i);\n }\n S[n-2][n-2]=2*delta(X,n-1,0);\n \n C= EliminationGaussLegendre.solve(S, Z);\n \n // Calculate the n-1 coefficients b_i and d_i.\n // Note that you need all c_i here (but you know that c_1 and c_n are zero).\n //a_i = y_i;\n for(int i=1 ; i<n ; i++){\n \tD[i-1]=d(Y,X,i-1);\n \tB[i-1]=b(Y,C,X,i-1);\n }\n \n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test085() throws Throwable {\n int[] intArray0 = new int[2];\n intArray0[0] = 0;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance(166, 0);\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(166, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(166, resultMatrixSignificance0.getColCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n int int0 = ResultMatrix.SIGNIFICANCE_LOSS;\n assertEquals(2, int0);\n \n int int1 = resultMatrixSignificance0.getDefaultRowNameWidth();\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(166, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(166, resultMatrixSignificance0.getColCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(40, int1);\n assertFalse(int1 == int0);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test(timeout = 4000)\n public void test200() throws Throwable {\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n Vector<Integer> vector0 = new Vector<Integer>();\n vector0.add((Integer) 0);\n resultMatrixSignificance0.getDefaultMeanWidth();\n resultMatrixSignificance0.getRevision();\n int int0 = resultMatrixSignificance0.getVisibleRowCount();\n assertEquals(1, int0);\n \n int[] intArray0 = new int[3];\n intArray0[0] = 1;\n intArray0[1] = 1;\n intArray0[2] = 0;\n resultMatrixSignificance0.m_RowOrder = intArray0;\n resultMatrixSignificance0.getSignificance(0, 322);\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n }", "public abstract double test(ClassifierData<U> testData);", "public double getC() {\n return c;\n }", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test088() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBRelativeInformation();\n assertEquals(0.0, double0, 0.01);\n }", "@Override\n final public void computeTransform()\n {\n // PCA\n IDoubleArray Cov = moments.getCov();\n IEigenvalueDecomposition evd = alg.evd(Cov);\n IDoubleArray evalPCA = evd.getEvalNorm();\n IDoubleArray evecPCA = evd.getRightEigenvectorMatrix().viewReal();\n \n // normalize principal components\n IDoubleArray S = doublesNew.array(evalPCA.size());\n for (int i=0; i<S.size(); i++)\n S.set(i, 1.0*Math.sqrt(evalPCA.get(i)));\n // normalize weights by dividing by the standard deviation of the pcs \n IDoubleArray evecPCAscaled = alg.product(evecPCA, doublesNew.diag(S));\n\n // time-lagged covariance matrix\n this.CovTauSym = moments.getCovLagged();\n // symmetrize\n CovTauSym = alg.addWeightedToNew(0.5, CovTauSym, 0.5, alg.transposeToNew(CovTauSym)); // symmetrize\n\n // TICA weights\n IDoubleArray pcCovTau = alg.product(alg.product(alg.transposeToNew(evecPCAscaled), CovTauSym), evecPCAscaled);\n\n IEigenvalueDecomposition evd2 = alg.evd(pcCovTau);\n this.evalTICA = evd2.getEvalNorm();\n this.evecTICA = alg.product(evecPCAscaled, evd2.getRightEigenvectorMatrix().viewReal()); \n }" ]
[ "0.7036593", "0.7006459", "0.62546384", "0.61666447", "0.61112034", "0.59915125", "0.58168507", "0.5547312", "0.55261725", "0.54291964", "0.5382521", "0.5353092", "0.5255702", "0.52556413", "0.5232925", "0.5190478", "0.5171634", "0.5145396", "0.5144711", "0.5140281", "0.51295865", "0.51065046", "0.51014143", "0.50702655", "0.5044568", "0.50436914", "0.50278646", "0.50092167", "0.5005783", "0.4970687", "0.4933694", "0.49321687", "0.49167377", "0.4914119", "0.49128217", "0.4902295", "0.49019283", "0.4892522", "0.4881466", "0.48796368", "0.48744392", "0.4868145", "0.485277", "0.48511744", "0.4847933", "0.48426172", "0.48301882", "0.48274305", "0.482231", "0.48170444", "0.48096898", "0.47932518", "0.47907713", "0.47658867", "0.47648665", "0.47580153", "0.4749182", "0.4746399", "0.47454748", "0.4743144", "0.47393286", "0.47349373", "0.472444", "0.4713873", "0.4710626", "0.47054666", "0.4700523", "0.46974543", "0.46870285", "0.467471", "0.46723706", "0.46680796", "0.4660974", "0.4656181", "0.46494082", "0.4646689", "0.46462646", "0.46452397", "0.46373186", "0.4633781", "0.4632452", "0.4632322", "0.46272257", "0.46260363", "0.46228683", "0.46225712", "0.4619252", "0.46191895", "0.46161816", "0.4614769", "0.46131226", "0.46112618", "0.4608847", "0.46081623", "0.4606277", "0.46062282", "0.45978013", "0.4596592", "0.4592471", "0.4592126" ]
0.63952476
2
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_3args_2() { IIntArray traj = null; Iterable<IIntArray> cores = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public void kolmogorovSmirnovTest(double cutoff, MWBMatchingAlgorithm mwbm) {\n double p = 0;\n\n KolmogorovSmirnovTest t = new KolmogorovSmirnovTest();\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexs in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // this may invoke exactP on small sample sizes which will not terminate in all\n // cases\n // p = t.kolmogorovSmirnovTest(this.train_values.get(i),\n // this.test_values.get(j), false);\n\n // this uses approximateP everytime\n p = t.approximateP(\n t.kolmogorovSmirnovStatistic(this.train_values.get(i),\n this.test_values.get(j)),\n this.train_values.get(i).length,\n this.test_values.get(j).length);\n if (p > cutoff) {\n mwbm.setWeight(i, j, p);\n }\n }\n }\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMMI() {\n System.out.println(\"MMI\");\n int a = 0;\n int m = 0;\n int expResult = 0;\n int result = utilsHill.MMI(a, m);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testJuvenilesSpreadFromCellsWithCorrespondingMatureLctFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(3, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 6);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 9);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 3);\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n discretize0.binsTipText();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning(25);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetImportanceStats() {\n System.out.println(\"getImportanceStats\");\n MDA instance = new MDA();\n\n // make the circles close to force tree to do lots of splits / make it harder\n ClassificationDataSet train = getHarderC(10000, RandomUtil.getRandom());\n int good_featres = 2;\n\n DecisionTree tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n double[] importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n // categorical features, make space wider b/c we lose resolution\n train = getHarderC(10000, RandomUtil.getRandom());\n\n train.applyTransform(new NumericalToHistogram(train, 7));\n tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Before\n\tpublic void iniciaDisciplinaConvencional() {\n\t\tList<String> pos = new ArrayList<String>();\n\t\tList<String> pos1 = new ArrayList<String>();\n\t\tpos1.add(\"Disciplina 3\");\n\t\tpos1.add(\"Disciplina 4\");\n\t\tpos1.add(\"Disciplina 5\");\n\n\t\tminitElimBai_1 = new MinitestesEliminandoBaixa(\"Disciplina 1\", 5, pos,\n\t\t\t\t1);\n\t\tminitElimBai_2 = new MinitestesEliminandoBaixa(\"Disciplina 2\", 10,\n\t\t\t\tpos1, 2);\n\t}", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Test\n public void test13() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 1));\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testLargeValues() {\n double x = 123;\n double dof = 6.4;\n double nonCent = 100.34;\n NonCentralChiSquaredDistribution dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.7930769).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 455.038;\n dof = 12;\n nonCent = 444.44;\n\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.4961805).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 999400;\n dof = 500;\n nonCent = 1000000;\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.2913029).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n\tpublic void testCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in that's within ed=1 and incorporates an error.\n\t\t// result has only a single base because two UMIs are merged.\n\t\tString molBC2 = \"AGGGGCTC\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 1);\n\t\tAssert.assertEquals(new Byte((byte) 8), qualResult2.get(0));\n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void percentiles(double cutoff, MWBMatchingAlgorithm mwbm) {\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexes in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // get percentiles\n double trainvals[] = this.train_values.get(i);\n double testvals[] = this.test_values.get(j);\n\n Arrays.sort(trainvals);\n Arrays.sort(testvals);\n\n // percentiles\n double train_p;\n double test_p;\n double score = 0.0;\n for (int p = 1; p <= 9; p++) {\n train_p = trainvals[(int) Math.ceil(trainvals.length * (p / 100))];\n test_p = testvals[(int) Math.ceil(testvals.length * (p / 100))];\n\n if (train_p > test_p) {\n score += test_p / train_p;\n }\n else {\n score += train_p / test_p;\n }\n }\n\n if (score > cutoff) {\n mwbm.setWeight(i, j, score);\n }\n }\n }\n }", "public double[] monteCarloPercentiles(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesPercentiles;\n }", "@Test\n public void test10() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 3));\n }", "@Test\n public void testMesurerDistanceCoordonnees() {\n System.out.println(\"MesurerDistanceCoordonnees\");\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = 0.0;\n double expResult = 0.0;\n double result = Utils.MesurerDistanceCoordonnees(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n\tpublic void evalCrispDistanceWithCrisp1(){\n\t\tFuzzySet res = (CrispSet)cs1.distance(cs2);\n\t\tassertTrue(res instanceof CrispSet);\n\t\tCrispSet resCrisp = (CrispSet)res;\n\t\t//Puntos limite\t\t\n\t\tassertTrue(resCrisp.getLeftBoundary()==3);\n\t\tassertTrue(resCrisp.getRightBoundary()==6);\n\t\t//Valores extremos\n\t\tassertTrue(resCrisp.getMembershipValue(0)==0);\n\t\tassertTrue(resCrisp.getMembershipValue(3)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4.5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6.01)==0);\n\t}", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "public int getCostPerMile() {\n return costPerMile;\n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "@Test\n public void testGetProjectileSpeedMultiplier() {\n assertEquals(1.3, proj.getProjectileSpeedMultiplier(), 0.001);\n }", "public void testConcurrency() throws InterruptedException {\n initCache();\n\n final ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n final ArrayList<Integer> test = new ArrayList<Integer>();\n final LinkedBlockingQueue<Integer> idxs = new LinkedBlockingQueue<Integer>();\n\n Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n\n for (int i = 0; i < 30000; i++) {\n wcos.add(getDefaultWMSCacheObject(\"q\" + i, 50, true));\n test.add(-1);\n idxs.put(i);\n\n //put and get task\n tasks.add(new Callable<Integer>() {\n\n public Integer call() throws Exception {\n //put\n int i = idxs.take();\n boolean ok = wmsCache.put(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1, wcos.get(i));\n\n //get\n if (ok) {\n WMSTile wco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (wco.getCached()) {\n if (compareWMSObjects(wco, wcos.get(i))) {\n test.set(i, 1);\n } else {\n test.set(i, 0);\n }\n }\n }\n return i;\n }\n });\n }\n ExecutorService executorService = Executors.newFixedThreadPool(100);\n executorService.invokeAll(tasks);\n\n //test cache cleaner operated correctly\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test for presence of invalid test comparisons\n int invalid = 0;\n int valid = 0;\n for (int i = 0; i < test.size(); i++) {\n if (test.get(i) == 0) {\n invalid++;\n } else if (test.get(i) == 1) {\n valid++;\n }\n }\n assertTrue(valid > 0);\n assertTrue(invalid == 0);\n }", "@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tcompute(\"12-10-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"10-09-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"11-08-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"03-05-17\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"09-03-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"01-02-17\",\"[email protected]\", null, 22,20);\r\n\t}", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\r\n //assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testNumCellsColonisedFromOutsideGrid() {\n CompletelySpatiallyRandomParams params1 = new CompletelySpatiallyRandomParams(0.1, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params1);\n assertEquals(1, coloniser.getNumCellsColonisedFromOutsideGrid());\n\n // if baseRate = 0.5 then 9 * 0.5 = 4.5 ~ 5 cells colonised from outside grid\n CompletelySpatiallyRandomParams params2 = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params2);\n assertEquals(5, coloniser.getNumCellsColonisedFromOutsideGrid());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[1];\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n double[] doubleArray0 = new double[7];\n doubleArray0[0] = (double) 0;\n doubleArray0[1] = (double) 2;\n doubleArray0[2] = (double) 0;\n doubleArray0[3] = (double) 1;\n doubleArray0[4] = (double) 2;\n doubleArray0[5] = (double) 0;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex(resultMatrixPlainText0);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n String string0 = resultMatrixPlainText0.getSummaryTitle(216);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"i\", string0);\n \n int[][] intArray1 = new int[8][0];\n intArray1[0] = intArray0;\n intArray1[1] = intArray0;\n intArray1[2] = intArray0;\n intArray1[3] = intArray0;\n intArray1[4] = intArray0;\n intArray1[5] = intArray0;\n intArray1[6] = intArray0;\n intArray1[7] = intArray0;\n resultMatrixLatex0.setSummary(intArray1, intArray1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(8, intArray1.length);\n \n ResultMatrixCSV resultMatrixCSV1 = new ResultMatrixCSV();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(resultMatrixCSV1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n int[] intArray2 = resultMatrixCSV1.getColOrder();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNull(intArray2);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n boolean boolean0 = resultMatrixLatex0.getDefaultPrintColNames();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(boolean0);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance(resultMatrixSignificance0);\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n String string1 = resultMatrixCSV1.toStringSummary();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(string1);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"-summary data not set-\", string1);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n assertFalse(string1.equals((Object)string0));\n \n boolean boolean1 = resultMatrixPlainText0.isRowName(1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int0 = resultMatrixLatex0.getDefaultColNameWidth();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, int0);\n }", "int getN_estimators();", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(resultMatrixCSV0);\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[0][9];\n // Undeclared exception!\n try { \n resultMatrixCSV0.setSummary(intArray0, intArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "public double[] jacobi_iter(double[] x, double tolerance, int M) {\n double[][] sContent = {{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}};\n Matrix s = new Matrix(sContent);\n\n double[][] tContent = {{0, -0.5, -0.33333333}, {-0.5, 0, -0.25}, {-0.3333333333, -0.25, 0}};\n Matrix t = new Matrix(tContent);\n\n //keep track of the number of iterations\n\n int counter = 0;\n double tol = 10000; //initial\n double[] tempXVector;\n Matrix firstFirst;\n double[] firstPart; //s^-1(-T)(Xn)\n double[] secondPart; //s^-1(b)\n String output = \"\";\n\n double tempXVectorNorm;\n double xVectorNorm;\n\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"x(0): \" + output);\n while (tol > tolerance && counter < M) {\n //perform the jacobi iterations\n firstFirst = s.multiply(t);\n firstPart = Matrix.matrixVectorMultiply(firstFirst, x);\n secondPart = Matrix.matrixVectorMultiply(s, bVector);\n tempXVector = Matrix.plus(firstPart, secondPart);\n\n //find norm of vectors and then subtract the\n tempXVectorNorm = Matrix.norm(tempXVector);\n xVectorNorm = Matrix.norm(x);\n tol = tempXVectorNorm - xVectorNorm;\n tol = Math.abs(tol);\n counter++;\n numOfIterations++;\n x = tempXVector;\n }\n\n output = \"\";\n if (counter == M) {\n System.out.println(\"Jacobi Output for x(N): null\");\n System.out.println(\"Too many iterations without reaching a accurate answer.\");\n return null;\n }\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"Jacobi Output for x(N): \" + output);\n System.out.println(\"Number of Iterations using Jacobi Algorithm: \" + counter + \"\\n\");\n return x;\n }", "@Before\n public void setup() {\n threeByTwo = new Matrix(new int[][] {{1, 2, 3}, {2, 5, 6}});\n compareTwoByThree = new Matrix(new int[][] {{1, 42, 32}, {2, 15, 65}});\n oneByOne = new Matrix(new int[][] {{4}});\n rightOneByOne = new Matrix(new int[][] {{8}});\n twoByFour = new Matrix(new int[][] {{1, 2, 3, 4}, {2, 5, 6, 8}});\n twoByThree = new Matrix(new int[][] {{4, 5}, {3, 2}, {1, 1}});\n threeByThree = new Matrix(new int[][] {{4, 5, 6}, {3, 2, 0}, {1, 1, 1}});\n rightThreeByThree = new Matrix(new int[][] {{1, 2, 3}, {5, 2, 0}, {1, 1, 1}});\n emptyMatrix = new Matrix(new int[0][0]);\n // this is the known correct result of multiplying M1 by M2\n twoByTwoResult = new Matrix(new int[][] {{13, 12}, {29, 26}});\n threeByThreeResult = new Matrix(new int[][] {{35, 24, 18}, {13, 10, 9}, {7, 5, 4}});\n oneByOneSum = new Matrix(new int[][] {{12}});\n oneByOneProduct = new Matrix(new int[][] {{32}});\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\r\n\tpublic void testGetReducedCell() {\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 10., 6., 4. }, lattice1\r\n\t\t\t\t.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 12.328828005937952, lattice1.getCMLVector3(\r\n\t\t\t\t0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 7., 11., 5. }, lattice1\r\n\t\t\t\t.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 13.96424004376894, lattice1\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 6.8, -4., -9. },\r\n\t\t\t\tlattice1.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 11.968291440301744, lattice1.getCMLVector3(\r\n\t\t\t\t2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", -619.2, lattice1.getVolume(), EPS);\r\n\t\tdouble[] params = lattice1.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] {\r\n\t\t\t\t12.328828005937952, 13.96424004376894, 11.968291440301744,\r\n\t\t\t\t104.34229064539636, 86.89206686722031, 25.025508299339933 },\r\n\t\t\t\tparams, EPS);\r\n\r\n\t\tCMLLattice reducedLattice = lattice1.getReducedCell();\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 3.0, -5.0, -1.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 5.916079783099616, reducedLattice\r\n\t\t\t\t.getCMLVector3(0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 3.8, 1.0, -8.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 8.912911982062877, reducedLattice\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 10.0, 6.0, 4.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 12.328828005937952, reducedLattice\r\n\t\t\t\t.getCMLVector3(2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", 619.2, reducedLattice.getVolume(), EPS);\r\n\t\tparams = reducedLattice.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] { 5.916079783099616,\r\n\t\t\t\t8.912911982062877, 12.328828005937952, 83.73054962879554,\r\n\t\t\t\t93.14372638090103, 74.15166267765416 }, params, EPS);\r\n\r\n\t}", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void testNoCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in nowhere near the ED\n\t\t// result has 2 different bases for the two pileups.\n\t\tString molBC2 = \"ZZZZZZZZ\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 2);\n\t\tAssert.assertEquals(new Byte((byte) 31), qualResult2.get(0));\n\t\tAssert.assertEquals(new Byte((byte) 5), qualResult2.get(1));\n\t}", "@Test\n public void testQuantile() {\n System.out.println(\"quantile\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0, instance.quantile(0), 1E-7);\n assertEquals(0, instance.quantile(0.001), 1E-7);\n assertEquals(0, instance.quantile(0.01), 1E-7);\n assertEquals(2, instance.quantile(0.1), 1E-7);\n assertEquals(3, instance.quantile(0.2), 1E-7);\n assertEquals(13, instance.quantile(0.9), 1E-7);\n assertEquals(22, instance.quantile(0.99), 1E-7);\n assertEquals(30, instance.quantile(0.999), 1E-7);\n }", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus();\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times getConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test\n void checkChangeImage() {\n ImageViewModel imageModel = new ImageViewModel();\n int countUp = 10;\n int totalTime = 70;\n\n int i = imageModel.checkChangeImage(countUp, totalTime);\n\n assertEquals(1, i);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "private void findAbdomenCM(int sliceNum) {\r\n \r\n // load up the sliceBuffer with the appropriate slice from the abdomen label image\r\n try {\r\n abdomenImage.exportData(sliceNum * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"findAbdomenCM(...) Error exporting data on slice: \" +sliceNum);\r\n return;\r\n }\r\n\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n // set the centerOfMass to an generate an obvious error \r\n centerOfMass[0] = (short)-1;\r\n centerOfMass[1] = (short)-1;\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[3][0];\n int[] intArray1 = new int[1];\n intArray1[0] = 1;\n intArray0[0] = intArray1;\n int[] intArray2 = new int[9];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray2[0] = 1;\n intArray2[1] = 2;\n intArray2[2] = 2;\n intArray2[3] = 0;\n intArray2[4] = 3;\n intArray2[6] = 2;\n intArray2[7] = 1;\n intArray2[8] = 2;\n intArray0[1] = intArray2;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String string0 = resultMatrixSignificance0.getRevision();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(string0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(\"8034\", string0);\n \n resultMatrixSignificance0.setColHidden(1003, false);\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n ResultMatrixSignificance resultMatrixSignificance2 = new ResultMatrixSignificance();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotNull(resultMatrixSignificance2);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n int int0 = resultMatrixSignificance2.getVisibleColCount();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance0);\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(1, int0);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixLatex0.isSignificance((-1));\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n String string0 = resultMatrixCSV0.toString();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"Dataset,[1]\\nrow0,''\\n'[v/ /*]',''\\n\", string0);\n \n String[] stringArray0 = new String[4];\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n resultMatrixGnuPlot0.setSize(0, 0);\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int int0 = resultMatrixGnuPlot0.getDefaultColNameWidth();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(50, int0);\n }", "@Test\n public void testMedian() {\n System.out.println(\"median\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.median();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCompute() {\n System.out.println(\"compute\");\n ParallelMergeSort instance = null;\n instance.compute();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void estimatedMonthlyCostTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertEquals(6.475, pb1.estimatedMonthlyCost(), 0.00001);\n }" ]
[ "0.7719048", "0.7314452", "0.6584927", "0.5736506", "0.5605106", "0.5367599", "0.53661937", "0.53501797", "0.5276743", "0.5212073", "0.5192482", "0.51843244", "0.5181949", "0.5180885", "0.5106315", "0.5093115", "0.50918853", "0.5088555", "0.5084552", "0.50662374", "0.50125676", "0.4966125", "0.4925259", "0.4916035", "0.4904818", "0.4897373", "0.4895549", "0.4877143", "0.48735413", "0.4864071", "0.48632434", "0.48575664", "0.48549956", "0.48405433", "0.48392025", "0.48380393", "0.48249203", "0.48199818", "0.4816632", "0.48130402", "0.4805838", "0.4802146", "0.48009422", "0.47922707", "0.47898033", "0.47840303", "0.47821093", "0.47802436", "0.47629127", "0.47511753", "0.47333142", "0.47305655", "0.4725433", "0.47171962", "0.47146106", "0.47067836", "0.46845716", "0.46632043", "0.4658659", "0.46537662", "0.46536765", "0.46477914", "0.46441466", "0.46402258", "0.46346408", "0.4631873", "0.46044913", "0.4601081", "0.46004325", "0.46003738", "0.45952582", "0.45915255", "0.4590748", "0.45904052", "0.4590059", "0.4588771", "0.45861593", "0.45860898", "0.45849136", "0.45820263", "0.45817718", "0.45815688", "0.45786047", "0.4573722", "0.45692286", "0.4568142", "0.45679897", "0.45642865", "0.45628566", "0.45587856", "0.45554203", "0.45536768", "0.45530653", "0.4550122", "0.4548589", "0.45407516", "0.4540433", "0.4530641", "0.45272774", "0.4513924" ]
0.76356745
1
Test of estimateCmilestoning method, of class MarkovModelUtilities.
@Test public void testEstimateCmilestoning_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCmilestoning(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMCMCWithoutAllelicPoN() {\n final double meanBiasSimulated = 1.2;\n final double biasVarianceSimulated = 0.04;\n testMCMC(meanBiasSimulated, biasVarianceSimulated, meanBiasSimulated, biasVarianceSimulated, AllelicPanelOfNormals.EMPTY_PON);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void calcROItest() {\n DirectMC h = new DirectMC(\"AdMailing\", 10000.00, 3.00, 2000);\n Assert.assertEquals(.4286, h.calcROI(), 1);\n }", "public void kolmogorovSmirnovTest(double cutoff, MWBMatchingAlgorithm mwbm) {\n double p = 0;\n\n KolmogorovSmirnovTest t = new KolmogorovSmirnovTest();\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexs in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // this may invoke exactP on small sample sizes which will not terminate in all\n // cases\n // p = t.kolmogorovSmirnovTest(this.train_values.get(i),\n // this.test_values.get(j), false);\n\n // this uses approximateP everytime\n p = t.approximateP(\n t.kolmogorovSmirnovStatistic(this.train_values.get(i),\n this.test_values.get(j)),\n this.train_values.get(i).length,\n this.test_values.get(j).length);\n if (p > cutoff) {\n mwbm.setWeight(i, j, p);\n }\n }\n }\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMMI() {\n System.out.println(\"MMI\");\n int a = 0;\n int m = 0;\n int expResult = 0;\n int result = utilsHill.MMI(a, m);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "private double GetMCRTestSet() \n\t{\n\t\tint numErrors = 0;\n\t\t\n\t\tfor(int i = ITrain; i < ITrain+ITest; i++)\n\t\t{\n\t\t\tPreCompute(i);\n\t\t\t\n\t\t\tdouble max_Y_hat_ic = Double.MIN_VALUE;\n\t\t\tint label_i = -1; \n\t\t\t\n\t\t\tfor(int c = 0; c < C; c++)\n\t\t\t{\n\t\t\t\tdouble Y_hat_ic = Predict(i, c);\n\t\t\t\t\n\n\t\t\t\tif(lossType == LossTypes.LOGISTIC)\n\t\t\t\t\tY_hat_ic = Sigmoid.Calculate(Y_hat_ic);\n\t\t\t\t\n\t\t\t\tif(Y_hat_ic > max_Y_hat_ic)\n\t\t\t\t{\n\t\t\t\t\tmax_Y_hat_ic = Y_hat_ic; \n\t\t\t\t\tlabel_i = (int)Math.ceil(c);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( nominalLabels.indexOf(Y.get(i)) != label_i ) \n\t\t\t\tnumErrors++;\n\t\t}\n\t\t\n\t\treturn (double)numErrors/(double)ITest; \n\t}", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testJuvenilesSpreadFromCellsWithCorrespondingMatureLctFromInsideGrid() {\n params = new CompletelySpatiallyRandomParams(3, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 6);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 9);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 3);\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test(timeout = 4000)\n public void test07() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setInvertSelection(true);\n discretize0.useEqualFrequencyTipText();\n int int0 = (-501);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-501));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test08() throws Throwable {\n Discretize discretize0 = new Discretize(\"\");\n discretize0.binsTipText();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning(25);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetImportanceStats() {\n System.out.println(\"getImportanceStats\");\n MDA instance = new MDA();\n\n // make the circles close to force tree to do lots of splits / make it harder\n ClassificationDataSet train = getHarderC(10000, RandomUtil.getRandom());\n int good_featres = 2;\n\n DecisionTree tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n double[] importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n // categorical features, make space wider b/c we lose resolution\n train = getHarderC(10000, RandomUtil.getRandom());\n\n train.applyTransform(new NumericalToHistogram(train, 7));\n tree = new DecisionTree();\n tree.setPruningMethod(TreePruner.PruningMethod.NONE);\n tree.train(train);\n\n importances = instance.getImportanceStats(tree, train);\n\n // make sure the first 2 features were infered as more important than the\n // others!\n for (int i = good_featres; i < importances.length; i++) {\n for (int j = 0; j < good_featres; j++)\n assertTrue(importances[j] > importances[i]);\n }\n\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\n }", "final CM computeCM(int[/**/][/**/] votes, Chunk[] chks, boolean local, boolean balance) {\n CM cm = new CM();\n int rows = votes.length;\n int validation_rows = 0;\n int cmin = (int) _data.vecs()[_classcol].min();\n\n // Assemble the votes-per-class into predictions & score each row\n\n // Make an empty confusion matrix for this chunk\n cm._matrix = new long[_N][_N];\n float preds[] = new float[_N+1];\n\n float num_trees = _errorsPerTree.length;\n\n // Loop over the rows\n for( int row = 0; row < rows; row++ ) {\n\n // Skip rows with missing response values\n if (chks[_classcol].isNA0(row)) continue;\n\n // The class votes for the i-th row\n int[] vi = votes[row];\n\n // Fill the predictions with the vote counts, keeping the 0th index unchanged\n for( int v=0; v<_N; v++ ) preds[v+1] = vi[v];\n\n float s = doSum(vi);\n if (s == 0) {\n cm._skippedRows++;\n continue;\n }\n\n int result;\n if (balance) {\n float[] scored = toProbs(preds.clone(), doSum(vi));\n double probsum=0;\n for( int c=1; c<scored.length; c++ ) {\n final double original_fraction = _model.priordist()[c-1];\n assert(original_fraction > 0) : \"original fraction should be > 0, but is \" + original_fraction + \": not using enough training data?\";\n final double oversampled_fraction = _model.modeldist()[c-1];\n assert(oversampled_fraction > 0) : \"oversampled fraction should be > 0, but is \" + oversampled_fraction + \": not using enough training data?\";\n assert(!Double.isNaN(scored[c]));\n scored[c] *= original_fraction / oversampled_fraction;\n probsum += scored[c];\n }\n for (int i=1;i<scored.length;++i) scored[i] /= probsum;\n result = ModelUtils.getPrediction(scored, row);\n } else {\n // `result` is the class with the most votes, accounting for ties in the shared logic in ModelUtils\n result = ModelUtils.getPrediction(preds, row);\n }\n\n // Get the class value from the response column for the current row\n int cclass = alignDataIdx((int) chks[_classcol].at80(row) - cmin);\n assert 0 <= cclass && cclass < _N : (\"cclass \" + cclass + \" < \" + _N);\n\n // Ignore rows with zero votes, but still update the sum of squared errors\n if( vi[result]==0 ) {\n cm._skippedRows++;\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n continue;\n }\n\n // Update the confusion matrix\n cm._matrix[cclass][result]++;\n if( result != cclass ) cm._errors++;\n validation_rows++;\n\n // Update the sum of squared errors\n if (!local) _sum += doSSECalc(vi, preds, cclass);\n float sum = doSum(vi);\n\n // Binomial classification -> compute AUC, draw ROC\n if(_N == 2 && !local) {\n float snd = preds[2] / sum;\n for(int i = 0; i < ModelUtils.DEFAULT_THRESHOLDS.length; i++) {\n int p = snd >= ModelUtils.DEFAULT_THRESHOLDS[i] ? 1 : 0;\n _cms[i][cclass][p]++; // Increase matrix\n }\n }\n }\n\n // End of loop over rows, return confusion matrix\n cm._rows=validation_rows;\n return cm;\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Before\n\tpublic void iniciaDisciplinaConvencional() {\n\t\tList<String> pos = new ArrayList<String>();\n\t\tList<String> pos1 = new ArrayList<String>();\n\t\tpos1.add(\"Disciplina 3\");\n\t\tpos1.add(\"Disciplina 4\");\n\t\tpos1.add(\"Disciplina 5\");\n\n\t\tminitElimBai_1 = new MinitestesEliminandoBaixa(\"Disciplina 1\", 5, pos,\n\t\t\t\t1);\n\t\tminitElimBai_2 = new MinitestesEliminandoBaixa(\"Disciplina 2\", 10,\n\t\t\t\tpos1, 2);\n\t}", "@Test\n public void test13() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 1));\n }", "private void computeMultiClassMCC(ConfusionMatrixElement[] elements) {\n\t\tdouble Sq = matrixTotal * matrixTotal;\n\t\tdouble CS = Arrays.stream(elements).map(n -> n.tp).reduce(0.0d, (n, m) -> n + m) * matrixTotal;\n\t\tdouble t = 0.0d, p = 0.0d, tt = 0.0d, pp = 0.0d, tp = 0.0d;\n\t\t\n\t\tfor (ConfusionMatrixElement e : elements) {\n\t\t\tt = (e.tp + e.fp); \n\t\t\tp = (e.tp + e.fn);\n\t\t\t\n\t\t\ttt += (t * t);\n\t\t\tpp += (p * p);\n\t\t\ttp += (t * p);\n\t\t}\n\t\tmatrixMCC = (CS - tp) / (Math.sqrt(Sq - pp) * Math.sqrt(Sq - tt));\n\t}", "@Test\n public void testLargeValues() {\n double x = 123;\n double dof = 6.4;\n double nonCent = 100.34;\n NonCentralChiSquaredDistribution dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.7930769).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 455.038;\n dof = 12;\n nonCent = 444.44;\n\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.4961805).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n x = 999400;\n dof = 500;\n nonCent = 1000000;\n dist = new NonCentralChiSquaredDistribution(dof, nonCent);\n assertThat(0.2913029).isCloseTo(dist.getCDF(x), offset(1e-6));\n\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "@Test\n\tpublic void testCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in that's within ed=1 and incorporates an error.\n\t\t// result has only a single base because two UMIs are merged.\n\t\tString molBC2 = \"AGGGGCTC\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 1);\n\t\tAssert.assertEquals(new Byte((byte) 8), qualResult2.get(0));\n\t}", "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void percentiles(double cutoff, MWBMatchingAlgorithm mwbm) {\n for (int i = 0; i < this.train.numAttributes(); i++) {\n for (int j = 0; j < this.test.numAttributes(); j++) {\n // negative infinity counts as not present, we do this so we don't have to map\n // between attribute indexes in weka\n // and the result of the mwbm computation\n mwbm.setWeight(i, j, Double.NEGATIVE_INFINITY);\n\n // class attributes are not relevant\n if (this.test.classIndex() == j) {\n continue;\n }\n if (this.train.classIndex() == i) {\n continue;\n }\n\n // get percentiles\n double trainvals[] = this.train_values.get(i);\n double testvals[] = this.test_values.get(j);\n\n Arrays.sort(trainvals);\n Arrays.sort(testvals);\n\n // percentiles\n double train_p;\n double test_p;\n double score = 0.0;\n for (int p = 1; p <= 9; p++) {\n train_p = trainvals[(int) Math.ceil(trainvals.length * (p / 100))];\n test_p = testvals[(int) Math.ceil(testvals.length * (p / 100))];\n\n if (train_p > test_p) {\n score += test_p / train_p;\n }\n else {\n score += train_p / test_p;\n }\n }\n\n if (score > cutoff) {\n mwbm.setWeight(i, j, score);\n }\n }\n }\n }", "public double[] monteCarloPercentiles(){\n if(!this.monteCarloDone)this.monteCarlo();\n return this.randomEigenValuesPercentiles;\n }", "@Test\n public void test10() {\n Assert.assertEquals(1, MedianOfThreeNumbers.median(1, 1, 3));\n }", "@Test\n public void testMesurerDistanceCoordonnees() {\n System.out.println(\"MesurerDistanceCoordonnees\");\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = 0.0;\n double expResult = 0.0;\n double result = Utils.MesurerDistanceCoordonnees(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize(\"\\tInvert matching sense of column indexes.\");\n discretize0.setOutputFormat();\n discretize0.listOptions();\n Discretize discretize1 = new Discretize();\n discretize1.setIgnoreClass(false);\n String[] stringArray0 = new String[2];\n stringArray0[0] = \"\\tInvert matching sense of column indexes.\";\n stringArray0[1] = \"\";\n Discretize.main(stringArray0);\n String string0 = discretize1.findNumBinsTipText();\n assertEquals(\"Optimize number of equal-width bins using leave-one-out. Doesn't work for equal-frequency binning\", string0);\n \n discretize1.setInvertSelection(false);\n discretize0.getBinRangesString(511);\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n \n discretize1.getFindNumBins();\n assertEquals(10, discretize1.getBins());\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test\n\tpublic void evalCrispDistanceWithCrisp1(){\n\t\tFuzzySet res = (CrispSet)cs1.distance(cs2);\n\t\tassertTrue(res instanceof CrispSet);\n\t\tCrispSet resCrisp = (CrispSet)res;\n\t\t//Puntos limite\t\t\n\t\tassertTrue(resCrisp.getLeftBoundary()==3);\n\t\tassertTrue(resCrisp.getRightBoundary()==6);\n\t\t//Valores extremos\n\t\tassertTrue(resCrisp.getMembershipValue(0)==0);\n\t\tassertTrue(resCrisp.getMembershipValue(3)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(4.5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(5)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6)==1);\n\t\tassertTrue(resCrisp.getMembershipValue(6.01)==0);\n\t}", "@Test\n public void testJuvenilesSpreadFromOutsideInsideGrid() {\n params = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params);\n coloniser.updateJuvenilePresenceLayers();\n\n assertTrue(countJuvenilesInGrid(juvenilePine) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileOak) >= 5);\n assertTrue(countJuvenilesInGrid(juvenileDeciduous) >= 5);\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "public int getCostPerMile() {\n return costPerMile;\n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test\n public void testConnectedComponents()\n {\n Collection<IIntArray> cc1 = MarkovModel.util.connectedComponents(P1);\n assertTrue(cc1.containsAll(C1));\n assertEquals(cc1.size(), C1.size());\n\n Collection<IIntArray> cc2 = MarkovModel.util.connectedComponents(P2);\n assertTrue(cc2.containsAll(C2));\n assertEquals(cc2.size(), C2.size());\n\n Collection<IIntArray> cc3 = MarkovModel.util.connectedComponents(P3);\n assertTrue(cc3.containsAll(C3));\n assertEquals(cc3.size(), C3.size()); \n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Test\r\n\tpublic void testAllMarkupsElectronics() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 5, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"113.40\"));\r\n\t}", "@Test\n public void testGetProjectileSpeedMultiplier() {\n assertEquals(1.3, proj.getProjectileSpeedMultiplier(), 0.001);\n }", "public void testConcurrency() throws InterruptedException {\n initCache();\n\n final ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n final ArrayList<Integer> test = new ArrayList<Integer>();\n final LinkedBlockingQueue<Integer> idxs = new LinkedBlockingQueue<Integer>();\n\n Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();\n\n for (int i = 0; i < 30000; i++) {\n wcos.add(getDefaultWMSCacheObject(\"q\" + i, 50, true));\n test.add(-1);\n idxs.put(i);\n\n //put and get task\n tasks.add(new Callable<Integer>() {\n\n public Integer call() throws Exception {\n //put\n int i = idxs.take();\n boolean ok = wmsCache.put(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1, wcos.get(i));\n\n //get\n if (ok) {\n WMSTile wco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (wco.getCached()) {\n if (compareWMSObjects(wco, wcos.get(i))) {\n test.set(i, 1);\n } else {\n test.set(i, 0);\n }\n }\n }\n return i;\n }\n });\n }\n ExecutorService executorService = Executors.newFixedThreadPool(100);\n executorService.invokeAll(tasks);\n\n //test cache cleaner operated correctly\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test for presence of invalid test comparisons\n int invalid = 0;\n int valid = 0;\n for (int i = 0; i < test.size(); i++) {\n if (test.get(i) == 0) {\n invalid++;\n } else if (test.get(i) == 1) {\n valid++;\n }\n }\n assertTrue(valid > 0);\n assertTrue(invalid == 0);\n }", "@Test\n public void testGetCenter() {\n int expResult = 3;\n int result = this.dummyDigitSize.getCenter();\n assertEquals(expResult, result);\n }", "@Before\r\n\tpublic void setup() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tcompute(\"12-10-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"10-09-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"11-08-20\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"03-05-17\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"09-03-19\",\"[email protected]\", null, 22,20);\r\n\t\tcompute(\"01-02-17\",\"[email protected]\", null, 22,20);\r\n\t}", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testSizeManagementWMS() {\n initCache();\n \n ArrayList<WMSTile> wcos = new ArrayList<WMSTile>();\n long putSize = 0;\n long maxSize = 0;\n int cacheSizeDropCount = 0;\n for (int i = 0; i < 1000; i++) {\n WMSTile wco = getDefaultWMSCacheObject(\"q\" + i, 50, true);\n putSize += wco.getSize();\n\n wcos.add(wco);\n long size = wmsCache.getSize();\n\n if (size < maxSize) {\n maxSize = size;\n cacheSizeDropCount++;\n } else {\n maxSize = size;\n }\n\n boolean result = wmsCache.put(wco.getQuery(), wco.getColourmode(), PointType.POINT_1, wco);\n\n //test if cache is full the put was unsuccessful\n //allow for cachecleaner to have reduced the size between put and test\n boolean test = (wmsCache.getSize() + wco.getSize() > wmsCache.getMaxCacheSize()) == !result;\n if (test == false) {\n assertTrue((size + wco.getSize() > wmsCache.getMaxCacheSize()) == !result);\n }\n\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n }\n\n //test size calcuations are operating\n assertTrue(putSize > 10000);\n\n //test cache cleaner was run more than once\n assertTrue(cacheSizeDropCount > 1);\n\n //test cache size is under max\n assertTrue(wmsCache.getSize() <= wmsCache.getMaxCacheSize());\n\n //test gets. Anything that is a placeholder will be null.\n int cachedCount = 0;\n for (int i = 0; i < wcos.size(); i++) {\n WMSTile getwco = wmsCache.get(wcos.get(i).getQuery(), wcos.get(i).getColourmode(), PointType.POINT_1);\n if (getwco.getCached()) {\n assertTrue(compareWMSObjects(wcos.get(i), getwco));\n cachedCount++;\n }\n }\n\n //test if at least 2 objects were cached at the end\n assertTrue(cachedCount > 1);\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\r\n //assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV(0, 0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[0];\n resultMatrixCSV0.setRowOrder(intArray0);\n assertArrayEquals(new int[] {}, intArray0);\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getColCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(0, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, intArray0.length);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML();\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n resultMatrixHTML0.setMeanPrec((-2615));\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML(2312, (-2214));\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testNumCellsColonisedFromOutsideGrid() {\n CompletelySpatiallyRandomParams params1 = new CompletelySpatiallyRandomParams(0.1, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params1);\n assertEquals(1, coloniser.getNumCellsColonisedFromOutsideGrid());\n\n // if baseRate = 0.5 then 9 * 0.5 = 4.5 ~ 5 cells colonised from outside grid\n CompletelySpatiallyRandomParams params2 = new CompletelySpatiallyRandomParams(0.5, 0);\n coloniser = new CompletelySpatiallyRandomColoniser(landCoverType, juvenilePine, juvenileOak,\n juvenileDeciduous, params2);\n assertEquals(5, coloniser.getNumCellsColonisedFromOutsideGrid());\n }", "@Test(timeout = 4000)\n public void test117() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[] intArray0 = new int[1];\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n double[] doubleArray0 = new double[7];\n doubleArray0[0] = (double) 0;\n doubleArray0[1] = (double) 2;\n doubleArray0[2] = (double) 0;\n doubleArray0[3] = (double) 1;\n doubleArray0[4] = (double) 2;\n doubleArray0[5] = (double) 0;\n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex(resultMatrixPlainText0);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n String string0 = resultMatrixPlainText0.getSummaryTitle(216);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"i\", string0);\n \n int[][] intArray1 = new int[8][0];\n intArray1[0] = intArray0;\n intArray1[1] = intArray0;\n intArray1[2] = intArray0;\n intArray1[3] = intArray0;\n intArray1[4] = intArray0;\n intArray1[5] = intArray0;\n intArray1[6] = intArray0;\n intArray1[7] = intArray0;\n resultMatrixLatex0.setSummary(intArray1, intArray1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(8, intArray1.length);\n \n ResultMatrixCSV resultMatrixCSV1 = new ResultMatrixCSV();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(resultMatrixCSV1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n int[] intArray2 = resultMatrixCSV1.getColOrder();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNull(intArray2);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n \n boolean boolean0 = resultMatrixLatex0.getDefaultPrintColNames();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(boolean0);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance(resultMatrixSignificance0);\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n String string1 = resultMatrixCSV1.toStringSummary();\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV1.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV1.getColCount());\n assertEquals(0, resultMatrixCSV1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV1.getColNameWidth());\n assertEquals(1, resultMatrixCSV1.getVisibleColCount());\n assertEquals(\"CSV\", resultMatrixCSV1.getDisplayName());\n assertTrue(resultMatrixCSV1.getPrintRowNames());\n assertEquals(2, resultMatrixCSV1.getDefaultMeanPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV1.showAverageTipText());\n assertTrue(resultMatrixCSV1.getEnumerateColNames());\n assertEquals(0, resultMatrixCSV1.getMeanWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV1.globalInfo());\n assertEquals(0, resultMatrixCSV1.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV1.countWidthTipText());\n assertEquals(25, resultMatrixCSV1.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV1.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV1.getStdDevWidth());\n assertFalse(resultMatrixCSV1.getShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV1.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV1.meanPrecTipText());\n assertEquals(2, resultMatrixCSV1.getDefaultStdDevPrec());\n assertTrue(resultMatrixCSV1.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV1.printRowNamesTipText());\n assertEquals(1, resultMatrixCSV1.getRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateRowNamesTipText());\n assertEquals(2, resultMatrixCSV1.getStdDevPrec());\n assertFalse(resultMatrixCSV1.getDefaultShowAverage());\n assertFalse(resultMatrixCSV1.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV1.getRemoveFilterName());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV1.meanWidthTipText());\n assertFalse(resultMatrixCSV1.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV1.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV1.getDefaultCountWidth());\n assertTrue(resultMatrixCSV1.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV1.getRowNameWidth());\n assertFalse(resultMatrixCSV1.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV1.showStdDevTipText());\n assertFalse(resultMatrixCSV1.getShowStdDev());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV1.significanceWidthTipText());\n assertFalse(resultMatrixCSV1.getDefaultPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV1.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV1.rowNameWidthTipText());\n assertEquals(0, resultMatrixCSV1.getCountWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV1.printColNamesTipText());\n assertEquals(2, resultMatrixCSV1.getMeanPrec());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV1.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV1.getSignificanceWidth());\n assertFalse(resultMatrixCSV1.getPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV1.removeFilterNameTipText());\n assertNotNull(string1);\n assertNotSame(resultMatrixCSV1, resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"-summary data not set-\", string1);\n assertFalse(resultMatrixCSV1.equals((Object)resultMatrixCSV0));\n assertFalse(string1.equals((Object)string0));\n \n boolean boolean1 = resultMatrixPlainText0.isRowName(1);\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int0 = resultMatrixLatex0.getDefaultColNameWidth();\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(5, resultMatrixLatex0.getCountWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(25, resultMatrixLatex0.getRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertTrue(resultMatrixLatex0.getPrintColNames());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, int0);\n }", "int getN_estimators();", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(resultMatrixCSV0);\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleRowCount());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertEquals(1, resultMatrixHTML0.getColCount());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertEquals(1, resultMatrixHTML0.getVisibleColCount());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[0][9];\n // Undeclared exception!\n try { \n resultMatrixCSV0.setSummary(intArray0, intArray0);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test\n public void testSmallDist() throws Exception {\n assertTrue(\n new ImageSimilarity(getFile(\"imageSimilarity/with.png\"))\n .calcDistance(ImageIO.read(getFile(\"imageSimilarity/without.png\")))\n > 0);\n }", "double[] compute_t_Cm (double[][] t_mmnt, double thickness, double camber) {\n double[] result = new double[15];\n if (camber >= 0)\n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = ci15_from_javafoil_data(t_mmnt, aoa, thickness, camber);\n else \n for (int aoa = -28, i = 0; aoa <= 28; aoa += 4, i++) \n result[i] = -ci15_from_javafoil_data(t_mmnt, -aoa, thickness, camber);\n return result;\n }", "@Test\r\n\tpublic void testGetReducedCell() {\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 10., 6., 4. }, lattice1\r\n\t\t\t\t.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 12.328828005937952, lattice1.getCMLVector3(\r\n\t\t\t\t0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 7., 11., 5. }, lattice1\r\n\t\t\t\t.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 13.96424004376894, lattice1\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 6.8, -4., -9. },\r\n\t\t\t\tlattice1.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 11.968291440301744, lattice1.getCMLVector3(\r\n\t\t\t\t2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", -619.2, lattice1.getVolume(), EPS);\r\n\t\tdouble[] params = lattice1.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] {\r\n\t\t\t\t12.328828005937952, 13.96424004376894, 11.968291440301744,\r\n\t\t\t\t104.34229064539636, 86.89206686722031, 25.025508299339933 },\r\n\t\t\t\tparams, EPS);\r\n\r\n\t\tCMLLattice reducedLattice = lattice1.getReducedCell();\r\n\t\tCMLVector3Test.assertEquals(\"a\", new double[] { 3.0, -5.0, -1.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(0), EPS);\r\n\t\tAssert.assertEquals(\"alen\", 5.916079783099616, reducedLattice\r\n\t\t\t\t.getCMLVector3(0).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"b\", new double[] { 3.8, 1.0, -8.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(1), EPS);\r\n\t\tAssert.assertEquals(\"blen\", 8.912911982062877, reducedLattice\r\n\t\t\t\t.getCMLVector3(1).getLength(), EPS);\r\n\t\tCMLVector3Test.assertEquals(\"c\", new double[] { 10.0, 6.0, 4.0 },\r\n\t\t\t\treducedLattice.getCMLVector3(2), EPS);\r\n\t\tAssert.assertEquals(\"clen\", 12.328828005937952, reducedLattice\r\n\t\t\t\t.getCMLVector3(2).getLength(), EPS);\r\n\t\tAssert.assertEquals(\"vol\", 619.2, reducedLattice.getVolume(), EPS);\r\n\t\tparams = reducedLattice.getCellParameters();\r\n\t\tDoubleTestBase.assertEquals(\"params\", new double[] { 5.916079783099616,\r\n\t\t\t\t8.912911982062877, 12.328828005937952, 83.73054962879554,\r\n\t\t\t\t93.14372638090103, 74.15166267765416 }, params, EPS);\r\n\r\n\t}", "public double[] jacobi_iter(double[] x, double tolerance, int M) {\n double[][] sContent = {{1.0, 0, 0}, {0, 1.0, 0}, {0, 0, 1.0}};\n Matrix s = new Matrix(sContent);\n\n double[][] tContent = {{0, -0.5, -0.33333333}, {-0.5, 0, -0.25}, {-0.3333333333, -0.25, 0}};\n Matrix t = new Matrix(tContent);\n\n //keep track of the number of iterations\n\n int counter = 0;\n double tol = 10000; //initial\n double[] tempXVector;\n Matrix firstFirst;\n double[] firstPart; //s^-1(-T)(Xn)\n double[] secondPart; //s^-1(b)\n String output = \"\";\n\n double tempXVectorNorm;\n double xVectorNorm;\n\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"x(0): \" + output);\n while (tol > tolerance && counter < M) {\n //perform the jacobi iterations\n firstFirst = s.multiply(t);\n firstPart = Matrix.matrixVectorMultiply(firstFirst, x);\n secondPart = Matrix.matrixVectorMultiply(s, bVector);\n tempXVector = Matrix.plus(firstPart, secondPart);\n\n //find norm of vectors and then subtract the\n tempXVectorNorm = Matrix.norm(tempXVector);\n xVectorNorm = Matrix.norm(x);\n tol = tempXVectorNorm - xVectorNorm;\n tol = Math.abs(tol);\n counter++;\n numOfIterations++;\n x = tempXVector;\n }\n\n output = \"\";\n if (counter == M) {\n System.out.println(\"Jacobi Output for x(N): null\");\n System.out.println(\"Too many iterations without reaching a accurate answer.\");\n return null;\n }\n for (double elem : x) {\n output += elem + \", \";\n }\n System.out.println(\"Jacobi Output for x(N): \" + output);\n System.out.println(\"Number of Iterations using Jacobi Algorithm: \" + counter + \"\\n\");\n return x;\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Before\n public void setup() {\n threeByTwo = new Matrix(new int[][] {{1, 2, 3}, {2, 5, 6}});\n compareTwoByThree = new Matrix(new int[][] {{1, 42, 32}, {2, 15, 65}});\n oneByOne = new Matrix(new int[][] {{4}});\n rightOneByOne = new Matrix(new int[][] {{8}});\n twoByFour = new Matrix(new int[][] {{1, 2, 3, 4}, {2, 5, 6, 8}});\n twoByThree = new Matrix(new int[][] {{4, 5}, {3, 2}, {1, 1}});\n threeByThree = new Matrix(new int[][] {{4, 5, 6}, {3, 2, 0}, {1, 1, 1}});\n rightThreeByThree = new Matrix(new int[][] {{1, 2, 3}, {5, 2, 0}, {1, 1, 1}});\n emptyMatrix = new Matrix(new int[0][0]);\n // this is the known correct result of multiplying M1 by M2\n twoByTwoResult = new Matrix(new int[][] {{13, 12}, {29, 26}});\n threeByThreeResult = new Matrix(new int[][] {{35, 24, 18}, {13, 10, 9}, {7, 5, 4}});\n oneByOneSum = new Matrix(new int[][] {{12}});\n oneByOneProduct = new Matrix(new int[][] {{32}});\n }", "@Test\n\tpublic void testOptimization() throws Exception {\n\t\tfor(int i = 0; i < 20000000; i++) {\n\t\t\tint _300s = (int) (Math.random() * 100);\n\t\t\tint _100s = (int) (Math.random() * 100);\n\t\t\tint _50s = (int) (Math.random() * 100);\n\t\t\tint misses = (int) (Math.random() * 100);\n\t\t\t\n\t\t\tdouble acc = OsuApiScore.getAccuracy(_300s, _100s, _50s, misses);\n\t\t\t\n\t\t\tAccuracyDistribution accuracyDistribution = AccuracyDistribution.closest(\n\t\t\t\t\t_300s + _100s + _50s + misses, misses,\n\t\t\t\t\tacc);\n\t\t\t\n\t\t\tdouble rec = OsuApiScore.getAccuracy(accuracyDistribution.getX300(),\n\t\t\t\t\taccuracyDistribution.getX100(), accuracyDistribution.getX50(),\n\t\t\t\t\taccuracyDistribution.getMiss());\n\t\t\t\n\t\t\tassertEquals(acc, rec, 0d);\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void testNoCollapseByEditDistance() {\n\t\tString cellBC = \"ATCAGGGACAGA\";\n\t\tString molBC = \"CGGGGCTC\";\n\t\tint snpPos = 76227022;\n\t\tInterval snpInterval = new Interval(\"HUMAN_1\", snpPos, snpPos, true, \"test\");\n\t\tSampleGenotypeProbabilities result = new SampleGenotypeProbabilities(snpInterval, cellBC);\n\t\tSNPUMIBasePileup p = getPileUpFromFile(cellBC, molBC);\n\t\tresult.add(p);\n\n\t\t// let's add another pileup in nowhere near the ED\n\t\t// result has 2 different bases for the two pileups.\n\t\tString molBC2 = \"ZZZZZZZZ\";\n\t\tSNPUMIBasePileup p2 = getPileUpFromFile(cellBC, molBC2);\n\t\tchar[] b2 = { 'G', 'G', 'T' };\n\t\tbyte[] bases2 = new byte[b2.length];\n\t\tStringUtil.charsToBytes(b2, 0, b2.length, bases2, 0);\n\t\tbyte[] quals2 = { 37, 37, 10 };\n\t\tp2.setBasesAndQualities(bases2, quals2);\n\t\tresult.add(p2);\n\t\tresult.collapseUMIs(1);\n\n\t\tList<Byte> qualResult2 = result.getQualities();\n\t\tAssert.assertEquals(qualResult2.size(), 2);\n\t\tAssert.assertEquals(new Byte((byte) 31), qualResult2.get(0));\n\t\tAssert.assertEquals(new Byte((byte) 5), qualResult2.get(1));\n\t}", "@Test\n\tpublic void testaGetMensagem() {\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 1 eh avaliada com 5 minitestes, eliminando 1 dos mais baixos.\",\n\t\t\t\tminitElimBai_1.getMensagem());\n\t\tAssert.assertEquals(\n\t\t\t\t\"Erro no getMensagem()\",\n\t\t\t\t\"Disciplina 2 eh avaliada com 10 minitestes, eliminando 2 dos mais baixos.\",\n\t\t\t\tminitElimBai_2.getMensagem());\n\t}", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderPRC((-1));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testQuantile() {\n System.out.println(\"quantile\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(0, instance.quantile(0), 1E-7);\n assertEquals(0, instance.quantile(0.001), 1E-7);\n assertEquals(0, instance.quantile(0.01), 1E-7);\n assertEquals(2, instance.quantile(0.1), 1E-7);\n assertEquals(3, instance.quantile(0.2), 1E-7);\n assertEquals(13, instance.quantile(0.9), 1E-7);\n assertEquals(22, instance.quantile(0.99), 1E-7);\n assertEquals(30, instance.quantile(0.999), 1E-7);\n }", "public void testGetConformingStimulusLargeScale() throws Exception {\n long start = System.currentTimeMillis();\n Stimulus stimulus = new MockStimulus();\n message.setConformingStimulus(stimulus);\n for (int i = 0; i < TOTAL_ITERATION; i++) {\n message.getConformingStimulus();\n }\n System.out.println(\"Calling \" + TOTAL_ITERATION + \"times getConformingStimulus method\"\n + \" costs:\" + (System.currentTimeMillis() - start) + \" ms\");\n }", "@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test\n void checkChangeImage() {\n ImageViewModel imageModel = new ImageViewModel();\n int countUp = 10;\n int totalTime = 70;\n\n int i = imageModel.checkChangeImage(countUp, totalTime);\n\n assertEquals(1, i);\n }", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n Discretize discretize0 = new Discretize(\"9/&=Kq&\");\n discretize0.getBinRangesString((-1679));\n int int0 = (-98);\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-98));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test23() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setIgnoreClass(true);\n discretize0.getOptions();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualFrequencyBinning((-821));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "private void findAbdomenCM(int sliceNum) {\r\n \r\n // load up the sliceBuffer with the appropriate slice from the abdomen label image\r\n try {\r\n abdomenImage.exportData(sliceNum * sliceSize, sliceSize, sliceBuffer);\r\n } catch (IOException ex) {\r\n System.err.println(\"findAbdomenCM(...) Error exporting data on slice: \" +sliceNum);\r\n return;\r\n }\r\n\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n // set the centerOfMass to an generate an obvious error \r\n centerOfMass[0] = (short)-1;\r\n centerOfMass[1] = (short)-1;\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n Discretize discretize0 = new Discretize();\n String string0 = discretize0.makeBinaryTipText();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(\"Make resulting attributes binary.\", string0);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getMakeBinary());\n }", "@Test(timeout = 4000)\n public void test102() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate(\"\");\n Evaluation evaluation0 = new Evaluation(instances0);\n double[][] doubleArray0 = evaluation0.confusionMatrix();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n assertEquals(2, doubleArray0.length);\n }", "@Test(timeout = 4000)\n public void test028() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String[] stringArray0 = new String[4];\n stringArray0[0] = \"v\";\n stringArray0[1] = \"[\";\n stringArray0[2] = \"*\";\n ResultMatrixHTML resultMatrixHTML0 = new ResultMatrixHTML(0, 16);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertEquals(25, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertNotNull(resultMatrixHTML0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int int0 = 2298;\n resultMatrixHTML0.setRowNameWidth(2298);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertEquals(2298, resultMatrixHTML0.getRowNameWidth());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n resultMatrixHTML0.setRowNameWidth(1);\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixHTML0.getShowAverage();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n \n ResultMatrixPlainText resultMatrixPlainText0 = new ResultMatrixPlainText();\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertNotNull(resultMatrixPlainText0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n boolean boolean1 = resultMatrixPlainText0.isSignificance(16);\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixPlainText0.meanPrecTipText());\n assertEquals(5, resultMatrixPlainText0.getDefaultCountWidth());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixPlainText0.printRowNamesTipText());\n assertEquals(2, resultMatrixPlainText0.getDefaultMeanPrec());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixPlainText0.rowNameWidthTipText());\n assertTrue(resultMatrixPlainText0.getPrintColNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixPlainText0.showAverageTipText());\n assertTrue(resultMatrixPlainText0.getPrintRowNames());\n assertEquals(0, resultMatrixPlainText0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixPlainText0.getDefaultStdDevPrec());\n assertEquals(25, resultMatrixPlainText0.getDefaultRowNameWidth());\n assertEquals(5, resultMatrixPlainText0.getCountWidth());\n assertEquals(1, resultMatrixPlainText0.getVisibleColCount());\n assertFalse(resultMatrixPlainText0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixPlainText0.getDefaultStdDevWidth());\n assertEquals(0, resultMatrixPlainText0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixPlainText0.countWidthTipText());\n assertFalse(resultMatrixPlainText0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixPlainText0.colNameWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getDefaultMeanWidth());\n assertFalse(resultMatrixPlainText0.getEnumerateRowNames());\n assertEquals(1, resultMatrixPlainText0.getColCount());\n assertEquals(1, resultMatrixPlainText0.getVisibleRowCount());\n assertFalse(resultMatrixPlainText0.getRemoveFilterName());\n assertTrue(resultMatrixPlainText0.getDefaultEnumerateColNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixPlainText0.stdDevWidthTipText());\n assertTrue(resultMatrixPlainText0.getDefaultPrintRowNames());\n assertEquals(2, resultMatrixPlainText0.getStdDevPrec());\n assertFalse(resultMatrixPlainText0.getDefaultShowStdDev());\n assertFalse(resultMatrixPlainText0.getDefaultShowAverage());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixPlainText0.meanWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixPlainText0.showStdDevTipText());\n assertFalse(resultMatrixPlainText0.getShowAverage());\n assertEquals(1, resultMatrixPlainText0.getRowCount());\n assertTrue(resultMatrixPlainText0.getDefaultPrintColNames());\n assertEquals(\"Plain Text\", resultMatrixPlainText0.getDisplayName());\n assertEquals(0, resultMatrixPlainText0.getStdDevWidth());\n assertEquals(25, resultMatrixPlainText0.getRowNameWidth());\n assertTrue(resultMatrixPlainText0.getEnumerateColNames());\n assertEquals(0, resultMatrixPlainText0.getMeanWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixPlainText0.printColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixPlainText0.stdDevPrecTipText());\n assertEquals(0, resultMatrixPlainText0.getColNameWidth());\n assertEquals(\"Generates the output as plain text (for fixed width fonts).\", resultMatrixPlainText0.globalInfo());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixPlainText0.significanceWidthTipText());\n assertEquals(0, resultMatrixPlainText0.getSignificanceWidth());\n assertEquals(2, resultMatrixPlainText0.getMeanPrec());\n assertFalse(resultMatrixPlainText0.getShowStdDev());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixPlainText0.removeFilterNameTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixPlainText0.enumerateColNamesTipText());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertFalse(boolean1);\n assertTrue(boolean1 == boolean0);\n \n int int1 = resultMatrixHTML0.getColCount();\n assertEquals(0, resultMatrixHTML0.getCountWidth());\n assertTrue(resultMatrixHTML0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixHTML0.showAverageTipText());\n assertFalse(resultMatrixHTML0.getRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultShowStdDev());\n assertEquals(\"HTML\", resultMatrixHTML0.getDisplayName());\n assertEquals(0, resultMatrixHTML0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateColNamesTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixHTML0.countWidthTipText());\n assertEquals(16, resultMatrixHTML0.getVisibleRowCount());\n assertEquals(2, resultMatrixHTML0.getDefaultStdDevPrec());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixHTML0.printColNamesTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixHTML0.printRowNamesTipText());\n assertEquals(2, resultMatrixHTML0.getDefaultMeanPrec());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixHTML0.colNameWidthTipText());\n assertEquals(25, resultMatrixHTML0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixHTML0.meanPrecTipText());\n assertFalse(resultMatrixHTML0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixHTML0.getVisibleColCount());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixHTML0.removeFilterNameTipText());\n assertEquals(1, resultMatrixHTML0.getRowNameWidth());\n assertTrue(resultMatrixHTML0.getEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixHTML0.stdDevPrecTipText());\n assertFalse(resultMatrixHTML0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixHTML0.rowNameWidthTipText());\n assertTrue(resultMatrixHTML0.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixHTML0.getMeanWidth());\n assertFalse(resultMatrixHTML0.getPrintColNames());\n assertEquals(0, resultMatrixHTML0.getSignificanceWidth());\n assertFalse(resultMatrixHTML0.getEnumerateRowNames());\n assertTrue(resultMatrixHTML0.getDefaultPrintRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixHTML0.meanWidthTipText());\n assertEquals(2, resultMatrixHTML0.getStdDevPrec());\n assertEquals(2, resultMatrixHTML0.getMeanPrec());\n assertFalse(resultMatrixHTML0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixHTML0.stdDevWidthTipText());\n assertEquals(0, resultMatrixHTML0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixHTML0.significanceWidthTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixHTML0.enumerateRowNamesTipText());\n assertEquals(16, resultMatrixHTML0.getRowCount());\n assertEquals(0, resultMatrixHTML0.getColCount());\n assertFalse(resultMatrixHTML0.getDefaultShowAverage());\n assertEquals(0, resultMatrixHTML0.getDefaultSignificanceWidth());\n assertEquals(\"Generates the matrix output as HTML.\", resultMatrixHTML0.globalInfo());\n assertFalse(resultMatrixHTML0.getDefaultRemoveFilterName());\n assertFalse(resultMatrixHTML0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixHTML0.showStdDevTipText());\n assertEquals(0, resultMatrixHTML0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixHTML0.getDefaultColNameWidth());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(0, int1);\n assertFalse(int1 == int0);\n \n ResultMatrixHTML resultMatrixHTML1 = null;\n try {\n resultMatrixHTML1 = new ResultMatrixHTML((-1157), 5);\n fail(\"Expecting exception: NegativeArraySizeException\");\n \n } catch(NegativeArraySizeException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.experiment.ResultMatrix\", e);\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, false, true);\n discretize0.setInvertSelection(false);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "@Test\n\tpublic final void testProcGridCoord() {\n\t\tfor (int d=0; d<DIMENSIONALITY; d++) {\n\t\t\tassertTrue(0 <= block.procGridCoord(d)\n\t\t\t\t\t&& block.procGridCoord(d)<block.procGridSize(d));\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test061() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n int[][] intArray0 = new int[3][0];\n int[] intArray1 = new int[1];\n intArray1[0] = 1;\n intArray0[0] = intArray1;\n int[] intArray2 = new int[9];\n assertFalse(intArray2.equals((Object)intArray1));\n \n intArray2[0] = 1;\n intArray2[1] = 2;\n intArray2[2] = 2;\n intArray2[3] = 0;\n intArray2[4] = 3;\n intArray2[6] = 2;\n intArray2[7] = 1;\n intArray2[8] = 2;\n intArray0[1] = intArray2;\n ResultMatrixSignificance resultMatrixSignificance0 = new ResultMatrixSignificance();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(resultMatrixSignificance0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n String string0 = resultMatrixSignificance0.getRevision();\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertNotNull(string0);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(\"8034\", string0);\n \n resultMatrixSignificance0.setColHidden(1003, false);\n assertTrue(resultMatrixSignificance0.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance0.getSignificanceWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance0.showStdDevTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance0.getDisplayName());\n assertEquals(1, resultMatrixSignificance0.getRowCount());\n assertEquals(0, resultMatrixSignificance0.getStdDevWidth());\n assertFalse(resultMatrixSignificance0.getShowAverage());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance0.globalInfo());\n assertTrue(resultMatrixSignificance0.getEnumerateColNames());\n assertFalse(resultMatrixSignificance0.getDefaultEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultCountWidth());\n assertFalse(resultMatrixSignificance0.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance0.getColCount());\n assertFalse(resultMatrixSignificance0.getEnumerateRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance0.stdDevWidthTipText());\n assertEquals(40, resultMatrixSignificance0.getRowNameWidth());\n assertTrue(resultMatrixSignificance0.getDefaultEnumerateColNames());\n assertEquals(1, resultMatrixSignificance0.getVisibleRowCount());\n assertFalse(resultMatrixSignificance0.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance0.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance0.meanWidthTipText());\n assertEquals(2, resultMatrixSignificance0.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance0.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance0.showAverageTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance0.printRowNamesTipText());\n assertEquals(0, resultMatrixSignificance0.getCountWidth());\n assertEquals(0, resultMatrixSignificance0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixSignificance0.getDefaultStdDevPrec());\n assertEquals(1, resultMatrixSignificance0.getVisibleColCount());\n assertFalse(resultMatrixSignificance0.getDefaultPrintColNames());\n assertEquals(40, resultMatrixSignificance0.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance0.meanPrecTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance0.colNameWidthTipText());\n assertEquals(0, resultMatrixSignificance0.getDefaultStdDevWidth());\n assertFalse(resultMatrixSignificance0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance0.countWidthTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance0.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance0.getMeanWidth());\n assertEquals(0, resultMatrixSignificance0.getColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance0.significanceWidthTipText());\n assertFalse(resultMatrixSignificance0.getDefaultShowStdDev());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance0.printColNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance0.rowNameWidthTipText());\n assertFalse(resultMatrixSignificance0.getPrintColNames());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance0.stdDevPrecTipText());\n assertFalse(resultMatrixSignificance0.getShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance0.enumerateColNamesTipText());\n assertEquals(2, resultMatrixSignificance0.getMeanPrec());\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n \n ResultMatrixSignificance resultMatrixSignificance1 = new ResultMatrixSignificance();\n assertEquals(0, resultMatrixSignificance1.getCountWidth());\n assertEquals(1, resultMatrixSignificance1.getVisibleColCount());\n assertFalse(resultMatrixSignificance1.getDefaultPrintColNames());\n assertEquals(1, resultMatrixSignificance1.getColCount());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance1.colNameWidthTipText());\n assertEquals(2, resultMatrixSignificance1.getDefaultMeanPrec());\n assertTrue(resultMatrixSignificance1.getPrintRowNames());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance1.showAverageTipText());\n assertEquals(40, resultMatrixSignificance1.getDefaultRowNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance1.meanPrecTipText());\n assertEquals(0, resultMatrixSignificance1.getColNameWidth());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance1.rowNameWidthTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance1.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance1.printRowNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance1.printColNamesTipText());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance1.removeFilterNameTipText());\n assertFalse(resultMatrixSignificance1.getDefaultShowStdDev());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateColNamesTipText());\n assertFalse(resultMatrixSignificance1.getRemoveFilterName());\n assertEquals(1, resultMatrixSignificance1.getVisibleRowCount());\n assertTrue(resultMatrixSignificance1.getDefaultEnumerateColNames());\n assertEquals(0, resultMatrixSignificance1.getStdDevWidth());\n assertEquals(0, resultMatrixSignificance1.getMeanWidth());\n assertEquals(2, resultMatrixSignificance1.getDefaultStdDevPrec());\n assertEquals(\"Significance only\", resultMatrixSignificance1.getDisplayName());\n assertFalse(resultMatrixSignificance1.getShowAverage());\n assertTrue(resultMatrixSignificance1.getEnumerateColNames());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance1.globalInfo());\n assertFalse(resultMatrixSignificance1.getPrintColNames());\n assertFalse(resultMatrixSignificance1.getEnumerateRowNames());\n assertEquals(0, resultMatrixSignificance1.getDefaultCountWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance1.showStdDevTipText());\n assertEquals(1, resultMatrixSignificance1.getRowCount());\n assertFalse(resultMatrixSignificance1.getShowStdDev());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance1.stdDevWidthTipText());\n assertTrue(resultMatrixSignificance1.getDefaultPrintRowNames());\n assertEquals(0, resultMatrixSignificance1.getSignificanceWidth());\n assertEquals(2, resultMatrixSignificance1.getMeanPrec());\n assertFalse(resultMatrixSignificance1.getDefaultShowAverage());\n assertEquals(2, resultMatrixSignificance1.getStdDevPrec());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance1.meanWidthTipText());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance1.enumerateRowNamesTipText());\n assertEquals(40, resultMatrixSignificance1.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance1.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance1.getDefaultMeanWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance1.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance1.getDefaultEnumerateRowNames());\n assertFalse(resultMatrixSignificance1.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance1.getDefaultStdDevWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance1.countWidthTipText());\n assertNotNull(resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(resultMatrixSignificance1.equals((Object)resultMatrixSignificance0));\n \n ResultMatrixSignificance resultMatrixSignificance2 = new ResultMatrixSignificance();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotNull(resultMatrixSignificance2);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n int int0 = resultMatrixSignificance2.getVisibleColCount();\n assertFalse(resultMatrixSignificance2.getDefaultEnumerateRowNames());\n assertEquals(2, resultMatrixSignificance2.getMeanPrec());\n assertFalse(resultMatrixSignificance2.getDefaultShowAverage());\n assertFalse(resultMatrixSignificance2.getEnumerateRowNames());\n assertEquals(1, resultMatrixSignificance2.getVisibleRowCount());\n assertFalse(resultMatrixSignificance2.getPrintColNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixSignificance2.rowNameWidthTipText());\n assertEquals(40, resultMatrixSignificance2.getRowNameWidth());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixSignificance2.meanWidthTipText());\n assertTrue(resultMatrixSignificance2.getDefaultPrintRowNames());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixSignificance2.meanPrecTipText());\n assertEquals(2, resultMatrixSignificance2.getStdDevPrec());\n assertEquals(1, resultMatrixSignificance2.getRowCount());\n assertEquals(40, resultMatrixSignificance2.getDefaultRowNameWidth());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixSignificance2.stdDevWidthTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixSignificance2.printRowNamesTipText());\n assertTrue(resultMatrixSignificance2.getDefaultEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getDefaultPrintColNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultCountWidth());\n assertTrue(resultMatrixSignificance2.getEnumerateColNames());\n assertFalse(resultMatrixSignificance2.getShowAverage());\n assertEquals(2, resultMatrixSignificance2.getDefaultStdDevPrec());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixSignificance2.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixSignificance2.colNameWidthTipText());\n assertEquals(\"Significance only\", resultMatrixSignificance2.getDisplayName());\n assertEquals(0, resultMatrixSignificance2.getStdDevWidth());\n assertEquals(\"Only outputs the significance indicators. Can be used for spotting patterns.\", resultMatrixSignificance2.globalInfo());\n assertEquals(0, resultMatrixSignificance2.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixSignificance2.removeFilterNameTipText());\n assertEquals(0, resultMatrixSignificance2.getColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultMeanWidth());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixSignificance2.enumerateColNamesTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixSignificance2.printColNamesTipText());\n assertEquals(1, resultMatrixSignificance2.getColCount());\n assertFalse(resultMatrixSignificance2.getRemoveFilterName());\n assertFalse(resultMatrixSignificance2.getShowStdDev());\n assertFalse(resultMatrixSignificance2.getDefaultShowStdDev());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixSignificance2.stdDevPrecTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixSignificance2.countWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixSignificance2.showStdDevTipText());\n assertEquals(0, resultMatrixSignificance2.getDefaultColNameWidth());\n assertEquals(0, resultMatrixSignificance2.getDefaultSignificanceWidth());\n assertFalse(resultMatrixSignificance2.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixSignificance2.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixSignificance2.significanceWidthTipText());\n assertEquals(0, resultMatrixSignificance2.getCountWidth());\n assertEquals(1, resultMatrixSignificance2.getVisibleColCount());\n assertTrue(resultMatrixSignificance2.getPrintRowNames());\n assertEquals(0, resultMatrixSignificance2.getDefaultStdDevWidth());\n assertEquals(2, resultMatrixSignificance2.getDefaultMeanPrec());\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance0);\n assertNotSame(resultMatrixSignificance2, resultMatrixSignificance1);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(1, int0);\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance0));\n assertFalse(resultMatrixSignificance2.equals((Object)resultMatrixSignificance1));\n \n ResultMatrixLatex resultMatrixLatex0 = new ResultMatrixLatex();\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertNotNull(resultMatrixLatex0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n boolean boolean0 = resultMatrixLatex0.isSignificance((-1));\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateColNamesTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultStdDevWidth());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixLatex0.printColNamesTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixLatex0.colNameWidthTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultMeanWidth());\n assertEquals(0, resultMatrixLatex0.getMeanWidth());\n assertEquals(0, resultMatrixLatex0.getColNameWidth());\n assertEquals(0, resultMatrixLatex0.getCountWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixLatex0.removeFilterNameTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixLatex0.printRowNamesTipText());\n assertEquals(1, resultMatrixLatex0.getColCount());\n assertFalse(resultMatrixLatex0.getRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixLatex0.stdDevPrecTipText());\n assertFalse(resultMatrixLatex0.getDefaultShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixLatex0.rowNameWidthTipText());\n assertFalse(resultMatrixLatex0.getShowStdDev());\n assertEquals(2, resultMatrixLatex0.getDefaultStdDevPrec());\n assertFalse(resultMatrixLatex0.getShowAverage());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixLatex0.stdDevWidthTipText());\n assertEquals(0, resultMatrixLatex0.getStdDevWidth());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixLatex0.meanPrecTipText());\n assertEquals(1, resultMatrixLatex0.getRowCount());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixLatex0.showAverageTipText());\n assertEquals(0, resultMatrixLatex0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixLatex0.getRowNameWidth());\n assertTrue(resultMatrixLatex0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixLatex0.getEnumerateColNames());\n assertFalse(resultMatrixLatex0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixLatex0.getDefaultCountWidth());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixLatex0.enumerateRowNamesTipText());\n assertEquals(0, resultMatrixLatex0.getSignificanceWidth());\n assertFalse(resultMatrixLatex0.getPrintColNames());\n assertEquals(1, resultMatrixLatex0.getVisibleRowCount());\n assertFalse(resultMatrixLatex0.getEnumerateRowNames());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixLatex0.meanWidthTipText());\n assertEquals(2, resultMatrixLatex0.getStdDevPrec());\n assertTrue(resultMatrixLatex0.getDefaultPrintRowNames());\n assertFalse(resultMatrixLatex0.getDefaultShowAverage());\n assertEquals(2, resultMatrixLatex0.getMeanPrec());\n assertEquals(\"LaTeX\", resultMatrixLatex0.getDisplayName());\n assertFalse(resultMatrixLatex0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixLatex0.getDefaultSignificanceWidth());\n assertEquals(0, resultMatrixLatex0.getDefaultColNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixLatex0.significanceWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixLatex0.showStdDevTipText());\n assertTrue(resultMatrixLatex0.getPrintRowNames());\n assertEquals(1, resultMatrixLatex0.getVisibleColCount());\n assertEquals(2, resultMatrixLatex0.getDefaultMeanPrec());\n assertFalse(resultMatrixLatex0.getDefaultPrintColNames());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixLatex0.countWidthTipText());\n assertEquals(\"Generates the matrix output in LaTeX-syntax.\", resultMatrixLatex0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertFalse(boolean0);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n ResultMatrixCSV resultMatrixCSV0 = new ResultMatrixCSV();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(resultMatrixCSV0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n \n String string0 = resultMatrixCSV0.toString();\n assertFalse(resultMatrixCSV0.getDefaultPrintColNames());\n assertFalse(resultMatrixCSV0.getDefaultShowAverage());\n assertTrue(resultMatrixCSV0.getDefaultEnumerateColNames());\n assertEquals(2, resultMatrixCSV0.getMeanPrec());\n assertFalse(resultMatrixCSV0.getDefaultEnumerateRowNames());\n assertEquals(1, resultMatrixCSV0.getVisibleRowCount());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateRowNamesTipText());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixCSV0.rowNameWidthTipText());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixCSV0.showStdDevTipText());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixCSV0.countWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultColNameWidth());\n assertEquals(\"Generates the matrix in CSV ('comma-separated values') format.\", resultMatrixCSV0.globalInfo());\n assertEquals(0, resultMatrixCSV0.getCountWidth());\n assertFalse(resultMatrixCSV0.getDefaultRemoveFilterName());\n assertEquals(0, resultMatrixCSV0.getDefaultSignificanceWidth());\n assertFalse(resultMatrixCSV0.getPrintColNames());\n assertEquals(0, resultMatrixCSV0.getSignificanceWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixCSV0.significanceWidthTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultStdDevWidth());\n assertTrue(resultMatrixCSV0.getPrintRowNames());\n assertEquals(2, resultMatrixCSV0.getDefaultMeanPrec());\n assertEquals(1, resultMatrixCSV0.getVisibleColCount());\n assertEquals(0, resultMatrixCSV0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixCSV0.removeFilterNameTipText());\n assertEquals(0, resultMatrixCSV0.getDefaultMeanWidth());\n assertTrue(resultMatrixCSV0.getEnumerateColNames());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixCSV0.printColNamesTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixCSV0.enumerateColNamesTipText());\n assertFalse(resultMatrixCSV0.getRemoveFilterName());\n assertEquals(1, resultMatrixCSV0.getColCount());\n assertFalse(resultMatrixCSV0.getShowStdDev());\n assertEquals(0, resultMatrixCSV0.getColNameWidth());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixCSV0.stdDevPrecTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixCSV0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixCSV0.meanWidthTipText());\n assertFalse(resultMatrixCSV0.getDefaultShowStdDev());\n assertEquals(2, resultMatrixCSV0.getStdDevPrec());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixCSV0.meanPrecTipText());\n assertEquals(1, resultMatrixCSV0.getRowCount());\n assertTrue(resultMatrixCSV0.getDefaultPrintRowNames());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixCSV0.stdDevWidthTipText());\n assertFalse(resultMatrixCSV0.getEnumerateRowNames());\n assertEquals(25, resultMatrixCSV0.getRowNameWidth());\n assertEquals(25, resultMatrixCSV0.getDefaultRowNameWidth());\n assertEquals(0, resultMatrixCSV0.getDefaultCountWidth());\n assertEquals(2, resultMatrixCSV0.getDefaultStdDevPrec());\n assertFalse(resultMatrixCSV0.getShowAverage());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixCSV0.showAverageTipText());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixCSV0.colNameWidthTipText());\n assertEquals(\"CSV\", resultMatrixCSV0.getDisplayName());\n assertEquals(0, resultMatrixCSV0.getStdDevWidth());\n assertNotNull(string0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(\"Dataset,[1]\\nrow0,''\\n'[v/ /*]',''\\n\", string0);\n \n String[] stringArray0 = new String[4];\n ResultMatrixGnuPlot resultMatrixGnuPlot0 = new ResultMatrixGnuPlot();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(1, resultMatrixGnuPlot0.getRowCount());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(1, resultMatrixGnuPlot0.getColCount());\n assertEquals(1, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertNotNull(resultMatrixGnuPlot0);\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n resultMatrixGnuPlot0.setSize(0, 0);\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n \n int int0 = resultMatrixGnuPlot0.getDefaultColNameWidth();\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateRowNames());\n assertEquals(0, resultMatrixGnuPlot0.getRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultCountWidth());\n assertFalse(resultMatrixGnuPlot0.getEnumerateColNames());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultSignificanceWidth());\n assertEquals(\"The width of the counts (0 = optimal).\", resultMatrixGnuPlot0.countWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultEnumerateColNames());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintColNames());\n assertEquals(0, resultMatrixGnuPlot0.getSignificanceWidth());\n assertTrue(resultMatrixGnuPlot0.getPrintRowNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultMeanPrec());\n assertEquals(0, resultMatrixGnuPlot0.getCountWidth());\n assertEquals(50, resultMatrixGnuPlot0.getRowNameWidth());\n assertEquals(\"The width of the significance indicator (0 = optimal).\", resultMatrixGnuPlot0.significanceWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleColCount());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultRowNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getMeanPrec());\n assertFalse(resultMatrixGnuPlot0.getShowStdDev());\n assertEquals(\"The maximum width for the row names (0 = optimal).\", resultMatrixGnuPlot0.rowNameWidthTipText());\n assertEquals(\"Whether to enumerate the column names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateColNamesTipText());\n assertEquals(\"The number of decimals after the decimal point for the standard deviation.\", resultMatrixGnuPlot0.stdDevPrecTipText());\n assertEquals(50, resultMatrixGnuPlot0.getColNameWidth());\n assertEquals(0, resultMatrixGnuPlot0.getMeanWidth());\n assertEquals(\"Whether to remove the classname package prefixes from the filter names in datasets.\", resultMatrixGnuPlot0.removeFilterNameTipText());\n assertEquals(\"Whether to output column names or just numbers representing them.\", resultMatrixGnuPlot0.printColNamesTipText());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultMeanWidth());\n assertEquals(\"The maximum width of the column names (0 = optimal).\", resultMatrixGnuPlot0.colNameWidthTipText());\n assertEquals(0, resultMatrixGnuPlot0.getVisibleRowCount());\n assertEquals(0, resultMatrixGnuPlot0.getStdDevWidth());\n assertFalse(resultMatrixGnuPlot0.getShowAverage());\n assertEquals(0, resultMatrixGnuPlot0.getColCount());\n assertEquals(0, resultMatrixGnuPlot0.getDefaultStdDevWidth());\n assertEquals(\"Whether to display the standard deviation column.\", resultMatrixGnuPlot0.showStdDevTipText());\n assertEquals(\"Whether to output row names or just numbers representing them.\", resultMatrixGnuPlot0.printRowNamesTipText());\n assertEquals(\"The width of the mean (0 = optimal).\", resultMatrixGnuPlot0.meanWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowStdDev());\n assertEquals(\"Whether to show the row with averages.\", resultMatrixGnuPlot0.showAverageTipText());\n assertTrue(resultMatrixGnuPlot0.getPrintColNames());\n assertEquals(2, resultMatrixGnuPlot0.getDefaultStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultRemoveFilterName());\n assertEquals(\"The number of decimals after the decimal point for the mean.\", resultMatrixGnuPlot0.meanPrecTipText());\n assertEquals(\"GNUPlot\", resultMatrixGnuPlot0.getDisplayName());\n assertFalse(resultMatrixGnuPlot0.getRemoveFilterName());\n assertEquals(\"The width of the standard deviation (0 = optimal).\", resultMatrixGnuPlot0.stdDevWidthTipText());\n assertFalse(resultMatrixGnuPlot0.getEnumerateRowNames());\n assertEquals(\"Whether to enumerate the row names (prefixing them with '(x)', with 'x' being the index).\", resultMatrixGnuPlot0.enumerateRowNamesTipText());\n assertEquals(50, resultMatrixGnuPlot0.getDefaultColNameWidth());\n assertEquals(2, resultMatrixGnuPlot0.getStdDevPrec());\n assertFalse(resultMatrixGnuPlot0.getDefaultShowAverage());\n assertTrue(resultMatrixGnuPlot0.getDefaultPrintRowNames());\n assertEquals(\"Generates output for a data and script file for GnuPlot.\", resultMatrixGnuPlot0.globalInfo());\n assertEquals(2, ResultMatrix.SIGNIFICANCE_LOSS);\n assertEquals(0, ResultMatrix.SIGNIFICANCE_TIE);\n assertEquals(1, ResultMatrix.SIGNIFICANCE_WIN);\n assertEquals(50, int0);\n }", "@Test\n public void testMedian() {\n System.out.println(\"median\");\n ImageFilter instance = null;\n BufferedImage expResult = null;\n BufferedImage result = instance.median();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testCompute() {\n System.out.println(\"compute\");\n ParallelMergeSort instance = null;\n instance.compute();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test public void estimatedMonthlyCostTest() throws NegativeValueException {\n PetBunny pb1 = new PetBunny(\"Floppy\", \"Holland Lop\", 3.5);\n \n Assert.assertEquals(6.475, pb1.estimatedMonthlyCost(), 0.00001);\n }" ]
[ "0.7719333", "0.76359123", "0.73141825", "0.57383484", "0.56049335", "0.5368913", "0.5366745", "0.53475344", "0.5276815", "0.5211457", "0.51922", "0.5185153", "0.51824313", "0.5180554", "0.51034254", "0.50930893", "0.50909305", "0.5089265", "0.508482", "0.50655603", "0.50131375", "0.4967044", "0.49259824", "0.49166456", "0.49056277", "0.4897456", "0.48964065", "0.4878053", "0.48741156", "0.48628837", "0.48621482", "0.4857977", "0.4856882", "0.4843203", "0.4839442", "0.48388618", "0.48254445", "0.48191392", "0.48160744", "0.48117122", "0.48064062", "0.48031175", "0.48019585", "0.47925425", "0.47874644", "0.47844023", "0.4783126", "0.47804153", "0.47622862", "0.4751772", "0.47323477", "0.472947", "0.4725859", "0.4717567", "0.4714627", "0.4706283", "0.46862835", "0.46653253", "0.46588334", "0.46533224", "0.46517122", "0.46484607", "0.46459064", "0.46393064", "0.46359068", "0.46323836", "0.460578", "0.46015692", "0.46007916", "0.46004763", "0.4596998", "0.459289", "0.45927462", "0.4591392", "0.45903093", "0.45902893", "0.45858636", "0.45837918", "0.45836726", "0.45825702", "0.45811412", "0.4581066", "0.4577238", "0.45733365", "0.45690647", "0.45689315", "0.4568545", "0.45649377", "0.45623296", "0.45590258", "0.4556435", "0.45536804", "0.45520693", "0.4550323", "0.45498943", "0.45419466", "0.45397726", "0.4532619", "0.45256138", "0.45127285" ]
0.65835816
3
Test of estimateCstepping method, of class MarkovModelUtilities.
@Test public void testEstimateCstepping_Iterable_int() { Iterable<IIntArray> trajs = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCstepping(trajs, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCstepping_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "public void steepestDescent() {\r\n ArrayList<Atom> atoms = cluster.getAtoms();\r\n Atom a;\r\n int numAtoms = atoms.size();\r\n double potentialEnergy;\r\n double trialPotential;\r\n int i;\r\n\r\n //Increment time\r\n totalTime += currentStep;\r\n\r\n //Calculate force on each atom\r\n cluster.calculateForces();\r\n\r\n //Get energy of current configuration\r\n HashMap<String, Double> energies = cluster.getEnergies();\r\n potentialEnergy = 0.0;\r\n for(String eName : energies.keySet())\r\n potentialEnergy += energies.get(eName).doubleValue();\r\n\r\n //Save current atom positions and advance atoms to trial positions\r\n for(i = 0; i < numAtoms; i++) {\r\n a = atoms.get(i);\r\n\r\n savedLocations[i].x = a.location.x;\r\n savedLocations[i].y = a.location.y;\r\n savedLocations[i].z = a.location.z;\r\n\r\n //Compute trial locations\r\n a.location.x += a.force.x * currentStep;\r\n a.location.y += a.force.y * currentStep;\r\n a.location.z += a.force.z * currentStep;\r\n }\r\n\r\n //Get energy of the trial configuration\r\n energies = cluster.getEnergies();\r\n trialPotential = 0.0;\r\n for(String eName : energies.keySet())\r\n trialPotential += energies.get(eName).doubleValue();\r\n\r\n //Decide whether to keep trial configuration based on convergence\r\n if(trialPotential < potentialEnergy) {\r\n //Keep positions and check for convergence\r\n if(Math.abs((potentialEnergy - trialPotential) / potentialEnergy) < convergenceCriterion)\r\n isConverged = true;\r\n\r\n currentStep *= 1.2;\r\n } else {\r\n //Restore old positions\r\n for(i = 0; i < numAtoms; i++) {\r\n a = atoms.get(i);\r\n\r\n a.location.x = savedLocations[i].x;\r\n a.location.y = savedLocations[i].y;\r\n a.location.z = savedLocations[i].z;\r\n }\r\n\r\n currentStep *= 0.5;\r\n }\r\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testBackwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.backwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void makeCoffee() {\n Assertions.assertFalse(machine.makeCoffee());\n\n //try with cup\n Assertions.assertDoesNotThrow(() -> {\n machine.positionCup();\n });\n\n Assertions.assertThrows(Exception.class, () -> {\n machine.positionCup();\n });\n\n\n Assertions.assertTrue(machine.makeCoffee());\n\n //check if correct amount as been subtracted\n Assertions.assertEquals(machine.getCurrentWater(), 1000 - machine.waterPerCup);\n Assertions.assertEquals(machine.getCurrentBeans(), 800 - machine.beansPerCup);\n\n //reset\n machine.fillWater();\n machine.fillBeans();\n machine.setCupPositioned(true);\n\n //test over boundary\n Assertions.assertTrue(machine.makeCoffee());\n Assertions.assertTrue(machine.makeCoffee());\n\n //set only water to boundary values and below\n machine.setCurrentWater(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentWater(machine.waterPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n //reset water\n machine.fillWater();\n\n //set only beans to boundary value and below\n machine.setCurrentBeans(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentBeans(machine.beansPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n\n }", "public void checkMovementZMinimum(ITestContext context) throws Exception {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=40;\n String disResult=oa.clickDistanceMinus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=5;\n disResult=oa.clickDistanceMinus(clickTimes);\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=6;\n disResult=oa.clickDistanceMinus(clickTimes);//click times: 51\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-5\",\"distance is not same as expected result\");\n\n embededCompareResult(higher,middle,lower, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n disResult=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+disResult,\"click Z reset(1 times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test03() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[19];\n evaluation0.updateMargins(doubleArray0, 0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n void cupTesting() {\n Assertions.assertFalse(machine.isCupPositioned());\n Assertions.assertFalse(machine.removeCup());\n\n Assertions.assertDoesNotThrow(() -> machine.positionCup());\n\n Assertions.assertTrue(machine.removeCup());\n Assertions.assertFalse(machine.isCupPositioned());\n machine.setCupPositioned(true);\n Assertions.assertTrue(machine.isCupPositioned());\n\n }", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\r\n public void testAverageacceleration() {\r\n System.out.println(\"Average Acceleration\");\r\n \r\n // Test case one.\r\n System.out.println(\"Test case #1\"); \r\n \r\n double distance = 200;\r\n long time = 16;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 0.78125;\r\n double result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case two.\r\n System.out.println(\"Test case #2\"); \r\n \r\n distance = 80;\r\n time = 200;\r\n \r\n \r\n expResult = .002;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case three.\r\n System.out.println(\"Test case #3\"); \r\n \r\n distance = 0;\r\n time = 15;\r\n \r\n \r\n expResult = 0;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case four.\r\n System.out.println(\"Test case #4\"); \r\n \r\n distance = 12;\r\n time = 1;\r\n \r\n \r\n expResult = 12;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case five.\r\n System.out.println(\"Test case #5\"); \r\n \r\n distance = 1;\r\n time = 1;\r\n \r\n \r\n expResult = 1;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case six.\r\n System.out.println(\"Test case #6\"); \r\n \r\n distance = 3;\r\n time = 8;\r\n \r\n \r\n expResult = .046875;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case seven.\r\n System.out.println(\"Test case #7\"); \r\n \r\n distance = 200;\r\n time = 1;\r\n \r\n \r\n expResult = 200;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n \r\n \r\n }", "@Test\n public void testGetSetTemperaturaExteriorMinima() {\n System.out.println(\"getSetTemperaturaExteriorMinima\");\n double expResult = 10.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMinima(expResult);\n double result = instance.getTemperaturaExteriorMinima();\n assertEquals(expResult, result, 0.0);\n }", "public void checkMovementZReset(ITestContext context) {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=30;\n String disResult=oa.clickDistanceMinus(clickTimes);\n embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-3\",\"distance is not same as expected result\");\n\n clickTimes=10;\n disResult=oa.clickDistancePlus(clickTimes);\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-2\",\"distance is not same as expected result\");\n\n disResult=oa.clickDistancePlus(clickTimes);\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-1\",\"distance is not same as expected result\");\n\n disResult=oa.clickDistanceReset();\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z reset(1 times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"0\",\"distance is not same as expected result\");\n\n embededCompareResult(lower,middle,higher, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n }\n Reporter.testEnd();\n }", "private static void testTakeStep(Drunkard drunkard, int testStepTimes, int testStepSize){\n\t for (int i = 0; i < testStepTimes; i++)\n\t{\n\t ImPoint pointA = drunkard.getCurrentLoc(); \n\t\tdrunkard.takeStep();\n\t\tImPoint pointB = drunkard.getCurrentLoc();\n\t\t\n\t\tif (pointA.getX()-pointB.getX() != 0 && pointA.getY()-pointB.getY() != 0)\n\t\t{\n\t\t\tSystem.out.println(\"Not a valid compass direction!\");\n\t\t}\n\t\telse if (Math.sqrt((pointA.getX() - pointB.getX())*(pointA.getX() - pointB.getX()) + (pointA.getY() - pointB.getY())*(pointA.getY() - pointB.getY())) != testStepSize)\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), FAILED, not a valid step\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), SUCCEEDED\");\n\t\t}\n\t}\n\t System.out.println(); \n\t}", "@Test\n public void testIsTransitionMatrix()\n {\n IDoubleArray T = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isTransitionMatrix(T);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateMargins(doubleArray0, 3, (-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "int calculateMST();", "@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public void testMainLBGFSCachedSemiMarkov() throws Exception {\n\t\tConrad.main(new String[] {\"train\", \"test/input/zeroOrderLBFGSCachedSemiMarkov.xml\", \"test/input/zeroOrderTestShortMax.txt\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroOrderMainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest2.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tassertFilesMatch(\"test/output/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\");\n\t}", "@Test\n public void testGetSetTemperaturaExterior() {\n System.out.println(\"getSetTemperaturaExterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExterior(expResult);\n double result = instance.getTemperaturaExterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\r\n public void gallonsCauldronHolds() {\r\n \r\n System.out.println(\"gallonsCauldronHolds\");\r\n \r\n //Test #1\r\n System.out.println(\"Test case #1\"); \r\n \r\n double diameter = 50;\r\n double depth = 25;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 212.500;\r\n double result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #2\r\n System.out.println(\"Test case #2\");\r\n \r\n diameter = 15;\r\n depth = -12;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #3\r\n System.out.println(\"Test case #3\");\r\n \r\n diameter = -5;\r\n depth = 20;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #4\r\n System.out.println(\"Test case #4\");\r\n \r\n diameter = 0;\r\n depth = 30;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #5\r\n System.out.println(\"Test case #5\");\r\n \r\n diameter = 14;\r\n depth = 0;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #6\r\n System.out.println(\"Test case #6\");\r\n \r\n diameter = 1;\r\n depth = 12;\r\n \r\n expResult = .041;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #7\r\n System.out.println(\"Test case #7\");\r\n \r\n diameter = 20;\r\n depth = 1;\r\n \r\n expResult = 1.36;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }", "public void test_setClippingIIII() {\n}", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess3() {\n\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B17DCCN123\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString tktMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Toán kinh tế\")) {\n\t\t\t\ttktMark = result.getMarkToChar();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\ttktMark.equals(\"C\") && \n\t\t\t\tpassedCreditsTillNow == 18 && \n\t\t\t\tdf.format(gpaTillNow).equals(\"3.19\")\n\t\t\t\t);\n\t}", "float estimateCostToGoal( int current_x, int current_y, int current_z, boolean fromStart ) {\n\t\treturn 0;\n\t}", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void testVerser1() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(5000.0);\n double montant_a_verser = 1000.0;\n double excepted = 6000.0;\n\n //Act\n assertEquals(true, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n }", "@Test\n public void testVirement3() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(0.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 8000.0;\n double excepted_solde_cpt1 = 0.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "public static void main(String[] args) {\n\n String fileEdgeList = \"../DataSource/PANCANsigEdgeList.csv\";\n String fileGtTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.training.10.csv\";\n// String fileGtTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.testing.10.csv\";\n String fileGeTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.training.10.csv\";\n String fileGeTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.testing.10.csv\";\n String fileInferDriver = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.InferDriver.10.withTumorID.csv\";\n// String fileDriverSGATable = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.DriverSGATable.10.csv\";\n \n \n DataReader dataObj = new DataReader(fileEdgeList, fileGtTrainingMatrix, fileGeTrainingMatrix);\n\n int reRun = 0;\n double T = 0.5;\n do {\n reRun += 1;\n\n EstimateParams paramObj = new EstimateParams(dataObj.edgeList, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.driverSGATable, dataObj.targetDEGTable);\n InferDriverActivation actObj = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n\n\n actObj.thresholding(T);\n \n actObj.updateInferDriverTable( dataObj.driverSGATable);\n \n double change = actObj.compareMatrix(dataObj.driverSGATable);\n\n System.out.println(\"Current T is \" + T);\n System.out.println(\"Change is \" + change);\n System.out.println(\"This is the \" + reRun + \"th run\");\n if (change < 0.001 || T > 1) {\n System.out.println(\"Total times of run is \" + reRun + \". Final cut shreshold is \" + T);\n \n// dataObj.readInGtMatrix(fileGtTestingMatrix);\n dataObj.readInGeMatrix(fileGeTestingMatrix);\n InferDriverActivation actObjTesting = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n \n actObjTesting.outputInferActivation(fileInferDriver, dataObj.tumorNames);\n// dataObj.outputDriverSGATable(fileDriverSGATable); //output contains tumorName, since tumor name is defined in dataObj, so no need to pass in\n\n break; \n \n } else {\n dataObj.updateDriverSGATable(actObj.inferDriverTable);\n T += 0.05;\n \n }\n\n } while (true);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void testStationaryDistributionRevQuick()\n {\n IDoubleArray T = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.stationaryDistributionRevQuick(T);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetSetTemperaturaInterior() {\n System.out.println(\"getSetTemperaturaInterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInterior(expResult);\n double result = instance.getTemperaturaInterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void checkMovementZMaximum(ITestContext context) {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.05\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=98;\n String valueOnLabel=oa.clickDistancePlus(clickTimes);\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.9\",\"distance is not same as expected result\");\n\n clickTimes=1;\n valueOnLabel=oa.clickDistancePlus();\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.95\",\"distance is not same as expected result\");\n\n text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n valueOnLabel=oa.clickDistancePlus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"5\",\"distance is not same as expected result\");\n\n embededCompareResult(lower,middle,higher, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n valueOnLabel=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+valueOnLabel,\"click Z reset(1 times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test void perfect() {\n\t\tstandardScene();\n\t\tsimulateScene(0);\n\n\t\tvar alg = new DistanceMetricTripleReprojection23();\n\n\t\tvar model = new MetricCameraTriple();\n\t\tmodel.view1.setTo(cameraA);\n\t\tmodel.view2.setTo(cameraB);\n\t\tmodel.view3.setTo(cameraC);\n\t\tmodel.view_1_to_2.setTo(truthView_1_to_i(1));\n\t\tmodel.view_1_to_3.setTo(truthView_1_to_i(2));\n\n\t\talg.setModel(model);\n\n\t\tfor (AssociatedTriple a : observations3) {\n\t\t\tassertEquals(0.0, alg.distance(a), UtilEjml.TEST_F64);\n\t\t}\n\n\t\tvar set = observations3.subList(4, 11);\n\t\tvar distances = new double[set.size()];\n\t\talg.distances(set, distances);\n\t\tfor (int i = 0; i < distances.length; i++) {\n\t\t\tassertEquals(0.0, distances[i], UtilEjml.TEST_F64);\n\t\t}\n\t}", "@Test\n public void testGetTemperaturaInteriorAlvo() {\n System.out.println(\"getSetTemperaturaInteriorAlvo\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInteriorAlvo(expResult);\n double result = instance.getTemperaturaInteriorAlvo();\n assertEquals(expResult, result, 0.0);\n }", "@Override\n protected boolean stoppingCriteriaSatisfied(KPMPSolution generatedSolution, RandomStepFunction stepFunction) {\n numberOfIterations++;\n numberOfIterationsWithoutImprovement++;\n KPMPSolutionChecker solutionChecker = new KPMPSolutionChecker();\n int crossingsOnOriginalPage = solutionChecker.getCrossingNumberOfEdge(bestSolution.getSpineOrder(), bestSolution.getEdgePartition(), originalPageIndex, edge);\n int crossingsOnNewPage = solutionChecker.getCrossingNumberOfEdge(generatedSolution.getSpineOrder(), generatedSolution.getEdgePartition(), newPageIndex, edge);\n if (crossingsOnNewPage < crossingsOnOriginalPage) {\n bestSolution = generatedSolution;\n numberOfIterationsWithoutImprovement = 0;\n\n crossingNumber = crossingNumber - (crossingsOnOriginalPage - crossingsOnNewPage);\n }\n return numberOfIterations >= Main.localSearchIterationLimit || numberOfIterations >= bestSolution.getEdgePartition().size() * bestSolution.getNumberOfPages() || numberOfIterationsWithoutImprovement >= Main.iterationMultiplier || ((System.nanoTime() - Main.START) / 1000000) >= (Main.secondsBeforeStop * 1000) || numberOfIterations >= Main.localSearchIterationLimit;\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Override\n protected boolean stoppingCriteriaSatisfied(KPMPSolution generatedSolution, BestImprovementStepFunction stepFunction) {\n KPMPSolutionChecker solutionChecker = new KPMPSolutionChecker();\n int crossingsOnOriginalPage = solutionChecker.getCrossingNumberOfEdge(bestSolution.getSpineOrder(), bestSolution.getEdgePartition(), originalPageIndex, edge);\n int crossingsOnNewPage = solutionChecker.getCrossingNumberOfEdge(generatedSolution.getSpineOrder(), generatedSolution.getEdgePartition(), newPageIndex, edge);\n if (crossingsOnNewPage < crossingsOnOriginalPage) {\n bestSolution = generatedSolution;\n index = 0;\n pageCounter = 0;\n\n crossingNumber = crossingNumber - (crossingsOnOriginalPage - crossingsOnNewPage);\n\n //assert(crossingNumber == new KPMPSolutionChecker().getCrossingNumber(bestSolution));\n }\n if (index == bestSolution.getEdgePartition().size() && pageCounter != bestSolution.getNumberOfPages() - 1) {\n index = 0;\n pageCounter++;\n }\n return ((System.nanoTime() - Main.START) / 1000000) >= (Main.secondsBeforeStop * 1000) || index == bestSolution.getEdgePartition().size() && pageCounter == bestSolution.getNumberOfPages() - 1 || numberOfIterations >= Main.localSearchIterationLimit;\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@ParameterizedTest\n\t@CsvSource({\n\t\t\t\"9, 1, 2, 3, 1, 10, 1, 10, 1, -1, -1, -1\",\n\t\t\t\"9, -1, -1, -1, 9, 10, 1, 10, 1, 9, -1, -1\",\n\t\t\t\"9, -1, -1, -1, 1, 10, 9, 10, 1, 9, -1, -1\",\n\t\t\t\"9, 3, 3, 3, 89, 100, 1, 10, 1, -1, -1, -1\",\n\t\t\t\"9, 1, -1, -1, 1, 10, 89, 100, 1, -1, -1, -1\",\n\t\t\t\"9, 1, 2, -1, 2, 2, 1, 10, 25, 1, 2, 9\",\n\t\t\t\"9, 3, 3, 3, 0, 2, 950, 1000, 25, 3, 3, -1\",\n\t\t\t\"9, -1, -1, -1, 9999, 10000, 950, 1000, 1, 9, 9, 9\",\n\t\t\t\"9, -1, -1, -1, 0, 1, 0, 390000, 1, -1, -1, -1\",\n\t\t\t\"4, -1, -1, -1, 100, 100, 1000, 1000, 1, 4, 4, 4\",\n\t\t\t\"5, 3, -1, -1, 100, 100, 1000, 1000, 10, 3, 5, 5\",\n\t\t\t\"5, 1, 3, 4, 100, 100, 1000, 1000, 25, 1, 3, 4\",\n\t})\n\tvoid usesExpectedMultiplier(\n\t\t\tlong consensusSec,\n\t\t\tlong old10XLevelStart,\n\t\t\tlong old25XLevelStart,\n\t\t\tlong old100XLevelStart,\n\t\t\tint firstUsed,\n\t\t\tint firstTps,\n\t\t\tint secondUsed,\n\t\t\tint secondTps,\n\t\t\tlong expectedMultiplier,\n\t\t\tlong new10XLevelStart,\n\t\t\tlong new25XLevelStart,\n\t\t\tlong new100XLevelStart\n\t) {\n\t\tfinal var aThrottle = DeterministicThrottle.withTps(firstTps);\n\t\tfinal var bThrottle = DeterministicThrottle.withTps(secondTps);\n\t\taThrottle.allow(firstUsed);\n\t\tbThrottle.allow(secondUsed);\n\t\tgiven(throttling.activeThrottlesFor(CryptoTransfer)).willReturn(List.of(aThrottle, bThrottle));\n\n\t\tsubject.resetExpectations();\n\t\tsubject.resetCongestionLevelStarts(instants(old10XLevelStart, old25XLevelStart, old100XLevelStart));\n\t\tsubject.updateMultiplier(Instant.ofEpochSecond(consensusSec));\n\t\tfinal long actualMultiplier = subject.currentMultiplier();\n\t\tfinal var starts = subject.congestionLevelStarts();\n\n\t\tassertEquals(expectedMultiplier, actualMultiplier);\n\t\tassertNullOrEquals(starts[0], new10XLevelStart);\n\t\tassertNullOrEquals(starts[1], new25XLevelStart);\n\t\tassertNullOrEquals(starts[2], new100XLevelStart);\n\t}", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT05() {\n\t\t// PRECONDITIONS\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> savedSchedules = new ArrayList<ScheduleStub>();\n\t\tsmc.saveSchedules(savedSchedules);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tdouble balance = 0.0d;\n\t\ttry {\n\t\t\tMethod getBalance = smc.getClass().getDeclaredMethod(\"getBalance\", (Class<?> []) null);\n\t\t\tObject balanceObj = getBalance.invoke(smc, (Object[]) null);\n\t\t\t\n\t\t\tif (balanceObj == null) throw new NullPointerException(\"getBalance() returned null; expected a number\");\n\t\t\telse if (!(balanceObj instanceof Number)) throw new RuntimeException(\"getBalance() did not return a number\");\n\t\t} catch (Exception ex) {\n\t\t\texceptionThrown = ex;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertEquals(0.0d, balance, 0.0d);\n\t}", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess2() {\n\t\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B16DCCN168\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString mmtMark = \"\", tthcmMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Mạng máy tính\")) {\n\t\t\t\tmmtMark = result.getMarkToChar();\n\t\t\t}\n\t\t\t\n\t\t\tif (subject.getName().equals(\"Tư tưởng Hồ Chí Minh\")) {\n\t\t\t\ttthcmMark = result.getMarkToChar();\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\tmmtMark.equals(\"B\") &&\n\t\t\t\ttthcmMark.equals(\"A\") &&\n\t\t\t\tpassedCreditsTillNow == 15 &&\n\t\t\t\tdf.format(gpaTillNow).equals(\"3.64\")\n\t\t\t\t);\n\t}", "@Test\n public void testWithPropagator() {\n CelestialBody sun = CelestialBodyFactory.getSun();\n final Frame eci = FramesFactory.getGCRF();\n final Frame ecef = FramesFactory.getITRF(IERSConventions.IERS_2010, true);\n AbsoluteDate date = new AbsoluteDate(2004, 1, 1, utc);\n OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,\n Constants.WGS84_EARTH_FLATTENING, ecef);\n Orbit orbit = new KeplerianOrbit(6378137 + 400e3, 1e-3, FastMath.toRadians(50), 0, 0, 0, PositionAngle.TRUE,\n eci, date, Constants.EIGEN5C_EARTH_MU);\n final SpacecraftState ic = new SpacecraftState(orbit);\n\n final AbsoluteDate end = date.shiftedBy(5 * Constants.JULIAN_DAY);\n final AbsoluteDate resetDate = date.shiftedBy(0.8 * Constants.JULIAN_DAY + 0.1);\n\n final SpacecraftState[] lastState = new SpacecraftState[1];\n final OrekitStepHandler stepSaver = interpolator -> {\n final AbsoluteDate start = interpolator.getPreviousState().getDate();\n if (start.compareTo(resetDate) < 0) {\n lastState[0] = interpolator.getPreviousState();\n }\n };\n\n // propagate with state rest to take slightly different path\n NumericalPropagator propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n SpacecraftState actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n SpacecraftState expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n\n // propagate with state rest to take slightly different path\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n }", "public void testSVMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the SVM with liner kernenl on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome, \"engines-svm.xml\")\n .getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n assertEquals(\"Wrong value for correct: \", 44, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 10, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 11, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 40, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n\n System.out.println(\"completed\");\n // Remove the resources\n clearOneTest();\n }", "static void playC45() throws IOException {\n\t\tRealVector[] data = NNDataset.getData(NNDataset.HOME);\n\t\tRealVector[] label = NNDataset.getLabel(NNDataset.HOME);\n\t\tRealMatrix d = MatrixUtils.createRealMatrix(data.length, data[0].getDimension());\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\td.setRowVector(i, data[i]);\n\t\t}\n\t\td = d.transpose(); // data = column vector\n\n\t\tRealVector l = MatrixUtils.createRealVector(new double[label.length]);\n\t\tfor (int i = 0; i < l.getDimension(); i++) {\n\t\t\tl.setEntry(i, label[i].getEntry(0));\n\t\t}\n\n\t\tDecisionNode root = training(d, l);\n\t\tString[] header = NNDataset.getHeader(NNDataset.HOME);\n\t\tprintTree(root, header);\n\n\t\tInteger lb = predict(root, data[0]);\n\t\tSystem.out.println(lb);\n\n\t\tdouble ok = MSE(root, data, label);\n\t\tSystem.out.println(\"total hit: \" + ok);\n\t}", "@Test\n public void testVirement1() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 28000.0;\n double excepted_solde_cpt1 = 35000.0;\n double excepted_solde_cpt2 = 71000.0;\n\n //Act\n assertEquals(true, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "public void controlPointsChanged(List<Coordinates> lcp) {\n // sort the control points by x position.\n // this makes things easier later when we paint the function.\n lcp.sort(\n (point1,point2) -> Integer.compare(point1.getX(),point2.getX())\n );\n\n // collect the points in an array before doing the calculations.\n // again, this makes things easier for us.\n controlPoints=lcp.toArray(new Coordinates[0]);\n n=controlPoints.length;\n if(n<2) {\n // nothing to do here\n return;\n }\n double []X = new double[n];\n double []Y = new double[n];\n for(int i =0;i<n;i++){\n \tX[i]=controlPoints[i].getX();\n \tY[i]=controlPoints[i].getY();\n }\n // Construct the linear system S*C=T with n-2 equations.\n // The matrix S contains the left hand side of the equations on slide 13.\n // The matrix Z contains the right hand side of the equations on slide 13.\n double[][] S=new double[n-2][n-2];\n double[] Z=new double[n-2];\n \n // Fill the matrix S and the vector Z and solve S*C=T to get c_2 to c_{n-1}.\n for(int i = 0; i< n-3;i++){\n \tS[i][i]=2*delta(X,i+1,0);\n \tS[i+1][i]=delta(X,i+2,-1);\n \tS[i][i+1]=delta(X,i+1,1);\n \tZ[i]=z(Y,X,i);\n }\n S[n-2][n-2]=2*delta(X,n-1,0);\n \n C= EliminationGaussLegendre.solve(S, Z);\n \n // Calculate the n-1 coefficients b_i and d_i.\n // Note that you need all c_i here (but you know that c_1 and c_n are zero).\n //a_i = y_i;\n for(int i=1 ; i<n ; i++){\n \tD[i-1]=d(Y,X,i-1);\n \tB[i-1]=b(Y,C,X,i-1);\n }\n \n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public static void main(String[] args) {\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, true, null)));\n measureTime(()->checkInterruptSequential(4, 4, 3, false));\n measureTime(()->checkInterruptSequential(4, 4, 3, true));\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT06() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c = new ClassDetailsStub(TEST_CONFIG.TueThu);\n\t\t\n\t\tCollection<ClassDetailsStub> s = new ArrayList<ClassDetailsStub>();\n\t\ts.add(c);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> savedSchedules = new ArrayList<ScheduleStub>();\n\t\tsavedSchedules.add(new ScheduleStub(s));\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tboolean balanceGreaterThanZero = false;\n\t\ttry {\n\t\t\tObject balanceObj = null;\n\t\t\tMethod getBalance = smc.getClass().getDeclaredMethod(\"getBalance\", (Class<?> []) null);\n\t\t\t\n\t\t\tsmc.saveSchedules(savedSchedules);\n\t\t\tbalanceObj = getBalance.invoke(smc, (Object[]) null);\n\t\t\t\n\t\t\tif (balanceObj == null) throw new NullPointerException(\"getBalance() returned null; expected a number\");\n\t\t\telse if (!(balanceObj instanceof Number)) throw new RuntimeException(\"getBalance() did not return a number\");\n\t\t\t\n\t\t\tbalanceGreaterThanZero = ((Number) balanceObj).doubleValue() > 0.0d;\n\t\t} catch (Exception ex) {\n\t\t\texceptionThrown = ex;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertTrue(balanceGreaterThanZero);\n\t}", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test28() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n CostMatrix costMatrix0 = costSensitiveClassifier0.getCostMatrix();\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0, costMatrix0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Cost matrix not compatible with data!\n //\n }\n }", "@Test\n public void testTrain_RegressionDataSet_ExecutorService() {\n System.out.println(\"train\");\n RegressionDataSet trainSet = FixedProblems.getSimpleRegression1(150, new Random(2));\n RegressionDataSet testSet = FixedProblems.getSimpleRegression1(50, new Random(3));\n\n for (boolean modification1 : new boolean[] { true, false })\n for (SupportVectorLearner.CacheMode cacheMode : SupportVectorLearner.CacheMode.values()) {\n PlattSMO smo = new PlattSMO(new RBFKernel(0.5));\n smo.setCacheMode(cacheMode);\n smo.setC(1);\n smo.setEpsilon(0.1);\n smo.setModificationOne(modification1);\n smo.train(trainSet, true);\n\n double errors = 0;\n for (int i = 0; i < testSet.size(); i++)\n errors += Math.pow(testSet.getTargetValue(i) - smo.regress(testSet.getDataPoint(i)), 2);\n assertTrue(errors / testSet.size() < 1);\n }\n }", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[] doubleArray0 = new double[0];\n int[] intArray0 = new int[4];\n intArray0[0] = 2749;\n intArray0[1] = (-2);\n intArray0[2] = 0;\n intArray0[3] = 0;\n SparseInstance sparseInstance0 = new SparseInstance((-40.152), doubleArray0, intArray0, 919);\n // Undeclared exception!\n try { \n discretize0.input(sparseInstance0);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "public void testCleave() {\n final String inputFile = \"testCleave.fas\";\n final String input = TestCaseLM.getFullFilePath(inputFile).replace(\"%20\", \" \");\n\n try {\n // We need to obtain a pointer the control file before anything else.\n BufferedReader br = new BufferedReader(new FileReader(input));\n\n // First one with zero MC's.\n Enzyme e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 0);\n Protein p = new Protein(\">sw|Q55645|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\");\n\n Protein[] result = e.cleave(p);\n boolean once = false;\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now with one miscleavage.\n e.setMiscleavages(1);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now with three miscleavages.\n e.setMiscleavages(3);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Now check for the edge case where there's only one amino acid after the last cleavage position\n // (used to be a bug that this amino acid was never considered).\n e.setMiscleavages(1);\n result = e.cleave(new Protein(\">sw|Q55645|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDRA\"));\n boolean foundIt = false;\n for(int i = 0; i < result.length; i++) {\n Protein lProtein = result[i];\n if(lProtein.getSequence().getSequence().equals(\"TGFDRA\")){\n foundIt = true;\n break;\n }\n }\n\n if(!foundIt) {\n fail(\"The peptide 'TGFDRA' (penultimate amino acid is cleavage site, one missed cleavage allowed) was NOT returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now Nterm position and 1 miscleavage.\n e.setPosition(Enzyme.NTERM);\n e.setMiscleavages(1);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Next, take an enzyme that does not have restricting residus.\n e = new Enzyme(\"Test\", \"KR\", null, \"Cterm\", 0);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // And now take an entry that has a location set and see if the cleavage is adjusted accordingly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\");\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take a C-terminally truncated sequence and see if it is cleaved correctly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\", true, Protein.CTERMTRUNC);\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take an N-terminally truncated sequence and see if it is cleaved correctly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\", true, Protein.NTERMTRUNC);\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take a translated sequence, containing an '_' (stopcodon).\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHG_FVNRTGFDA\");\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // END of file reached.\n // Check this!\n String line = null;\n while((line = br.readLine()) != null) {\n if(!line.trim().equals(\"\")) {\n fail(\"More lines in testCleave.fas then were generated by the test cleavage!\");\n }\n }\n br.close();\n } catch(IOException ioe) {\n fail(\"IOException occurred while testing the cleave() method: '\" + ioe.getMessage() + \"'.\");\n }\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testVerser2() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(6500.0);\n double montant_a_verser = -2000.0;\n double excepted = 6500.0;\n\n //Act\n assertEquals(false, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n\n }" ]
[ "0.65949225", "0.65912473", "0.5986597", "0.57795", "0.5703691", "0.563787", "0.53556013", "0.5318458", "0.531436", "0.52704465", "0.5177754", "0.5174197", "0.5158172", "0.51175845", "0.51056963", "0.507546", "0.5049223", "0.50490606", "0.5048576", "0.50396436", "0.50091225", "0.50049496", "0.49835175", "0.49745733", "0.49732602", "0.49524283", "0.4951273", "0.49045762", "0.490148", "0.49009198", "0.48959324", "0.48947224", "0.4891426", "0.48707473", "0.48685265", "0.48633185", "0.48515907", "0.48470095", "0.4844898", "0.48436123", "0.48387545", "0.4836782", "0.4828989", "0.4802411", "0.47978875", "0.47808146", "0.47798273", "0.4768204", "0.47634593", "0.47626087", "0.47494087", "0.47443756", "0.47443378", "0.4738983", "0.47319967", "0.47283176", "0.47174108", "0.47151816", "0.47100234", "0.47089654", "0.47085842", "0.4697149", "0.4692755", "0.46917945", "0.4666193", "0.46616486", "0.46554494", "0.46519253", "0.4648634", "0.4644216", "0.46313304", "0.46295875", "0.46276626", "0.46170428", "0.46129498", "0.46123195", "0.46072134", "0.46064213", "0.45993474", "0.45975587", "0.45975453", "0.45942676", "0.4593302", "0.4591114", "0.45910373", "0.45897686", "0.45873484", "0.45796907", "0.4575925", "0.45708704", "0.45677796", "0.45607907", "0.45571607", "0.45456725", "0.45397073", "0.45350856", "0.4524383", "0.45240518", "0.45236713", "0.45216507" ]
0.71575373
0
Test of estimateCstepping method, of class MarkovModelUtilities.
@Test public void testEstimateCstepping_IIntArray_int() { IIntArray traj = null; int lag = 0; MarkovModelUtilities instance = new MarkovModelUtilities(); IDoubleArray expResult = null; IDoubleArray result = instance.estimateCstepping(traj, lag); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEstimateCstepping_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCstepping(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize(\"l*{e5SNh\");\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 177;\n discretize0.setUseEqualFrequency(true);\n double[][] doubleArray0 = new double[5][9];\n double[] doubleArray1 = new double[3];\n doubleArray1[0] = (double) 177;\n doubleArray1[1] = (double) 177;\n doubleArray1[2] = (double) 177;\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[2];\n doubleArray2[0] = (double) 177;\n doubleArray2[1] = (double) 177;\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[9];\n doubleArray3[0] = (double) 177;\n doubleArray3[1] = (double) 177;\n doubleArray3[2] = (double) 177;\n doubleArray3[3] = (double) 177;\n doubleArray3[4] = (double) 177;\n doubleArray3[5] = (double) 177;\n doubleArray3[6] = (double) 177;\n doubleArray3[7] = (double) 177;\n doubleArray3[8] = (double) 177;\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[8];\n doubleArray4[0] = (double) 177;\n doubleArray4[1] = (double) 177;\n doubleArray4[2] = (double) 177;\n doubleArray4[3] = (double) 177;\n doubleArray4[4] = (double) 177;\n doubleArray4[5] = (double) 177;\n doubleArray4[6] = (double) 177;\n doubleArray4[7] = (double) 177;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[0];\n doubleArray0[4] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.listOptions();\n discretize0.setIgnoreClass(true);\n String[] stringArray0 = new String[0];\n Discretize.main(stringArray0);\n discretize0.findNumBinsTipText();\n discretize0.setInvertSelection(true);\n // Undeclared exception!\n try { \n discretize0.getBinRangesString(511);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 511\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "public void steepestDescent() {\r\n ArrayList<Atom> atoms = cluster.getAtoms();\r\n Atom a;\r\n int numAtoms = atoms.size();\r\n double potentialEnergy;\r\n double trialPotential;\r\n int i;\r\n\r\n //Increment time\r\n totalTime += currentStep;\r\n\r\n //Calculate force on each atom\r\n cluster.calculateForces();\r\n\r\n //Get energy of current configuration\r\n HashMap<String, Double> energies = cluster.getEnergies();\r\n potentialEnergy = 0.0;\r\n for(String eName : energies.keySet())\r\n potentialEnergy += energies.get(eName).doubleValue();\r\n\r\n //Save current atom positions and advance atoms to trial positions\r\n for(i = 0; i < numAtoms; i++) {\r\n a = atoms.get(i);\r\n\r\n savedLocations[i].x = a.location.x;\r\n savedLocations[i].y = a.location.y;\r\n savedLocations[i].z = a.location.z;\r\n\r\n //Compute trial locations\r\n a.location.x += a.force.x * currentStep;\r\n a.location.y += a.force.y * currentStep;\r\n a.location.z += a.force.z * currentStep;\r\n }\r\n\r\n //Get energy of the trial configuration\r\n energies = cluster.getEnergies();\r\n trialPotential = 0.0;\r\n for(String eName : energies.keySet())\r\n trialPotential += energies.get(eName).doubleValue();\r\n\r\n //Decide whether to keep trial configuration based on convergence\r\n if(trialPotential < potentialEnergy) {\r\n //Keep positions and check for convergence\r\n if(Math.abs((potentialEnergy - trialPotential) / potentialEnergy) < convergenceCriterion)\r\n isConverged = true;\r\n\r\n currentStep *= 1.2;\r\n } else {\r\n //Restore old positions\r\n for(i = 0; i < numAtoms; i++) {\r\n a = atoms.get(i);\r\n\r\n a.location.x = savedLocations[i].x;\r\n a.location.y = savedLocations[i].y;\r\n a.location.z = savedLocations[i].z;\r\n }\r\n\r\n currentStep *= 0.5;\r\n }\r\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testBackwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.backwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testEstimateC_IIntArray_int()\n {\n IIntArray traj = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateC(traj, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n void makeCoffee() {\n Assertions.assertFalse(machine.makeCoffee());\n\n //try with cup\n Assertions.assertDoesNotThrow(() -> {\n machine.positionCup();\n });\n\n Assertions.assertThrows(Exception.class, () -> {\n machine.positionCup();\n });\n\n\n Assertions.assertTrue(machine.makeCoffee());\n\n //check if correct amount as been subtracted\n Assertions.assertEquals(machine.getCurrentWater(), 1000 - machine.waterPerCup);\n Assertions.assertEquals(machine.getCurrentBeans(), 800 - machine.beansPerCup);\n\n //reset\n machine.fillWater();\n machine.fillBeans();\n machine.setCupPositioned(true);\n\n //test over boundary\n Assertions.assertTrue(machine.makeCoffee());\n Assertions.assertTrue(machine.makeCoffee());\n\n //set only water to boundary values and below\n machine.setCurrentWater(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentWater(machine.waterPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n //reset water\n machine.fillWater();\n\n //set only beans to boundary value and below\n machine.setCurrentBeans(0);\n Assertions.assertFalse(machine.makeCoffee());\n machine.setCurrentBeans(machine.beansPerCup);\n Assertions.assertTrue(machine.makeCoffee());\n\n\n }", "public void checkMovementZMinimum(ITestContext context) throws Exception {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=40;\n String disResult=oa.clickDistanceMinus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=5;\n disResult=oa.clickDistanceMinus(clickTimes);\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n\n clickTimes=6;\n disResult=oa.clickDistanceMinus(clickTimes);//click times: 51\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-5\",\"distance is not same as expected result\");\n\n embededCompareResult(higher,middle,lower, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n disResult=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+disResult,\"click Z reset(1 times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "@Test(timeout = 4000)\n public void test29() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[3][6];\n discretize0.setIgnoreClass(false);\n discretize0.m_CutPoints = doubleArray0;\n double[] doubleArray1 = new double[4];\n // Undeclared exception!\n try { \n discretize0.getCutPoints((-831));\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // -831\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "public void testStep() {\n\n DT_TractographyImage crossing = Images.getCrossing();\n\n FACT_FibreTracker tracker = new FACT_FibreTracker(crossing);\n\n Vector3D[] pds = crossing.getPDs(1,1,1);\n\n Vector3D step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, true);\n\n assertEquals(1.0, pds[0].dot(step.normalized()), 1E-8);\n\n assertEquals(Images.xVoxelDim / 2.0, step.mod(), 0.05);\n \n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 0, false);\n\n assertEquals(-1.0, pds[0].dot(step.normalized()), 1E-8);\n\n step = tracker.getFirstStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), 1, true);\n\n assertEquals(1.0, pds[1].dot(step.normalized()), 1E-8);\n\n\n for (int i = 0; i < 2; i++) {\n\n step = tracker.getNextStep(new Point3D(1.5 * Images.xVoxelDim, 1.2 * Images.yVoxelDim, 1.1 * Images.zVoxelDim), new Vector3D(pds[i].x + 0.01, pds[i].y + 0.02, pds[i].z + 0.03).normalized());\n\n assertEquals(1.0, pds[i].dot(step.normalized()), 1E-8);\n\n }\n\n \n }", "@Test()\n public void testTrainWarmCFastSMO() {\n ClassificationDataSet train = FixedProblems.getHalfCircles(250, RandomUtil.getRandom(), 0.1, 0.2);\n\n PlattSMO warmModel = new PlattSMO(new LinearKernel(1));\n warmModel.setC(1);\n warmModel.train(train);\n\n PlattSMO warm = new PlattSMO(new LinearKernel(1));\n warm.setC(1e4);// too large to train efficently like noraml\n\n long start, end;\n\n start = System.currentTimeMillis();\n warm.train(train, warmModel);\n end = System.currentTimeMillis();\n long warmTime = (end - start);\n\n PlattSMO notWarm = new PlattSMO(new LinearKernel(1));\n notWarm.setC(1e4);// too large to train efficently like noraml\n\n start = System.currentTimeMillis();\n notWarm.train(train);\n end = System.currentTimeMillis();\n long normTime = (end - start);\n\n assertTrue(warmTime < normTime * 0.75);\n\n }", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.setAttributeIndices(\"\");\n Filter.makeCopy(discretize0);\n discretize0.setDesiredWeightOfInstancesPerInterval(2.0);\n boolean boolean0 = true;\n discretize0.m_ClassIndex = 0;\n discretize0.setUseBinNumbers(true);\n discretize0.listOptions();\n discretize0.makeBinaryTipText();\n discretize0.getInvertSelection();\n // Undeclared exception!\n try { \n discretize0.calculateCutPointsByEqualWidthBinning((-458));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test03() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[19];\n evaluation0.updateMargins(doubleArray0, 0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test\n void cupTesting() {\n Assertions.assertFalse(machine.isCupPositioned());\n Assertions.assertFalse(machine.removeCup());\n\n Assertions.assertDoesNotThrow(() -> machine.positionCup());\n\n Assertions.assertTrue(machine.removeCup());\n Assertions.assertFalse(machine.isCupPositioned());\n machine.setCupPositioned(true);\n Assertions.assertTrue(machine.isCupPositioned());\n\n }", "public ModelParams optimize() throws Exception {\n\t\tint iterCount = 0;\n\t\tdivergence = KLDivergenceCalculator.calculate(cState, tState);\n\t\tSystem.out.println(\"KL Divergence : \" + divergence);\n\t\t// ((DivergenceChart) BeanFinder\n\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t// iterCount, divergence);\n\t\tdouble delta[] = null;\n\t\tdouble theta[] = data.getParams().getParams();\n\t\tdouble newDivergence = 0.0d;\n\t\tdouble initialStep = data.getInitialStepSize();\n\t\tboolean optimized = false;\n\t\tdo {\n\t\t\tdelta = computeGradient(theta);\n\t\t\tfor (double step = initialStep; iterCount < data.getMaxIterations(); step /= 10) {\n\t\t\t\tSystem.out.println(\"Step size : \" + step);\n\t\t\t\tSystem.out.println(\"KL divergence before taking a step : \"\n\t\t\t\t\t\t+ KLDivergenceCalculator.calculate(cState, tState));\n\t\t\t\tfor (int i = 0; i < delta.length; i++) {\n\t\t\t\t\tif (Double.isNaN(delta[i]))\n\t\t\t\t\t\tSystem.out.print(\"delta is NAN!!\" + delta[i] + \", \");\n\t\t\t\t\ttheta[i] -= step * delta[i];\n\t\t\t\t\tSystem.out.print((theta[i]) + \", \");\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t\tgetNewState(theta);\n\t\t\t\titerCount++;\n\t\t\t\tnewDivergence = KLDivergenceCalculator\n\t\t\t\t\t\t.calculate(cState, tState);\n\t\t\t\tSystem.out.println(\"KL Divergence : \" + newDivergence);\n\t\t\t\t// ((DivergenceChart) BeanFinder\n\t\t\t\t// .findBean(MetaConstants.BEAN_DIVERGENCE_CHART)).update(\n\t\t\t\t// iterCount, newDivergence);\n\t\t\t\tif (newDivergence < divergence) {\n\t\t\t\t\tdivergence = newDivergence;\n\t\t\t\t\tinitialStep = step;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// before taking the next step size, reset theta to what it was\n\t\t\t\tfor (int i = 0; i < delta.length; i++)\n\t\t\t\t\ttheta[i] += step * delta[i];\n\t\t\t\tgetNewState(theta); // Added for checking. Not required.\n\t\t\t}\n\t\t\toptimized = optimized(theta);\n\t\t} while (!optimized && iterCount < data.getMaxIterations());\n\t\tModelParams optimParams = null;\n\t\tif (optimized) {\n\t\t\toptimParams = new ModelParams();\n\t\t\toptimParams.setParams(theta);\n\t\t}\n\t\treturn optimParams;\n\t}", "@Test\n public void testEstimateCmilestoning_Iterable_int()\n {\n Iterable<IIntArray> trajs = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[7][2];\n double[] doubleArray1 = new double[7];\n doubleArray1[0] = 0.0;\n doubleArray1[1] = (-587.14627);\n doubleArray1[2] = (-2542.40202289275);\n doubleArray1[3] = (-167.679515);\n doubleArray1[4] = (-1.0);\n doubleArray1[5] = 1.0;\n doubleArray1[6] = (-1.0);\n doubleArray0[0] = doubleArray1;\n double[] doubleArray2 = new double[5];\n doubleArray2[0] = (-167.679515);\n doubleArray2[1] = (-2692.352);\n doubleArray2[2] = (-167.679515);\n doubleArray2[3] = (-2542.40202289275);\n doubleArray2[4] = (-587.14627);\n doubleArray0[1] = doubleArray2;\n double[] doubleArray3 = new double[4];\n doubleArray3[0] = (-1.0);\n doubleArray3[1] = (-1.0);\n doubleArray3[2] = 1.0;\n doubleArray3[3] = (-2542.40202289275);\n doubleArray0[2] = doubleArray3;\n double[] doubleArray4 = new double[7];\n doubleArray4[0] = (-2692.352);\n doubleArray4[1] = (-1.0);\n doubleArray4[2] = (-1.0);\n doubleArray4[3] = 0.0;\n doubleArray4[4] = 1.0;\n doubleArray4[5] = 0.0;\n doubleArray4[6] = 1.0;\n doubleArray0[3] = doubleArray4;\n double[] doubleArray5 = new double[1];\n doubleArray5[0] = (-167.679515);\n doubleArray0[4] = doubleArray5;\n double[] doubleArray6 = new double[0];\n doubleArray0[5] = doubleArray6;\n double[] doubleArray7 = new double[1];\n doubleArray7[0] = (-587.14627);\n doubleArray0[6] = doubleArray7;\n discretize0.m_CutPoints = doubleArray0;\n String string0 = discretize0.invertSelectionTipText();\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals(\"Set attribute selection mode. If false, only selected (numeric) attributes in the range will be discretized; if true, only non-selected attributes will be discretized.\", string0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\r\n public void testAverageacceleration() {\r\n System.out.println(\"Average Acceleration\");\r\n \r\n // Test case one.\r\n System.out.println(\"Test case #1\"); \r\n \r\n double distance = 200;\r\n long time = 16;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 0.78125;\r\n double result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case two.\r\n System.out.println(\"Test case #2\"); \r\n \r\n distance = 80;\r\n time = 200;\r\n \r\n \r\n expResult = .002;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case three.\r\n System.out.println(\"Test case #3\"); \r\n \r\n distance = 0;\r\n time = 15;\r\n \r\n \r\n expResult = 0;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case four.\r\n System.out.println(\"Test case #4\"); \r\n \r\n distance = 12;\r\n time = 1;\r\n \r\n \r\n expResult = 12;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case five.\r\n System.out.println(\"Test case #5\"); \r\n \r\n distance = 1;\r\n time = 1;\r\n \r\n \r\n expResult = 1;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case six.\r\n System.out.println(\"Test case #6\"); \r\n \r\n distance = 3;\r\n time = 8;\r\n \r\n \r\n expResult = .046875;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n // Test case seven.\r\n System.out.println(\"Test case #7\"); \r\n \r\n distance = 200;\r\n time = 1;\r\n \r\n \r\n expResult = 200;\r\n result = instance.averageAcceleration(distance, time);\r\n assertEquals(expResult, result, -1);\r\n \r\n \r\n \r\n }", "@Test\n public void testGetSetTemperaturaExteriorMinima() {\n System.out.println(\"getSetTemperaturaExteriorMinima\");\n double expResult = 10.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMinima(expResult);\n double result = instance.getTemperaturaExteriorMinima();\n assertEquals(expResult, result, 0.0);\n }", "public void checkMovementZReset(ITestContext context) {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=30;\n String disResult=oa.clickDistanceMinus(clickTimes);\n embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z minus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-3\",\"distance is not same as expected result\");\n\n clickTimes=10;\n disResult=oa.clickDistancePlus(clickTimes);\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-2\",\"distance is not same as expected result\");\n\n disResult=oa.clickDistancePlus(clickTimes);\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"-1\",\"distance is not same as expected result\");\n\n disResult=oa.clickDistanceReset();\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+disResult,\"click Z reset(1 times), get distance is \"+disResult);\n Assert.assertEquals(disResult,\"0\",\"distance is not same as expected result\");\n\n embededCompareResult(lower,middle,higher, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n }\n Reporter.testEnd();\n }", "private static void testTakeStep(Drunkard drunkard, int testStepTimes, int testStepSize){\n\t for (int i = 0; i < testStepTimes; i++)\n\t{\n\t ImPoint pointA = drunkard.getCurrentLoc(); \n\t\tdrunkard.takeStep();\n\t\tImPoint pointB = drunkard.getCurrentLoc();\n\t\t\n\t\tif (pointA.getX()-pointB.getX() != 0 && pointA.getY()-pointB.getY() != 0)\n\t\t{\n\t\t\tSystem.out.println(\"Not a valid compass direction!\");\n\t\t}\n\t\telse if (Math.sqrt((pointA.getX() - pointB.getX())*(pointA.getX() - pointB.getX()) + (pointA.getY() - pointB.getY())*(pointA.getY() - pointB.getY())) != testStepSize)\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), FAILED, not a valid step\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"took step to (\" + pointB.getX() + \",\" + pointB.getY() + \"), SUCCEEDED\");\n\t\t}\n\t}\n\t System.out.println(); \n\t}", "@Test\n public void testIsTransitionMatrix()\n {\n IDoubleArray T = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isTransitionMatrix(T);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[7];\n evaluation0.updateMargins(doubleArray0, 3, (-1));\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints((-2276));\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n }", "@Test\n public void testGiveChange() throws Exception {\n System.out.println(\"giveChange\");\n //CashRegister instance = new CashRegister();\n assertEquals(0.0, instance.giveChange(), EPSILON);\n instance.scanItem(0.55);\n instance.scanItem(1.27);\n double expResult = 0.18;\n instance.collectPayment(Money.QUARTER, 8);\n double result = instance.giveChange();\n assertEquals(expResult, result, EPSILON);\n \n }", "@Test\n public void testCalcMedAmount() {\n \n //Test case 1\n \n System.out.println(\"calcMedAmount Test Case 1 - Dose is correct\");\n \n //Input Values for Test Case 1\n \n double weightInPounds = 100;\n double numberOfPills = 1;\n \n AntidoteControl instance = new AntidoteControl();\n \n double expResult = 227;\n double result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 2\n \n System.out.println(\"calcMedAmount Test Case 2 Invalid weight\");\n \n //Input Values for Test Case 2\n \n weightInPounds = 0;\n numberOfPills = 1;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -1;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 3\n \n System.out.println(\"calcMedAmount Test Case 3 Underdose\");\n \n //Input Values for Test Case 3\n \n weightInPounds = 10001;\n numberOfPills = 0;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = -2;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n \n \n //Test case 4\n \n System.out.println(\"calcMedAmount Test Case 4 Overdose\");\n \n //Input Values for Test Case 4\n \n weightInPounds = 100;\n numberOfPills = 4;\n \n // AntidoteControl instance = new AntidoteControl();\n \n expResult = 227;\n result = AntidoteControl.calcMedAmount(weightInPounds);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "int calculateMST();", "@Test\n public void transferCheckingtoSavingsTest(){\n assertTrue(userC.transfer(150.00, userS));\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n Discretize discretize0 = new Discretize();\n Locale.getISOLanguages();\n double[][] doubleArray0 = new double[9][8];\n double[] doubleArray1 = new double[3];\n double[] doubleArray2 = new double[9];\n doubleArray2[5] = (-163.0);\n doubleArray2[8] = 1421.4058829;\n doubleArray0[3] = doubleArray0[2];\n doubleArray0[4] = doubleArray0[1];\n discretize0.setOutputFormat();\n double[] doubleArray3 = new double[2];\n doubleArray3[0] = 1421.4058829;\n doubleArray3[1] = (-163.0);\n doubleArray0[6] = doubleArray2;\n double[] doubleArray4 = new double[0];\n doubleArray0[7] = doubleArray4;\n double[] doubleArray5 = new double[6];\n doubleArray5[2] = (-163.0);\n doubleArray0[8] = doubleArray5;\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test096() throws Throwable {\n CostMatrix costMatrix0 = Evaluation.handleCostOption(\"\", 1281);\n assertNull(costMatrix0);\n }", "@Test(timeout = 4000)\n public void test19() throws Throwable {\n Discretize discretize0 = new Discretize(\"%\");\n FileSystemHandling.createFolder((EvoSuiteFile) null);\n discretize0.findNumBinsTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"%\");\n discretize0.m_DefaultCols = \"%\";\n double[][] doubleArray0 = new double[0][7];\n discretize0.m_CutPoints = doubleArray0;\n // Undeclared exception!\n try { \n discretize0.getCutPoints(1);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void shouldCalculateProperMoveProbabilities() throws Exception {\n\n int actualCity = 0;\n boolean[] visited = new boolean[] {true, false, false, false};\n int[][] firstCriterium = new int[][] {{0, 2, 1, 2},\n {2, 2, 1, 1},\n {1, 1, 0, 1},\n {2, 1, 1, 0}};\n int[][] secondCriterium = new int[][] {{0, 3, 2, 1},\n {3, 0, 0, 0},\n {2, 0, 0, 0},\n {1, 0, 0, 0}};\n// final AttractivenessCalculator attractivenessCalculator = new AttractivenessCalculator(1.0, 0.0, 0.0, 0.0, 0.0);\n// double[][] array = new double[0][0];\n// final double[] probabilities = attractivenessCalculator.movesProbability(actualCity, visited, array, firstCriterium, secondCriterium, null, 0.0, 0.0);\n\n// assertTrue(probabilities[0] == 0.0);\n// assertTrue(probabilities[1] == 0.0);\n// assertTrue(probabilities[2] == 0.5);\n// assertTrue(probabilities[3] == 0.5);\n }", "public void testMainLBGFSCachedSemiMarkov() throws Exception {\n\t\tConrad.main(new String[] {\"train\", \"test/input/zeroOrderLBFGSCachedSemiMarkov.xml\", \"test/input/zeroOrderTestShortMax.txt\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest.txt\", \"test/working/zeroOrderMainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tConrad.main(new String[] {\"test\", \"test/working/zeroLBGFSModelCachedSemiMarkov.ser\", \"test/input/zeroOrderTest2.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\"});\n\t\tassertFilesMatch(\"test/output/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\", \"test/working/zeroOrder2MainLBGFSCachedSemiMarkovPredicted.txt\");\n\t}", "@Test\n public void testGetSetTemperaturaExterior() {\n System.out.println(\"getSetTemperaturaExterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExterior(expResult);\n double result = instance.getTemperaturaExterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\r\n public void gallonsCauldronHolds() {\r\n \r\n System.out.println(\"gallonsCauldronHolds\");\r\n \r\n //Test #1\r\n System.out.println(\"Test case #1\"); \r\n \r\n double diameter = 50;\r\n double depth = 25;\r\n \r\n SceneControl instance = new SceneControl();\r\n \r\n double expResult = 212.500;\r\n double result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #2\r\n System.out.println(\"Test case #2\");\r\n \r\n diameter = 15;\r\n depth = -12;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #3\r\n System.out.println(\"Test case #3\");\r\n \r\n diameter = -5;\r\n depth = 20;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #4\r\n System.out.println(\"Test case #4\");\r\n \r\n diameter = 0;\r\n depth = 30;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #5\r\n System.out.println(\"Test case #5\");\r\n \r\n diameter = 14;\r\n depth = 0;\r\n \r\n expResult = -1;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #6\r\n System.out.println(\"Test case #6\");\r\n \r\n diameter = 1;\r\n depth = 12;\r\n \r\n expResult = .041;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n //Test #7\r\n System.out.println(\"Test case #7\");\r\n \r\n diameter = 20;\r\n depth = 1;\r\n \r\n expResult = 1.36;\r\n result = instance.gallonsCauldronHolds(diameter, depth);\r\n \r\n assertEquals(expResult, result, 0.0001);\r\n \r\n }", "@Test\n public void testInbreedingCoeffForMultiallelicVC() {\n VariantContext test1 = makeVC(\"1\",Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s2\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s3\", T, C, 7099, 2530, 7099, 3056, 0, 14931),\n makeG(\"s4\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s5\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s6\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s7\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s8\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s9\", T, T, 7099, 2530, 0, 7099, 366, 3056),\n makeG(\"s10\", Aref, T, 2530, 0, 7099, 366, 3056, 14931));\n\n final AS_InbreedingCoeff testClass1 = new AS_InbreedingCoeff();\n final double ICresult1 = testClass1.calculateIC(test1, T);\n Assert.assertEquals(ICresult1, -0.4285714, DELTA_PRECISION, \"Pass\");\n final double ICresult1b = testClass1.calculateIC(test1, C);\n Assert.assertEquals(ICresult1b, -0.05263, DELTA_PRECISION, \"Pass\");\n\n //make sure that hets with different alternate alleles all get counted\n VariantContext test2 = makeVC(\"2\", Arrays.asList(Aref,T,C),\n makeG(\"s1\", Aref, C, 4878, 1623, 11297, 0, 7970, 8847),\n makeG(\"s2\", Aref, T, 2530, 0, 7099, 366, 3056, 14931),\n makeG(\"s3\", Aref, T, 3382, 0, 6364, 1817, 5867, 12246),\n makeG(\"s4\", Aref, T, 2488, 0, 9110, 3131, 9374, 12505),\n makeG(\"s5\", Aref, C, 4530, 2006, 18875, 0, 6847, 23949),\n makeG(\"s6\", Aref, T, 5325, 0, 18692, 389, 16014, 24570),\n makeG(\"s7\", Aref, T, 2936, 0, 29743, 499, 21979, 38630),\n makeG(\"s8\", Aref, T, 6902, 0, 8976, 45, 5844, 9061),\n makeG(\"s9\", Aref, T, 5732, 0, 10876, 6394, 11408, 17802),\n makeG(\"s10\", Aref, T, 2780, 0, 25045, 824, 23330, 30939));\n\n final AS_InbreedingCoeff testClass2 = new AS_InbreedingCoeff();\n final double ICresult2 = testClass2.calculateIC(test2, T);\n Assert.assertEquals(ICresult2, -0.666666, DELTA_PRECISION, \"Pass\");\n final double ICresult2b = testClass2.calculateIC(test2, C);\n Assert.assertEquals(ICresult2b, -0.111129, DELTA_PRECISION, \"Pass\");\n }", "public void test_setClippingIIII() {\n}", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess3() {\n\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B17DCCN123\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString tktMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Toán kinh tế\")) {\n\t\t\t\ttktMark = result.getMarkToChar();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\ttktMark.equals(\"C\") && \n\t\t\t\tpassedCreditsTillNow == 18 && \n\t\t\t\tdf.format(gpaTillNow).equals(\"3.19\")\n\t\t\t\t);\n\t}", "float estimateCostToGoal( int current_x, int current_y, int current_z, boolean fromStart ) {\n\t\treturn 0;\n\t}", "@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }", "@Test\n public void testVerser1() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(5000.0);\n double montant_a_verser = 1000.0;\n double excepted = 6000.0;\n\n //Act\n assertEquals(true, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n }", "@Test\n public void testVirement3() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(0.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 8000.0;\n double excepted_solde_cpt1 = 0.0;\n double excepted_solde_cpt2 = 43000.0;\n\n //Act\n assertEquals(false, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "public static void main(String[] args) {\n\n String fileEdgeList = \"../DataSource/PANCANsigEdgeList.csv\";\n String fileGtTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.training.10.csv\";\n// String fileGtTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.testing.10.csv\";\n String fileGeTrainingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.training.10.csv\";\n String fileGeTestingMatrix = \"../DataSource/CrossMatrixDriver/PANCAN.GeM.4468tumors.testing.10.csv\";\n String fileInferDriver = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.InferDriver.10.withTumorID.csv\";\n// String fileDriverSGATable = \"../DataSource/CrossMatrixDriver/PANCAN.Drivercallpertumor.4468tumors.DriverSGATable.10.csv\";\n \n \n DataReader dataObj = new DataReader(fileEdgeList, fileGtTrainingMatrix, fileGeTrainingMatrix);\n\n int reRun = 0;\n double T = 0.5;\n do {\n reRun += 1;\n\n EstimateParams paramObj = new EstimateParams(dataObj.edgeList, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.driverSGATable, dataObj.targetDEGTable);\n InferDriverActivation actObj = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n\n\n actObj.thresholding(T);\n \n actObj.updateInferDriverTable( dataObj.driverSGATable);\n \n double change = actObj.compareMatrix(dataObj.driverSGATable);\n\n System.out.println(\"Current T is \" + T);\n System.out.println(\"Change is \" + change);\n System.out.println(\"This is the \" + reRun + \"th run\");\n if (change < 0.001 || T > 1) {\n System.out.println(\"Total times of run is \" + reRun + \". Final cut shreshold is \" + T);\n \n// dataObj.readInGtMatrix(fileGtTestingMatrix);\n dataObj.readInGeMatrix(fileGeTestingMatrix);\n InferDriverActivation actObjTesting = new InferDriverActivation(paramObj.mapEdgeParam, paramObj.mapSGAParam,\n dataObj.targetDEGTable, dataObj.driverSGAs, dataObj.targetDEGs, dataObj.mapSgaDegs);\n \n actObjTesting.outputInferActivation(fileInferDriver, dataObj.tumorNames);\n// dataObj.outputDriverSGATable(fileDriverSGATable); //output contains tumorName, since tumor name is defined in dataObj, so no need to pass in\n\n break; \n \n } else {\n dataObj.updateDriverSGATable(actObj.inferDriverTable);\n T += 0.05;\n \n }\n\n } while (true);\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n Discretize discretize0 = new Discretize();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Properties properties0 = new Properties();\n ProtectedProperties protectedProperties0 = new ProtectedProperties(properties0);\n ProtectedProperties protectedProperties1 = new ProtectedProperties(protectedProperties0);\n Attribute attribute0 = new Attribute(\"-\", \"-\", protectedProperties1);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"(,Z;Xp#\\\"dxq[\", arrayList0, 1587);\n boolean boolean0 = discretize0.setInputFormat(instances0);\n boolean boolean1 = discretize0.batchFinished();\n assertFalse(discretize0.getFindNumBins());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertTrue(boolean1 == boolean0);\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(boolean1);\n }", "@Test\n public void testStationaryDistributionRevQuick()\n {\n IDoubleArray T = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.stationaryDistributionRevQuick(T);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testGetSetTemperaturaInterior() {\n System.out.println(\"getSetTemperaturaInterior\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInterior(expResult);\n double result = instance.getTemperaturaInterior();\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test\n public void testGetSetTemperaturaExteriorMaxima() {\n System.out.println(\"getSetTemperaturaExteriorMaxima\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaExteriorMaxima(expResult);\n double result = instance.getTemperaturaExteriorMaxima();\n assertEquals(expResult, result, 0.0);\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "public void checkMovementZMaximum(ITestContext context) {\n Reporter.testStart();\n String caseFolder=context.getName()+\"/\";\n String importFile=context.getCurrentXmlTest().getParameter(\"importFile\");\n String expectationFile=context.getCurrentXmlTest().getParameter(\"expectationFile\");\n String methodName=Thread.currentThread().getStackTrace()[1].getMethodName();\n String screenWithinCase=caseFolder+methodName;\n MeshViewPage meshViewPage=new MeshViewPage(getWebDriverWrapper());\n if(meshViewPage.isThePage()){\n\n uploadDCM(meshViewPage,importFile);\n\n OrientationAdjustment oa= meshViewPage.clickOrientationAdjustment();\n\n Reporter.log(\"click Orientation Adjustment tab on left bar\");\n String text=\"0.05\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n Integer clickTimes=98;\n String valueOnLabel=oa.clickDistancePlus(clickTimes);\n String lower=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.9\",\"distance is not same as expected result\");\n\n clickTimes=1;\n valueOnLabel=oa.clickDistancePlus();\n String middle=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"4.95\",\"distance is not same as expected result\");\n\n text=\"0.1\";\n Reporter.log(\"select Movement step \"+text);\n Assert.assertEquals(oa.selectMovementStep(text),text,\"Cann't select \"+text);\n\n valueOnLabel=oa.clickDistancePlus(clickTimes);\n String higher=embededScreenShot(screenWithinCase+\"_distance_\"+valueOnLabel,\"click Z plus(\"+clickTimes.toString()+\" times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"5\",\"distance is not same as expected result\");\n\n embededCompareResult(lower,middle,higher, IComFolder.RESULT_ACTUAL_FOLDER +caseFolder, IComFolder.RESULT_EXPECTATION_FOLDER+expectationFile);\n\n valueOnLabel=oa.clickDistanceReset();\n embededScreenShot(screenWithinCase+\"_reset_\"+valueOnLabel,\"click Z reset(1 times), get distance is \"+valueOnLabel);\n Assert.assertEquals(valueOnLabel,\"0\",\"distance is not same as expected result\");\n }\n Reporter.testEnd();\n }", "@Test(timeout = 4000)\n public void test05() throws Throwable {\n Discretize discretize0 = new Discretize(\"^yH*RVC#\\\"|tm,k2XpGN\");\n String[] stringArray0 = new String[2];\n discretize0.m_ClassIndex = 906;\n discretize0.m_IgnoreClass = true;\n stringArray0[0] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n stringArray0[1] = \"^yH*RVC#\\\"|tm,k2XpGN\";\n discretize0.setOptions(stringArray0);\n discretize0.setAttributeIndices(\"^yH*RVC#\\\"|tm,k2XpGN\");\n assertFalse(discretize0.getMakeBinary());\n assertFalse(discretize0.getUseEqualFrequency());\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getFindNumBins());\n }", "@Test void perfect() {\n\t\tstandardScene();\n\t\tsimulateScene(0);\n\n\t\tvar alg = new DistanceMetricTripleReprojection23();\n\n\t\tvar model = new MetricCameraTriple();\n\t\tmodel.view1.setTo(cameraA);\n\t\tmodel.view2.setTo(cameraB);\n\t\tmodel.view3.setTo(cameraC);\n\t\tmodel.view_1_to_2.setTo(truthView_1_to_i(1));\n\t\tmodel.view_1_to_3.setTo(truthView_1_to_i(2));\n\n\t\talg.setModel(model);\n\n\t\tfor (AssociatedTriple a : observations3) {\n\t\t\tassertEquals(0.0, alg.distance(a), UtilEjml.TEST_F64);\n\t\t}\n\n\t\tvar set = observations3.subList(4, 11);\n\t\tvar distances = new double[set.size()];\n\t\talg.distances(set, distances);\n\t\tfor (int i = 0; i < distances.length; i++) {\n\t\t\tassertEquals(0.0, distances[i], UtilEjml.TEST_F64);\n\t\t}\n\t}", "@Test\n public void testGetTemperaturaInteriorAlvo() {\n System.out.println(\"getSetTemperaturaInteriorAlvo\");\n double expResult = 20.0;\n Simulacao simulacao = new Simulacao();\n simulacao.setSala(sala);\n AlterarTemperaturasMeioController instance = new AlterarTemperaturasMeioController(simulacao);\n instance.setTemperaturaInteriorAlvo(expResult);\n double result = instance.getTemperaturaInteriorAlvo();\n assertEquals(expResult, result, 0.0);\n }", "@Override\n protected boolean stoppingCriteriaSatisfied(KPMPSolution generatedSolution, RandomStepFunction stepFunction) {\n numberOfIterations++;\n numberOfIterationsWithoutImprovement++;\n KPMPSolutionChecker solutionChecker = new KPMPSolutionChecker();\n int crossingsOnOriginalPage = solutionChecker.getCrossingNumberOfEdge(bestSolution.getSpineOrder(), bestSolution.getEdgePartition(), originalPageIndex, edge);\n int crossingsOnNewPage = solutionChecker.getCrossingNumberOfEdge(generatedSolution.getSpineOrder(), generatedSolution.getEdgePartition(), newPageIndex, edge);\n if (crossingsOnNewPage < crossingsOnOriginalPage) {\n bestSolution = generatedSolution;\n numberOfIterationsWithoutImprovement = 0;\n\n crossingNumber = crossingNumber - (crossingsOnOriginalPage - crossingsOnNewPage);\n }\n return numberOfIterations >= Main.localSearchIterationLimit || numberOfIterations >= bestSolution.getEdgePartition().size() * bestSolution.getNumberOfPages() || numberOfIterationsWithoutImprovement >= Main.iterationMultiplier || ((System.nanoTime() - Main.START) / 1000000) >= (Main.secondsBeforeStop * 1000) || numberOfIterations >= Main.localSearchIterationLimit;\n }", "@Test(timeout = 4000)\n public void test116() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanPriorEntropy();\n assertEquals(Double.NaN, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.totalCost();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }", "@Override\n protected boolean stoppingCriteriaSatisfied(KPMPSolution generatedSolution, BestImprovementStepFunction stepFunction) {\n KPMPSolutionChecker solutionChecker = new KPMPSolutionChecker();\n int crossingsOnOriginalPage = solutionChecker.getCrossingNumberOfEdge(bestSolution.getSpineOrder(), bestSolution.getEdgePartition(), originalPageIndex, edge);\n int crossingsOnNewPage = solutionChecker.getCrossingNumberOfEdge(generatedSolution.getSpineOrder(), generatedSolution.getEdgePartition(), newPageIndex, edge);\n if (crossingsOnNewPage < crossingsOnOriginalPage) {\n bestSolution = generatedSolution;\n index = 0;\n pageCounter = 0;\n\n crossingNumber = crossingNumber - (crossingsOnOriginalPage - crossingsOnNewPage);\n\n //assert(crossingNumber == new KPMPSolutionChecker().getCrossingNumber(bestSolution));\n }\n if (index == bestSolution.getEdgePartition().size() && pageCounter != bestSolution.getNumberOfPages() - 1) {\n index = 0;\n pageCounter++;\n }\n return ((System.nanoTime() - Main.START) / 1000000) >= (Main.secondsBeforeStop * 1000) || index == bestSolution.getEdgePartition().size() && pageCounter == bestSolution.getNumberOfPages() - 1 || numberOfIterations >= Main.localSearchIterationLimit;\n }", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, false);\n Discretize discretize0 = new Discretize();\n discretize0.getCutPoints(3594);\n Discretize discretize1 = new Discretize();\n discretize1.attributeIndicesTipText();\n FileSystemHandling.appendStringToFile((EvoSuiteFile) null, \"\");\n Discretize discretize2 = new Discretize();\n // Undeclared exception!\n try { \n discretize2.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@ParameterizedTest\n\t@CsvSource({\n\t\t\t\"9, 1, 2, 3, 1, 10, 1, 10, 1, -1, -1, -1\",\n\t\t\t\"9, -1, -1, -1, 9, 10, 1, 10, 1, 9, -1, -1\",\n\t\t\t\"9, -1, -1, -1, 1, 10, 9, 10, 1, 9, -1, -1\",\n\t\t\t\"9, 3, 3, 3, 89, 100, 1, 10, 1, -1, -1, -1\",\n\t\t\t\"9, 1, -1, -1, 1, 10, 89, 100, 1, -1, -1, -1\",\n\t\t\t\"9, 1, 2, -1, 2, 2, 1, 10, 25, 1, 2, 9\",\n\t\t\t\"9, 3, 3, 3, 0, 2, 950, 1000, 25, 3, 3, -1\",\n\t\t\t\"9, -1, -1, -1, 9999, 10000, 950, 1000, 1, 9, 9, 9\",\n\t\t\t\"9, -1, -1, -1, 0, 1, 0, 390000, 1, -1, -1, -1\",\n\t\t\t\"4, -1, -1, -1, 100, 100, 1000, 1000, 1, 4, 4, 4\",\n\t\t\t\"5, 3, -1, -1, 100, 100, 1000, 1000, 10, 3, 5, 5\",\n\t\t\t\"5, 1, 3, 4, 100, 100, 1000, 1000, 25, 1, 3, 4\",\n\t})\n\tvoid usesExpectedMultiplier(\n\t\t\tlong consensusSec,\n\t\t\tlong old10XLevelStart,\n\t\t\tlong old25XLevelStart,\n\t\t\tlong old100XLevelStart,\n\t\t\tint firstUsed,\n\t\t\tint firstTps,\n\t\t\tint secondUsed,\n\t\t\tint secondTps,\n\t\t\tlong expectedMultiplier,\n\t\t\tlong new10XLevelStart,\n\t\t\tlong new25XLevelStart,\n\t\t\tlong new100XLevelStart\n\t) {\n\t\tfinal var aThrottle = DeterministicThrottle.withTps(firstTps);\n\t\tfinal var bThrottle = DeterministicThrottle.withTps(secondTps);\n\t\taThrottle.allow(firstUsed);\n\t\tbThrottle.allow(secondUsed);\n\t\tgiven(throttling.activeThrottlesFor(CryptoTransfer)).willReturn(List.of(aThrottle, bThrottle));\n\n\t\tsubject.resetExpectations();\n\t\tsubject.resetCongestionLevelStarts(instants(old10XLevelStart, old25XLevelStart, old100XLevelStart));\n\t\tsubject.updateMultiplier(Instant.ofEpochSecond(consensusSec));\n\t\tfinal long actualMultiplier = subject.currentMultiplier();\n\t\tfinal var starts = subject.congestionLevelStarts();\n\n\t\tassertEquals(expectedMultiplier, actualMultiplier);\n\t\tassertNullOrEquals(starts[0], new10XLevelStart);\n\t\tassertNullOrEquals(starts[1], new25XLevelStart);\n\t\tassertNullOrEquals(starts[2], new100XLevelStart);\n\t}", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "@Test(timeout = 4000)\n public void test35() throws Throwable {\n Discretize discretize0 = new Discretize();\n assertFalse(discretize0.getMakeBinary());\n \n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n Attribute attribute0 = new Attribute(\"invalid CVS revision - not dots!\");\n attribute0.setWeight(0.0);\n Attribute.typeToString(attribute0);\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"UR<dj;O\", arrayList0, 3);\n Instances instances1 = new Instances(instances0);\n boolean boolean0 = discretize0.setInputFormat(instances1);\n assertFalse(boolean0);\n \n String[] stringArray0 = new String[3];\n stringArray0[0] = \".bsi\";\n stringArray0[1] = \"invalid CVS revision - not dots!\";\n stringArray0[2] = \"@end\";\n discretize0.setOptions(stringArray0);\n discretize0.setOptions(stringArray0);\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertFalse(discretize0.getUseBinNumbers());\n assertEquals(10, discretize0.getBins());\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT05() {\n\t\t// PRECONDITIONS\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> savedSchedules = new ArrayList<ScheduleStub>();\n\t\tsmc.saveSchedules(savedSchedules);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tdouble balance = 0.0d;\n\t\ttry {\n\t\t\tMethod getBalance = smc.getClass().getDeclaredMethod(\"getBalance\", (Class<?> []) null);\n\t\t\tObject balanceObj = getBalance.invoke(smc, (Object[]) null);\n\t\t\t\n\t\t\tif (balanceObj == null) throw new NullPointerException(\"getBalance() returned null; expected a number\");\n\t\t\telse if (!(balanceObj instanceof Number)) throw new RuntimeException(\"getBalance() did not return a number\");\n\t\t} catch (Exception ex) {\n\t\t\texceptionThrown = ex;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertEquals(0.0d, balance, 0.0d);\n\t}", "public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}", "@Test\n\tvoid testCalculateMarkTillSemesterSuccess2() {\n\t\t\n\t\tString semesterName = \"20193\";\n\t\t\n\t\tUser user = userService.findByUsername(\"B16DCCN168\");\n\t\tStudent student = user.getStudent();\n\t\tList<StudentResult> resultsTillSemester = resultService.findResultTillSemester(student.getId(),\n\t\t\t\tsemesterName);\n\t\t\n\t\tString mmtMark = \"\", tthcmMark = \"\";\n\t\t\n\t\tfor (StudentResult result : resultsTillSemester) {\n\t\t\tSubject subject = result.getStudentRegister().getCourse().getSubject();\n\t\t\tif (subject.getName().equals(\"Mạng máy tính\")) {\n\t\t\t\tmmtMark = result.getMarkToChar();\n\t\t\t}\n\t\t\t\n\t\t\tif (subject.getName().equals(\"Tư tưởng Hồ Chí Minh\")) {\n\t\t\t\ttthcmMark = result.getMarkToChar();\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<Object> listGpaResultsTillNow = MarkUtility.calculateMarkTillSemester(resultsTillSemester);\n\t\tint passedCreditsTillNow = (int) listGpaResultsTillNow.get(0);\n\t\tfloat gpaTillNow = (float) listGpaResultsTillNow.get(1);\n\t\t\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\");\n\t\t\n\t\tassertTrue(\n\t\t\t\tmmtMark.equals(\"B\") &&\n\t\t\t\ttthcmMark.equals(\"A\") &&\n\t\t\t\tpassedCreditsTillNow == 15 &&\n\t\t\t\tdf.format(gpaTillNow).equals(\"3.64\")\n\t\t\t\t);\n\t}", "@Test\n public void testWithPropagator() {\n CelestialBody sun = CelestialBodyFactory.getSun();\n final Frame eci = FramesFactory.getGCRF();\n final Frame ecef = FramesFactory.getITRF(IERSConventions.IERS_2010, true);\n AbsoluteDate date = new AbsoluteDate(2004, 1, 1, utc);\n OneAxisEllipsoid earth = new OneAxisEllipsoid(Constants.WGS84_EARTH_EQUATORIAL_RADIUS,\n Constants.WGS84_EARTH_FLATTENING, ecef);\n Orbit orbit = new KeplerianOrbit(6378137 + 400e3, 1e-3, FastMath.toRadians(50), 0, 0, 0, PositionAngle.TRUE,\n eci, date, Constants.EIGEN5C_EARTH_MU);\n final SpacecraftState ic = new SpacecraftState(orbit);\n\n final AbsoluteDate end = date.shiftedBy(5 * Constants.JULIAN_DAY);\n final AbsoluteDate resetDate = date.shiftedBy(0.8 * Constants.JULIAN_DAY + 0.1);\n\n final SpacecraftState[] lastState = new SpacecraftState[1];\n final OrekitStepHandler stepSaver = interpolator -> {\n final AbsoluteDate start = interpolator.getPreviousState().getDate();\n if (start.compareTo(resetDate) < 0) {\n lastState[0] = interpolator.getPreviousState();\n }\n };\n\n // propagate with state rest to take slightly different path\n NumericalPropagator propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n SpacecraftState actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithDTM(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n SpacecraftState expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n\n // propagate with state rest to take slightly different path\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.setStepHandler(stepSaver);\n propagator.propagate(resetDate);\n propagator.resetInitialState(lastState[0]);\n propagator.clearStepHandlers();\n actual = propagator.propagate(end);\n\n // propagate straight through\n propagator = getNumericalPropagatorWithMSIS(sun, earth, ic);\n propagator.resetInitialState(ic);\n propagator.clearStepHandlers();\n expected = propagator.propagate(end);\n\n assertThat(actual.getPVCoordinates(), pvCloseTo(expected.getPVCoordinates(), 1.0));\n }", "public void testSVMChunkLearnng() throws IOException, GateException {\n // Initialisation\n System.out.print(\"Testing the SVM with liner kernenl on chunk learning...\");\n File chunklearningHome = new File(new File(learningHome, \"test\"),\n \"chunklearning\");\n String configFileURL = new File(chunklearningHome, \"engines-svm.xml\")\n .getAbsolutePath();\n String corpusDirName = new File(chunklearningHome, \"data-ontonews\")\n .getAbsolutePath();\n //Remove the label list file, feature list file and chunk length files.\n String wdResults = new File(chunklearningHome,\n ConstantParameters.SUBDIRFORRESULTS).getAbsolutePath();\n emptySavedFiles(wdResults);\n String inputASN = \"Key\";\n loadSettings(configFileURL, corpusDirName, inputASN, inputASN);\n // Set the evaluation mode\n RunMode runM=RunMode.EVALUATION;\n learningApi.setLearningMode(runM);\n controller.execute();\n // Using the evaluation mode for testing\n EvaluationBasedOnDocs evaluation = learningApi.getEvaluation();\n // Compare the overall results with the correct numbers\n assertEquals(\"Wrong value for correct: \", 44, (int)Math.floor(evaluation.macroMeasuresOfResults.correct));\n assertEquals(\"Wrong value for partial: \", 10, (int)Math.floor(evaluation.macroMeasuresOfResults.partialCor));\n assertEquals(\"Wrong value for spurious: \", 11, (int)Math.floor(evaluation.macroMeasuresOfResults.spurious));\n assertEquals(\"Wrong value for missing: \", 40, (int)Math.floor(evaluation.macroMeasuresOfResults.missing));\n\n System.out.println(\"completed\");\n // Remove the resources\n clearOneTest();\n }", "static void playC45() throws IOException {\n\t\tRealVector[] data = NNDataset.getData(NNDataset.HOME);\n\t\tRealVector[] label = NNDataset.getLabel(NNDataset.HOME);\n\t\tRealMatrix d = MatrixUtils.createRealMatrix(data.length, data[0].getDimension());\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\td.setRowVector(i, data[i]);\n\t\t}\n\t\td = d.transpose(); // data = column vector\n\n\t\tRealVector l = MatrixUtils.createRealVector(new double[label.length]);\n\t\tfor (int i = 0; i < l.getDimension(); i++) {\n\t\t\tl.setEntry(i, label[i].getEntry(0));\n\t\t}\n\n\t\tDecisionNode root = training(d, l);\n\t\tString[] header = NNDataset.getHeader(NNDataset.HOME);\n\t\tprintTree(root, header);\n\n\t\tInteger lb = predict(root, data[0]);\n\t\tSystem.out.println(lb);\n\n\t\tdouble ok = MSE(root, data, label);\n\t\tSystem.out.println(\"total hit: \" + ok);\n\t}", "@Test\n public void testVirement1() {\n\n //Arrange\n CompteBancaire cpt1 = new CompteBancaire(63000.0);\n CompteBancaire cpt2 = new CompteBancaire(43000.0);\n double montant_a_virer = 28000.0;\n double excepted_solde_cpt1 = 35000.0;\n double excepted_solde_cpt2 = 71000.0;\n\n //Act\n assertEquals(true, cpt1.virerArgent(cpt2, montant_a_virer));\n\n //Assert\n assertEquals(excepted_solde_cpt1, cpt1.getSolde(), 0);\n assertEquals(excepted_solde_cpt2, cpt2.getSolde(), 0);\n\n }", "public void controlPointsChanged(List<Coordinates> lcp) {\n // sort the control points by x position.\n // this makes things easier later when we paint the function.\n lcp.sort(\n (point1,point2) -> Integer.compare(point1.getX(),point2.getX())\n );\n\n // collect the points in an array before doing the calculations.\n // again, this makes things easier for us.\n controlPoints=lcp.toArray(new Coordinates[0]);\n n=controlPoints.length;\n if(n<2) {\n // nothing to do here\n return;\n }\n double []X = new double[n];\n double []Y = new double[n];\n for(int i =0;i<n;i++){\n \tX[i]=controlPoints[i].getX();\n \tY[i]=controlPoints[i].getY();\n }\n // Construct the linear system S*C=T with n-2 equations.\n // The matrix S contains the left hand side of the equations on slide 13.\n // The matrix Z contains the right hand side of the equations on slide 13.\n double[][] S=new double[n-2][n-2];\n double[] Z=new double[n-2];\n \n // Fill the matrix S and the vector Z and solve S*C=T to get c_2 to c_{n-1}.\n for(int i = 0; i< n-3;i++){\n \tS[i][i]=2*delta(X,i+1,0);\n \tS[i+1][i]=delta(X,i+2,-1);\n \tS[i][i+1]=delta(X,i+1,1);\n \tZ[i]=z(Y,X,i);\n }\n S[n-2][n-2]=2*delta(X,n-1,0);\n \n C= EliminationGaussLegendre.solve(S, Z);\n \n // Calculate the n-1 coefficients b_i and d_i.\n // Note that you need all c_i here (but you know that c_1 and c_n are zero).\n //a_i = y_i;\n for(int i=1 ; i<n ; i++){\n \tD[i-1]=d(Y,X,i-1);\n \tB[i-1]=b(Y,C,X,i-1);\n }\n \n }", "@Test\n public void costTest() {\n // TODO: test cost\n }", "@Test\n public void testAutocorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.autocorrelation(M, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "public static void main(String[] args) {\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, true, null)));\n measureTime(()->checkInterruptSequential(4, 4, 3, false));\n measureTime(()->checkInterruptSequential(4, 4, 3, true));\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT06() {\n\t\t// PRECONDITIONS\n\t\tClassDetailsStub c = new ClassDetailsStub(TEST_CONFIG.TueThu);\n\t\t\n\t\tCollection<ClassDetailsStub> s = new ArrayList<ClassDetailsStub>();\n\t\ts.add(c);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<ScheduleStub> savedSchedules = new ArrayList<ScheduleStub>();\n\t\tsavedSchedules.add(new ScheduleStub(s));\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tException exceptionThrown = null;\n\t\tboolean balanceGreaterThanZero = false;\n\t\ttry {\n\t\t\tObject balanceObj = null;\n\t\t\tMethod getBalance = smc.getClass().getDeclaredMethod(\"getBalance\", (Class<?> []) null);\n\t\t\t\n\t\t\tsmc.saveSchedules(savedSchedules);\n\t\t\tbalanceObj = getBalance.invoke(smc, (Object[]) null);\n\t\t\t\n\t\t\tif (balanceObj == null) throw new NullPointerException(\"getBalance() returned null; expected a number\");\n\t\t\telse if (!(balanceObj instanceof Number)) throw new RuntimeException(\"getBalance() did not return a number\");\n\t\t\t\n\t\t\tbalanceGreaterThanZero = ((Number) balanceObj).doubleValue() > 0.0d;\n\t\t} catch (Exception ex) {\n\t\t\texceptionThrown = ex;\n\t\t}\n\t\t\n\t\tassertNull(exceptionThrown);\n\t\tassertTrue(balanceGreaterThanZero);\n\t}", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[][] doubleArray0 = new double[8][8];\n double[] doubleArray1 = new double[3];\n doubleArray1[2] = 1421.4058829;\n doubleArray0[1] = doubleArray1;\n double[] doubleArray2 = new double[9];\n doubleArray2[1] = 1.7976931348623157E308;\n doubleArray2[2] = 0.0;\n doubleArray2[5] = (-236.4995664359);\n doubleArray2[7] = 1421.4058829;\n doubleArray0[3] = doubleArray2;\n double[] doubleArray3 = new double[3];\n doubleArray3[0] = 0.0;\n doubleArray3[1] = (-236.4995664359);\n doubleArray0[4] = doubleArray3;\n double[] doubleArray4 = new double[21];\n doubleArray4[0] = 1421.4058829;\n doubleArray3[2] = (-236.4995664359);\n doubleArray4[4] = 1.7976931348623157E308;\n doubleArray0[7] = doubleArray4;\n discretize0.m_NumBins = 162;\n doubleArray0[1] = doubleArray4;\n discretize0.m_CutPoints = doubleArray0;\n discretize0.getBinRangesString(1);\n // Undeclared exception!\n try { \n discretize0.setOutputFormat();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n public void test28() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n CostMatrix costMatrix0 = costSensitiveClassifier0.getCostMatrix();\n Evaluation evaluation0 = null;\n try {\n evaluation0 = new Evaluation(instances0, costMatrix0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // Cost matrix not compatible with data!\n //\n }\n }", "@Test\n public void testTrain_RegressionDataSet_ExecutorService() {\n System.out.println(\"train\");\n RegressionDataSet trainSet = FixedProblems.getSimpleRegression1(150, new Random(2));\n RegressionDataSet testSet = FixedProblems.getSimpleRegression1(50, new Random(3));\n\n for (boolean modification1 : new boolean[] { true, false })\n for (SupportVectorLearner.CacheMode cacheMode : SupportVectorLearner.CacheMode.values()) {\n PlattSMO smo = new PlattSMO(new RBFKernel(0.5));\n smo.setCacheMode(cacheMode);\n smo.setC(1);\n smo.setEpsilon(0.1);\n smo.setModificationOne(modification1);\n smo.train(trainSet, true);\n\n double errors = 0;\n for (int i = 0; i < testSet.size(); i++)\n errors += Math.pow(testSet.getTargetValue(i) - smo.regress(testSet.getDataPoint(i)), 2);\n assertTrue(errors / testSet.size() < 1);\n }\n }", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "@Test\n public void testGetMoveSpeedMultiplier() {\n assertEquals(1, proj.getMoveSpeedMultiplier(), 0.001);\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.invertSelectionTipText();\n boolean boolean0 = discretize0.m_UseBinNumbers;\n // Undeclared exception!\n try { \n discretize0.calculateCutPoints();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test\n\tpublic void test() {\n\t\tdouble delta = 0.00001;\n\t\tSnp fakeSnp1 = new Snp(\"fakeId1\", 0, 0.3);\n\t\tSnp fakeSnp2 = new Snp(\"fakeId2\", 0, 0.8);\n\t\tSnp fakeSnp3 = new Snp(\"fakeId3\", 0, 1.4);\n\t\tPascal.set.withZScore_=true;\n\t\tArrayList<Snp> geneSnps = new ArrayList<Snp>();\n\t\tgeneSnps.add(fakeSnp1);geneSnps.add(fakeSnp2);geneSnps.add(fakeSnp3);\n\t\tDenseMatrix ld= new DenseMatrix(3,3);\n\t\t//DenseMatrix crossLd= new DenseMatrix(3,2);\n\t\t\n\t\tArrayList<Double> snpScores = new ArrayList<Double>(3);\n\t\tsnpScores.add(fakeSnp1.getZscore());\n\t\tsnpScores.add(fakeSnp2.getZscore());\n\t\tsnpScores.add(fakeSnp3.getZscore());\n\t\t//ld and crossLd calculated as follows:\n\t\t// make 0.9-toeplitz mat of size 5.\n\t\t// 3,4,5 for ld-mat\n\t\t// 1,2 for crossLd-mat\n\t\tld.set(0,0,1);ld.set(1,1,1);ld.set(2,2,1);\n\t\tld.set(0,1,0.9);ld.set(1,2,0.9);\n\t\tld.set(1,0,0.9);ld.set(2,1,0.9);\n\t\tld.set(0,2,0.81);\n\t\tld.set(2,0,0.81);\n\t\tdouble[] weights = {2,2,2};\n\t\tAnalyticVegas myAnalyticObj= null;\n\t\t//UpperSymmDenseMatrix myMatToDecompose = null;\n\t\tdouble[] myEigenvals = null;\n\t\tdouble[] emptyWeights = {1,1,1};\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, emptyWeights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\n\t\tassertEquals(myEigenvals[0],2.74067, delta);\n\t\tassertEquals(myEigenvals[1],0.1900, delta);\n\t\tassertEquals(myEigenvals[2],0.06932, delta);\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\t\n\t\tassertEquals(myEigenvals[0], 5.481348, delta);\n\t\tassertEquals(myEigenvals[1],0.380000, delta);\n\t\tassertEquals(myEigenvals[2],0.138652, delta);\n\t\t\t\n\t\tdouble[] weights2 = {1,2,0.5};\n\t\t\n\t\tmyAnalyticObj= new AnalyticVegas(snpScores, ld, weights2);\n\t\tmyAnalyticObj.computeScore();\n\t\tmyEigenvals = myAnalyticObj.computeLambda();\t\t\n\t\tassertEquals(myEigenvals[0],3.27694674, delta);\n\t\tassertEquals(myEigenvals[1],0.1492338, delta);\n\t\tassertEquals(myEigenvals[2],0.07381938, delta);\t\t\t\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n Discretize discretize0 = new Discretize();\n double[] doubleArray0 = new double[0];\n int[] intArray0 = new int[4];\n intArray0[0] = 2749;\n intArray0[1] = (-2);\n intArray0[2] = 0;\n intArray0[3] = 0;\n SparseInstance sparseInstance0 = new SparseInstance((-40.152), doubleArray0, intArray0, 919);\n // Undeclared exception!\n try { \n discretize0.input(sparseInstance0);\n fail(\"Expecting exception: IllegalStateException\");\n \n } catch(IllegalStateException e) {\n //\n // No input instance format defined\n //\n verifyException(\"weka.filters.unsupervised.attribute.Discretize\", e);\n }\n }", "@Test(timeout = 4000)\n public void test01() throws Throwable {\n Discretize discretize0 = new Discretize(\"c9^n/\");\n discretize0.getCapabilities();\n assertFalse(discretize0.getFindNumBins());\n assertFalse(discretize0.getUseBinNumbers());\n assertFalse(discretize0.getUseEqualFrequency());\n assertEquals((-1.0), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n assertEquals(10, discretize0.getBins());\n assertFalse(discretize0.getMakeBinary());\n }", "double cekStop(double x[][], double v0[],double v[][],double w0[],double w[][], double t[]){\n double akumY=0;\n //~ itung z_in dan z\n for(int h=0; h<jumlah_data; h++){\n for(int j=0; j<unit_hidden; j++){\n //itung sigma xi vij\n double jum_xv=0;\n for(int i=0; i<unit_input; i++){\n double cc=x[h][i]*v[i][j];\n jum_xv=jum_xv+cc;\n //System.out.println(x[h][j]);\n }\n z_in[j]=v0[j]+jum_xv;\n //itung z\n z[j]=1/(1+(double)Math.exp(-z_in[j]));\n //System.out.println(\" dan z= \"+z[j]);\n }\n \n //~ itung y_in dan y (output)\n double cxc=0;\n for(int k=0; k<unit_output; k++){\n double jum_zw=0;\n for(int j=0; j<unit_hidden; j++){\n double cc=z[j]*w[j][k];\n jum_zw=jum_zw+cc;\n }\n y_in[k]=w0[k]+jum_zw;\n y[k]=1/(1+(double)Math.exp(-y_in[k]));\n akumY = akumY + Math.pow((t[h]-y[k]),2);\n //System.out.println(t[h]+\"-\"+y[k]+\"=\"+(t[k]-y[k]));\n }\n }\n double E = 0.5 * akumY;\n //System.out.println(E);\n return E;\n }", "public void testCleave() {\n final String inputFile = \"testCleave.fas\";\n final String input = TestCaseLM.getFullFilePath(inputFile).replace(\"%20\", \" \");\n\n try {\n // We need to obtain a pointer the control file before anything else.\n BufferedReader br = new BufferedReader(new FileReader(input));\n\n // First one with zero MC's.\n Enzyme e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 0);\n Protein p = new Protein(\">sw|Q55645|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\");\n\n Protein[] result = e.cleave(p);\n boolean once = false;\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now with one miscleavage.\n e.setMiscleavages(1);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now with three miscleavages.\n e.setMiscleavages(3);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Now check for the edge case where there's only one amino acid after the last cleavage position\n // (used to be a bug that this amino acid was never considered).\n e.setMiscleavages(1);\n result = e.cleave(new Protein(\">sw|Q55645|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDRA\"));\n boolean foundIt = false;\n for(int i = 0; i < result.length; i++) {\n Protein lProtein = result[i];\n if(lProtein.getSequence().getSequence().equals(\"TGFDRA\")){\n foundIt = true;\n break;\n }\n }\n\n if(!foundIt) {\n fail(\"The peptide 'TGFDRA' (penultimate amino acid is cleavage site, one missed cleavage allowed) was NOT returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now Nterm position and 1 miscleavage.\n e.setPosition(Enzyme.NTERM);\n e.setMiscleavages(1);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Next, take an enzyme that does not have restricting residus.\n e = new Enzyme(\"Test\", \"KR\", null, \"Cterm\", 0);\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // And now take an entry that has a location set and see if the cleavage is adjusted accordingly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\");\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take a C-terminally truncated sequence and see if it is cleaved correctly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\", true, Protein.CTERMTRUNC);\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take an N-terminally truncated sequence and see if it is cleaved correctly.\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHGFVNRTGFDA\", true, Protein.NTERMTRUNC);\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // Skip to the next part of the controlfile.\n br.readLine();\n once = false;\n\n // Now take a translated sequence, containing an '_' (stopcodon).\n e = new Enzyme(\"TestEnzyme\", \"KR\", \"P\", \"Cterm\", 1);\n p = new Protein(\">sw|Q55645 (15-45)|TEST_HUMAN Test Protein for the cleave() method.\", \"GHIKLMVSTRPIGASDNPKLHG_FVNRTGFDA\");\n\n result = e.cleave(p);\n for(int i = 0; i < result.length; i++) {\n once = true;\n Protein lProtein = result[i];\n String header = lProtein.getHeader().getFullHeaderWithAddenda();\n String sequence = lProtein.getSequence().getSequence();\n Assert.assertEquals(br.readLine(), header);\n Assert.assertEquals(br.readLine(), sequence);\n }\n\n if(!once) {\n fail(\"NO peptides AT ALL were returned when cleaving '\" + p.getSequence().getSequence() + \"'!\");\n }\n\n // END of file reached.\n // Check this!\n String line = null;\n while((line = br.readLine()) != null) {\n if(!line.trim().equals(\"\")) {\n fail(\"More lines in testCleave.fas then were generated by the test cleavage!\");\n }\n }\n br.close();\n } catch(IOException ioe) {\n fail(\"IOException occurred while testing the cleave() method: '\" + ioe.getMessage() + \"'.\");\n }\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testVerser2() {\n\n //Arrange\n CompteBancaire cpt = new CompteBancaire(6500.0);\n double montant_a_verser = -2000.0;\n double excepted = 6500.0;\n\n //Act\n assertEquals(false, cpt.verser(montant_a_verser));\n\n //Assert\n assertEquals(excepted, cpt.getSolde(), 0);\n\n }" ]
[ "0.71575373", "0.65949225", "0.5986597", "0.57795", "0.5703691", "0.563787", "0.53556013", "0.5318458", "0.531436", "0.52704465", "0.5177754", "0.5174197", "0.5158172", "0.51175845", "0.51056963", "0.507546", "0.5049223", "0.50490606", "0.5048576", "0.50396436", "0.50091225", "0.50049496", "0.49835175", "0.49745733", "0.49732602", "0.49524283", "0.4951273", "0.49045762", "0.490148", "0.49009198", "0.48959324", "0.48947224", "0.4891426", "0.48707473", "0.48685265", "0.48633185", "0.48515907", "0.48470095", "0.4844898", "0.48436123", "0.48387545", "0.4836782", "0.4828989", "0.4802411", "0.47978875", "0.47808146", "0.47798273", "0.4768204", "0.47634593", "0.47626087", "0.47494087", "0.47443756", "0.47443378", "0.4738983", "0.47319967", "0.47283176", "0.47174108", "0.47151816", "0.47100234", "0.47089654", "0.47085842", "0.4697149", "0.4692755", "0.46917945", "0.4666193", "0.46616486", "0.46554494", "0.46519253", "0.4648634", "0.4644216", "0.46313304", "0.46295875", "0.46276626", "0.46170428", "0.46129498", "0.46123195", "0.46072134", "0.46064213", "0.45993474", "0.45975587", "0.45975453", "0.45942676", "0.4593302", "0.4591114", "0.45910373", "0.45897686", "0.45873484", "0.45796907", "0.4575925", "0.45708704", "0.45677796", "0.45607907", "0.45571607", "0.45456725", "0.45397073", "0.45350856", "0.4524383", "0.45240518", "0.45236713", "0.45216507" ]
0.65912473
2
Test of logLikelihood method, of class MarkovModelUtilities.
@Test public void testLogLikelihood() { IDoubleArray T = null; IDoubleArray C = null; MarkovModelUtilities instance = new MarkovModelUtilities(); double expResult = 0.0; double result = instance.logLikelihood(T, C); assertEquals(expResult, result, 0.0); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testLogLikelihoodCorrelationMatrix()\n {\n IDoubleArray corr = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihoodCorrelationMatrix(corr, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void computeLogLikelihood(double[] betas, Instances instances) {\n //Basic implementation done in the prior class.\n super.computelogLikelihood(betas, instances);\n }", "@Test\n public void testLogP() {\n System.out.println(\"logP\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(Math.log(0.027), instance.logp(0), 1E-7);\n assertEquals(Math.log(0.0567), instance.logp(1), 1E-7);\n assertEquals(Math.log(0.07938), instance.logp(2), 1E-7);\n assertEquals(Math.log(0.09261), instance.logp(3), 1E-7);\n assertEquals(Math.log(0.05033709), instance.logp(10), 1E-7);\n }", "@Test\n public void testEstimateT()\n {\n \n IDoubleArray counts = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateT(counts);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public abstract double getLikelihood(String command);", "com.google.privacy.dlp.v2.Likelihood getLikelihood();", "int getLikelihoodValue();", "public void test2 (List<List<String>> sentences) {\n double totalLogProb = 0;\n double totalNumTokens = 0;\n for (List<String> sentence : sentences) {\n totalNumTokens += sentence.size();\n double sentenceLogProb = sentenceLogProb2(sentence);\n totalLogProb += sentenceLogProb;\n }\n double perplexity = Math.exp(-totalLogProb / totalNumTokens);\n System.out.println(\"Word Perplexity = \" + perplexity );\n }", "public double empiricalLikelihood(int numSamples, ArrayList<ArrayList<Integer>> testing) {\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tNCRPNode node;\n\t\t\n\t\tpath[0] = rootNode;\n\n\t\tArrayList<Integer> fs;\n\t\tint sample, level, type, token, doc, seqLen;\n\n\t\tDirichlet dirichlet = new Dirichlet(numLevels, alpha);\n\t\tdouble[] levelWeights;\n\t\t//dictionary\n\t\tdouble[] multinomial = new double[numTypes];\n\n\t\tdouble[][] likelihoods = new double[ testing.size() ][ numSamples ];\n\t\t\n\t\t//for each sample\n\t\tfor (sample = 0; sample < numSamples; sample++) {\n\t\t\tArrays.fill(multinomial, 0.0);\n\n\t\t\t//select a path\n\t\t\tfor (level = 1; level < numLevels; level++) {\n\t\t\t\tpath[level] = path[level-1].selectExisting();\n\t\t\t}\n\t \n\t\t\t//sample level weights\n\t\t\tlevelWeights = dirichlet.nextDistribution();\n\t \n\t\t\t//for each words in dictionary\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\t//for each topic\n\t\t\t\tfor (level = 0; level < numLevels; level++) {\n\t\t\t\t\tnode = path[level];\n\t\t\t\t\tmultinomial[type] +=\n\t\t\t\t\t\tlevelWeights[level] * \n\t\t\t\t\t\t(eta + node.typeCounts[type]) /\n\t\t\t\t\t\t(etaSum + node.totalTokens);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//convert to log\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\tmultinomial[type] = Math.log(multinomial[type]);\n\t\t\t}\n\n\t\t\t//calculate document likelihoods \n\t\t\tfor (doc=0; doc<testing.size(); doc++) {\n fs = testing.get(doc);\n seqLen = fs.size();\n \n for (token = 0; token < seqLen; token++) {\n type = fs.get(token);\n likelihoods[doc][sample] += multinomial[type];\n }\n }\n\t\t}\n\t\n double averageLogLikelihood = 0.0;\n double logNumSamples = Math.log(numSamples);\n for (doc=0; doc<testing.size(); doc++) {\n \t\n \t//find the max for normalization, avoid overflow of sum\n double max = Double.NEGATIVE_INFINITY;\n for (sample = 0; sample < numSamples; sample++) {\n if (likelihoods[doc][sample] > max) {\n max = likelihoods[doc][sample];\n }\n }\n\n double sum = 0.0;\n //normalize \n for (sample = 0; sample < numSamples; sample++) {\n sum += Math.exp(likelihoods[doc][sample] - max);\n }\n\n //calc average\n averageLogLikelihood += Math.log(sum) + max - logNumSamples;\n }\n\n\t\treturn averageLogLikelihood;\n }", "@Test(timeout = 4000)\n public void test14() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.m_lnorm = (double) (-2);\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals((-2.0), double0, 0.01);\n }", "void calculateLogLikelihoods(double[] fPartials, double[] fFrequencies, double[] fOutLogLikelihoods)\n\t{\n int v = 0;\n\t\tfor (int k = 0; k < m_nPatterns; k++) {\n\n double sum = 0.0;\n\t\t\tfor (int i = 0; i < m_nStates; i++) {\n\n\t\t\t\tsum += fFrequencies[i] * fPartials[v];\n\t\t\t\tv++;\n\t\t\t}\n fOutLogLikelihoods[k] = Math.log(sum) + getLogScalingFactor(k);\n\t\t}\n\t}", "@Test\n public void whenLogarithmicFunctionThenLogarithmicResults() {\n FunctionMethod functionMethod = new FunctionMethod();\n List<Double> result = functionMethod.diapason(16, 18, x -> Math.log(x) / Math.log(2.0));\n List<Double> expected = Arrays.asList(4D, 4.08746284125034D);\n assertThat(result, is(expected));\n }", "@Test(timeout = 4000)\n public void test68() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "@Test(timeout = 4000)\n public void test40() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"probToLogOdds: probability must be in [0,1] \");\n assertEquals(\"probtologod: prob must be in [0,1] \", string0);\n }", "public void logThis(String log, Theory theory)\n {\n }", "@Test(timeout = 4000)\n public void test42() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.setLNorm(551.149718887);\n assertEquals(551.149718887, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Tutorial(showSource = true, showSignature = true, showLink = true, linkPrefix = \"src/test/java/\")\n @Override\n public void process(ProcessorContext context)\n {\n samples.add(model.likelihood.parameters.max.getValue() - observation.getValue());\n }", "@Test\n public void test03() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double[] doubleArray0 = new double[19];\n evaluation0.updateMargins(doubleArray0, 0, 0.0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@SuppressWarnings(\"deprecation\")\n\t@Override\n public double calculateLogP() {\n logP = 0.0;\n // jeffreys Prior!\n if (jeffreys) {\n logP += -Math.log(getChainValue(0));\n }\n for (int i = 1; i < chainParameter.getDimension(); i++) {\n final double mean = getChainValue(i - 1);\n final double x = getChainValue(i);\n\n if (useLogNormal) {\n\t final double sigma = 1.0 / shape; // shape = precision\n\t // convert mean to log space\n\t final double M = Math.log(mean) - (0.5 * sigma * sigma);\n\t logNormal.setMeanAndStdDev(M, sigma);\n\t logP += logNormal.logDensity(x);\n } else {\n final double scale = mean / shape;\n gamma.setBeta(scale);\n logP += gamma.logDensity(x);\n }\n }\n return logP;\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n \n naiveBayesMultinomialText0.setLNorm(0);\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(0.0, double0, 0.01);\n }", "public abstract double log2Prior(double betaForDimension, int dimension);", "@Test\n public void testPerturbationExpectation()\n {\n IDoubleArray M = null;\n IDoubleArray pi0 = null;\n IDoubleArray observable = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.perturbationExpectation(M, pi0, observable, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public List<Float> randomLikelihood() {\n\t\tList<Float> likelihood = new ArrayList<Float>();\n\t\tlikelihood.add((float) getRandomInteger(-200, 0));\n\t\treturn(likelihood);\n\t}", "@Test\r\n public void TestFindLog() {\r\n\r\n int index = r.nextInt(100);\r\n Assert.assertEquals(logs[index], logDocument.findLog(index));\r\n\r\n }", "@Test\n public void testMetastableStates()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IIntArray expResult = null;\n IIntArray result = instance.metastableStates(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testMMI() {\n System.out.println(\"MMI\");\n int a = 0;\n int m = 0;\n int expResult = 0;\n int result = utilsHill.MMI(a, m);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testStationaryDistribution()\n {\n try\n {\n IDoubleArray T = Doubles.create.fromFile(inputT1);\n IDoubleArray expResult = Doubles.create.fromFile(inputT1_pi); \n IDoubleArray pi = MarkovModel.util.stationaryDistribution(T);\n assertEqual(pi, expResult, 1e-5);\n }\n catch(IOException e)\n {\n \n e.printStackTrace();\n }\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test051() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass(0.0, Double.NaN);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void test33() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.correct();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertEquals(0.0, double0, 0.01D);\n }", "@Test(timeout = 4000)\n public void test026() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.recall((-9));\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testMetastableMemberships()\n {\n IDoubleArray M = null;\n int nstates = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.metastableMemberships(M, nstates);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void test22() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n FastVector fastVector0 = evaluation0.predictions();\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test\n public void testTrain_RegressionDataSet() {\n System.out.println(\"train\");\n RegressionDataSet trainSet = FixedProblems.getSimpleRegression1(150, new Random(2));\n RegressionDataSet testSet = FixedProblems.getSimpleRegression1(50, new Random(3));\n\n for (boolean modification1 : new boolean[] { true, false })\n for (SupportVectorLearner.CacheMode cacheMode : SupportVectorLearner.CacheMode.values()) {\n PlattSMO smo = new PlattSMO(new RBFKernel(0.5));\n smo.setCacheMode(cacheMode);\n smo.setC(1);\n smo.setEpsilon(0.1);\n smo.setModificationOne(modification1);\n smo.train(trainSet);\n\n double errors = 0;\n for (int i = 0; i < testSet.size(); i++)\n errors += Math.pow(testSet.getTargetValue(i) - smo.regress(testSet.getDataPoint(i)), 2);\n assertTrue(errors / testSet.size() < 1);\n }\n }", "@Test\n public void testTrain() {\n System.out.println(\"train\");\n TokenizedLine tokenizedLine = null;\n ArrayList<Words> expResult = null;\n ArrayList<Words> result = Training.train(tokenizedLine);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n \n }", "@Test(timeout = 4000)\n public void test012() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.priorEntropy();\n assertEquals(0.0, double0, 0.01);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "@Test\n public void testIsRateMatrix()\n {\n IDoubleArray K = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n boolean expResult = false;\n boolean result = instance.isRateMatrix(K);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }", "@Test\n public void test36() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.incorrect();\n assertEquals(0.0, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public static void main(String[] args) throws IOException{\n \n int cells = 16;\n MnistManager mm = new MnistManager(Config.MNIST_TRAIN_IMAGES, Config.MNIST_TRAIN_LABELS);\n \n // Grab first image\n mm.setCurrent(1);\n int[][] image = mm.readPixelMatrix();\n BufferedImage bimg = mm.readImage();\n \n ImageHelper.printImage(mm.readImage(), \"llf_test.png\");\n System.out.println(\"The number is: \" + mm.readLabel());\n \n // Make sure the cell size is correct -> 7 pixels\n int cellSize = image.length / (int)Math.sqrt(cells);\n System.out.println(\"The size of the cells are \" + cellSize + \" pixels\");\n \n // Check that the cell iteration is correct\n for(int i = 0; i < image.length; i += cellSize) {\n for(int j = 0; j < image[0].length; j += cellSize) {\n String info = \"Top left X: \"+i+\" Y: \"+j+\" Bottom right X: \"+(i + cellSize)+\" Y: \"+(j + cellSize);\n System.out.println(info);\n double b = slope(i, j, cellSize, image);\n System.out.println(b);\n System.out.println(\"\\n\\n\");\n }\n }\n }", "@Test\n public void testEstimateCmilestoning_3args_1()\n {\n Iterable<IIntArray> trajs = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(trajs, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "void log(Log log);", "public void testLogAccuracy() {\r\n // log the message\r\n Exception cause = new Exception(\"some error\");\r\n String message = \"some message\";\r\n log.log(Level.ALL, cause, message);\r\n\r\n // check the result\r\n String result = AccuracyTestsHelper.getFileContent(FILE);\r\n assertTrue(result.indexOf(\"some message\") >= 0);\r\n assertTrue(result.indexOf(\"some error\") >= 0);\r\n }", "public void createLog(double initialFitness, double mst) {\n createLog(initialFitness, mst, null, null);\n }", "@Override\n public double calculateLogP() {\n\n double fastLogP = logLhoodAllGeneTreesInSMCTree(getInverseGammaMixture(),\n popPriorScaleInput.get().getValue(), false);\n\n if (debugFlag && numberofdebugchecks < maxnumberofdebugchecks) {\n double robustLogP = logLhoodAllGeneTreesInSMCTree(getInverseGammaMixture(),\n popPriorScaleInput.get().getValue(), true);\n if (Math.abs(fastLogP - robustLogP) > 1e-12) {\n System.err.println(\"BUG in calculateLogP() in PIOMSCoalescentDistribution\");\n throw new RuntimeException(\"Fatal STACEY error.\");\n\n }\n numberofdebugchecks++;\n }\n logP = fastLogP;\n return logP;\n }", "void log() {\n\t\tm_drivetrain.log();\n\t\tm_forklift.log();\n\t}", "@Test(timeout = 4000)\n public void test093() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[2];\n evaluation0.evaluateModel((Classifier) null, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.m_leplace = (double) (-1);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }", "@Test\n public void test21() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.errorRate();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public double logZero(double x);", "@Test\n public void test29() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0, (CostMatrix) null);\n double double0 = evaluation0.pctCorrect();\n assertEquals(Double.NaN, double0, 0.01D);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test059() throws Throwable {\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n String[] stringArray0 = new String[2];\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Utils\", e);\n }\n }", "@Test\n public void testMean() {\n System.out.println(\"mean\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(7, instance.mean(), 1E-7);\n }", "public static double exact(double mu, double lambda, double bl, MSAPoset msa)\n { \n LinearizedAlignment linearizedMSA = new LinearizedAlignment(msa);\n PIPTreeNode root = PIPTreeNode.nextUnlabelled();\n PIPTreeNode \n n1 = PIPTreeNode.withLabel(PIPMain.ta.toString()),\n n2 = PIPTreeNode.withLabel(PIPMain.tb.toString());\n UndirectedGraph<PIPTreeNode, UnorderedPair<PIPTreeNode,PIPTreeNode>> topo = GraphUtils.newUndirectedGraph();\n topo.addVertex(n1);\n topo.addVertex(n2);\n topo.addVertex(root);\n topo.addEdge(n1, root);\n topo.addEdge(n2, root);\n Map<UnorderedPair<PIPTreeNode,PIPTreeNode>, Double> bls = Maps.newLinkedHashMap();\n bls.put(UnorderedPair.of(n1, root), fraction * bl);\n bls.put(UnorderedPair.of(n2, root), (1.0-fraction)*bl);\n \n double [][] trivialRateMtx = new double[][]{{1}};\n Indexer<Character> trivialIndex = new Indexer<Character>();\n trivialIndex.addToIndex(PIPProcess.star);\n \n PoissonParameters poissonParams = new PoissonParameters(trivialIndex, trivialRateMtx, lambda, mu);\n \n PIPLikelihoodCalculator calculator = new PIPLikelihoodCalculator(poissonParams, linearizedMSA, topo, bls, root);\n double logJoint = calculator.computeDataLogProbabilityGivenTree(); \n \n double statRate = lambda / mu;\n PoissonDistribution pd = new PoissonDistribution(statRate);\n double logPrior = Math.log(pd.probability(msa.sequences().get(PIPMain.ta).length()));\n return logJoint - logPrior;\n }", "@Test\n public void test18() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.KBMeanInformation();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "public double getMMLScore(Value.Model m, Value stats, Value params) {\n Value.Vector x = (Value.Vector)((Value.Structured)stats).cmpnt(0);\n return -m_LL + Math.log(x.length())*getNumParams(null);\n }", "long countByExample(BehaveLogExample example);", "@Test(timeout = 4000)\n public void test03() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n \n naiveBayesMultinomialText0.m_norm = 715.85816;\n MultiClassClassifierUpdateable multiClassClassifierUpdateable0 = new MultiClassClassifierUpdateable();\n Capabilities capabilities0 = multiClassClassifierUpdateable0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n }", "@Test(timeout = 4000)\n public void test045() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n NaiveBayesMultinomialUpdateable naiveBayesMultinomialUpdateable0 = new NaiveBayesMultinomialUpdateable();\n try { \n evaluation0.evaluateModel((Classifier) naiveBayesMultinomialUpdateable0, instances0, (Object[]) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test\n public void test01() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.addNumericTrainClass((-1459.149165489484), ',');\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test125() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n CostSensitiveClassifier costSensitiveClassifier0 = new CostSensitiveClassifier();\n try { \n evaluation0.evaluateModelOnceAndRecordPrediction((Classifier) costSensitiveClassifier0, (Instance) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test\n public void testEstimateCmilestoning_3args_2()\n {\n IIntArray traj = null;\n Iterable<IIntArray> cores = null;\n int lag = 0;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.estimateCmilestoning(traj, cores, lag);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\r\n public void testCalculateNDM() {\r\n System.out.println(\"calculateNDM\");\r\n NDM instance = null;\r\n Double expResult = null;\r\n //Double result = instance.calculateNDM();\r\n //assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n //fail(\"The test case is a prototype.\");\r\n }", "@Test(timeout = 4000)\n public void test101() throws Throwable {\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate((String) null);\n Evaluation evaluation0 = new Evaluation(instances0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n MockRandom mockRandom0 = new MockRandom((-1));\n try { \n evaluation0.crossValidateModel((Classifier) naiveBayesMultinomial0, instances0, (-1), (Random) mockRandom0, (Object[]) testInstances0.DEFAULT_WORDS);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // Number of folds must be greater than 1\n //\n verifyException(\"weka.core.Instances\", e);\n }\n }", "private void log(String l) {\n if (LOG) {\n System.out.println(\"RotationMatrixTest.\" + l);\n }\n }", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "public static void main(String[] args) {\r\n // feed the generator a fixed random value for repeatable behavior\r\n MarkovTextGeneratorLoL gen = new MarkovTextGeneratorLoL(new Random(42));\r\n //String textString = \"hi there hi Leo\";\r\n //String textString = \"\";\r\n \r\n String textString = \"Hello. Hello there. This is a test. Hello there. Hello Bob. Test again.\";\r\n System.out.println(textString);\r\n gen.train(textString);\r\n System.out.println(gen);\r\n System.out.println(\"Generator: \" + gen.generateText(0));\r\n String textString2 = \"You say yes, I say no, \" +\r\n \"You say stop, and I say go, go, go, \" +\r\n \"Oh no. You say goodbye and I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"I say high, you say low, \" +\r\n \"You say why, and I say I don't know. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"Why, why, why, why, why, why, \" +\r\n \"Do you say goodbye. \" +\r\n \"Oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello. \" +\r\n \"You say yes, I say no, \" +\r\n \"You say stop and I say go, go, go. \" +\r\n \"Oh, oh no. \" +\r\n \"You say goodbye and I say hello, hello, hello. \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello, \" +\r\n \"I don't know why you say goodbye, I say hello, hello, hello,\";\r\n System.out.println(textString2);\r\n gen.retrain(textString2);\r\n System.out.println(gen);\r\n System.out.println(gen.generateText(20));\r\n }", "@Test\n public void testForwardCommittor()\n {\n IDoubleArray M = null;\n IIntArray A = null;\n IIntArray B = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.forwardCommittor(M, A, B);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n public void testNpara() {\n System.out.println(\"npara\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(2, instance.npara());\n }", "public double getInstanceReward(Instance selectedInstance, boolean doBernoulliRewards, boolean isTrainingInstance, boolean verbose)\n {\n double[] probDist = classifyInstance(selectedInstance, false); \n \n //Determine Expected Reward from the returned Probability Distribution\n //Note that the following 5-point Likert scale was used\n //1 - Extremely unchallenging for me\n //2 - Somewhat unchallenging for me\n //3 - Appropriately challenging for me\n //4 - Somewhat challenging for me\n //5 - Extremely challenging for me\n double[] rewardsPerClass = new double[]{0, 1d/3d, 1, 1d/3d, 0}; //rewards per class as defined in paper, section 4.2 Phase 1.\n double expectedReward = (probDist[0] * rewardsPerClass[0]) +\n (probDist[1] * rewardsPerClass[1]) +\n (probDist[2] * rewardsPerClass[2]) +\n (probDist[3] * rewardsPerClass[3]) +\n (probDist[4] * rewardsPerClass[4]);\n \n if (verbose) {\n System.out.println(\"\");\n System.out.println(\"getInstanceReward called()...\");\n System.out.println(\"-probability of instance being class 1: \" + probDist[0]);\n System.out.println(\"-probability of instance being class 2: \" + probDist[1]);\n System.out.println(\"-probability of instance being class 3: \" + probDist[2]);\n System.out.println(\"-probability of instance being class 4: \" + probDist[3]);\n System.out.println(\"-probability of instance being class 5: \" + probDist[4]);\n System.out.println(\"-the expected reward for this level segment was determined to be: \" + expectedReward );\n System.out.println(\"-done\");\n }\n \n// //Determine rewards according to Bernoulli scheme / proportional reward\n// double reward = 0.0;\n// if (doBernoulliRewards) {\n// if (verbose) System.out.println(\"-returning reward of 1 with probablity of \" + probChallenging + \", else reward of 0 (Bernoulli rewards)\");\n// boolean returnBernoulliReward;\n// if ( Math.random() <= probChallenging ) returnBernoulliReward = true;\n// else returnBernoulliReward = false;\n// if (verbose) System.out.println(\"-boolean returnBernoulliReward: \" + returnBernoulliReward);\n// if (returnBernoulliReward) reward = 1.0;\n// else reward = 0.0; \n// }\n// else {\n// if (verbose) System.out.println(\"-returning reward \" + probChallenging + \" (regular non-Bernoulli rewards)\");\n// reward = probChallenging;\n// }\n// if (verbose) System.out.println(\"-done\");\n \n return expectedReward;\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n try { \n naiveBayesMultinomialText0.distributionForInstance((Instance) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test23() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n SerializedClassifier serializedClassifier0 = new SerializedClassifier();\n Object[] objectArray0 = new Object[25];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) serializedClassifier0, instances0, objectArray0);\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01D);\n }", "@Test(timeout = 4000)\n public void test094() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n NaiveBayesMultinomialUpdateable naiveBayesMultinomialUpdateable0 = new NaiveBayesMultinomialUpdateable();\n Evaluation evaluation0 = new Evaluation(instances0);\n Object[] objectArray0 = new Object[0];\n double[] doubleArray0 = evaluation0.evaluateModel((Classifier) naiveBayesMultinomialUpdateable0, instances0, objectArray0);\n try { \n evaluation0.evaluateModelOnce(doubleArray0, (Instance) null);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 0\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test54() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double double0 = naiveBayesMultinomialText0.getLNorm();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, double0, 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test\n public void fastLogitInversesSigmoidCorrectly()\n {\n\n double maxDiff1 = Double.MIN_VALUE;\n double maxDiff2 = Double.MIN_VALUE;\n\n for (int k = 0; k < 20; k++)\n {\n double x = (double) k / 2 - 5;\n double fastSigmoidAlternative1 = fastSigmoidAlternative(x);\n double fastLogitAlternative1 = fastLogitAlternative(fastSigmoidAlternative1);\n double diff1 = abs(x - fastLogitAlternative1);\n if (!Double.isNaN(diff1) && !Double.isInfinite(diff1))\n maxDiff1 = max(diff1, maxDiff1);\n for (int i = 0; i < 20; i++)\n {\n for (int j = 0; j < 20; j++)\n {\n double rangeLow = (double) i / 10 - 1;\n double rangeHigh = (double) j / 10;\n double fastSigmoidAlternative2 = fastSigmoidAlternative(x, rangeLow, rangeHigh);\n double fastLogitAlternative2 = fastLogitAlternative(fastSigmoidAlternative2, rangeLow, rangeHigh);\n double diff2 = abs(x - fastLogitAlternative2);\n if (!Double.isNaN(diff2) && !Double.isInfinite(diff2) && ! DoubleMath.fuzzyEquals(rangeLow, rangeHigh, 1E-10))\n maxDiff2 = max(diff2, maxDiff2);\n }\n }\n }\n\n // Verify that x = logit(sigmoid(x))\n assertThat(maxDiff1, closeTo(0, .0000000001));\n assertThat(maxDiff2, closeTo(0, .0000000001));\n }", "public void testPLSOM() throws Exception\r\n {\r\n System.err.println(\"PLSOM test\");\r\n PLSOM plsom = new PLSOM(2,mapWidth,mapHeight);\r\n plsom.setNeighbourhoodRange(60);\r\n double [] tmp = new double[2];\r\n Random r = new Random(1);\r\n long mean = 0;\r\n int count = 2000; \r\n //train\r\n for ( int x = 0;x< count;x++ )\r\n {\r\n //random input\r\n tmp[0] = r.nextDouble()*2-1;\r\n tmp[1] = r.nextDouble()*2-1;\r\n long start = System.nanoTime();\r\n plsom.train(tmp);\r\n long diff = System.nanoTime()-start;\r\n mean += diff;\r\n }\r\n double meanTrainTime = mean/((double)count*1000);\r\n //test\r\n mean = 0;\r\n int sqrtCount = (int)Math.sqrt(count);\r\n for ( int x = 0;x< sqrtCount;x++ )\r\n {\r\n for ( int y = 0;y<sqrtCount;y++ )\r\n {\r\n tmp[0] = (x/(double)sqrtCount)*2-1;\r\n tmp[1] = (y/(double)sqrtCount)*2-1;\r\n plsom.setInput(tmp);\r\n long start = System.nanoTime();\r\n plsom.classify();\r\n long diff = System.nanoTime()-start;\r\n mean += diff;\r\n }\r\n }\r\n double meanTestTime = mean/((double)count*1000);\r\n System.err.println(\"Train mean query time is: \" + meanTrainTime + \" microseconds.\");\r\n System.err.println(\"Test mean query time is: \" + meanTestTime + \" microseconds.\");\r\n }", "public static void runMarginPerceptron(Data[] data, int index,String testFileName,HashMap<Integer,Integer> words)\r\n{\r\n int t=0;\r\n double LearningRates[] = {1, 0.1, 0.01};\r\n double Margins[] = {1, 0.1, 0.01};\r\n\r\n\tint minInt =0; // Set To Your Desired Min Value\r\n int maxInt =2;\r\n\tRandom rand = new Random();\r\n\t\r\n \tint randomNum = rand.nextInt((maxInt - minInt) + 1) + minInt;\r\n\r\n \tdouble LearningRate = LearningRates[randomNum];\r\n \t\r\nfor(int m=0;m<LearningRates.length;m++)\r\n{\r\n for(int i=0;i<LearningRates.length;i++)\r\n {\r\n\t LearningRate = LearningRates[i];\r\n\t\t double devAccuracyTotal = (double)0;\r\n\t\t int noOfEpochs= 20;\r\n\t\t int decreaseRate = 0;\r\n\t\t \r\n \t\t Double w[] = new Double[74500];\r\n\t\t Double min =-0.01; // Set To Your Desired Min Value\r\n\t Double max = 0.01;\r\n\t \t\tdouble smallRandNumber = min + new Random().nextDouble() * (max - min); \r\n\t\t\tArrays.fill(w, smallRandNumber);\r\n\t\t\t\r\n\t\t for(int epoch=0;epoch<noOfEpochs;epoch++)\r\n\t\t {\r\n\t\t\t \tw = learnMarginPerceptron(data,index,LearningRate,decreaseRate,w,Margins[m]);\r\n\t\t\t \tdecreaseRate = decreaseRate + index;\r\n\t\t\r\n\t\t }\r\n\t\t//CVSplit test\r\n \tdouble cvAccuracy = testTestFile(w,testFileName,words);\r\n \t\r\n// \tSystem.out.println(\"Epoch\" + epoch +\" Dev Accuracy for Decaying Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \r\n \r\n \tSystem.out.println(\" ** Cv Accuracy for Margin Rate\" + Margins[m] + \" Learning Rate \" + LearningRate + \" is \" + cvAccuracy);\r\n \tSystem.out.println(\" \");\r\n }\r\n}\r\n//double testAccuracy = testTestFile(w,testFileName);\r\n\t//System.out.println(\"test Accuracy\" + testAccuracy);\r\n}", "public void setLogModel(LogModel[] param) {\n validateLogModel(param);\n\n localLogModelTracker = true;\n\n this.localLogModel = param;\n }", "@Test\n public void test30() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n boolean boolean0 = evaluation0.getDiscardPredictions();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01D);\n assertFalse(boolean0);\n }", "public void setLogModel(LogModel param) {\n this.localLogModel = param;\n }", "protected void validateLogModel(LogModel[] param) {\n }", "@Test(timeout = 4000)\n public void test003() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.weightedFalsePositiveRate();\n assertEquals(Double.NaN, double0, 0.01);\n }", "@Test(timeout = 4000)\n public void test031() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.numFalseNegatives((-1436));\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(0.0, double0, 0.01);\n }", "@Test\n\tpublic void testRepeatibleDynamics() throws IOException, PropertiesException {\n\n\t\t\n\t\t// INSTANTIATE benchmark \n\t\tProperties props = PropertiesUtil.setpointProperties(new File (\"src/main/resources/sim.properties\"));\n\t\tSetPointGenerator lg = new SetPointGenerator (props);\n\t\tList<ExternalDriver> externalDrivers = new ArrayList<ExternalDriver>();\n\t\texternalDrivers.add(lg);\n\t\tIndustrialBenchmarkDynamics d = new IndustrialBenchmarkDynamics (props, externalDrivers);\n\t\tRandom actionRand = new Random(System.currentTimeMillis());\n \n // 1) do 100000 random steps, in order to initialize dynamics\n\t\tfinal ActionDelta action = new ActionDelta(0.001f, 0.001f, 0.001f); \n\t\tfor (int i=0; i<INIT_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t}\n\t\t\n\t\t// 2) memorize current observable state and current markov state\n\t\tfinal ObservableState os = d.getState();\n\t\tfinal DataVector ms = d.getInternalMarkovState();\n\t\tSystem.out.println (\"init o-state: \" + os.toString());\n\t\tSystem.out.println (\"init m-state: \" + ms.toString());\n\t\t\n\t\t\n\t\t// 3) perform test trajectory and memorize states\n\t\tactionRand.setSeed(ACTION_SEED);\n\t\tDataVector oStates[] = new DataVector[MEM_STEPS];\n\t\tDataVector mStates[] = new DataVector[MEM_STEPS];\n\t\t\t\t\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\td.step(action);\n\t\t\toStates[i] = d.getState();\n\t\t\tmStates[i] = d.getInternalMarkovState();\n\t\t}\n\t\t\n\t\t// 4) reset dynamics & parameters and internal markov state\n\t\td.reset();\n\t\td.setInternalMarkovState(ms);\n\t\t\n\t\t// 5) reperform test and check if values are consistent\n\t\tactionRand.setSeed(ACTION_SEED); // reproduce action sequence\n\t\tDataVector oState = null;\n\t\tDataVector mState = null;\n\t\tfor (int i=0; i<MEM_STEPS; i++) {\n\t\t\taction.setDeltaGain(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaVelocity(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\taction.setDeltaShift(2.f*(actionRand.nextFloat()-0.5f));\n\t\t\t\n\t\t\td.step(action);\n\t\t\toState = d.getState();\n\t\t\tmState = d.getInternalMarkovState();\n\t\t\t\n\t\t\t// check observable state\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.SetPoint), oState.getValue(ObservableStateDescription.SetPoint), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Fatigue), oState.getValue(ObservableStateDescription.Fatigue), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.Consumption), oState.getValue(ObservableStateDescription.Consumption), 0.0001);\n\t\t\tassertEquals (oStates[i].getValue(ObservableStateDescription.RewardTotal), oState.getValue(ObservableStateDescription.RewardTotal), 0.0001);\n\n\t\t\t// \n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.CurrentOperationalCost), mState.getValue(MarkovianStateDescription.CurrentOperationalCost), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent2), mState.getValue(MarkovianStateDescription.FatigueLatent2), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.FatigueLatent1), mState.getValue(MarkovianStateDescription.FatigueLatent1), 0.0001);\n\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionGainBeta), mState.getValue(MarkovianStateDescription.EffectiveActionGainBeta), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), mState.getValue(MarkovianStateDescription.EffectiveActionVelocityAlpha), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.EffectiveShift), mState.getValue(MarkovianStateDescription.EffectiveShift), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.MisCalibration), mState.getValue(MarkovianStateDescription.MisCalibration), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), mState.getValue(SetPointGeneratorStateDescription.SetPointChangeRatePerStep), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointCurrentSteps), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), mState.getValue(SetPointGeneratorStateDescription.SetPointLastSequenceSteps), 0.0001);\n\t\t\t\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardFatigue), mState.getValue(MarkovianStateDescription.RewardFatigue), 0.0001);\n\t\t\tassertEquals (mStates[i].getValue(MarkovianStateDescription.RewardConsumption), mState.getValue(MarkovianStateDescription.RewardConsumption), 0.0001);\n\t\t}\n\t\t\n\t\tSystem.out.println (\"last o-state 1st trajectory: \" + oStates[oStates.length-1]);\n\t\tSystem.out.println (\"last o-state 2nd trajectory: \" + oState);\n\t\t\n\t\tSystem.out.println (\"last m-state 1st trajectory: \" + mStates[oStates.length-1]);\n\t\tSystem.out.println (\"last m-state 2nd trajectory: \" + mState);\n\t}", "@Test\n public void testSlip() {\n // Setup\n\n // Run the test\n modelUnderTest.slip();\n\n // Verify the results\n }", "@Test(timeout = 4000)\n public void test025() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getDataSet();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.setPriors(instances0);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "void log();", "public boolean updateLog(LogModel Log);", "@Test(timeout = 4000)\n public void test048() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.areaUnderROC(17);\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n }", "protected abstract void evaluate(Vector target, List<Vector> predictions);", "@Test(timeout = 4000)\n public void test51() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n naiveBayesMultinomialText0.getTokenizer();\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n }", "public static double computeMleLikelihood(double[] T, double PIuni, double mu, double sigma) {\n\n double range = 100;\n double likelihood = Double.NEGATIVE_INFINITY;\n if (PIuni >= 0 && PIuni < 100) {\n PIuni = PIuni / 100;\n // loop over the elements the x array\n likelihood = 0; // init sum value\n for (int i = 0; i < T.length; i++) {\n double temp = (T[i] - mu) / sigma;\n temp = Math.exp(-0.5 * temp * temp);\n temp = temp / (SQRT2PI * sigma);\n temp = (PIuni / range) + (1 - PIuni) * temp;\n temp = Math.abs(temp);\n temp = Math.log(temp);\n likelihood = likelihood + temp;\n }\n }\n\n return likelihood;\n }", "public void test_0020() {\n int nFactors = 2;\n FactorAnalysis instance = new FactorAnalysis(data, nFactors);\n\n assertEquals(instance.nObs(), 18., 1e-15);\n assertEquals(instance.nVariables(), 6., 1e-15);\n assertEquals(instance.nFactors(), 2., 1e-15);\n\n FAEstimator estimators = instance.getEstimators(400);\n\n Vector uniqueness = estimators.psi();\n assertArrayEquals(\n new double[]{0.005, 0.114, 0.642, 0.742, 0.005, 0.097},\n uniqueness.toArray(),\n 2e-2);\n\n int dof = estimators.dof();\n assertEquals(dof, 4);\n\n double fitted = estimators.logLikelihood();\n assertEquals(fitted, 1.803, 1e-3);\n\n Matrix loadings = estimators.loadings();\n assertTrue(AreMatrices.equal(\n new DenseMatrix(new double[][]{\n {0.971, 0.228},\n {0.917, 0.213},\n {0.429, 0.418},\n {0.363, 0.355},\n {0.254, 0.965},\n {0.205, 0.928}\n }),\n loadings,\n 1e-3));\n\n double testStats = estimators.statistics();\n assertEquals(testStats, 23.14, 1e-2);\n\n double pValue = estimators.pValue();\n assertEquals(pValue, 0.000119, 1e-6);//R: 1-pchisq(23.14, df=4) = 0.0001187266\n\n// System.out.println(uniqueness.toString());\n// System.out.println(fitted);\n// System.out.println(loadings.toString());\n }", "@Test\r\n public void testCheckLIS() {\r\n System.out.println(\"checkLIS\");\r\n String word = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n boolean expResult = false;\r\n boolean result = instance.checkLIS(word);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test(timeout = 4000)\n public void test06() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrecomputedKernelMatrixKernel precomputedKernelMatrixKernel0 = new PrecomputedKernelMatrixKernel();\n File file0 = precomputedKernelMatrixKernel0.getKernelMatrixFile();\n naiveBayesMultinomialText0.setStopwords(file0);\n File file1 = naiveBayesMultinomialText0.getStopwords();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertFalse(file1.exists());\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getUseStopList());\n }", "@Test\r\n public void testGetLIS() {\r\n System.out.println(\"getLIS\");\r\n String word = \"\";\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n ImageWord expResult = null;\r\n ImageWord result = instance.getLIS(word);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "public final void log() throws ArithmeticException {\n\t\tif ((mksa&_LOG) != 0) throw new ArithmeticException\n\t\t(\"****Unit: log(\" + symbol + \")\") ;\n\t\tvalue = AstroMath.log(value);\n\t\tmksa |= _log;\n\t\tif (symbol != null) \n\t\t\tsymbol = \"[\" + symbol + \"]\";\t// Enough to indicate log\n\t}", "@Test\n public void testCorrelation()\n {\n IDoubleArray M = null;\n IDoubleArray observable1 = null;\n IDoubleArray observable2 = null;\n IDoubleArray timepoints = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n IDoubleArray expResult = null;\n IDoubleArray result = instance.correlation(M, observable1, observable2, timepoints);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test(timeout = 4000)\n public void test81() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n String string0 = naiveBayesMultinomialText0.LNormTipText();\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n assertEquals(\"The LNorm to use for document length normalization.\", string0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getUseWordFrequencies());\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n double double0 = evaluation0.SFMeanEntropyGain();\n assertEquals(0.0, evaluation0.SFPriorEntropy(), 0.01);\n assertEquals(Double.NaN, double0, 0.01);\n }" ]
[ "0.7427038", "0.66404974", "0.6166927", "0.5927131", "0.5869066", "0.56961393", "0.55797553", "0.5571208", "0.5482358", "0.54607975", "0.5375718", "0.5269194", "0.52524656", "0.5225311", "0.52244943", "0.5209235", "0.51835144", "0.51666826", "0.51612955", "0.51324403", "0.5106958", "0.509174", "0.50861907", "0.5084256", "0.506817", "0.50583553", "0.50580794", "0.5053669", "0.50403553", "0.5035418", "0.5027856", "0.5024973", "0.50182116", "0.5015083", "0.50058436", "0.49936283", "0.49896488", "0.49802783", "0.4972849", "0.4968762", "0.4967253", "0.4961648", "0.49538022", "0.4934286", "0.4924379", "0.4920171", "0.4918766", "0.49144915", "0.49132162", "0.49102497", "0.49024618", "0.49003986", "0.48910427", "0.48906612", "0.489039", "0.4887172", "0.48870128", "0.4872422", "0.4865407", "0.48559827", "0.4851867", "0.4851198", "0.4828478", "0.4820917", "0.48162195", "0.4810992", "0.47851023", "0.47831306", "0.47681564", "0.476582", "0.47635767", "0.4761168", "0.47605193", "0.47571817", "0.47495136", "0.47488818", "0.47471437", "0.47452116", "0.47361922", "0.47353965", "0.47307587", "0.47250813", "0.47142136", "0.47136307", "0.4709314", "0.47092596", "0.4701", "0.47009462", "0.46907344", "0.4687461", "0.4684473", "0.46735126", "0.46668038", "0.4666704", "0.46660745", "0.465778", "0.46495485", "0.46448883", "0.46397632", "0.4635751" ]
0.88419306
0