text
stringlengths
14
410k
label
int32
0
9
public StagShopPlayer(StageManager stageManager, Map<String, String> data) { super(stageManager, data); PlayerData.load(); players = new ArrayList<>(); buttons = new BufferedImage[2][2]; try { addPlayer("/graphics/entity/MCPlayerAnimation.xml", ImageIO.read(getClass().getResourceAsStream("/graphics/entity/...
1
@Override public Object getValueAt(int rowIndex, int columnIndex) { ComponentIn in = ins.get(rowIndex); switch (columnIndex) { case 0: return in.getComponent().getId(); case 1: return in.getDate(); case 2: return in....
7
@EventHandler public void onArenaStart(PAStartEvent e){ FileConfiguration config = Main.getConfig(); HashSet<ArenaTeam> Teams = e.getArena().getTeams(); for (ArenaTeam t : Teams) { HashSet<ArenaPlayer> Players = t.getTeamMembers(); if (t.getName().equalsIgnoreCase(config.getString("PVPArena.BlueTeamN...
5
@Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (tagLabel != null ? tagLabel.hashCode() : 0); result = 31 * result + (parentLink != null ? parentLink.hashCode() : 0); result = 31 * result + (creatio...
5
public void run() { try { // this will handle our XML voyageHandler voyagesHandler = new voyageHandler(); // get a parser object SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); // get an InputStream from somewhere (could be HttpConnec...
3
public final void levelDone() { if (!inGameState("InGame") || inGameState("LevelDone") || inGameState("LifeLost") || inGameState("GameOver") ) return; // System.err.println( // "Warning: levelDone() called from other state than InGame." ); //} clearKey(key_continuegame); removeGameState("StartLevel"); r...
6
public Move giveMove(){ //update the weights for the new state double[][] w = newGenerateWeights(super.currentGameState.getStatus()); //double[][] w1 = generateWeights(super.currentGameState.getStatus()); Iterator<String> i = super.currentGameState.getDict().iterator(); for(int j =0; j<5;j++){ Letterpress.p...
7
public static void main(String[] args) { //TODO think if we want to remove it System.setProperty("java.net.preferIPv4Stack" , "true"); try { prop.load(new FileInputStream(CONFIG_FILE)); startSMTPNotifictionThread(); startLisning(); } catch (NumberFormatException e) { System.out.println("Plz ch...
4
public boolean isMove() { return (fromTable!=null && toTable!=null&& toName != null && fromName!= null && toName.equals(fromName)); }
4
public void onStart() { preStop = false; preStart = false; isStarted = true; DodgeballPlayer parray[] = new DodgeballPlayer[1]; parray = playerList.toArray(parray); Player pl = (parray[rand.nextInt(parray.length)]).getPlayer(); pl.setItemInHand(new ItemStack(Mater...
1
public void setAmount(double amount) { this.amount = amount; }
0
@SuppressWarnings("unused") private void i(String input[]) throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, InstantiationException { if (inspObject.isNull() || inspObject.isPrimitive() || input.length < 2 || input.length > 3) { InfoPrinter.printNothingTo...
9
public List<String> getmenuItemsCourseType() { List<String> menuItemsCourseType = new ArrayList<String>() { private static final long serialVersionUID = 3109256773218160485L; { try { //Connect to database conn...
7
public Iterable<String> keysWithPrefix(String prefix) { Queue<String> q = new LinkedList<String>(); Node x = get(root, prefix, 0); collect(x, new StringBuilder(prefix), q); return q; }
0
public Quantity sub (Quantity target) throws IllegalArgumentException { if(target.unit == null || !target.unit.equals(this.unit)) { throw new IllegalArgumentException(); } Quantity result = new Quantity (this.value - target.value, target.numerator, target.denominator); return result; }
2
private final MaplePortal getFreePortal() { final List<MaplePortal> freePortals = new ArrayList<MaplePortal>(); for (final MaplePortal port : town.getPortals()) { if (port.getType() == 6) { freePortals.add(port); } } Collections.sort(freePortals, new Comparator<MaplePortal>() { @Override pub...
7
private Tree compoundStatementPro(){ Tree statements = null; if(accept(Symbol.Id.PUNCTUATORS,"\\{")!=null){ statements = statementsPro(); if(accept(Symbol.Id.PUNCTUATORS,"\\}")!=null){ return statements; } } return null; }
2
public void receive(Message msg) { Address sender=msg.getSrc(); if(bridge.getAddress().equals(sender)) // discard my own messages return; RelayHeader hdr=msg.getHeader(id); switch(hdr.type) { case DISSEMINATE: // should not occur here, but...
7
public void generation(String srcWord, int length) { generated.add(srcWord); System.out.println(srcWord); //processQueue(srcWord); checkOneLetterOff(srcWord); if(length != 0) { if(tmp4.size() > location) { if(!(tmp4.get(location).isEmpty()) && location <tmp4.size()-1) { location++; ...
4
public static void makeCompactGrid(Container parent, int rows, int cols, int initialX, int initialY, int xPad, int yPad) { SpringLayout layout; try { layout = (SpringLayout)pa...
7
public void start () { engine.start(); }
0
public void processQueries(String strInputFilePath, String strOutputFilePath) throws IOException { oBufferedReader = new BufferedReader(new FileReader(strInputFilePath)); oBufferedWriter = new BufferedWriter(new FileWriter(strOutputFilePath)); calcuateTFIDF(oBufferedReader); oBufferedReader.close(); oBuff...
9
public void addDish(Dish dish) { if (storage.avaiable(dish)) { queue.add(dish); storage.prepare(dish); } if(queue.size()>10){ getFirstDish(); } }
2
private boolean checkRightDiagonalWin(int playerNumber) { int criticalNumber = 0; int i = 0; int j = gameField.getFieldSize() - 1; switch(playerNumber) { case 1: { while (i < gameField.getFieldSize()) { if(gameField.isX(i,j)) { ...
9
public Gridlet getNextGridlet(int userID) throws NoMoreGridletsException { if ((_configs == null) || (_currentConfig == null)) throw new NoMoreGridletsException(); if (_currentConfigGridletsCount >= _currentConfig.getCount()) { if (!_itCurrentGC.hasNext()) ...
4
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { System.out.println("Blip3.readExternal"); s = (String)in.readObject(); i = in.readInt(); }
0
@EventHandler(priority= EventPriority.NORMAL) public void onInventoryOpenEvent(InventoryOpenEvent e){ if(e.getPlayer().hasPermission("pexp.everywhere")){ return; } if(!(e.getPlayer() instanceof Player)){ if(e.getVie...
6
public static DataLayerManager getInstance() { if (instance == null) instance = new DataLayerManager(); return instance; }
1
public int getInt(String itemTxt) { int num = 0; if(itemTxt.equals("inv1")) { num = 1; } else if(itemTxt.equals("inv2")) { num = 2; } else if(itemTxt.equals("inv3")) { num = 3; } else if(itemTxt.equals("inv4")) { num = 4; } else if(itemTx...
6
public void detectOther(Sprite other) { if(isRemovable) return; if( other == detected) return; detected = other; if(getCenter().distance(other.getCenter()) <= getWidth() / 2 + other.getWidth()/2){ collide(other); other.collide(this); }else{ ...
5
public RedrawButtonListener(GraphDrawer d) { this.d = d; }
0
private Runnable createConsumer(final CloudNode cloudNode) { return () -> { logger.info("Consumer thread started."); while (!this.isMaster(cloudNode)) { try { final String task = HazelcastHelper.this.getTaskQueue().take(); logger.in...
2
private void setShapeDefault(Attributes attrs) { // find the value to be set, then set it if (attrs.getValue(0).equals("fill")) shapeDef.setFill(Boolean.valueOf(attrs.getValue(1))); else if (attrs.getValue(0).equals("color")) shapeDef.setColor(new Color((Integer.valueOf(attrs.getValue(1) .substring(1),...
9
private Tree constructorCallPro(){ Tree argumentListOpt=null; Symbol identifier; if((identifier = accept(Symbol.Id.IDENTIFIER_NAME))!=null){ if(accept(Symbol.Id.PUNCTUATORS,"\\(")!=null){ argumentListOpt = argumentListPro(); if(accept(Symbol.Id.PUNCTUATORS,"\\)")!=null){ return new ConstructorCal...
3
public Collection<Merchant> getMerchants(Token t) { HTTPClient client = GoCoin.getHTTPClient(); client.setRequestOption(HTTPClient.KEY_OPTION_PATH,"/merchants/"); client.addAuthorizationHeader(t); try { //make the GET request client.doGET(client.createURL(HTTPClient.URL_TYPE_API)); ...
4
public Domain cap(Domain d) { if (!(d instanceof IntDomain)) return EMPTY; IntDomain new_d = new IntDomain(); IntDomain d0 = this; IntDomain d1 = (IntDomain) d; try { int[] interval; int min0, max0, min1, max1; int i0 = 0; int i1 = 0; while (i0 < d0.intervals.size() && i1 < d1.intervals.size...
9
public static void main(String[] args) throws Exception { { File json = new File("/home/markus/Country.json"); FileUtils.write(json, "{\n", true); Country[] countries = Country.values(); for (Country country : countries) { FileUtils.write(json, "\"...
9
public void print(){ for(Term term: this){ System.out.println("Iterator Found: " + term.getName()); } }
1
public RulesMainCLI(String[] args) { if (args.length < 1) { System.out.println(HEADER); System.out.println(FOOTER); System.out.println("Use -h or --help for command line options."); return; } CommandLine cl = null; Options options = new Options(); options.addOption("p"...
8
@Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Perfil)) { return false; } Perfil other = (Perfil) object; if ((this.id == null && other.id != null) || (this.i...
5
private void gameRender() { if (dbImage == null) { dbImage = createImage(PWIDTH, PHEIGHT); g = dbImage.getGraphics(); } // clear screen g.setColor(Color.WHITE); g.fillRect(0, 0, PWIDTH, PHEIGHT); // green board g.setColor(new Color(62, 156, 76)); g.fillRect(BORDER, BORDER, PWIDTH - 2 * BORDER, P...
8
public Locale dequeue() throws Exception { Locale retVal = null; // Check for underflow. if (! this.isEmpty()) { retVal = arr[frontPtr]; // Shift every element towards the front. for(int i = 0; i < backPtr; i++) { arr[i] = arr[i+1]; ...
2
private boolean isStandardProperty(Class clazz) { return clazz.isPrimitive() || clazz.isAssignableFrom(Byte.class) || clazz.isAssignableFrom(Short.class) || clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(Long.class) || clazz.isAssignab...
9
public ShellLink setLanguage(String s) { ConsoleFEData cd = (ConsoleFEData)extra.get(ConsoleFEData.signature); if (cd == null) { cd = new ConsoleFEData(); extra.put(ConsoleFEData.signature, cd); } cd.setLanguage(s); return this; }
1
private static void abortPhase(Registry registry, LogItem logItem) { try { boolean failedServer = false; ICoreServer primary = null; for (String serverName : registry.list()) { //For every server, check it is alright to commit, and pass it the log try { ICoreServer currentServer = ((ICor...
8
protected static boolean isSkeletonSpecial(OggPacket packet) { byte[] d = packet.getData(); // Is it a Skeleton Fishead or Fisbone packet? if (d.length < 52) return false; if (IOUtils.byteRangeMatches(MAGIC_FISHEAD_BYTES, d, 0)) return true; if (IOUtils.byteRangeMatches(MAGIC_...
3
@Override public void onPlayerItemUse(ChunkyPlayerItemUseEvent event) { try { if (!Permissions.PLAYER_BUILD_ANYWHERE.hasPerm(event.getChunkyPlayer().getPlayer())) return; } catch (ChunkyPlayerOfflineException e) { return; } if (event.getAccessLevel().equals(Ac...
3
public void closeStatement(){ try { stmnt.close(); } catch (SQLException ex) { handleSqlExceptions(ex); } }
1
public CalculateAccordingUser(ReadData data) throws IOException { FileOutputStream fos = new FileOutputStream("comments_2.csv"); OutputStreamWriter osw = new OutputStreamWriter(fos, "GBK"); BufferedWriter bw = new BufferedWriter(osw); HashMap<String, ArrayList<Comment>> userCommentMap = data.getUserCommentMap(...
9
private String makeBoardMove(CardGame game) { switch (moveTypeTo) { case TO_ACE_PILES: return game.moveCardOntoAceFromBoard(indexFrom, indexTo); case TO_KING_PILES: return game.moveCardOntoKingFromBoard(indexFrom, indexTo); case TO_HAND: ...
4
private String[] getPersonData(String name) throws Exception { for (String[] item : data) { if (item[NAME_INDEX].trim().equals(name)) { return item; } } throw new Exception("Data for " + name + " not found!"); }
2
public Duck(HuntField field) { boolean searchPosition = true; this.field = field; while (searchPosition) { position = new Position(new Random().nextInt(field.getXLength()), new Random().nextInt(field.getYLength())); if (field.setItem(this, position)) { sea...
2
public int getUnreadMessage(){ int remaining = 0; try { PreparedStatement checkCount = connection.prepareStatement( "select min(msg_seq) from hl7_q where read_flag is null"); ResultSet rs = checkCount.executeQuery(); while (rs.next()){ ...
2
public void uimsg(String msg, Object... args) { if (msg == "pop") { is_ready = true; final int xoff = 50; if (inputs != null) { for (Widget w : inputs) w.unlink(); for (Widget w : outputs) w.unlink(); ...
7
public Matrix backSubstitution(Matrix y) { if(rows != cols) { throw new IllegalArgumentException("Matrica nije kvadratna!"); } if(y.rows != rows || y.cols != 1) { throw new IllegalArgumentException("Krivi format vektora!"); } double[] x = new double[rows]; for(int i = rows - 1; i >= 0; i--) {...
5
@Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { if(!Chant.chantAlignmentCheck(this,mob,false,auto)) return false; final Room R=mob.location(); if((R!=null)&&(!auto)) { this.alwaysRandomArea=true; if(super.getPlanarAbility(R.getArea())...
7
public String encodeSolution() throws EncodeException { StringBuilder res = new StringBuilder(); if (this.solution != null && this.solution.length > 0) { if (solution[0] instanceof Integer) { res.append("int"); } else if (solution[0] instanceof Double) { ...
8
@Override public Response serve(IHTTPSession session) { Method method = session.getMethod(); String uri = session.getUri(); Map<String, String> parms = session.getParms(); File rootDirectory = new File("www"); Response res = new NanoHTTPD.Response("jErgoViewer - Not Found"); if (uri.endsWith(".do")) { ...
8
public void setRight(PExp node) { if(this._right_ != null) { this._right_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); ...
3
private static void scanNetworkInterfaces() { Enumeration<NetworkInterface> enumNI = null; NetworkInterface niTmp = null; EzimNetwork.nifs = new Hashtable<NetworkInterface, List<InetAddress>>(); try { enumNI = NetworkInterface.getNetworkInterfaces(); while(enumNI.hasMoreElements()) { niTmp = e...
4
public static Solucao eliminarRedundancia(Solucao solucao){ Multimap<Float, Integer> colunas = TreeMultimap.create(); for(Coluna coluna : solucao.getColunas()){ Float custo = coluna.getCusto(); colunas.put((custo*(-1)), coluna.getNome()); } Solucao testa...
4
@EventHandler public void PlayerSlow(EntityDamageByEntityEvent event) { Entity e = event.getEntity(); Entity damager = event.getDamager(); String world = e.getWorld().getName(); boolean dodged = false; Random random = new Random(); double randomChance = plugin.getPlayerConfig().getDouble("Player.Slow.Dodge...
6
public void redo() { if (!redo.empty()) { ArrayList<Delta> toDo = redo.pop(); for (Delta d : toDo) { d.unundo(colorArr); } undo.push(toDo); } }
2
public void init() throws IOException{ if(targetDirs.size() == 0){ logger.error("No target is set"); return; } this.filesInTargetsNotInSource = new ArrayList<ArrayList<Path>>(); this.filesInSourceNotInTargets = new ArrayList<ArrayList<Path>>(); for(Path...
2
@Test public void getBillLinesByStudentTest() throws InstanceNotFoundException { Calendar cb3 = Calendar.getInstance(); Booking b3 = new Booking(cb3, familyService.findStudent(0), bookingService.findDiningHall(0)); HashSet<Activity> activityForS = new HashSet<Activity>(); HashSet<Booking> bookingForS = n...
5
public void update() { for (GameObject obj : myObjects) { obj.update(); } for (GameObject obj : objects) { obj.update(); } }
2
public static void main(String args[]) throws Throwable { primes[0]=primes[1]=true; for(int i=0,c=0;i<MAX;i++) if(!primes[i]) { if(c<MAX_PRIMES) lstPrimes[c++]=i; for(int j=i+i;j<MAX;j+=i) primes[j]=true; } int MAX_SOL=10001; int[] euler=new int[MAX_SOL]; for(int i=0;i<MAX_SOL;i++) ...
9
public void setStrokeParts(float w, int cap, int join, float limit, float[] ary, float phase) { if (w == NOWIDTH) { w = state.stroke.getLineWidth(); } if (cap == NOCAP) { cap = state.stroke.getEndCap(); } if (join == NOJOIN) { join = state.stro...
8
@Override public ArrayList<String> getTerminationSprites() { ArrayList<String> result = new ArrayList<String>(); if(stype1 != null) result.add(stype1); if(stype2 != null) result.add(stype2); if(stype3 != null) result.add(stype3); return result; }
3
public Boolean isUsed() { return used; }
0
public void run(){ //System.err.println(this+":run >"); Buffer buf=new Buffer(rmpsize); Packet packet=new Packet(buf); int i=-1; try{ while(isConnected() && thread!=null && io!=null && io.in!=null){ i=io.in.read(buf.buffer, 14, ...
9
public String getName() { return name; }
0
private void refreshTable() { if (modelHR.getRowCount() > 0) { for (int i = modelHR.getRowCount() - 1; i > -1; i--) { modelHR.removeRow(i); } } try { populateTable(); } catch (Throwable e) { // TODO Auto-generated catch block e.printStackTrace(); } }
3
public ChessPanel() { super(); this.mainPanel.setLayout(null); this.setContentPane(this.mainPanel); this.initBackground(this.mainPanel); this.initBlockLabel(this.mainPanel); this.mainPanel.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ...
9
protected void redirectToCo(String[] validatedInput, HttpServletResponse resp) throws IOException { // エンコード。"(" と ")" を戻している。 // 前工程で正規化が済んでいる点に注意。 String encodedInput1 = URLEncoder.encode(validatedInput[1], "utf-8") .replaceAll("%28", "(").replaceAll("%29", ")"); String encodedInput2 = URLEncoder.encod...
4
public void paint(Graphics g) { switch (player.dir) { case 1: g.drawImage(image, player.getX()+30, player.getY()+15, player.gameScreen); break; case 2: g.drawImage(image, player.getX()+3, player.getY()+15, player.gameScreen); break; case 3: g.drawImage(image, player.getX()-5, player.getY(...
3
public void remove(Packet p) { if(!activePackets.remove(p)) { if(!passivePackets.remove(p)) { // The packet was in neither list return; // nothing changed, the interference did not change } } if(Configuration.asynchronousMode && !Configuration.interferenceIsAdditive) { testForInterference(); } ...
4
public void keyPressed(KeyEvent e){ if (e.getKeyChar() >= '0' && e.getKeyChar() <= '9'){ if (answerLabel.getText() != ""){ answerLabel.setText(answerLabel.getText() + String.valueOf(e.getKeyChar())); } else{ answerLabel.setText(String.valueOf(e.getKeyChar())); } if(Integer.valueOf(answe...
5
@Override public Success<Expression> parse(String s, int p) { // Parse the '{'. if (s.charAt(p++) != '{') return null; p = optWS(s, p); // Handle empty sequences. if (s.charAt(p) == '}') return new Success<Expression>(new LiteralSequence(Expression.NO...
7
public String getGame() { return game; }
0
public void setRemoteTarget(String remoteIP, int targetPacketRate) { try { ipAddr = InetAddress.getByName(remoteIP); packetRate = targetPacketRate; } catch (Exception e) { System.out.println(e.toString()); } }
1
private String createPlayersJson(List<OfflinePlayer> players) { StringBuilder json = new StringBuilder(); json.append("["); for (OfflinePlayer player : players) { if (player instanceof Player) { json.append(createPlayerJson((Player)player)).append(","); } else if (!player.isOnline()) { json...
4
public void testMetaVariables() { System.out.println(); String[] testStrings = { ":X", ":XX", ":X-X", ":ABC-234", ":ABC-ABC", ":UIO-123-UIO", ":a"}; String[] testsThatShouldFail = { ":-", "::234", "", "XX", "qawerpiouasdf", "::", "::X", ":1", ":.", ":@", ":!", ":234a2354dsf", ":234-ABC", "::23...
9
public DiceTaskXmlDriver(String xmlStr) throws DocumentException, XmlTypeErrorException { super(); if (!isDiceTaskXml(xmlStr)) { throw new XmlTypeErrorException("not a valid diceTask Xml"); } document = DocumentHelper.parseText(xmlStr); timestamp = documen...
6
@Override public void addRecord( BiffRec rec, int[] rc ) { // check to see if there is a BiffRec already at the address add the rec to the Cell, // set as value if it's a val type rec rec.setSheet( this );// create a new BiffRec if none exists rec.setRowCol( rc ); rec.setIsValueForCell( true ); rec.setSt...
5
public Dimension getPreferredSize() { int x = 0, y = 0; for (int i = 0; i < zelements.size(); i++) { x = getElement(i).getX() + getElement(i).getWidth() > x ? getElement( i).getX() + getElement(i).getWidth() : x; y =...
3
private String addContent(String content, boolean isHtml, String nodeContent, boolean isHtmlNode) { if (isHtml) { final String start[] = BODY_END.split(content, -2); content = start[0]; if (!isHtmlNode) { final String end[] = BODY...
7
void compress(int init_bits, OutputStream outs) throws IOException { int fcode; int i /* = 0 */; int c; int ent; int disp; int hsize_reg; int hshift; // Set up the globals: g_init_bits - initial number of bits ...
9
private void kasitteleSeuraava() throws IllegalStateException, IllegalArgumentException { if (seuraavanaLuku()) { kasitteleLuku(); } else if (seuraavanaNegatiiviMiinus()) { kasitteleNegatiiviMiinus(); } else if (seuraavanaLaskutoimitus()){ ...
6
private void declareFrameTypes(final int n, final Object[] o) { for (int i = 0; i < n; ++i) { if (o[i] instanceof Label) { declareLabel((Label) o[i]); } } }
2
public AbstractOutlinerMenuItem() { }
0
public void setRegion(String region) { this.region = region; }
0
public void paint( Graphics graphics ) { Dimension size = size(); graphics.setColor( getBackground() ); switch ( type ) { case SOLID: graphics.setColor( getForeground() ); for ( int i = 0; i < thickness; ++i ) graphics.drawRect( i, i, size.width - i * 2 - 1, size.height - i * 2 - 1 ); ...
8
public static void ReadFromFile(String fileName){ BufferedReader br = null; try{ br = new BufferedReader(new FileReader(fileName)); String line = null; while((line = br.readLine()) != null){ HashMap<Integer, ArrayList<Double>> geneEntry = new Ha...
5
public int untransform(int info){ if(info==InteractivePanel.UP) return properties.getUpCtrl(); else if(info==InteractivePanel.LEFT) return properties.getLeftCtrl(); else if(info==InteractivePanel.RIGHT) return properties.getRightCtrl(); else if(info==InteractivePanel.SHOOT) return properties.getShoo...
5
public void setTableModel(TableModel tableModel) { if (this.tableModel != null) { this.tableModel.removeTableModelListener(tableModelListener); } this.tableModel = tableModel; if (this.tableModel != null) { this.tableModel.addTableModelListener(tableModelListener); } clearSortingState(); fire...
2
public void loadPropertiesFromFile(File fileName) throws IOException { FileInputStream in = new FileInputStream(fileName); Properties properties = new Properties(); properties.loadFromXML(in); int x1 =(new Integer(properties.getProperty("x1"))); int y1 =(new Integer(properties.g...
2
public void initialisation(final int[][] keysTable) throws KeyTableSizeException, KeyValueException { if (keysTable.length != xSize || keysTable[0].length != ySize) { throw new KeyTableSizeException(); } else { for (int i = 0; i < xSize; ++i) { for (int j = 0; j < ySize; ++j) { switch (keysTable[i][j...
6
* @return boolean */ public static boolean trueP(Proposition self) { { TruthValue truthvalue = ((TruthValue)(Stella_Object.accessInContext(self.truthValue, self.homeContext, false))); if (truthvalue == Logic.TRUE_TRUTH_VALUE) { return (true); } else if (truthvalue == Logic.DEFAULT_TR...
7
private boolean isFriendOrSelf(String name) { if (name == null) { return false; } for (int i = 0; i < friendsCount; i++) { if (name.equalsIgnoreCase(friendsNames[i])) { return true; } } return name.equalsIgnoreCase(Client.myPlay...
3