query
stringlengths
8
1.54M
document
stringlengths
9
312k
negatives
sequencelengths
19
20
metadata
dict
Sets the field separator string as an escaped regex.
public void setFieldSeparatorRegex(String fieldSeparatorRegex) { this.fieldSeparatorRegex = fieldSeparatorRegex; }
[ "void setFieldSeparator(final String fieldSeparator);", "public String getFieldSeparatorRegex()\n\t{\n\t\treturn fieldSeparatorRegex;\n\t}", "public void setFieldSeparator(String fieldSeparator) {\n\t\tthis.fieldSeparator = fieldSeparator;\n\t}", "public void setFieldSeparator(String fieldSeparator)\n\t{\n\t\tthis.fieldSeparator = fieldSeparator;\n\t}", "public static void setFieldSeparator(char field) {\r\n\t\tfieldSep=\"\"+field;\r\n\t}", "public void setRowSeparatorRegex(String rowSeparatorRegex)\n\t{\n\t\tthis.rowSeparatorRegex = rowSeparatorRegex;\n\t}", "public void setSeparator(String separator);", "public void setSeparator(String _separator);", "@Override\n public void setSeparator(String separator) {\n\n }", "public void setSeparator(String separator){\n\t\tthis.separator = separator;\n\t}", "public void setSeparator(char separator) {\n\t\tthis.separator = separator;\n\t}", "public void setValueSeparator(char sep) {\n this.valuesep = sep;\n }", "public void setSeparator(String separator) {\n\t\tthis.separator = separator;\n\t}", "public void setSeparator(char separator) {\n\t this.separator = separator;\n\t}", "public void setDelimiter(String delimiter);", "public String delimiterRegex() {\n return DELIMITER_REGEX;\n }", "public String getRowSeparatorRegex()\n\t{\n\t\treturn rowSeparatorRegex;\n\t}", "public void setExtractLineSeparator (String linesep);", "public static String getPathSeparatorRegex() {\n if (File.separator.equals(Constants.SLASH)) {\n return File.separator;\n } else {\n return Constants.BACK_SLASH + File.separator;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes pickable and non pickable items and adding them to rooms
public static void createItem() { //Initializing an item and putting it in a room airport itemLocation.addItem(airport, new PickableItem("Bottle", "This is a bottle that have been left behind by someone", 2, false)); itemLocation.addItem(airport, new PickableItem("Boardingpass", "This is a boardingpass to get on the plane to Hawaii: 126AB", 1, false)); //Initializing an item and putting it in a room beach itemLocation.addItem(beach, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(beach, new PickableItem("Fish", "Why are you inspecting this item, its GOD damn fish", 1, true)); itemLocation.addItem(beach, new PickableItem("Fish", "Why are you inspecting this item, its GOD damn fish", 1, true)); itemLocation.addItem(beach, new PickableItem("Flint", "This a flint, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(beach, new PickableItem("Rope", "This is some rope that has been washed up on the beach shore from the plane crash ", 2, false)); itemLocation.addItem(beach, new PickableItem("Stick", "This is a small stick, maybe it can be used to create something more usefull", 1, false)); itemLocation.addItem(beach, new PickableItem("Stick", "This is a small stick, maybe it can be used to create something more usefull", 1, false)); //non pickable item itemLocation.addItem(beach, new Item("GiantRock", "The giant rock dont look like it can be moved", 100)); itemLocation.addItem(beach, new Item("GiantLog", "The giant log dont look like it can be moved", 100)); //Initializing an item and putting it in a room jungle itemLocation.addItem(jungle, new PickableItem("Berry", "this is berries, maybe its poisonous try ur luck!! ", 1, true)); itemLocation.addItem(jungle, new PickableItem("Berry", "this is berries, maybe its poisonous try ur luck!! ", 1, true)); itemLocation.addItem(jungle, new PickableItem("Lumber", "This is a log of tree, maybe it can be used to craft something to get away from this island ", 3, false)); itemLocation.addItem(jungle, new PickableItem("Lian", "This is a lian from the jungle, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(jungle, new PickableItem("Lian", "This is a lian from the jungle, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(jungle, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(jungle, new PickableItem("Stick", "This is a small stick, maybe it can be used to create something more usefull", 1, false)); //non pickable item itemLocation.addItem(jungle, new Item("GiantLog", "The giant log dont look like it can be moved", 100)); //Initializing an item and putting it in a room mountain itemLocation.addItem(mountain, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(mountain, new PickableItem("Egg", "This is some wild eggs, maybe it can be used for food", 1, true)); itemLocation.addItem(mountain, new PickableItem("Lumber", "This is a log of tree, maybe it can be used to craft something to get away from this island ", 3, false)); //Initializing an item and putting it in a room cave itemLocation.addItem(cave, new PickableItem("Shroom", "these shrooms look suspecius, but maybe the can be", 1, true)); itemLocation.addItem(cave, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(cave, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(cave, new PickableItem("Waterbottle", "This is freshwater found in the jungle, maybe you can drink it", 2, true)); itemLocation.addItem(cave, new PickableItem("Flint", "This a flint, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(cave, new Item("GiantRock", "The giant rock dont look like it can be moved", 100)); //Initializing an item and putting it in a room camp itemLocation.addItem(camp, new PickableItem("Stone", "This is a stone, maybe it can be used to create something more usefull", 2, false)); itemLocation.addItem(camp, new PickableItem("Stick", "This is a small stick, maybe it can be used to create something more usefull", 1, false)); itemLocation.addItem(camp, new PickableItem("Egg", "This is some wild eggs, maybe it can be used for food", 1, true)); //Initializing an item and putting it in a room seaBottom itemLocation.addItem(seaBottom, new PickableItem("Backpack", "This is a backpack from the plane crash maybe you can use it to carry more items ", 0, false)); itemLocation.addItem(seaBottom, new PickableItem("WaterBottle", "This is a water bottle from the plan crash ", 1, true)); itemLocation.addItem(seaBottom, new PickableItem("Rope", "This is some rope that has been washed up on the beach shore from the plane crash", 2, false)); }
[ "private void addItemsToRooms(){\n fountain.addItem(items.get(\"key\"));\n }", "private void initRooms() {\r\n\t\tRoom kitchen = new Room(\"Kitchen\", 1, \"K\");\r\n\t\tRoom study = new Room(\"Study\", 2, \"S\");\r\n\t\tRoom lounge = new Room(\"Lounge\", 3, \"L\");\r\n\t\tRoom conservatory = new Room(\"Conservatory\", 4, \"C\");\r\n\t\tRoom ballRoom = new Room(\"Ball Room\", 5, \"Bi\");\r\n\t\tRoom billiardRoom = new Room(\"Billiard Room\", 6, \"I\");\r\n\t\tRoom library = new Room(\"Library\", 7, \"Y\");\r\n\t\tRoom hall = new Room(\"Hall\", 8, \"H\");\r\n\t\tRoom diningRoom = new Room(\"Dining Room\", 9, \"D\");\r\n\t\t\r\n\t\tkitchen.setConnectingRoom(study);\r\n\t\tstudy.setConnectingRoom(kitchen);\r\n\t\tlounge.setConnectingRoom(conservatory);\r\n\t\tconservatory.setConnectingRoom(lounge);\r\n\r\n\t\t// store in data structure\r\n\t\trooms.put(conservatory.getName(), conservatory);\r\n\t\trooms.put(lounge.getName(), lounge);\r\n\t\trooms.put(kitchen.getName(), kitchen);\r\n\t\trooms.put(study.getName(), study);\r\n\t\trooms.put(hall.getName(), hall);\r\n\t\trooms.put(ballRoom.getName(), ballRoom);\r\n\t\trooms.put(billiardRoom.getName(), billiardRoom);\r\n\t\trooms.put(library.getName(), library);\r\n\t\trooms.put(diningRoom.getName(), diningRoom);\r\n\t}", "private void setWeapons() {\n\t\tList<Rooms> tempRoom = new ArrayList<>(rooms.keySet());\n\t\tCollections.shuffle(tempRoom);\n\t\t// for each weapon that needs to be added\n\t\tfor (Weapons w : Weapons.values()) {\n\t\t\tRoom r = rooms.get(tempRoom.remove(0));\n\t\t\tweapons.put(w, r);\n\t\t\tr.addItem(w);\n\t\t}\n\t}", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void setItems()\n {\n sewers.setItem(rope); \n promenade.setItem(rope);\n bridge.setItem(potion);\n tower.setItem(potion);\n throneRoomEntrance.setItem(potion);\n depths.setItem(shovel);\n crypt.setItem(shovel);\n }", "public void initialize() {\n // Do not initialize twice\n if (owner != null) {\n return;\n }\n\n // 1. Find the owner mobile in the room\n List<Mobile> mobs = room.getMobiles();\n synchronized(mobs) {\n for (Mobile mob : room.getMobiles()) {\n if (mob.ownsShop(id)) {\n owner = mob;\n break;\n }\n }\n }\n\n // 2. Initialize the shop items in stock\n for (ShopItem item : items) {\n item.initialize();\n }\n }", "private void createRooms()\n\t{\n\t\tRoom outside, lab, tavern, gblock, office;\n\n\t\t// create the rooms\n\t\toutside = new Room(\"outside G block on Peninsula campus\");\n\t\tlab = new Room(\"a lecture theatre in A block\");\n\t\ttavern = new Room(\"the Seahorse Tavern (the campus pub)\");\n\t\tgblock = new Room(\"the G building\");\n\t\toffice = new Room(\"the computing admin office\");\n\n\t\t// Initialize room exits\n\t\toutside.setExits(null, lab, gblock, tavern);\n\t\tlab.setExits(null, null, null, outside);\n\t\ttavern.setExits(null, outside, null, null);\n\t\tgblock.setExits(outside, office, null, null);\n\t\toffice.setExits(null, null, null, gblock);\n\n\t\t// Set Items to inventory\n//\t\toutside.getInv().add(new Item(\"Gate Key\", 0, 0, 7));\n\t\tInventory disInv = outside.getInv();\n\t\tItem dis = new Item(\"Gate Key\", 0, 0, 7);\n\t\tdisInv.add(dis);\n\t\t\n\t\t\n\t\tcurrentRoom = outside; // start game outside\n\t}", "private void initializeRooms(){\n mListRooms = new ArrayList<String>();\n mRooms = database.getAllRooms();\n for(Room room : mRooms){\n mListRooms.add(room.getLabel());\n }\n }", "private void addRoomItems(int itemsToAdd)\n {\n\n // Adds up to 3 random items to a random room .\n if (!(itemsToAdd == 0)){\n\n for(int j = 0; j < itemsToAdd; j++){\n Item chooseItem = chooseValidItem(); \n Room chooseRoom = rooms.get(random.nextInt(rooms.size()));\n\n chooseRoom.getInventory().getItems().add(chooseItem);\n System.out.println(chooseRoom.getName()+\": \"+chooseItem.getName());\n\n }\n }\n }", "public void initItems() {\n List<Integer> emptySlots = NimbleServer.enchantmentConfig.getEmptySlots();\n for (int i = 0; i < getSize(); i++) {\n if(!(emptySlots.contains(i))) {\n getInventory().setItem(i, getFiller());\n }\n }\n }", "public void setRoomItems(ArrayList<Item> newRoomItems) {\n roomItems = newRoomItems;\n }", "protected void setRoom() {\n\t\tfor(int x = 0; x < xSize; x++) {\n\t\t\tfor (int y = 0; y < ySize; y++) {\n\t\t\t\tif (WALL_GRID[y][x] == 1) {\n\t\t\t\t\tlevelSetup[x][y] = new SimpleRoom();\n\t\t\t\t} else{\n\t\t\t\t\tlevelSetup[x][y] = new ForbiddenRoom();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t// put special rooms\n\t\tlevelSetup[6][0] = new RoomWithLockedDoor();\n\t\tlevelSetup[2][6] = new FragileRoom();\n\n\t}", "private void init()\n\t{\n\t\tselectedUnits = new ArrayList<UnitEntry>();\n\n\t\tif (!player.isHuman())\n\t\t{\n\t\t\tArrayList<UnitEntry> unitTypes = new ArrayList<UnitEntry>(units);\n\t\t\tfor (int i = 0; i < maxUnits; i++)\n\t\t\t{\n\t\t\t\tplayer.addUnit(new Unit(\n\t\t\t\t\t\tunitTypes.get((int) (Math.random() * maxUnits)), player));\n\t\t\t}\n\t\t\tcompleted = true;\n\t\t}\n\t}", "private void populateRooms() {\r\n\t\tArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\r\n\t\t\t\tandroid.R.layout.simple_spinner_item, roomList);\r\n\t\tdataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\t\trooms.setAdapter(dataAdapter);\r\n\t}", "private void initialize_rooms()\n {\n final String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWYXZ\";\n String desc;\n\n for(int i = 0; i < rowscols; i++)\n {\n for(int j = 0; j < rowscols; j++)\n {\n \n desc = \"\" + (i + 1);\n desc += \"\" + alpha.charAt(j);\n maze[i][j] = new Room(desc);\n }\n }\n \n set_paths();\n }", "public Room()\r\n\t{\r\n\t\tmap = createRooms();\r\n\t}", "public void allocateWeapons() {\n Collections.shuffle(this.getWeaponPieces());\n List<Room> rooms = this.board.getRooms();\n Collections.shuffle(rooms);\n int roomIndex = 0;\n for (WeaponPiece weapon : this.getWeaponPieces()) {\n Room room = rooms.get(roomIndex);\n if (room.getWeaponPiece() == null) {\n room.setWeaponPiece(weapon);\n roomIndex += 1;\n }\n }\n }", "private static void buildRooms()\n {\n //Room 1 test\n room1.setNorth(room2);\n \n //Room 2 test\n room2.setSecret(true);\n\n \n end.setInMaze(false);\n }", "public void setRooms(ArrayList<ChatRoom> rooms) {\n this.rooms = rooms;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all the container within a city. ATTENTION this is not implemented by city now, it is just all containers
@Override public List<Container> getAllContainers(City city) { List<Container> l = new ArrayList<Container>(); if (getStore() != null) { try { KeyValueIterator<String,String> k = getStore().all(); while (k.hasNext()) { l.add(jsonParser.fromJson(k.next().value, Container.class)); } } catch(InvalidStateStoreException e) { e.printStackTrace(); return l; } } return l; }
[ "private void getAllContainers() {\n AID ams = getAMS();\n QueryPlatformLocationsAction queryPlatformLocationsAction = new QueryPlatformLocationsAction();\n sendRequest(new Action(ams, queryPlatformLocationsAction));\n MessageTemplate mt = MessageTemplate.and(\n MessageTemplate.MatchSender(getAMS()),\n MessageTemplate.MatchPerformative(ACLMessage.INFORM));\n ACLMessage resp = blockingReceive(mt);\n ContentElement ce = null;\n try {\n ce = getContentManager().extractContent(resp);\n } catch (Codec.CodecException e) {\n e.printStackTrace();\n } catch (OntologyException e) {\n e.printStackTrace();\n }\n Result result = (Result) ce;\n jade.util.leap.Iterator it = result.getItems().iterator();\n while (it.hasNext()) {\n Location loc = (Location) it.next();\n containersOnPlatform.put(loc.getName(), loc);\n }\n }", "@Override\n public List<CityCollection> findAll() {\n log.debug(\"Request to get all CityCollections\");\n return cityCollectionRepository.findAll();\n }", "Vector getAllContainers() {\n\n Vector containers = new Vector();\n Vector list = layer.getObjects();\n\n if ((list == null) || (list.size() == 0))\n return containers;\n\n for (int i = 0; i < list.size(); i++) {\n Object obj = list.get(i);\n\n if (obj instanceof BeanContainer)\n containers.add(obj);\n }\n\n return containers;\n }", "public List<City> getCities(){\n waitFor(visibilityOfAllElements(cities));\n return cities.stream().map(City::new).collect(toList());\n }", "@Override\n public Collection<City> findAllCity() {\n List<City> city = new ArrayList<>();\n try (Connection cn = pool.getConnection();\n PreparedStatement ps = cn.prepareStatement(\"SELECT * FROM city\")\n ) {\n try (ResultSet it = ps.executeQuery()) {\n while (it.next()) {\n city.add(new City(it.getInt(\"id\"), it.getString(\"name\")));\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n LOG.error(\"Неверный SQL запрос, города не найдены\");\n }\n return city;\n }", "public Iterable<SearchableContainer> getAllSearchableContainers() {\n return workspace.getAllSearchableContainers();\n }", "public Collection<CityDTO> getCities() {\n return new LinkedList<>(cities);\n }", "public static ArrayList<City> getCities(){\n return allCities;\n }", "List<City> getAllCities();", "public List<City> getAllCities() {\n List<City> cityList = new ArrayList<>();\n try (Connection connection = DBConnectionUtility.getDBConnection()) {\n String query = \"SELECT * FROM cities\";\n Statement statement = connection.createStatement();\n ResultSet resultSet = statement.executeQuery(query);\n while (resultSet.next()) {\n City city = new City();\n city.setId(resultSet.getString(\"cityId\"));\n city.setCityName(resultSet.getString(\"cityName\"));\n city.setCityAlias(resultSet.getString(\"cityAlias\"));\n cityList.add(city);\n }\n } catch (SQLException throwables) {\n daoError(\"SQLException was caught. Stacktrace is available in console\");\n throwables.printStackTrace();\n }\n return cityList;\n }", "@Override\r\n\tpublic List <City> getAllCities() {\r\n\t\tSystem.out.println(\"Looking for all cities...\");\r\n\t\tConnection con = ConnectionFactory.getConnection();\r\n\t\ttry {\r\n\t\t\tStatement stmt = con.createStatement();\r\n\t\t\tResultSet rs = stmt.executeQuery(\"SELECT * FROM city\");\r\n\t\t\tList<City> cityList = new ArrayList<City>();\r\n\r\n\t\t\twhile(rs.next())\r\n\t\t\t{\r\n\t\t\t\tCity ci = new City();\r\n\t\t\t\tci.setCityId(rs.getInt(\"cityid\"));\r\n\t\t\t\tci.setName(rs.getString(\"name\"));\r\n\t\t\t\tci.setCapital(rs.getBoolean(\"iscapital\"));\r\n\t\t\t\tcityList.add(ci);\r\n\t\t\t}\r\n\t\t\tstmt.close();\r\n\t\t\trs.close();\r\n\t\t\treturn cityList;\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "List<City> findCities();", "public static java.util.List getAllContainer(Model model) throws JastorException {\n\t\tStmtIterator it = model.listStatements(null,RDF.type,Container.TYPE);\n\t\tjava.util.List list = new java.util.ArrayList();\n\t\twhile (it.hasNext()) {\n\t\t\tStatement stmt = it.nextStatement();\n\t\t\tlist.add(getContainer(stmt.getSubject(),model));\n\t\t}\n\t\treturn list;\n\t}", "public List<Container> getLocalContainers() {\n if (containerList == null) {\n containerList = new ArrayList<Container>();\n\n // Request to the daemon a new Container list\n try {\n verifyLockAndRefreshContainerDatabase();\n } catch (Exception e) {\n LOG.error(\"Failed to retrieve list of containers\", e);\n }\n }\n\n return containerList;\n }", "public Set<String> getContainers();", "public Vector<City> getCities(){\r\n\t\tif (map.getVerteices()==null){\r\n\t\t\treturn new Vector<City>();\r\n\t\t}\r\n\t\treturn map.getVerteices();\r\n\t}", "Collection<String> getCities();", "public Flux<ContainerItem> listContainers() {\n return this.listContainers(new ListContainersOptions());\n }", "@GetMapping(value=\"/getcityandrun\")\n\tpublic Collection<City> getAllCityAndRunner(){\n\t\treturn cityservice.getAllDataCityRunner();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Constructor for objects of class FileIO
public FileIO() { }
[ "public File() {}", "public TFileFactory() {\n this(PhysicalFileSystem.instance);\n }", "public FileObjectFactory() {\n }", "private FileUtils() {\n super();\n }", "public interface IOFactory {\n\n public FileIO newFile(String path);\n\n}", "IOFile createIOFile();", "private DataFile() {}", "public FileManager() {\n\t\t\n\t}", "@InterfaceAudience.Private\n public FileContext() {}", "private FileHandler() {\n\t}", "public ParserFileSystem() {\n }", "public FilesContainer() {\r\n\r\n }", "public FileManager() {\r\n\t\t\r\n\t}", "public FileResource() {\n }", "public FileParameter() { }", "public FileTest() {\n }", "public AncFile() {\n }", "public FileParser() {\r\n\t\t\r\n\t}", "public SimpleFactoryIO(String path) {\n\t\tthis.f = new File(path);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The stage of the Cluster definition allowing to specify azureActiveDirectory.
interface WithAzureActiveDirectory { /** * Specifies the azureActiveDirectory property: The AAD authentication settings of the cluster.. * * @param azureActiveDirectory The AAD authentication settings of the cluster. * @return the next definition stage. */ WithCreate withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory); }
[ "public AzureActiveDirectory azureActiveDirectory() {\n return this.azureActiveDirectory;\n }", "HybridAksClusterProvisioningState provisioningState();", "interface WithCreate extends DefinitionStages.WithTags {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n HybridAksCluster create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n HybridAksCluster create(Context context);\n }", "default void createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClusterMethod(), responseObserver);\n }", "public String dataCenterAzureLocation() {\n return this.dataCenterAzureLocation;\n }", "public KerberizedAbfsCluster() {\n super(\"KerberizedAbfsCluster\");\n // load all the configs to force in the -default.xml files\n new JobConf();\n if (LOG.isDebugEnabled()) {\n // turn on kerberos logging @ debug.\n System.setProperty(KDiag.SUN_SECURITY_KRB5_DEBUG, \"true\");\n System.setProperty(KDiag.SUN_SECURITY_SPNEGO_DEBUG, \"true\");\n }\n\n }", "public AzureActiveDirectoryApp azureApp() {\n return this.azureApp;\n }", "interface WithHybridAksProvisionedClusterId {\n /**\n * Specifies the hybridAksProvisionedClusterId property: The resource ID of the Hybrid AKS cluster that this\n * additional information is for..\n *\n * @param hybridAksProvisionedClusterId The resource ID of the Hybrid AKS cluster that this additional\n * information is for.\n * @return the next definition stage.\n */\n WithWorkerCount withHybridAksProvisionedClusterId(String hybridAksProvisionedClusterId);\n }", "public interface HybridAksCluster {\n /**\n * Gets the id property: Fully qualified resource Id for the resource.\n *\n * @return the id value.\n */\n String id();\n\n /**\n * Gets the name property: The name of the resource.\n *\n * @return the name value.\n */\n String name();\n\n /**\n * Gets the type property: The type of the resource.\n *\n * @return the type value.\n */\n String type();\n\n /**\n * Gets the location property: The geo-location where the resource lives.\n *\n * @return the location value.\n */\n String location();\n\n /**\n * Gets the tags property: Resource tags.\n *\n * @return the tags value.\n */\n Map<String, String> tags();\n\n /**\n * Gets the extendedLocation property: ExtendedLocation represents the Azure custom location where the resource will\n * be created.\n *\n * <p>The extended location of the cluster associated with the resource.\n *\n * @return the extendedLocation value.\n */\n ExtendedLocation extendedLocation();\n\n /**\n * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.\n *\n * @return the systemData value.\n */\n SystemData systemData();\n\n /**\n * Gets the associatedNetworkIds property: The list of resource IDs for the workload networks associated with the\n * Hybrid AKS cluster. It can be any of l2Networks, l3Networks, or trunkedNetworks resources. This field will also\n * contain one cloudServicesNetwork and one defaultCniNetwork.\n *\n * @return the associatedNetworkIds value.\n */\n List<String> associatedNetworkIds();\n\n /**\n * Gets the cloudServicesNetworkId property: The resource ID of the associated cloud services network.\n *\n * @return the cloudServicesNetworkId value.\n */\n String cloudServicesNetworkId();\n\n /**\n * Gets the clusterId property: The resource ID of the Network Cloud cluster hosting the Hybrid AKS cluster.\n *\n * @return the clusterId value.\n */\n String clusterId();\n\n /**\n * Gets the controlPlaneCount property: The number of control plane node VMs.\n *\n * @return the controlPlaneCount value.\n */\n long controlPlaneCount();\n\n /**\n * Gets the controlPlaneNodes property: The list of node configurations detailing associated VMs that are part of\n * the control plane nodes of this Hybrid AKS cluster.\n *\n * @return the controlPlaneNodes value.\n */\n List<NodeConfiguration> controlPlaneNodes();\n\n /**\n * Gets the defaultCniNetworkId property: The resource ID of the associated default CNI network.\n *\n * @return the defaultCniNetworkId value.\n */\n String defaultCniNetworkId();\n\n /**\n * Gets the detailedStatus property: The more detailed status of this Hybrid AKS cluster.\n *\n * @return the detailedStatus value.\n */\n HybridAksClusterDetailedStatus detailedStatus();\n\n /**\n * Gets the detailedStatusMessage property: The descriptive message about the current detailed status.\n *\n * @return the detailedStatusMessage value.\n */\n String detailedStatusMessage();\n\n /**\n * Gets the hybridAksProvisionedClusterId property: The resource ID of the Hybrid AKS cluster that this additional\n * information is for.\n *\n * @return the hybridAksProvisionedClusterId value.\n */\n String hybridAksProvisionedClusterId();\n\n /**\n * Gets the provisioningState property: The provisioning state of the Hybrid AKS cluster resource.\n *\n * @return the provisioningState value.\n */\n HybridAksClusterProvisioningState provisioningState();\n\n /**\n * Gets the volumes property: The resource IDs of volumes that are attached to the Hybrid AKS cluster.\n *\n * @return the volumes value.\n */\n List<String> volumes();\n\n /**\n * Gets the workerCount property: The number of worker node VMs.\n *\n * @return the workerCount value.\n */\n long workerCount();\n\n /**\n * Gets the workerNodes property: The list of node configurations detailing associated VMs that are part of the\n * worker nodes of this Hybrid AKS cluster.\n *\n * @return the workerNodes value.\n */\n List<NodeConfiguration> workerNodes();\n\n /**\n * Gets the region of the resource.\n *\n * @return the region of the resource.\n */\n Region region();\n\n /**\n * Gets the name of the resource region.\n *\n * @return the name of the resource region.\n */\n String regionName();\n\n /**\n * Gets the name of the resource group.\n *\n * @return the name of the resource group.\n */\n String resourceGroupName();\n\n /**\n * Gets the inner com.azure.resourcemanager.networkcloud.fluent.models.HybridAksClusterInner object.\n *\n * @return the inner object.\n */\n HybridAksClusterInner innerModel();\n\n /** The entirety of the HybridAksCluster definition. */\n interface Definition\n extends DefinitionStages.Blank,\n DefinitionStages.WithLocation,\n DefinitionStages.WithResourceGroup,\n DefinitionStages.WithExtendedLocation,\n DefinitionStages.WithAssociatedNetworkIds,\n DefinitionStages.WithControlPlaneCount,\n DefinitionStages.WithHybridAksProvisionedClusterId,\n DefinitionStages.WithWorkerCount,\n DefinitionStages.WithCreate {\n }\n /** The HybridAksCluster definition stages. */\n interface DefinitionStages {\n /** The first stage of the HybridAksCluster definition. */\n interface Blank extends WithLocation {\n }\n /** The stage of the HybridAksCluster definition allowing to specify location. */\n interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(String location);\n }\n /** The stage of the HybridAksCluster definition allowing to specify parent resource. */\n interface WithResourceGroup {\n /**\n * Specifies resourceGroupName.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @return the next definition stage.\n */\n WithExtendedLocation withExistingResourceGroup(String resourceGroupName);\n }\n /** The stage of the HybridAksCluster definition allowing to specify extendedLocation. */\n interface WithExtendedLocation {\n /**\n * Specifies the extendedLocation property: ExtendedLocation represents the Azure custom location where the\n * resource will be created.\n *\n * <p>The extended location of the cluster associated with the resource..\n *\n * @param extendedLocation ExtendedLocation represents the Azure custom location where the resource will be\n * created.\n * <p>The extended location of the cluster associated with the resource.\n * @return the next definition stage.\n */\n WithAssociatedNetworkIds withExtendedLocation(ExtendedLocation extendedLocation);\n }\n /** The stage of the HybridAksCluster definition allowing to specify associatedNetworkIds. */\n interface WithAssociatedNetworkIds {\n /**\n * Specifies the associatedNetworkIds property: The list of resource IDs for the workload networks\n * associated with the Hybrid AKS cluster. It can be any of l2Networks, l3Networks, or trunkedNetworks\n * resources. This field will also contain one cloudServicesNetwork and one defaultCniNetwork..\n *\n * @param associatedNetworkIds The list of resource IDs for the workload networks associated with the Hybrid\n * AKS cluster. It can be any of l2Networks, l3Networks, or trunkedNetworks resources. This field will\n * also contain one cloudServicesNetwork and one defaultCniNetwork.\n * @return the next definition stage.\n */\n WithControlPlaneCount withAssociatedNetworkIds(List<String> associatedNetworkIds);\n }\n /** The stage of the HybridAksCluster definition allowing to specify controlPlaneCount. */\n interface WithControlPlaneCount {\n /**\n * Specifies the controlPlaneCount property: The number of control plane node VMs..\n *\n * @param controlPlaneCount The number of control plane node VMs.\n * @return the next definition stage.\n */\n WithHybridAksProvisionedClusterId withControlPlaneCount(long controlPlaneCount);\n }\n /** The stage of the HybridAksCluster definition allowing to specify hybridAksProvisionedClusterId. */\n interface WithHybridAksProvisionedClusterId {\n /**\n * Specifies the hybridAksProvisionedClusterId property: The resource ID of the Hybrid AKS cluster that this\n * additional information is for..\n *\n * @param hybridAksProvisionedClusterId The resource ID of the Hybrid AKS cluster that this additional\n * information is for.\n * @return the next definition stage.\n */\n WithWorkerCount withHybridAksProvisionedClusterId(String hybridAksProvisionedClusterId);\n }\n /** The stage of the HybridAksCluster definition allowing to specify workerCount. */\n interface WithWorkerCount {\n /**\n * Specifies the workerCount property: The number of worker node VMs..\n *\n * @param workerCount The number of worker node VMs.\n * @return the next definition stage.\n */\n WithCreate withWorkerCount(long workerCount);\n }\n /**\n * The stage of the HybridAksCluster definition which contains all the minimum required properties for the\n * resource to be created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate extends DefinitionStages.WithTags {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n HybridAksCluster create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n HybridAksCluster create(Context context);\n }\n /** The stage of the HybridAksCluster definition allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: Resource tags..\n *\n * @param tags Resource tags.\n * @return the next definition stage.\n */\n WithCreate withTags(Map<String, String> tags);\n }\n }\n /**\n * Begins update for the HybridAksCluster resource.\n *\n * @return the stage of resource update.\n */\n HybridAksCluster.Update update();\n\n /** The template for HybridAksCluster update. */\n interface Update extends UpdateStages.WithTags {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n HybridAksCluster apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n HybridAksCluster apply(Context context);\n }\n /** The HybridAksCluster update stages. */\n interface UpdateStages {\n /** The stage of the HybridAksCluster update allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: The Azure resource tags that will replace the existing ones..\n *\n * @param tags The Azure resource tags that will replace the existing ones.\n * @return the next definition stage.\n */\n Update withTags(Map<String, String> tags);\n }\n }\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @return the refreshed resource.\n */\n HybridAksCluster refresh();\n\n /**\n * Refreshes the resource to sync with Azure.\n *\n * @param context The context to associate with this operation.\n * @return the refreshed resource.\n */\n HybridAksCluster refresh(Context context);\n\n /**\n * Restart a targeted node.\n *\n * <p>Restart a targeted node of a Hybrid AKS cluster.\n *\n * @param hybridAksClusterRestartNodeParameters The request body.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restartNode(HybridAksClusterRestartNodeParameters hybridAksClusterRestartNodeParameters);\n\n /**\n * Restart a targeted node.\n *\n * <p>Restart a targeted node of a Hybrid AKS cluster.\n *\n * @param hybridAksClusterRestartNodeParameters The request body.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restartNode(HybridAksClusterRestartNodeParameters hybridAksClusterRestartNodeParameters, Context context);\n}", "interface DefinitionStages {\n /** The first stage of the Cluster definition. */\n interface Blank extends WithLocation {\n }\n /** The stage of the Cluster definition allowing to specify location. */\n interface WithLocation {\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(Region location);\n\n /**\n * Specifies the region for the resource.\n *\n * @param location The geo-location where the resource lives.\n * @return the next definition stage.\n */\n WithResourceGroup withRegion(String location);\n }\n /** The stage of the Cluster definition allowing to specify parent resource. */\n interface WithResourceGroup {\n /**\n * Specifies resourceGroupName.\n *\n * @param resourceGroupName The name of the resource group.\n * @return the next definition stage.\n */\n WithCreate withExistingResourceGroup(String resourceGroupName);\n }\n /**\n * The stage of the Cluster definition which contains all the minimum required properties for the resource to be\n * created, but also allows for any other optional properties to be specified.\n */\n interface WithCreate\n extends DefinitionStages.WithTags,\n DefinitionStages.WithAddOnFeatures,\n DefinitionStages.WithAzureActiveDirectory,\n DefinitionStages.WithCertificate,\n DefinitionStages.WithCertificateCommonNames,\n DefinitionStages.WithClientCertificateCommonNames,\n DefinitionStages.WithClientCertificateThumbprints,\n DefinitionStages.WithClusterCodeVersion,\n DefinitionStages.WithDiagnosticsStorageAccountConfig,\n DefinitionStages.WithEventStoreServiceEnabled,\n DefinitionStages.WithFabricSettings,\n DefinitionStages.WithManagementEndpoint,\n DefinitionStages.WithNodeTypes,\n DefinitionStages.WithReliabilityLevel,\n DefinitionStages.WithReverseProxyCertificate,\n DefinitionStages.WithReverseProxyCertificateCommonNames,\n DefinitionStages.WithUpgradeDescription,\n DefinitionStages.WithUpgradeMode,\n DefinitionStages.WithApplicationTypeVersionsCleanupPolicy,\n DefinitionStages.WithVmImage,\n DefinitionStages.WithSfZonalUpgradeMode,\n DefinitionStages.WithVmssZonalUpgradeMode,\n DefinitionStages.WithInfrastructureServiceManager,\n DefinitionStages.WithUpgradeWave,\n DefinitionStages.WithUpgradePauseStartTimestampUtc,\n DefinitionStages.WithUpgradePauseEndTimestampUtc,\n DefinitionStages.WithWaveUpgradePaused,\n DefinitionStages.WithNotifications {\n /**\n * Executes the create request.\n *\n * @return the created resource.\n */\n Cluster create();\n\n /**\n * Executes the create request.\n *\n * @param context The context to associate with this operation.\n * @return the created resource.\n */\n Cluster create(Context context);\n }\n /** The stage of the Cluster definition allowing to specify tags. */\n interface WithTags {\n /**\n * Specifies the tags property: Resource tags..\n *\n * @param tags Resource tags.\n * @return the next definition stage.\n */\n WithCreate withTags(Map<String, String> tags);\n }\n /** The stage of the Cluster definition allowing to specify addOnFeatures. */\n interface WithAddOnFeatures {\n /**\n * Specifies the addOnFeatures property: The list of add-on features to enable in the cluster..\n *\n * @param addOnFeatures The list of add-on features to enable in the cluster.\n * @return the next definition stage.\n */\n WithCreate withAddOnFeatures(List<AddOnFeatures> addOnFeatures);\n }\n /** The stage of the Cluster definition allowing to specify azureActiveDirectory. */\n interface WithAzureActiveDirectory {\n /**\n * Specifies the azureActiveDirectory property: The AAD authentication settings of the cluster..\n *\n * @param azureActiveDirectory The AAD authentication settings of the cluster.\n * @return the next definition stage.\n */\n WithCreate withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory);\n }\n /** The stage of the Cluster definition allowing to specify certificate. */\n interface WithCertificate {\n /**\n * Specifies the certificate property: The certificate to use for securing the cluster. The certificate\n * provided will be used for node to node security within the cluster, SSL certificate for cluster\n * management endpoint and default admin client..\n *\n * @param certificate The certificate to use for securing the cluster. The certificate provided will be used\n * for node to node security within the cluster, SSL certificate for cluster management endpoint and\n * default admin client.\n * @return the next definition stage.\n */\n WithCreate withCertificate(CertificateDescription certificate);\n }\n /** The stage of the Cluster definition allowing to specify certificateCommonNames. */\n interface WithCertificateCommonNames {\n /**\n * Specifies the certificateCommonNames property: Describes a list of server certificates referenced by\n * common name that are used to secure the cluster..\n *\n * @param certificateCommonNames Describes a list of server certificates referenced by common name that are\n * used to secure the cluster.\n * @return the next definition stage.\n */\n WithCreate withCertificateCommonNames(ServerCertificateCommonNames certificateCommonNames);\n }\n /** The stage of the Cluster definition allowing to specify clientCertificateCommonNames. */\n interface WithClientCertificateCommonNames {\n /**\n * Specifies the clientCertificateCommonNames property: The list of client certificates referenced by common\n * name that are allowed to manage the cluster..\n *\n * @param clientCertificateCommonNames The list of client certificates referenced by common name that are\n * allowed to manage the cluster.\n * @return the next definition stage.\n */\n WithCreate withClientCertificateCommonNames(List<ClientCertificateCommonName> clientCertificateCommonNames);\n }\n /** The stage of the Cluster definition allowing to specify clientCertificateThumbprints. */\n interface WithClientCertificateThumbprints {\n /**\n * Specifies the clientCertificateThumbprints property: The list of client certificates referenced by\n * thumbprint that are allowed to manage the cluster..\n *\n * @param clientCertificateThumbprints The list of client certificates referenced by thumbprint that are\n * allowed to manage the cluster.\n * @return the next definition stage.\n */\n WithCreate withClientCertificateThumbprints(List<ClientCertificateThumbprint> clientCertificateThumbprints);\n }\n /** The stage of the Cluster definition allowing to specify clusterCodeVersion. */\n interface WithClusterCodeVersion {\n /**\n * Specifies the clusterCodeVersion property: The Service Fabric runtime version of the cluster. This\n * property can only by set the user when **upgradeMode** is set to 'Manual'. To get list of available\n * Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list\n * of available version for existing clusters use **availableClusterVersions**..\n *\n * @param clusterCodeVersion The Service Fabric runtime version of the cluster. This property can only by\n * set the user when **upgradeMode** is set to 'Manual'. To get list of available Service Fabric\n * versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available\n * version for existing clusters use **availableClusterVersions**.\n * @return the next definition stage.\n */\n WithCreate withClusterCodeVersion(String clusterCodeVersion);\n }\n /** The stage of the Cluster definition allowing to specify diagnosticsStorageAccountConfig. */\n interface WithDiagnosticsStorageAccountConfig {\n /**\n * Specifies the diagnosticsStorageAccountConfig property: The storage account information for storing\n * Service Fabric diagnostic logs..\n *\n * @param diagnosticsStorageAccountConfig The storage account information for storing Service Fabric\n * diagnostic logs.\n * @return the next definition stage.\n */\n WithCreate withDiagnosticsStorageAccountConfig(\n DiagnosticsStorageAccountConfig diagnosticsStorageAccountConfig);\n }\n /** The stage of the Cluster definition allowing to specify eventStoreServiceEnabled. */\n interface WithEventStoreServiceEnabled {\n /**\n * Specifies the eventStoreServiceEnabled property: Indicates if the event store service is enabled..\n *\n * @param eventStoreServiceEnabled Indicates if the event store service is enabled.\n * @return the next definition stage.\n */\n WithCreate withEventStoreServiceEnabled(Boolean eventStoreServiceEnabled);\n }\n /** The stage of the Cluster definition allowing to specify fabricSettings. */\n interface WithFabricSettings {\n /**\n * Specifies the fabricSettings property: The list of custom fabric settings to configure the cluster..\n *\n * @param fabricSettings The list of custom fabric settings to configure the cluster.\n * @return the next definition stage.\n */\n WithCreate withFabricSettings(List<SettingsSectionDescription> fabricSettings);\n }\n /** The stage of the Cluster definition allowing to specify managementEndpoint. */\n interface WithManagementEndpoint {\n /**\n * Specifies the managementEndpoint property: The http management endpoint of the cluster..\n *\n * @param managementEndpoint The http management endpoint of the cluster.\n * @return the next definition stage.\n */\n WithCreate withManagementEndpoint(String managementEndpoint);\n }\n /** The stage of the Cluster definition allowing to specify nodeTypes. */\n interface WithNodeTypes {\n /**\n * Specifies the nodeTypes property: The list of node types in the cluster..\n *\n * @param nodeTypes The list of node types in the cluster.\n * @return the next definition stage.\n */\n WithCreate withNodeTypes(List<NodeTypeDescription> nodeTypes);\n }\n /** The stage of the Cluster definition allowing to specify reliabilityLevel. */\n interface WithReliabilityLevel {\n /**\n * Specifies the reliabilityLevel property: The reliability level sets the replica set size of system\n * services. Learn about\n * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).\n *\n * <p>- None - Run the System services with a target replica set count of 1. This should only be used for\n * test clusters. - Bronze - Run the System services with a target replica set count of 3. This should only\n * be used for test clusters. - Silver - Run the System services with a target replica set count of 5. -\n * Gold - Run the System services with a target replica set count of 7. - Platinum - Run the System services\n * with a target replica set count of 9. .\n *\n * @param reliabilityLevel The reliability level sets the replica set size of system services. Learn about\n * [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).\n * <p>- None - Run the System services with a target replica set count of 1. This should only be used\n * for test clusters. - Bronze - Run the System services with a target replica set count of 3. This\n * should only be used for test clusters. - Silver - Run the System services with a target replica set\n * count of 5. - Gold - Run the System services with a target replica set count of 7. - Platinum - Run\n * the System services with a target replica set count of 9.\n * @return the next definition stage.\n */\n WithCreate withReliabilityLevel(ReliabilityLevel reliabilityLevel);\n }\n /** The stage of the Cluster definition allowing to specify reverseProxyCertificate. */\n interface WithReverseProxyCertificate {\n /**\n * Specifies the reverseProxyCertificate property: The server certificate used by reverse proxy..\n *\n * @param reverseProxyCertificate The server certificate used by reverse proxy.\n * @return the next definition stage.\n */\n WithCreate withReverseProxyCertificate(CertificateDescription reverseProxyCertificate);\n }\n /** The stage of the Cluster definition allowing to specify reverseProxyCertificateCommonNames. */\n interface WithReverseProxyCertificateCommonNames {\n /**\n * Specifies the reverseProxyCertificateCommonNames property: Describes a list of server certificates\n * referenced by common name that are used to secure the cluster..\n *\n * @param reverseProxyCertificateCommonNames Describes a list of server certificates referenced by common\n * name that are used to secure the cluster.\n * @return the next definition stage.\n */\n WithCreate withReverseProxyCertificateCommonNames(\n ServerCertificateCommonNames reverseProxyCertificateCommonNames);\n }\n /** The stage of the Cluster definition allowing to specify upgradeDescription. */\n interface WithUpgradeDescription {\n /**\n * Specifies the upgradeDescription property: The policy to use when upgrading the cluster..\n *\n * @param upgradeDescription The policy to use when upgrading the cluster.\n * @return the next definition stage.\n */\n WithCreate withUpgradeDescription(ClusterUpgradePolicy upgradeDescription);\n }\n /** The stage of the Cluster definition allowing to specify upgradeMode. */\n interface WithUpgradeMode {\n /**\n * Specifies the upgradeMode property: The upgrade mode of the cluster when new Service Fabric runtime\n * version is available..\n *\n * @param upgradeMode The upgrade mode of the cluster when new Service Fabric runtime version is available.\n * @return the next definition stage.\n */\n WithCreate withUpgradeMode(UpgradeMode upgradeMode);\n }\n /** The stage of the Cluster definition allowing to specify applicationTypeVersionsCleanupPolicy. */\n interface WithApplicationTypeVersionsCleanupPolicy {\n /**\n * Specifies the applicationTypeVersionsCleanupPolicy property: The policy used to clean up unused\n * versions..\n *\n * @param applicationTypeVersionsCleanupPolicy The policy used to clean up unused versions.\n * @return the next definition stage.\n */\n WithCreate withApplicationTypeVersionsCleanupPolicy(\n ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy);\n }\n /** The stage of the Cluster definition allowing to specify vmImage. */\n interface WithVmImage {\n /**\n * Specifies the vmImage property: The VM image VMSS has been configured with. Generic names such as Windows\n * or Linux can be used..\n *\n * @param vmImage The VM image VMSS has been configured with. Generic names such as Windows or Linux can be\n * used.\n * @return the next definition stage.\n */\n WithCreate withVmImage(String vmImage);\n }\n /** The stage of the Cluster definition allowing to specify sfZonalUpgradeMode. */\n interface WithSfZonalUpgradeMode {\n /**\n * Specifies the sfZonalUpgradeMode property: This property controls the logical grouping of VMs in upgrade\n * domains (UDs). This property can't be modified if a node type with multiple Availability Zones is already\n * present in the cluster..\n *\n * @param sfZonalUpgradeMode This property controls the logical grouping of VMs in upgrade domains (UDs).\n * This property can't be modified if a node type with multiple Availability Zones is already present in\n * the cluster.\n * @return the next definition stage.\n */\n WithCreate withSfZonalUpgradeMode(SfZonalUpgradeMode sfZonalUpgradeMode);\n }\n /** The stage of the Cluster definition allowing to specify vmssZonalUpgradeMode. */\n interface WithVmssZonalUpgradeMode {\n /**\n * Specifies the vmssZonalUpgradeMode property: This property defines the upgrade mode for the virtual\n * machine scale set, it is mandatory if a node type with multiple Availability Zones is added..\n *\n * @param vmssZonalUpgradeMode This property defines the upgrade mode for the virtual machine scale set, it\n * is mandatory if a node type with multiple Availability Zones is added.\n * @return the next definition stage.\n */\n WithCreate withVmssZonalUpgradeMode(VmssZonalUpgradeMode vmssZonalUpgradeMode);\n }\n /** The stage of the Cluster definition allowing to specify infrastructureServiceManager. */\n interface WithInfrastructureServiceManager {\n /**\n * Specifies the infrastructureServiceManager property: Indicates if infrastructure service manager is\n * enabled..\n *\n * @param infrastructureServiceManager Indicates if infrastructure service manager is enabled.\n * @return the next definition stage.\n */\n WithCreate withInfrastructureServiceManager(Boolean infrastructureServiceManager);\n }\n /** The stage of the Cluster definition allowing to specify upgradeWave. */\n interface WithUpgradeWave {\n /**\n * Specifies the upgradeWave property: Indicates when new cluster runtime version upgrades will be applied\n * after they are released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'..\n *\n * @param upgradeWave Indicates when new cluster runtime version upgrades will be applied after they are\n * released. By default is Wave0. Only applies when **upgradeMode** is set to 'Automatic'.\n * @return the next definition stage.\n */\n WithCreate withUpgradeWave(ClusterUpgradeCadence upgradeWave);\n }\n /** The stage of the Cluster definition allowing to specify upgradePauseStartTimestampUtc. */\n interface WithUpgradePauseStartTimestampUtc {\n /**\n * Specifies the upgradePauseStartTimestampUtc property: Indicates the start date and time to pause\n * automatic runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..\n *\n * @param upgradePauseStartTimestampUtc Indicates the start date and time to pause automatic runtime version\n * upgrades on the cluster for an specific period of time on the cluster (UTC).\n * @return the next definition stage.\n */\n WithCreate withUpgradePauseStartTimestampUtc(OffsetDateTime upgradePauseStartTimestampUtc);\n }\n /** The stage of the Cluster definition allowing to specify upgradePauseEndTimestampUtc. */\n interface WithUpgradePauseEndTimestampUtc {\n /**\n * Specifies the upgradePauseEndTimestampUtc property: Indicates the end date and time to pause automatic\n * runtime version upgrades on the cluster for an specific period of time on the cluster (UTC)..\n *\n * @param upgradePauseEndTimestampUtc Indicates the end date and time to pause automatic runtime version\n * upgrades on the cluster for an specific period of time on the cluster (UTC).\n * @return the next definition stage.\n */\n WithCreate withUpgradePauseEndTimestampUtc(OffsetDateTime upgradePauseEndTimestampUtc);\n }\n /** The stage of the Cluster definition allowing to specify waveUpgradePaused. */\n interface WithWaveUpgradePaused {\n /**\n * Specifies the waveUpgradePaused property: Boolean to pause automatic runtime version upgrades to the\n * cluster..\n *\n * @param waveUpgradePaused Boolean to pause automatic runtime version upgrades to the cluster.\n * @return the next definition stage.\n */\n WithCreate withWaveUpgradePaused(Boolean waveUpgradePaused);\n }\n /** The stage of the Cluster definition allowing to specify notifications. */\n interface WithNotifications {\n /**\n * Specifies the notifications property: Indicates a list of notification channels for cluster events..\n *\n * @param notifications Indicates a list of notification channels for cluster events.\n * @return the next definition stage.\n */\n WithCreate withNotifications(List<Notification> notifications);\n }\n }", "public void createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateAzureClusterMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "ClusterState clusterState();", "public String getDBClusterArn() {\n return this.dBClusterArn;\n }", "public String aadAuthority() {\n return this.aadAuthority;\n }", "String hybridAksProvisionedClusterId();", "public String azureManagementEndpointAudience() {\n return this.azureManagementEndpointAudience;\n }", "public ClusterSettings() {\n def = false;\n urlLoadBalancing = true;\n implementationClass = JGROUPS_CLUSTER;\n }", "public com.google.longrunning.Operation createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateAzureClusterMethod(), getCallOptions(), request);\n }", "public ManagedClusterAadProfile aadProfile() {\n return this.aadProfile;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method sets the value of the database column regsat_regist.adr_lineb
public void setAdrLineb(String adrLineb) { this.adrLineb = adrLineb; }
[ "public void setAdrLinea(String adrLinea) {\n this.adrLinea = adrLinea;\n }", "public void setAdrLinec(String adrLinec) {\n this.adrLinec = adrLinec;\n }", "public String getAdrLineb() {\n return adrLineb;\n }", "public void setFrnAddressLine1(String frnAddressLine1) {\n \tthis.frnAddressLine1 = frnAddressLine1;\n }", "public void setFrnAddressLine2(String frnAddressLine2) {\n \tthis.frnAddressLine2 = frnAddressLine2;\n }", "void setCfgLinea(String cfgLinea);", "public void setAddressLine(String addressLine) {\n\t\tthis.addressLine = addressLine;\n\t}", "public void setAdr1(String adr1) {\n this.adr1 = adr1;\n }", "public abstract void setLinea_anterior(java.lang.String newLinea_anterior);", "public String getAdrLinea() {\n return adrLinea;\n }", "public String getAdrLinec() {\n return adrLinec;\n }", "public void setAdr2(String adr2) {\n this.adr2 = adr2;\n }", "public void setLINE_NBR(BigDecimal LINE_NBR) {\r\n this.LINE_NBR = LINE_NBR;\r\n }", "public void setADD_REF_LINE_NO(BigDecimal ADD_REF_LINE_NO) {\r\n this.ADD_REF_LINE_NO = ADD_REF_LINE_NO;\r\n }", "@Step(\"Enter Address Line 1 Name {addressLine}\")\n\tpublic void setAddressLine(String addressLine) {\n\t\tcompanyInfo.getInpAddressLine().sendKeys(addressLine);\n\t}", "void xsetCfgLinea(org.apache.xmlbeans.XmlString cfgLinea);", "public void setAddressline1(String addressline1) {\n this.addressline1 = addressline1;\n }", "private void mergeBankStatementLine(FIN_BankStatementLine bsline) {\n BigDecimal totalCredit = bsline.getCramount();\n BigDecimal totalDebit = bsline.getDramount();\n FIN_BankStatement bs = bsline.getBankStatement();\n OBCriteria<FIN_BankStatementLine> obc = OBDal.getInstance().createCriteria(\n FIN_BankStatementLine.class);\n obc.add(Restrictions.eq(FIN_BankStatementLine.PROPERTY_BANKSTATEMENT, bsline.getBankStatement()));\n obc.add(Restrictions.eq(FIN_BankStatementLine.PROPERTY_LINENO, bsline.getLineNo()));\n obc.add(Restrictions.ne(FIN_BankStatementLine.PROPERTY_ID, bsline.getId()));\n obc.add(Restrictions.isNull(FIN_BankStatementLine.PROPERTY_FINANCIALACCOUNTTRANSACTION));\n\n if (obc.list().size() > 0) {\n bs.setProcessed(false);\n OBDal.getInstance().save(bs);\n OBDal.getInstance().flush();\n\n for (FIN_BankStatementLine bsl : obc.list()) {\n totalCredit = totalCredit.add(bsl.getCramount());\n totalDebit = totalDebit.add(bsl.getDramount());\n for (FIN_ReconciliationLineTemp tempbsline : getRecTempLines(bsl)) {\n tempbsline.setBankStatementLine(bsline);\n OBDal.getInstance().save(tempbsline);\n }\n OBDal.getInstance().remove(bsl);\n }\n\n if (totalCredit.compareTo(BigDecimal.ZERO) != 0 && totalDebit.compareTo(BigDecimal.ZERO) != 0) {\n BigDecimal total = totalCredit.subtract(totalDebit);\n if (total.compareTo(BigDecimal.ZERO) == -1) {\n bsline.setCramount(BigDecimal.ZERO);\n bsline.setDramount(total.abs());\n } else {\n bsline.setCramount(total);\n bsline.setDramount(BigDecimal.ZERO);\n }\n } else {\n bsline.setCramount(totalCredit);\n bsline.setDramount(totalDebit);\n }\n\n OBDal.getInstance().save(bsline);\n OBDal.getInstance().flush();\n\n bs.setProcessed(true);\n OBDal.getInstance().save(bs);\n OBDal.getInstance().flush();\n }\n\n }", "public void setLineofBusiness(java.lang.String lineofBusiness) {\n this.lineofBusiness = lineofBusiness;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
updates our step size based on the current frequency
private void updateStepSize() { float currFreq = getRate(); if ( prevFreq != currFreq ) { stepSize = currFreq * oneOverSampleRate; prevFreq = currFreq; } }
[ "@Override\n\tprotected void sampleRateChanged()\n\t{\n\t\ttimeStepSize = 1/sampleRate();\n\t}", "public void setStepSize(double step) {\n dblMaxStep = step;\n }", "private synchronized void updateMaxFrequency(int steps) {\n\t\tthis.maxFrequency = 0.f;\n\n\t\tfor (int i = 0; i < steps; i++) {\n\t\t\tthis.maxFrequency = Math.max(this.maxFrequency, this.values[i]);\n\t\t}\n\t}", "double getStepSize();", "public void setTimeStep(double timeStep){\n\t\tfrequency = timeStep;\n\t}", "public void increaseFreq() { this.frequency++; }", "public void setStepTime(final int step_size)\n {\n // store the new value\n _myStepTime = step_size;\n \n // update the timer\n _myTimer.setDelay(step_size);\n \n // fire the new value\n fireNewStepSize(step_size);\n }", "Number getStepSize();", "protected float getStepSize(int width) {\n\t\treturn (float) width / this.points.length;\n\t}", "public void setStepLength(double step) {\n\t\tthis.stepLength = step;\n\t}", "@Override\r\n\tprotected void updateSize()\r\n\t{\r\n\t\tif(_height < _watching.size*LINE_HEIGHT + 17)\r\n\t\t\t_height = _watching.size*LINE_HEIGHT + 17;\r\n\r\n\t\tsuper.updateSize();\r\n\r\n\t\t//_values.x = _width/2 + 2;\r\n\r\n\t\tint i = 0;\r\n\t\tint l = _watching.size;\r\n\t\twhile(i < l)\r\n\t\t\t_watching.get(i++).updateWidth(_width/2,_width/2-10);\r\n\t}", "public double getInternalStepSize ();", "public void incrementFrequency() {\n\t\tfrequency++;\n\t}", "private void updateFrequencySeekPosition() {\n mFrequencyItem.setSeekPosition(Math.round(((float) (mFrequencyMilliseconds - FREQUENCY_MILLIS_MIN_VALUE) / (FREQUENCY_MILLIS_MAX_VALUE - FREQUENCY_MILLIS_MIN_VALUE)) * 100));\n }", "public void setStepTime(Duration step_size)\n {\n this.setStepTime((int) step_size.getValueIn(Duration.MILLISECONDS));\n }", "public void setFrequency(double frequency)\n {\n this.frequency = frequency;\n }", "private void updateTotalStepsValue(int count) {\n if (editor == null) {\n editor = Util.getUserPreferencesEditor();\n }\n int prevSteps = sharedPreferences.getInt(HPIApp.Prefs.SHARED_KEY_TOTAL_STEPS, 0);\n int newSteps = prevSteps + count;\n editor.putInt(HPIApp.Prefs.SHARED_KEY_TOTAL_STEPS, newSteps);\n editor.apply();\n }", "public final void setTimeStep(float _timeStep) {timeStep = _timeStep;}", "void setFrequency(long frequency);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method was generated by MyBatis Generator. This method returns the value of the database column t_mp_num.countyAgent
public Long getCountyagent() { return countyagent; }
[ "public void setCountyagent(Long countyagent) {\n this.countyagent = countyagent;\n }", "public Long getCityagent() {\n return cityagent;\n }", "public String getAddrcounty() {\n return addrcounty;\n }", "public String getCounty() {\n return _county;\n }", "public String getAgent_id_no() {\n return agent_id_no;\n }", "public CsvCell getCounty() {\n return super.getCell(\"ADDRESS_5\");\n }", "io.opencannabis.schema.geo.usa.California.CaliforniaCounty getCaliforniaCounty();", "public Number getAgentNoFk() {\r\n return (Number) getAttributeInternal(AGENTNOFK);\r\n }", "public void setCityagent(Long cityagent) {\n this.cityagent = cityagent;\n }", "public Integer getCountyid() {\n return countyid;\n }", "public String getCounty()\n {\n \treturn county;\n }", "public String findAgentNameByAgentId(String agentId);", "public java.lang.String getAgentId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(AGENTID$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getCountyCode() {\r\n return countyCode;\r\n }", "public java.lang.String getCounty() {\n return county;\n }", "public String getCounty() {\r\n return county;\r\n }", "public String getCounty() {\n return county;\n }", "public int getAgentType()\n {\n return mAgentType;\n }", "public String getCountyCode() {\n return countyCode;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates new form DataPresensiAdmin
public DataPresensiAdmin() { initComponents(); }
[ "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public new_admin() {\n initComponents();\n }", "public FormInserir() {\n initComponents();\n }", "public frmAdministracion() {\n initComponents();\n skin();\n DaoAdministracion da = new DaoAdministracion();\n da.setAdministracion(txtMedioAdministracion.getText());\n tblAdministracion.setModel(da.listar());\n\n }", "public void addNewAdmin(){\n switchToAdminRegisterView();\n }", "private void azzeraInsertForm() {\n\t\tviewInserimento.getCmbbxTipologia().setSelectedIndex(-1);\n\t\tviewInserimento.getTxtFieldDataI().setText(\"\");\n\t\tviewInserimento.getTxtFieldValore().setText(\"\");\n\t\tviewInserimento.getTxtFieldDataI().setBackground(Color.white);\n\t\tviewInserimento.getTxtFieldValore().setBackground(Color.white);\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public FrmNuevoProducto() {\n initComponents();\n llenaCategorias();\n }", "public FormAdminEscuelas() {\n initComponents();\n }", "public adminAddData() {\n initComponents();\n conn=connection.ConnecrDb();\n }", "public Administrasi()\n {\n // initialise instance variables\n \n }", "public Administradores() {\n initComponents();\n Llenatabla();\n }", "public FrmInsertar() {\n initComponents();\n }", "public AgregarAlumnoAdmin() {\n initComponents();\n }", "public CrearPedidos() {\n initComponents();\n }", "public void crearCuentaAdmin() {\n if (todos().isEmpty()) {\n PersonaServicio persona = new PersonaServicio();\n persona.getPersona().setNombre(\"Franz Flores\");\n persona.getPersona().setCedula(\"1104015928\");\n persona.getPersona().setTelefono(\"2572310\");\n persona.getPersona().setDireccion(\"Andrés Bello y Juan Jose Peña\");\n persona.getPersona().setRol(new RolServicio().buscarRolNombre(\"Administrador\"));\n\n Cuenta c = new Cuenta();\n c.setUsuario(\"franz\");\n c.setClave(\"franz\");\n c.setCreacion(new Date());\n c.setPersona(persona.getPersona());\n persona.getPersona().setCuenta(c);\n persona.guardar();\n }\n }", "public FormProduto() {\n initComponents();\n }", "public formPenjualan() {\n initComponents();\n judul();\n tampilData(\"\");\n }", "public RegistroAdmin() {\n initComponents();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__JvmFormalParameter__Group__0__Impl" $ANTLR start "rule__JvmFormalParameter__Group__1" ../com.avaloq.tools.dslsdk.check.ui/srcgen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13987:1: rule__JvmFormalParameter__Group__1 : rule__JvmFormalParameter__Group__1__Impl ;
public final void rule__JvmFormalParameter__Group__1() throws RecognitionException { int stackSize = keepStackSize(); try { // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13991:1: ( rule__JvmFormalParameter__Group__1__Impl ) // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13992:2: rule__JvmFormalParameter__Group__1__Impl { pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__128261); rule__JvmFormalParameter__Group__1__Impl(); state._fsp--; if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11015:1: ( rule__JvmFormalParameter__Group__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11016:2: rule__JvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__122335);\n rule__JvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12621:1: ( rule__JvmFormalParameter__Group__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12622:2: rule__JvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__125589);\n rule__JvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23677:1: ( rule__JvmFormalParameter__Group__1__Impl )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23678:2: rule__JvmFormalParameter__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__147653);\r\n rule__JvmFormalParameter__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11724:1: ( rule__JvmFormalParameter__Group__1__Impl )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11725:2: rule__JvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__123776);\n rule__JvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:12762:1: ( rule__JvmFormalParameter__Group__1__Impl )\r\n // InternalDroneScript.g:12763:2: rule__JvmFormalParameter__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__JvmFormalParameter__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8770:1: ( rule__JvmFormalParameter__Group__1__Impl )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:8771:2: rule__JvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__117707);\n rule__JvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12592:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12593:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__025528);\n rule__JvmFormalParameter__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__025531);\n rule__JvmFormalParameter__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13962:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:13963:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__028200);\r\n rule__JvmFormalParameter__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__028203);\r\n rule__JvmFormalParameter__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__1() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12999:1: ( rule__JvmFormalParameter__Group__1__Impl )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:13000:2: rule__JvmFormalParameter__Group__1__Impl\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1__Impl_in_rule__JvmFormalParameter__Group__126416);\r\n rule__JvmFormalParameter__Group__1__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11695:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\n // ../org.xtext.mongobeans.ui/src-gen/org/xtext/mongobeans/ui/contentassist/antlr/internal/InternalMongoBeans.g:11696:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__023715);\n rule__JvmFormalParameter__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__023718);\n rule__JvmFormalParameter__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:12735:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\r\n // InternalDroneScript.g:12736:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\r\n {\r\n pushFollow(FOLLOW_42);\r\n rule__JvmFormalParameter__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_2);\r\n rule__JvmFormalParameter__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:10986:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:10987:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__022274);\n rule__JvmFormalParameter__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__022277);\n rule__JvmFormalParameter__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23648:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:23649:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__047592);\r\n rule__JvmFormalParameter__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__047595);\r\n rule__JvmFormalParameter__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__JvmFormalParameter__Group__0() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12970:1: ( rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:12971:2: rule__JvmFormalParameter__Group__0__Impl rule__JvmFormalParameter__Group__1\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0__Impl_in_rule__JvmFormalParameter__Group__026355);\r\n rule__JvmFormalParameter__Group__0__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__1_in_rule__JvmFormalParameter__Group__026358);\r\n rule__JvmFormalParameter__Group__1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleJvmFormalParameter() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1626:2: ( ( ( rule__JvmFormalParameter__Group__0 ) ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1627:1: ( ( rule__JvmFormalParameter__Group__0 ) )\r\n {\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1627:1: ( ( rule__JvmFormalParameter__Group__0 ) )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1628:1: ( rule__JvmFormalParameter__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmFormalParameterAccess().getGroup()); \r\n }\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1629:1: ( rule__JvmFormalParameter__Group__0 )\r\n // ../com.avaloq.tools.dslsdk.check.ui/src-gen/com/avaloq/tools/dslsdk/check/ui/contentassist/antlr/internal/InternalCheck.g:1629:2: rule__JvmFormalParameter__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0_in_ruleJvmFormalParameter3411);\r\n rule__JvmFormalParameter__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmFormalParameterAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleJvmFormalParameter() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1480:2: ( ( ( rule__JvmFormalParameter__Group__0 ) ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1481:1: ( ( rule__JvmFormalParameter__Group__0 ) )\n {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1481:1: ( ( rule__JvmFormalParameter__Group__0 ) )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1482:1: ( rule__JvmFormalParameter__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getJvmFormalParameterAccess().getGroup()); \n }\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1483:1: ( rule__JvmFormalParameter__Group__0 )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:1483:2: rule__JvmFormalParameter__Group__0\n {\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0_in_ruleJvmFormalParameter3105);\n rule__JvmFormalParameter__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getJvmFormalParameterAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FullJvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12682:1: ( rule__FullJvmFormalParameter__Group__1__Impl )\n // ../org.xtext.guicemodules.ui/src-gen/org/xtext/guicemodules/ui/contentassist/antlr/internal/InternalGuiceModules.g:12683:2: rule__FullJvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__FullJvmFormalParameter__Group__1__Impl_in_rule__FullJvmFormalParameter__Group__125710);\n rule__FullJvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__FullJvmFormalParameter__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11076:1: ( rule__FullJvmFormalParameter__Group__1__Impl )\n // ../org.xtext.example.helloxcore.ui/src-gen/org/xtext/example/helloxcore/ui/contentassist/antlr/internal/InternalHelloXcore.g:11077:2: rule__FullJvmFormalParameter__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__FullJvmFormalParameter__Group__1__Impl_in_rule__FullJvmFormalParameter__Group__122456);\n rule__FullJvmFormalParameter__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleJvmFormalParameter() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2910:2: ( ( ( rule__JvmFormalParameter__Group__0 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2911:1: ( ( rule__JvmFormalParameter__Group__0 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2911:1: ( ( rule__JvmFormalParameter__Group__0 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2912:1: ( rule__JvmFormalParameter__Group__0 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getJvmFormalParameterAccess().getGroup()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2913:1: ( rule__JvmFormalParameter__Group__0 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:2913:2: rule__JvmFormalParameter__Group__0\r\n {\r\n pushFollow(FOLLOW_rule__JvmFormalParameter__Group__0_in_ruleJvmFormalParameter6168);\r\n rule__JvmFormalParameter__Group__0();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getJvmFormalParameterAccess().getGroup()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO Autogenerated method stub ch.pipeline().addLast("tcpOutHandler", new TcpOutBoundHandler()); ch.pipeline().addLast("tcpEncoder", new MessageEncoder());
@Override protected void initChannel(SocketChannel ch) throws Exception { ch.pipeline().addLast("tcpDecoder", new MessageDecoder()); ch.pipeline().addLast("tcpHandler", new TcpServerHandler(ac)); }
[ "public TcpOutgoing(EventQueue eventQueue, AsyncPipe<Object> pipe, int mss, int winSize, long seqNum) {\n\t\tthis(eventQueue, pipe, mss, winSize, seqNum, null);\n\t}", "@Override\n\tprotected void initChannel(SocketChannel ch) throws Exception {\n\t\tch.pipeline().addLast(\"tcpDecoder\", new MessageDecoder());\n\t\tch.pipeline().addLast(\"tcpHandler\", new TcpServerHandler(ac)); \n\t\t\n\t}", "public TcpOutgoing(EventQueue eventQueue, AsyncPipe<Object> pipe, int mss, int winSize, long seqNum, Queue<ByteChunker> sendQ) {\n\t\tthis.eventQueue = eventQueue;\n\t\tthis.pipe = pipe;\n\t\tthis.mss = mss;\n\t\tthis.winSize = winSize;\n\t\tthis.seqNum = (int)seqNum;\n\t\tthis.sendQ = (sendQ == null) ? new ConcurrentLinkedQueue<ByteChunker>() : sendQ;\n\t}", "@Override\r\n protected void initChannel(Channel ch) throws Exception {\n ch.pipeline().addLast(defaultEventExecutorGroup, new ServerHandler(),new Decoder());\r\n }", "@Override\n protected void initChannel(DatagramChannel ch) throws Exception {\n ch.pipeline()\n .addLast(new LoggingHandler())\n// .addLast(new TimestampSecondsCommandEncoder(commandByteBuf, groupAddress));\n .addLast(new BinaryFileCommandEncoder2(commandByteBuf, groupAddress));\n }", "public Queue<ProtocolMessage> getOutputQueue()\n {\n return m_outbound;\n }", "@Override\n protected void initChannel(Channel ch) throws Exception {\n log.info(\"Initialize handler pipeline for: {}\", ch);\n ch.pipeline().addLast(\"lineBaseSplit\", new LineBasedFrameDecoder(Integer.MAX_VALUE));\n ch.pipeline().addLast(new StringDecoder());\n ch.pipeline().addLast(\"echo\", new EchoHandler2());\n }", "private final void writeMessage(Message out) throws IOException{\n\n mOutStream.writeObject(out);\n }", "public void writeMessages () {\n try {\n ByteBuffer frame;\n while ((frame = _outq.peek()) != null) {\n // if we've been closed, stop trying to write\n if (!_chan.isOpen()) return;\n _chan.write(frame);\n if (frame.remaining() > 0) {\n // partial write, requeue ourselves and finish the job later\n _cmgr.requeueWriter(this);\n return;\n }\n _outq.poll(); // remove fully written frame\n }\n\n } catch (NotYetConnectedException nyce) {\n // this means that our async connection is not quite complete, just requeue ourselves\n // and try again later\n _cmgr.requeueWriter(this);\n\n } catch (IOException ioe) {\n // because we may still be lingering in the connection manager's writable queue, clear\n // out our outgoing queue so that any final calls to writeMessages NOOP\n _outq.clear();\n // now let the usual suspects know that we failed\n _input.onSendError(ioe);\n onClose(ioe);\n }\n }", "private void handleOutgoingMessages() { // Sender thread\r\n\t\tThread senderThread = new Thread(new Runnable(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\t\twhile (!finished){\r\n\t\t\t\t\t\tout.println(getClientInput(null));\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tsenderThread.start();\r\n\t}", "@Override\n protected void initChannel(SocketChannel socketChannel) throws Exception {\n\n socketChannel.pipeline().addLast(\"frameDecoder\", new DelimiterBasedFrameDecoder(40, false, Delimiters.lineDelimiter()));\n socketChannel.pipeline().addLast(\"stringDecoder\", new StringDecoder(Charset.forName(\"utf-8\")));\n socketChannel.pipeline().addLast(\"bizHandler\", new MessageHandler3());\n }", "public void outboundConnected() {\n _conKey.interestOps(SelectionKey.OP_READ);\n // schedule up the beginning of our handshaking by calling prepareNextWrite on the\n // writer thread pool\n _transport.getWriter().wantsWrite(this, \"outbound connected\");\n }", "private void sendTcpMessage(String msg) throws Exception{\n DataOutputStream outputStream = new DataOutputStream(tcpOutSocket.getOutputStream());\n outputStream.writeBytes(msg + \"\\n\");\n logger.info(\"Sent message: \" + msg + \" to \" + tcpOutSocket.getInetAddress());\n }", "protected abstract void onTCPMessageReceived(String msg);", "@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception{\n GameProtocol g = (GameProtocol) msg;\n logger.log(\"In Protocol Process Handler, message is: \" + g.toString(), \"Server\");\n // 2. Process message\n ProtocolProcessor processor = ProtocolProcessor.getProcessorInstance();\n processor.process(g);\n logger.log(\"Successfully stored in buffer\",\"Server\");\n }", "@Override\n public void emit() {\n routeToProperty(Message.Property.ENCODER);\n }", "OutputPort getOutPort();", "@Override\n public void encode(ChannelHandlerContext ctx, Packet in, ByteBuf out) throws Exception {\n out.writeInt(in.getId()); // Write packet id\n in.write(out); // Encode the packet.\n }", "public void makeOutputConnection(Connection connector){\n\toutputconnections.add(connector);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove a collection of TvShowViewModel to the collection.
@Override public void removeAll(Collection<TvShowViewModel> tvShowViewModels) { tvShowViewModels.removeAll(tvShowViewModels); }
[ "@Override\n public void remove(TvShowViewModel tvShowViewModel) {\n tvShows.remove(tvShowViewModel);\n }", "private void removeShow() {\n\t\tCinema cinemaToRemoveFrom = ConsoleBoundary.printRemoveShow();\n\t\tif(cinemaToRemoveFrom == null)\n\t\t\treturn;\n\t\tShow showToRemove = ConsoleBoundary.printShowList(cinemaToRemoveFrom);\n\t\tif(showToRemove == null)\n\t\t\treturn;\n\t\tcinemaToRemoveFrom.removeShow(showToRemove);\n\t}", "@FXML\n public void removeGuest() {\n if (removeGuestNum.getText() == null) return;\n Guest g = null;\n try {\n int guestNumber = Integer.parseInt(removeGuestNum.getText());\n g = Guest.getGuestFromID(\"\" + guestNumber);\n } catch (Exception ignored) {\n }\n if (g == null) return;\n removeGuestNum.clear();\n guests.remove(g);\n g.remove();\n if (selectedGuest == g) {\n selectedGuest = null;\n }\n updateGuest();\n guestSelect.setItems(guests);\n\n }", "void removeFacts(Collection facts);", "public void removeSelected() {\n \n Iterator<Actor> iterator;\n\n iterator = actors.iterator();\n \n while (iterator.hasNext()) {\n if (iterator.next().getId().equals(getData().getRowData().getId())) {\n iterator.remove();\n break;\n }\n }\n\n this.data = new ListDataModel<Actor>(actors);\n this.recordCount = actors.size();\n }", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (TvShow tvShow : findAll()) {\n\t\t\tremove(tvShow);\n\t\t}\n\t}", "public void clear() {\r\n\t\tshowList.clear();\r\n\t\tcurrentSlideNumber = -1;\r\n\t\tsetTitle(\"\");\r\n\t\tthis.notifyObservers(null);\r\n\t}", "public void clearShowroom() {\n\n realm.beginTransaction();\n realm.delete(ShowroomRealm.class);\n\n realm.commitTransaction();\n }", "public void clear() {\n collection.clear();\n }", "DatumResponse<CollectionData> removeStoryFromCollection(int collectionId, int storyId);", "private void removeAlbumFromCollection() {\n //\n }", "@FXML\n public void onRemoveFromList(ActionEvent event) {\n removeSelectedItemsFromMultiplesList();\n updateButtons();\n }", "public void removeMovie(Movie movie) { this.movies.remove(movie); }", "public void unsetCustShow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(CUSTSHOW$10, 0);\n }\n }", "private void removeShorts(List<Show> filteredShows, Map<Integer, CommonItem> shortsMap) {\n \t\n \tIterator iter = filteredShows.iterator();\n \n // Remove all ShortFilms from the list of Shows.\n while( iter.hasNext() ) {\n \t\n \tShow show = (Show)iter.next();\n \t\n \tif(shortsMap.containsKey(Integer.parseInt(show.id))) {\n \t\titer.remove();\n \t}\n } \t\n }", "public void clearFilmPanel(){\n\t\tfilmContents.removeAll();\n\t}", "public void drop() {\n if (collection != null) {\n collection.drop();\n }\n }", "public void removeAll(FeatureCollection featColl){\n if (debug) logger.info(\"collection removed\");\n fc.removeAll(featColl);\n fcLastEdits.clear();\n fcLastEdits.addAll(featColl);\n lastEditType = EDIT_REMOVE;\n fireTableDataChanged();\n }", "private void deleteSelectedVehicles() {\n // prevent calling refresh() for each record\n facade.removeObserver(this);\n\n for (var vehicle : vehiclesPane.getSelected()) {\n try {\n facade.deleteVehicle(vehicle.getID());\n } catch (Exception ex) {\n new Alert(Alert.AlertType.ERROR, ex.getMessage()).showAndWait();\n break;\n }\n }\n\n facade.addObserver(this);\n\n refresh();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Instantiates a state that will handle all decryption for NTLM.
public DecryptingState(NTLMCrypt crypt) { this.crypt = crypt; }
[ "public abstract void setDecryptMode();", "public void initCryptAsym() {\n if (this.client.getCryptAsymArt().equals(\"RSA\")) {\n this.setCryptAsym(new CryptRSA());\n } else {\n this.setCryptAsym(new CryptRSA());\n }\n }", "BlobCrypter getStateCrypter();", "private TLSContext() {\n }", "public EncryptedContent()\n {}", "public abstract void setEncryptMode();", "public void initCryptSym() {\n if (this.client.getCryptSymArt().equals(\"AES\")) {\n this.setCryptSym(new CryptAES());\n } else {\n this.setCryptSym(new CryptAES());\n }\n }", "public CryptCipher() {\n\t}", "private CryptSetup() {\n initFields();\n }", "public PDEncryptionDictionary()\n {\n encryptionDictionary = new COSDictionary();\n }", "private CryptUtility() {\r\n }", "public LoginDecoder() {\n\t\tsuper(false);\n\t\tcheckpoint(LoginState.HANDSHAKE);\n\t}", "public void unDecrypt() {\n\t\tmMainPasswordDecrypted = null;\n\t}", "public LedState() {\t}", "public BackendTlsProperties() {\n }", "public PasswordTokenHandler() {\r\n\t\tresetCodeToUsername = new HashMap<String, String>();\r\n\t\tresetCodeToTimeCreated = new HashMap<String, Long>();\r\n\t}", "public abstract void init(Key theKey, byte theMode) throws CryptoException;", "public PrivateLinkServiceConnectionState() {\n }", "public TLRequestMessagesRequestEncryption() {\n super();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
gets the last index of the entity set if it exists otherrwise returns INVALID_ENTITY_INDEX. e.g. [0,1,2,3] > gets 3
public final <T extends Component> int getLastSetIndex(Class<T> setType) { ArrayList<Integer> tmp = getComponentPackedVector(setType).get_packed_indicies(); if (tmp.size() == 0) return INVALID_ENTITY_INDEX; else return tmp.get(tmp.size() - 1); }
[ "long maybeLastIndex() {\n int entryNum = entries.size();\n while (entryNum != 0) {\n try {\n return entries.get(entryNum - 1).getCurrLogIndex();\n } catch (IndexOutOfBoundsException e) {\n // the exception is thrown when there is a concurrent deletion, which is rare, so a retry\n // is usually enough and it is not likely that we will get stuck here\n entryNum = entries.size();\n }\n }\n return -1;\n }", "public int getIndex()\n {\n\treturn lastIdx;\n }", "public int getLastIndex(EIDVal.Type t) {\n int i;\n boolean found = false;\n \n for (i = equips.size() - 1; i > 0; i--) {\n if (equips.get(i).EID.etype == t) {\n found = true;\n break;\n }\n }\n \n if (!found)\n i = -1;\n \n return i;\n }", "public Integer getLastIndex()\n {\n if (!hasItems())\n {\n return null;\n }\n return Integer.valueOf(Math.min(getTotal() - 1, index + itemsPerPage - 1));\n }", "private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}", "int getEndIndex();", "protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }", "private int getLastItemEntryIndex() {\n int sortedCount = this.sortedCount.get();\n int entryIndex = sortedCount == 0 ? HEAD_NODE : (sortedCount - 1) * (FIELDS) + 1;\n int nextEntryIndex = getEntryFieldInt(entryIndex, OFFSET.NEXT);\n while (nextEntryIndex != Chunk.NONE) {\n entryIndex = nextEntryIndex;\n nextEntryIndex = getEntryFieldInt(entryIndex, OFFSET.NEXT);\n }\n return entryIndex;\n }", "@Transactional(readOnly = true)\n IndexData findLastIndexData();", "long getIndex();", "int getIndexOfInternalTransaction();", "public final <T extends Component> int\n\tgetInitialSetIndex(Class<T> setType)\n\t{\n\t\tArrayList<Integer> tmp =\n\t\t\tgetComponentPackedVector(setType).get_packed_indicies();\n\t\tif (tmp.size() == 0)\n\t\t\treturn INVALID_ENTITY_INDEX;\n\t\telse\n\t\t\treturn tmp.get(0);\n\t}", "public int lastGetIndex()\n {\n\treturn lastGetIndex;\n }", "private int last()\n {\n return list.getLast();\t\t\t\t\t\t//returns last vertex\n }", "int index()\n {\n\t if(cursor == null)\n\t {\n\t\t return -1;\n\t }\n\t return index;\n }", "public int last() {\n\t\tif (count == 0)\n\t\t\treturn -1;\n\t\treturn list[count - 1];\n\t}", "public int findEmptyIndex(){\n\t for( int i = 0; i < entries.length; i++){\n\t\t\tcache_entry current = entries[i];\n\t\t\tif( !current.isValid() ){\n\t\t\t return i;\n\t\t\t}\n\t }\n\t return -1;\n\t}", "public int lastIndexOf(int element);", "public int lastIndexOf(Object elem, int index);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the localized error mandatory message of this form item in the language. Uses the default language if no localization exists for the requested language.
@Override public java.lang.String getErrorMandatoryMessage(java.util.Locale locale) { return _formItem.getErrorMandatoryMessage(locale); }
[ "@Override\n\tpublic java.lang.String getErrorMandatoryMessage(\n\t\tjava.lang.String languageId) {\n\t\treturn _formItem.getErrorMandatoryMessage(languageId);\n\t}", "@Override\n\tpublic java.lang.String getErrorMandatoryMessage(\n\t\tjava.lang.String languageId, boolean useDefault) {\n\t\treturn _formItem.getErrorMandatoryMessage(languageId, useDefault);\n\t}", "@Override\n\tpublic java.lang.String getErrorMandatoryMessage(java.util.Locale locale,\n\t\tboolean useDefault) {\n\t\treturn _formItem.getErrorMandatoryMessage(locale, useDefault);\n\t}", "@Override\n\tpublic java.lang.String getErrorValidationMessage(\n\t\tjava.lang.String languageId) {\n\t\treturn _formItem.getErrorValidationMessage(languageId);\n\t}", "@Override\n\tpublic java.lang.String getErrorMandatoryMessage() {\n\t\treturn _formItem.getErrorMandatoryMessage();\n\t}", "@Override\n\tpublic java.lang.String getErrorValidationMessage(java.util.Locale locale) {\n\t\treturn _formItem.getErrorValidationMessage(locale);\n\t}", "@Override\n\tpublic java.lang.String getErrorValidationMessage(\n\t\tjava.lang.String languageId, boolean useDefault) {\n\t\treturn _formItem.getErrorValidationMessage(languageId, useDefault);\n\t}", "@Override\n\tpublic java.lang.String getErrorValidationMessage(java.util.Locale locale,\n\t\tboolean useDefault) {\n\t\treturn _formItem.getErrorValidationMessage(locale, useDefault);\n\t}", "@Override\n\tpublic java.lang.String getHintMessage(java.lang.String languageId) {\n\t\treturn _formItem.getHintMessage(languageId);\n\t}", "@Override\n\tpublic java.lang.String getErrorValidationMessage() {\n\t\treturn _formItem.getErrorValidationMessage();\n\t}", "@Override\n\tpublic java.util.Map<java.util.Locale, java.lang.String> getErrorMandatoryMessageMap() {\n\t\treturn _formItem.getErrorMandatoryMessageMap();\n\t}", "public String getErrorMessage() {\n String errMsg = \"\";\n switch (Locale.getDefault().getLanguage()) {\n case \"fr\":\n errMsg = \"Problème avec le chargement de la vue \" + viewName + \" !\";\n break;\n case \"de\":\n errMsg = \"Problem mit der Ansicht \" + viewName + \" Lade !\";\n break;\n case \"it\":\n errMsg = \"Problemi con la vista di carico \" + viewName + \" !\";\n break;\n default :\n errMsg = \"Problem when loading the view \" + viewName + \" !\";\n }\n return errMsg + \"\\n\" + exMessage;\n }", "@Override\n\tpublic java.lang.String getHintMessage(java.util.Locale locale) {\n\t\treturn _formItem.getHintMessage(locale);\n\t}", "@Override\n\tpublic java.lang.String getHintMessage(java.lang.String languageId,\n\t\tboolean useDefault) {\n\t\treturn _formItem.getHintMessage(languageId, useDefault);\n\t}", "public String getLocalized(String key) {\n String local = key == null ? null : language.getProperty(key);\n return local == null ? key : local;\n }", "@AutoEscape\n\tpublic String getMessage(String languageId, boolean useDefault);", "@Override\n\tpublic void setErrorMandatoryMessage(\n\t\tjava.lang.String errorMandatoryMessage, java.util.Locale locale) {\n\t\t_formItem.setErrorMandatoryMessage(errorMandatoryMessage, locale);\n\t}", "@AutoEscape\n\tpublic String getMessage(Locale locale, boolean useDefault);", "@Override\n\tpublic java.lang.String getErrorLengthMessage(java.lang.String languageId) {\n\t\treturn _formItem.getErrorLengthMessage(languageId);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns names (as one string) of modes in which this manager is working (for instance "Client BootstrapServer").
private String getModesNamesAsOneString() { String[] names = getModesNames(); StringBuilder builder = new StringBuilder(); for (int i = 0; i < names.length; i++) { builder.append(names[i] + " "); } return builder.toString(); }
[ "String getModes();", "public String[] getModeNames(){\n return modeNames;\n }", "public abstract List<MODE> getModes();", "Set<String> getRunModes();", "public Map<String, ArrayList<Integer>> modes() {\n return this.modes;\n }", "public static synchronized String[] getModeNames() {\n\n\tString names[] = new String[registryModes.size()];\n\n\tint i = 0;\n\n for (Enumeration e = registryModes.keys(); e.hasMoreElements();) {\n CaselessStringKey key = (CaselessStringKey)e.nextElement();\n\n\t names[i++] = key.getName();\n\t}\n\n\tif (i <= 0)\n\t return null;\n\n\treturn names;\n }", "public String[] getModes() throws EV3LibraryException{\n\t\tString modesstr;\n\t\ttry {\n\t\t\tmodesstr = Sysfs.getAttribute(CLASS_NAME, \"port\" + port, \"modes\");\n\t\t} catch (IOException e) {\n\t\t\tthrow new EV3LibraryException(\"Get modes attribute failed\", e);\n\t\t}\n\t\treturn Sysfs.separateSpace(modesstr);\n\t}", "public String getMode() {\n\t\tif (elevatorPiston.get()) {\n\t\t\tmode = \"Elevator\";\n\t\t\treturn mode;\n\t\t}\n\t\tmode = \"Lifter\";\n\t\treturn mode;\n\t}", "public String getModeName(int mode){\n return modeNames[mode];\n }", "public String getTransitionModesString() {\r\n\t\tString s = \"\";\r\n\t\tfor (TransitionMode mode : transitionModes) {\r\n\t\t\ts = s.concat(mode.getName() + \"; \");\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "void retrieveListModes();", "public static String getDebugModes() {\n String ret = \"\";\n for (DebugMode mode : DebugMode.values()) {\n if (isInDebugMode(mode)) ret += \",\" + mode.toString();\n }\n return (ret.length() > 0) ? ret.substring(1, ret.length())\n : ret;\n }", "public String[] getModeSelectCmd() {\n\t\tString path = sv.getCommonFunction(\"modeSelect\");\t\t//Get mode selections script path\r\n\t\tif(path == null || mode == null || comPort == null) {\r\n\t\t\tconsole.logError(\"Error creating mode selection command.\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\tString baseArray[] = {\r\n\t\t\t\t\"python\",\r\n\t\t\t\tpath,\r\n\t\t\t\t\"-p\",\r\n\t\t\t\tcomPort,\r\n\t\t\t\t\"-m\",\r\n\t\t\t\tmode\r\n\t\t};\r\n\t\t\r\n\t\tswitch (mode) {\t\t//Execute commands required by mode\r\n\t\tcase \"i2c\":\r\n\t\t\tvalidateParams(2);\r\n\t\t\tString paramArray[] = getParams(2);\r\n\t\t\tString modeArray[] = combine(baseArray, paramArray);\r\n\t\t\treturn modeArray;\r\n\t\tdefault:\r\n\t\t\tconsole.logError(\"No parameters defined for mode:\" + mode);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public int getNumModes(){\n return numModes;\n }", "@Override\n public void requestListModes() {\n final IRCChannelClientInfo me = getChannelClient(parser.getLocalClient());\n\n if (me == null) {\n // In a normal situation of non bouncer-brokenness this won't happen\n return;\n }\n\n askedForListModes = true;\n\n final ServerType serverType = parser.getServerType();\n\n final boolean isOpped = me.isOpped();\n\n int modecount = 1;\n\n if (!ServerTypeGroup.SINGLE_LISTMODE.isMember(serverType) && parser.h005Info.containsKey(\"MODES\")) {\n try {\n modecount = Integer.parseInt(parser.h005Info.get(\"MODES\"));\n } catch (NumberFormatException e) {\n modecount = 1;\n }\n }\n\n // Support for potential future decent mode listing in the protocol\n //\n // See my proposal: http://shane.dmdirc.com/listmodes.php\n // Add listmode handler\n final boolean supportLISTMODE = parser.h005Info.containsKey(\"LISTMODE\");\n\n String listmodes = \"\";\n int i = 0;\n for (Character cTemp : parser.chanModesOther.keySet()) {\n final int nTemp = parser.chanModesOther.get(cTemp);\n if (nTemp == IRCParser.MODE_LIST) {\n if (!isOpped && serverType.isOpOnly(cTemp)) {\n // IRCD doesn't allow non-ops to ask for these modes.\n continue;\n } else if (serverType == ServerType.STARCHAT && cTemp == 'H') {\n // IRCD Denies the mode exists\n continue;\n }\n i++;\n listmodes = listmodes + cTemp;\n if (i >= modecount && !supportLISTMODE) {\n parser.sendString(\"MODE \" + getName() + \" \" + listmodes, QueuePriority.LOW);\n i = 0;\n listmodes = \"\";\n }\n }\n }\n if (i > 0) {\n if (supportLISTMODE) {\n parser.sendString(\"LISTMODE \" + getName() + \" \" + listmodes, QueuePriority.LOW);\n } else {\n parser.sendString(\"MODE \" + getName() + \" \" + listmodes, QueuePriority.LOW);\n }\n }\n }", "String getOperatingModeName();", "String getACModeName();", "public com.google.protobuf.ByteString getModeBytes() {\n java.lang.Object ref = mode_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n mode_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getMiscModesString();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether tile walkable. imgTileEnum = Value to associate. imgFile = Filename (just name and extension, no path). imgKey = Key associated with image used with asset manager hash map. walkable = Whether tile walkable.
private ImgTileEnum(int imgTileEnum, String imgFile, String imgKey, boolean walkable) { // The constructor sets the values for each enumeration. this.imgTileEnum = imgTileEnum; this.imgFile = imgFile; this.imgKey = imgKey; this.walkable = walkable; }
[ "boolean isImageTileType();", "public int getValue() \n {\n return imgTileEnum;\n }", "private boolean isImage() {\n return SlidingTilesBoard.getType().equals(\"Image tiles\");\n }", "public static Image getAttackTile(){\r\n return attackTile;\r\n }", "ImageTile getImageTile();", "public Image getTileImage(){\n\t\treturn tileImage;\n\t}", "public abstract String mapTileToImage(Tile tile);", "private SpriteType initTileSpriteType(String imgFile, String spriteTypeID)\n {\n // WE'LL MAKE A NEW SPRITE TYPE FOR EACH GROUP OF SIMILAR LOOKING TILES\n SpriteType sT = new SpriteType(spriteTypeID);\n addSpriteType(sT);\n \n // LOAD THE ART\n BufferedImage img = miniGame.loadImageWithColorKey(imgFile, COLOR_KEY);\n Image tempImage = img.getScaledInstance(TILE_IMAGE_WIDTH, TILE_IMAGE_HEIGHT, BufferedImage.SCALE_SMOOTH);\n img = new BufferedImage(TILE_IMAGE_WIDTH, TILE_IMAGE_HEIGHT, BufferedImage.TYPE_INT_ARGB);\n img.getGraphics().drawImage(tempImage, 0, 0, null);\n \n // WE'LL USE THE SAME IMAGE FOR ALL STATES\n sT.addState(INVISIBLE_STATE, img);\n sT.addState(VISIBLE_STATE, img);\n sT.addState(SELECTED_STATE, img);\n sT.addState(INCORRECTLY_SELECTED_STATE, img);\n return sT;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.valueOf(getImageIcon());\n\t\t\t// + String.format(\"[%s]\", isWalkable);\n\t}", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "public static Image getMoveTile(){\r\n return moveTile;\r\n }", "public abstract String mapItemToImage(Item item, Tile tile);", "@Test\r\n\tpublic void TileTests() {\r\n\t\tTile tile = new Tile(\"String image path is stored as string so not needed\", false, 4, 1, 5, 2);\r\n\t\tassertEquals(tile.imgPath(), \"String image path is stored as string so not needed\");\r\n\t\tassertFalse(tile.isPassable());\r\n\t\tassertEquals(tile.startCol(), 4);\r\n\t\tassertEquals(tile.colRange(), 1);\r\n\t\tassertEquals(tile.startRow(), 5);\r\n\t\tassertEquals(tile.rowRange(), 2);\r\n\t}", "private void fillImageMap() {\n Image shipImage;\n try {\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat.png\"));\n imageMap.put(ShipType.PATROL_BOAT, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/patrol_boat_sunken.png\"));\n imageMap.put(ShipType.PATROL_BOAT_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_horizontal_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/cruiser_vertical_sunken.gif\"));\n imageMap.put(ShipType.CRUISER_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_horizontal_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/submarine_vertical_sunken.gif\"));\n imageMap.put(ShipType.SUBMARINE_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_horizontal_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/battleship_vertical_sunken.gif\"));\n imageMap.put(ShipType.BATTLESHIP_VERTICAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_horizontal_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_HORIZONTAL_SUNKEN, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL, shipImage);\n shipImage = ImageIO.read(getClass().getResource(\"img/aircraft_carrier_vertical_sunken.gif\"));\n imageMap.put(ShipType.AIRCRAFT_CARRIER_VERTICAL_SUNKEN, shipImage);\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "public int tileType(){\n\t\treturn this.type;\n\t}", "private Bitmap getImage() {\n if (SlidingTilesBoard.getIMAGE().equals(\"American Pie\")) {\n return BitmapFactory.decodeResource(getResources(), R.drawable.american_pie);\n } else if (SlidingTilesBoard.getIMAGE().equals(\"U of T\")) {\n return BitmapFactory.decodeResource(getResources(), R.drawable.uoft);\n }\n return BitmapFactory.decodeResource(getResources(), R.drawable.flower);\n\n }", "public abstract boolean isTileTypeAllowed(TileType tileType);", "public ImageBank () {\n String itemEnemies = \"images/enemies/\";\n String itemItems = \"images/items/\";\n String itemTiles = \"images/tiles/\";\n String button = \"images/buttons/\";\n String buttonEnemies = \"images/buttons/enemies/\";\n String buttonItems = \"images/buttons/items/\";\n String buttonTiles = \"images/buttons/tiles/\";\n \n images = new BufferedImage[317];\n // Level area\n // Enemies\n try {images[ImageBank.GAUSS] = ImageIO.read(new File(itemEnemies + \"Gaussturret.gif\"));} catch (IOException e) {}\n try {images[ImageBank.HOMING] = ImageIO.read(new File(itemEnemies + \"Hominglauncher.gif\"));} catch (IOException e) {}\n try {images[ImageBank.MINE] = ImageIO.read(new File(itemEnemies + \"Mine.gif\"));} catch (IOException e) {}\n try {images[ImageBank.FLOOR] = ImageIO.read(new File(itemEnemies + \"Floorguard.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THWUMP] = ImageIO.read(new File(itemEnemies + \"Thwump/ThwumpD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THWUMP+1] = ImageIO.read(new File(itemEnemies + \"Thwump/ThwumpS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THWUMP+2] = ImageIO.read(new File(itemEnemies + \"Thwump/ThwumpA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THWUMP+3] = ImageIO.read(new File(itemEnemies + \"Thwump/ThwumpW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ZAP] = ImageIO.read(new File(itemEnemies + \"Zapdrone/ZapdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ZAP+1] = ImageIO.read(new File(itemEnemies + \"Zapdrone/ZapdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ZAP+2] = ImageIO.read(new File(itemEnemies + \"Zapdrone/ZapdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ZAP+3] = ImageIO.read(new File(itemEnemies + \"Zapdrone/ZapdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.SEEKER] = ImageIO.read(new File(itemEnemies + \"Seekerdrone/SeekerdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.SEEKER+1] = ImageIO.read(new File(itemEnemies + \"Seekerdrone/SeekerdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.SEEKER+2] = ImageIO.read(new File(itemEnemies + \"Seekerdrone/SeekerdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.SEEKER+3] = ImageIO.read(new File(itemEnemies + \"Seekerdrone/SeekerdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LASER] = ImageIO.read(new File(itemEnemies + \"Laserdrone/LaserdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LASER+1] = ImageIO.read(new File(itemEnemies + \"Laserdrone/LaserdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LASER+2] = ImageIO.read(new File(itemEnemies + \"Laserdrone/LaserdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LASER+3] = ImageIO.read(new File(itemEnemies + \"Laserdrone/LaserdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CHAINGUN] = ImageIO.read(new File(itemEnemies + \"Chaingundrone/ChaingundroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CHAINGUN+1] = ImageIO.read(new File(itemEnemies + \"Chaingundrone/ChaingundroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CHAINGUN+2] = ImageIO.read(new File(itemEnemies + \"Chaingundrone/ChaingundroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CHAINGUN+3] = ImageIO.read(new File(itemEnemies + \"Chaingundrone/ChaingundroneW.gif\"));} catch (IOException e) {}\n // Items\n try {images[ImageBank.PLAYER] = ImageIO.read(new File(itemItems + \"Player.gif\"));} catch (IOException e) {}\n try {images[ImageBank.GOLD] = ImageIO.read(new File(itemItems + \"Gold.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BOUNCE] = ImageIO.read(new File(itemItems + \"Bounceblock.gif\"));} catch (IOException e) {}\n try {images[ImageBank.EXIT] = ImageIO.read(new File(itemItems + \"Exit/Exitdoor.gif\"));} catch (IOException e) {}\n try {images[ImageBank.EXIT+1] = ImageIO.read(new File(itemItems + \"Exit/Exitswitch.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ONEWAY] = ImageIO.read(new File(itemItems + \"Oneway/OnewayD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ONEWAY+1] = ImageIO.read(new File(itemItems + \"Oneway/OnewayS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ONEWAY+2] = ImageIO.read(new File(itemItems + \"Oneway/OnewayA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ONEWAY+3] = ImageIO.read(new File(itemItems + \"Oneway/OnewayW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.NDOOR] = ImageIO.read(new File(itemItems + \"Normaldoor/NormaldoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.NDOOR+1] = ImageIO.read(new File(itemItems + \"Normaldoor/NormaldoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.NDOOR+2] = ImageIO.read(new File(itemItems + \"Normaldoor/NormaldoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.NDOOR+3] = ImageIO.read(new File(itemItems + \"Normaldoor/NormaldoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LDOOR] = ImageIO.read(new File(itemItems + \"Lockeddoor/LockeddoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LDOOR+1] = ImageIO.read(new File(itemItems + \"Lockeddoor/LockeddoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LDOOR+2] = ImageIO.read(new File(itemItems + \"Lockeddoor/LockeddoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LDOOR+3] = ImageIO.read(new File(itemItems + \"Lockeddoor/LockeddoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LDOOR+4] = ImageIO.read(new File(itemItems + \"Lockeddoor/Lockeddoorswitch.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TDOOR] = ImageIO.read(new File(itemItems + \"Trapdoor/TrapdoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TDOOR+1] = ImageIO.read(new File(itemItems + \"Trapdoor/TrapdoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TDOOR+2] = ImageIO.read(new File(itemItems + \"Trapdoor/TrapdoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TDOOR+3] = ImageIO.read(new File(itemItems + \"Trapdoor/TrapdoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TDOOR+4] = ImageIO.read(new File(itemItems + \"Trapdoor/Trapdoorswitch.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+1] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadDS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+2] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+3] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadAS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+4] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+5] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadAW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+6] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.LAUNCH+7] = ImageIO.read(new File(itemItems + \"Launchpad/LaunchpadDW.gif\"));} catch (IOException e) {}\n // Tiles\n try {images[ImageBank.TILE45] = ImageIO.read(new File(itemTiles + \"45tile/45tileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TILE45+1] = ImageIO.read(new File(itemTiles + \"45tile/45tileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TILE45+2] = ImageIO.read(new File(itemTiles + \"45tile/45tileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.TILE45+3] = ImageIO.read(new File(itemTiles + \"45tile/45tileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN63] = ImageIO.read(new File(itemTiles + \"63thintile/63thintileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN63+1] = ImageIO.read(new File(itemTiles + \"63thintile/63thintileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN63+2] = ImageIO.read(new File(itemTiles + \"63thintile/63thintileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN63+3] = ImageIO.read(new File(itemTiles + \"63thintile/63thintileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN27] = ImageIO.read(new File(itemTiles + \"27thintile/27thintileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN27+1] = ImageIO.read(new File(itemTiles + \"27thintile/27thintileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN27+2] = ImageIO.read(new File(itemTiles + \"27thintile/27thintileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THIN27+3] = ImageIO.read(new File(itemTiles + \"27thintile/27thintileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONCAVE] = ImageIO.read(new File(itemTiles + \"Concavetile/ConcavetileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONCAVE+1] = ImageIO.read(new File(itemTiles + \"Concavetile/ConcavetileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONCAVE+2] = ImageIO.read(new File(itemTiles + \"Concavetile/ConcavetileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONCAVE+3] = ImageIO.read(new File(itemTiles + \"Concavetile/ConcavetileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.HALF] = ImageIO.read(new File(itemTiles + \"Halftile/HalftileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.HALF+1] = ImageIO.read(new File(itemTiles + \"Halftile/HalftileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.HALF+2] = ImageIO.read(new File(itemTiles + \"Halftile/HalftileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.HALF+3] = ImageIO.read(new File(itemTiles + \"Halftile/HalftileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK63] = ImageIO.read(new File(itemTiles + \"63thicktile/63thicktileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK63+1] = ImageIO.read(new File(itemTiles + \"63thicktile/63thicktileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK63+2] = ImageIO.read(new File(itemTiles + \"63thicktile/63thicktileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK63+3] = ImageIO.read(new File(itemTiles + \"63thicktile/63thicktileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK27] = ImageIO.read(new File(itemTiles + \"27thicktile/27thicktileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK27+1] = ImageIO.read(new File(itemTiles + \"27thicktile/27thicktileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK27+2] = ImageIO.read(new File(itemTiles + \"27thicktile/27thicktileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.THICK27+3] = ImageIO.read(new File(itemTiles + \"27thicktile/27thicktileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONVEX] = ImageIO.read(new File(itemTiles + \"Convextile/ConvextileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONVEX+1] = ImageIO.read(new File(itemTiles + \"Convextile/ConvextileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONVEX+2] = ImageIO.read(new File(itemTiles + \"Convextile/ConvextileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.CONVEX+3] = ImageIO.read(new File(itemTiles + \"Convextile/ConvextileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.FILL] = ImageIO.read(new File(itemTiles + \"Fill.gif\"));} catch (IOException e) {}\n try {images[ImageBank.ERASE] = ImageIO.read(new File(itemTiles + \"Erase.gif\"));} catch (IOException e) {}\n // Buttons\n // Enemies\n try {images[ImageBank.BT_GAUSS] = ImageIO.read(new File(buttonEnemies + \"Gaussturret.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_GAUSS+1] = ImageIO.read(new File(buttonEnemies + \"Gaussturretpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HOMING] = ImageIO.read(new File(buttonEnemies + \"Hominglauncher.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HOMING+1] = ImageIO.read(new File(buttonEnemies + \"Hominglauncherpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_MINE] = ImageIO.read(new File(buttonEnemies + \"Mine.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_MINE+1] = ImageIO.read(new File(buttonEnemies + \"Minepushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_FLOOR] = ImageIO.read(new File(buttonEnemies + \"Floorguard.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_FLOOR+1] = ImageIO.read(new File(buttonEnemies + \"Floorguardpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+1] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+2] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+3] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+4] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+5] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+6] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THWUMP+7] = ImageIO.read(new File(buttonEnemies + \"Thwump/ThwumpWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+1] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+2] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+3] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+4] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+5] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+6] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+7] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/ZapdroneWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+8] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronesurfacecw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+9] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronesurfacecwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+10] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronesurfaceccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+11] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronesurfaceccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+12] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronedumbcw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+13] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronedumbcwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+14] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronedumbccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+15] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronedumbccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+16] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronealt.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+17] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronealtpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+18] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronerand.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ZAP+19] = ImageIO.read(new File(buttonEnemies + \"Zapdrone/Zapdronerandpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+1] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+2] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+3] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+4] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+5] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+6] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+7] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/SeekerdroneWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+8] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronesurfacecw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+9] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronesurfacecwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+10] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronesurfaceccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+11] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronesurfaceccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+12] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronedumbcw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+13] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronedumbcwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+14] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronedumbccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+15] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronedumbccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+16] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronealt.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+17] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronealtpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+18] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronerand.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_SEEKER+19] = ImageIO.read(new File(buttonEnemies + \"Seekerdrone/Seekerdronerandpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+1] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+2] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+3] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+4] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+5] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+6] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+7] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/LaserdroneWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+8] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronesurfacecw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+9] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronesurfacecwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+10] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronesurfaceccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+11] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronesurfaceccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+12] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronedumbcw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+13] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronedumbcwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+14] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronedumbccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+15] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronedumbccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+16] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronealt.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+17] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronealtpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+18] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronerand.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LASER+19] = ImageIO.read(new File(buttonEnemies + \"Laserdrone/Laserdronerandpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+1] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+2] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+3] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+4] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+5] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+6] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+7] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/ChaingundroneWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+8] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronesurfacecw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+9] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronesurfacecwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+10] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronesurfaceccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+11] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronesurfaceccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+12] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronedumbcw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+13] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronedumbcwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+14] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronedumbccw.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+15] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronedumbccwpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+16] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronealt.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+17] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronealtpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+18] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronerand.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CHAINGUN+19] = ImageIO.read(new File(buttonEnemies + \"Chaingundrone/Chaingundronerandpushed.gif\"));} catch (IOException e) {}\n // Items\n try {images[ImageBank.BT_PLAYER] = ImageIO.read(new File(buttonItems + \"Player.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_PLAYER+1] = ImageIO.read(new File(buttonItems + \"Playerpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_GOLD] = ImageIO.read(new File(buttonItems + \"Gold.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_GOLD+1] = ImageIO.read(new File(buttonItems + \"Goldpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_BOUNCE] = ImageIO.read(new File(buttonItems + \"Bounceblock.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_BOUNCE+1] = ImageIO.read(new File(buttonItems + \"Bounceblockpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_EXIT] = ImageIO.read(new File(buttonItems + \"Exit/Exitdoor.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_EXIT+1] = ImageIO.read(new File(buttonItems + \"Exit/Exitdoorpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+1] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+2] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+3] = ImageIO.read(new File(buttonItems + \"Oneway/OnewaySpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+4] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+5] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+6] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ONEWAY+7] = ImageIO.read(new File(buttonItems + \"Oneway/OnewayWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+1] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+2] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+3] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+4] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+5] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+6] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_NDOOR+7] = ImageIO.read(new File(buttonItems + \"Normaldoor/NormaldoorWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+1] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+2] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+3] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+4] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+5] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+6] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+7] = ImageIO.read(new File(buttonItems + \"Lockeddoor/LockeddoorWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+8] = ImageIO.read(new File(buttonItems + \"Lockeddoor/Lockeddoor.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LDOOR+9] = ImageIO.read(new File(buttonItems + \"Lockeddoor/Lockeddoorpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+1] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+2] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+3] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+4] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+5] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+6] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+7] = ImageIO.read(new File(buttonItems + \"Trapdoor/TrapdoorWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+8] = ImageIO.read(new File(buttonItems + \"Trapdoor/Trapdoor.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TDOOR+9] = ImageIO.read(new File(buttonItems + \"Trapdoor/Trapdoorpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadD.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+1] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadDpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+2] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadDS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+3] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadDSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+4] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+5] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+6] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadAS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+7] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadASpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+8] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+9] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+10] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadAW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+11] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadAWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+12] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+13] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+14] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadDW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+15] = ImageIO.read(new File(buttonItems + \"Launchpad/LaunchpadDWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+16] = ImageIO.read(new File(buttonItems + \"Launchpad/Teleporter.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_LAUNCH+17] = ImageIO.read(new File(buttonItems + \"Launchpad/Teleporterpushed.gif\"));} catch (IOException e) {}\n // Tiles\n try {images[ImageBank.BT_TILE45] = ImageIO.read(new File(buttonTiles + \"45tile/45tileW.gif\"));} catch (IOException e) {System.out.print(\"Nope. \");}\n try {images[ImageBank.BT_TILE45+1] = ImageIO.read(new File(buttonTiles + \"45tile/45tileWpushed.gif\"));} catch (IOException e) {System.out.print(\"Nope. \");}\n try {images[ImageBank.BT_TILE45+2] = ImageIO.read(new File(buttonTiles + \"45tile/45tileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TILE45+3] = ImageIO.read(new File(buttonTiles + \"45tile/45tileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TILE45+4] = ImageIO.read(new File(buttonTiles + \"45tile/45tileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TILE45+5] = ImageIO.read(new File(buttonTiles + \"45tile/45tileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TILE45+6] = ImageIO.read(new File(buttonTiles + \"45tile/45tileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_TILE45+7] = ImageIO.read(new File(buttonTiles + \"45tile/45tileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+1] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+2] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+3] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+4] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+5] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+6] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN63+7] = ImageIO.read(new File(buttonTiles + \"63thintile/63thintileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+1] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+2] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+3] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+4] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+5] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+6] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THIN27+7] = ImageIO.read(new File(buttonTiles + \"27thintile/27thintileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+1] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+2] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+3] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+4] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+5] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+6] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONCAVE+7] = ImageIO.read(new File(buttonTiles + \"Concavetile/ConcavetileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+1] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+2] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+3] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+4] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+5] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+6] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_HALF+7] = ImageIO.read(new File(buttonTiles + \"Halftile/HalftileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+1] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+2] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+3] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+4] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+5] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+6] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK63+7] = ImageIO.read(new File(buttonTiles + \"63thicktile/63thicktileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+1] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+2] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+3] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+4] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+5] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+6] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_THICK27+7] = ImageIO.read(new File(buttonTiles + \"27thicktile/27thicktileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileW.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+1] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileWpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+2] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileS.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+3] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileSpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+4] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileA.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+5] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileApushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+6] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileQ.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_CONVEX+7] = ImageIO.read(new File(buttonTiles + \"Convextile/ConvextileQpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_FILL] = ImageIO.read(new File(buttonTiles + \"Fill.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_FILL+1] = ImageIO.read(new File(buttonTiles + \"Fillpushed.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ERASE] = ImageIO.read(new File(buttonTiles + \"Erase.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_ERASE+1] = ImageIO.read(new File(buttonTiles + \"Erasepushed.gif\"));} catch (IOException e) {}\n // Other\n try {images[ImageBank.BT_DOWN_ARROW] = ImageIO.read(new File(button + \"Downarrow.gif\"));} catch (IOException e) {}\n try {images[ImageBank.BT_DOWN_ARROW+1] = ImageIO.read(new File(button + \"Downarrowpushed.gif\"));} catch (IOException e) {}\n }", "public boolean isWalkable() {\n \t\treturn ((data[MapBlock.BLOCK_SIZE - 1] & this.walkableBit) != 0);\n \t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine if the RFFreqMin is configured.
public boolean isSetRFFreqMin() { return (this.rfFreqMin != null ? this.rfFreqMin.isSetValue() : false); }
[ "public boolean isSetRFChannelFreqMin() {\n return (this.rfChannelFreqMin != null ? this.rfChannelFreqMin.isSetValue() : false);\n }", "public boolean isSetFreqMin() {\n return (this.freqMin != null ? this.freqMin.isSetValue() : false);\n }", "public boolean hasMinRequirements() {\n\t\t// FIXME MIN input\n\t\treturn true;\n\t}", "boolean isSetWagerMinimum();", "public boolean isSetMin()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(MIN$18) != null;\r\n }\r\n }", "public boolean isSetRFFreqTolerance() {\n return (this.rfFreqTolerance != null ? this.rfFreqTolerance.isSetValue() : false);\n }", "public boolean isSetRFFreqMax() {\n return (this.rfFreqMax != null ? this.rfFreqMax.isSetValue() : false);\n }", "public boolean isCondReqrdFlg() {\n return condReqrdFlg;\n }", "public boolean isSetMin() {\n return EncodingUtils.testBit(__isset_bitfield, __MIN_ISSET_ID);\n }", "public boolean hasMinRequired() {\n return cacheHasKey(CacheKey.minRequired);\n }", "public boolean hasMinbitrate() {\n return fieldSetFlags()[11];\n }", "public boolean isMinWidthSet() { return get(\"MinWidth\")!=null; }", "public static Property hasMin() {\n Property p = fpsProperty(\"hasMin\");\n p.addProperty(RDF.type, OWL2.DatatypeProperty);\n p.addProperty(RDFS.subPropertyOf, OWL2.topDataProperty);\n return p;\n }", "private boolean isDFltdFMin()\n {\n double fLow = (x2.getF(0) < x1.getF(0)) ? x2.getF(0) : x1.getF(0);\n double dF = Math.abs(fLowBor-fLow);\n return (dF < dFMin) ? true : false;\n }", "public boolean isMinFitnessValue() {\n\t\treturn minFitnessValue;\n\t}", "public boolean isSetRFFreqToleranceInterval() {\n return (this.rfFreqToleranceInterval != null ? this.rfFreqToleranceInterval.isSetValue() : false);\n }", "public boolean isNotNullMinRequired() {\n return cacheValueIsNotNull(CacheKey.minRequired);\n }", "boolean isSetFractionalMinimum();", "public boolean isSetRotationRateMin() {\n return (this.rotationRateMin != null ? this.rotationRateMin.isSetValue() : false);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method: firstInFirstOut() Purpose: Reads from 4 given files, places data into array structures, then sorts them based on First In First Out algorithm. Prints out frame at each step and page fault total
private static void firstInFirstOut() throws IOException { //File names String fileBank[] = new String[] {"ReferenceString1.txt", "ReferenceString2.txt", "ReferenceString3.txt", "ReferenceString4.txt"}; //for-loop: go through each file for(int currentFile = 0; currentFile < fileBank.length; currentFile++) { //Indicate which algorithm is being used and which test case is being ran System.out.println("\nFIFO using file: " + fileBank[currentFile] + "\nTest Case #" + (currentFile+1)); String fileName = fileBank[currentFile]; //Page numbers from reference string int pages[] = new int[30]; //Number of Page Frames value int numberOfPageFrames = 0; //Scan file for number page frames value and reference string File pageFile = new File(fileName); Scanner scan = new Scanner(pageFile); for(int i = 0; i < 4; i++) { if(i == 1) { String numberOfPageFrameValue = scan.nextLine(); numberOfPageFrames = Integer.parseInt(numberOfPageFrameValue); } else if(i == 3) { String referenceString = scan.nextLine(); for(int currentCharacter = 0; currentCharacter < 30; currentCharacter++) { pages[currentCharacter] = Character.getNumericValue(referenceString.charAt(currentCharacter)); } } else { scan.nextLine(); } } scan.close(); //Frame array size depends on number of page frame value int frames[] = new int[numberOfPageFrames]; //Set all values in frame to -1 for(int i = 0; i < frames.length; i++) { frames[i] = -1; } //Pointer to our index in frame array int frameIndex = 0; //Total page faults int pageFaults = 0; //Check tests boolean check = true; //for-loop: Goes through all pages[] elements for(int i = 0; i < pages.length; i++) { //Current page number int page = pages[i]; check = true; //If page is already in frames, do nothing for(int j = 0; j < frames.length; j++) { if(frames[j] == page) { check = false; break; } } //If page is not in frames, add page to frames and update pointer if(check) { frames[frameIndex] = page; frameIndex++; //If pointer goes out of bounds, move it back to beginning if(frameIndex == frames.length) { frameIndex = 0; } //Print out current frame System.out.print("Frames: "); for(int j = 0; j < frames.length; j++) { if(frames[j] != -1) { System.out.print(frames[j] + " "); } } System.out.println(); //Increment page faults pageFaults++; } else { //Print out current frame System.out.print("Frames: "); for(int j = 0; j < frames.length; j++) { if(frames[j] != -1) { System.out.print(frames[j] + " "); } } System.out.println(); } } //Print total page faults System.out.println("Page faults: " + pageFaults); } }
[ "public void initialPass(TapeDrive in, TapeDrive out1, TapeDrive out2) {\n // TODO: Implement me for 15 points!\n \tint tapeCount = 0;\n \tint outCount = 2;\n \twhile (tapeCount < tapeSize) {\n \t\tif (outCount % 2 == 0) {\n \t\t\tfor (int i = 0; i < memorySize; i++) {\n \t\tmemory[i] = in.read();\n \t}\n \tquicksort(memorySize);\n \tfor (int i = 0; i < memorySize; i++) {\n \t\tout1.write(memory[i]);\n \t}\n \ttapeCount += memorySize;\n \t\t} else if (outCount % 2 == 1) {\n \t\t\tfor (int i = 0; i < memorySize; i++) {\n \t\tmemory[i] = in.read();\n \t}\n \tquicksort(memorySize);\n \tfor (int i = 0; i < memorySize; i++) {\n \t\tout2.write(memory[i]);\n \t}\n \ttapeCount += memorySize;\n \t\t}\n \t}\n }", "private static void stepSorter(String file, DataOutputStream d, int size) throws FileNotFoundException, IOException {\n\t\tDataInputStream inputA = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tDataInputStream inputB = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(file))));\n\t\tint numDivisions = (int) Math.ceil(fileSize/((double) size));\n\t\tinputB.skip(size*4);\n\t\tfor (int j = 0; j < numDivisions/2; j++){\t\n\t\t\tint counterA = size;\n\t\t\tint counterB = Math.min(fileSize - j*size*2 - size, size);\n\t\t\tInteger a = inputA.readInt();\n\t\t\tInteger b = inputB.readInt();\n\t\t\twhile (counterA > 0 && counterB > 0){\n\t\t\t\tif (a < b){\n\t\t\t\t\td.writeInt(a);\n\t\t\t\t\tif (counterA > 1){\n\t\t\t\t\t\ta = inputA.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterA--;\n\t\t\t\t} else {\n\t\t\t\t\td.writeInt(b);\n\t\t\t\t\tif (counterB > 1){\n\t\t\t\t\t\tb = inputB.readInt();\n\t\t\t\t\t}\n\t\t\t\t\tcounterB--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counterA == 0){\n\t\t\t\td.writeInt(b);\n\t\t\t\tcounterB--;\n\t\t\t\tfor (int i =0; i < counterB; i++){\n\t\t\t\t\td.writeInt(inputB.readInt());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\td.writeInt(a);\n\t\t\t\tcounterA--;\n\t\t\t\tfor (int i =0; i < counterA; i++){\n\t\t\t\t\td.writeInt(inputA.readInt());\n\t\t\t\t}\n\t\t\t}\n\t\t\tinputA.skip(size*4);\n\t\t\tinputB.skip(size*4);\n\t\t}\n\t\t\n\t\t//copy the excess\n\t\twhile (inputA.available()>0){\n\t\t\td.writeInt(inputA.readInt());\n\t\t}\n\t\tinputA.close();\n\t\tinputB.close();\n\t\td.flush();\n\t}", "private static void leastRecentlyUsed() throws IOException {\n\t\t\n\t\t//File names\n\t\tString fileBank[] = new String[] {\"ReferenceString1.txt\", \"ReferenceString2.txt\",\n\t\t\t\t\"ReferenceString3.txt\", \"ReferenceString4.txt\"};\n\t\t\n\t\t//for-loop: go through each of the four files\n\t\tfor(int currentFile = 0; currentFile < fileBank.length; currentFile++) {\n\t\t\t\n\t\t\t//Indicate LRU is being used and which test case is being ran\n\t\t\tSystem.out.println(\"\\nLRU using file: \" + fileBank[currentFile]\n\t\t\t\t\t+ \"\\nTest Case #\" + (currentFile+1));\n\t\t\tString fileName = fileBank[currentFile];\n\t\t\t\n\t\t\t//Page numbers for reference string\n\t\t\tint pages[] = new int[30];\n\t\t\t//Number of Page Frames value\n\t\t\tint numberOfPageFrames = 0;\n\t\t\t\n\t\t\t//Scan file for number page frames value and reference string\n\t\t\tFile pageFile = new File(fileName);\n\t\t\tScanner scan = new Scanner(pageFile);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i == 1) {\n\t\t\t\t\tString numberOfPageFrameValue = scan.nextLine();\n\t\t\t\t\tnumberOfPageFrames = Integer.parseInt(numberOfPageFrameValue);\n\t\t\t\t} else if(i == 3) {\n\t\t\t\t\tString referenceString = scan.nextLine();\n\t\t\t\t\tfor(int currentCharacter = 0; currentCharacter < 30; currentCharacter++) {\n\t\t\t\t\t\tpages[currentCharacter] = Character.getNumericValue(referenceString.charAt(currentCharacter));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tscan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tscan.close();\n\t\t\t\n\t\t\t//Frame array size depends on number of page frame value\n\t\t\tint frames[] = new int[numberOfPageFrames];\n\t\t\t//temporary arrays to reference recently used values\n\t\t\tint tempFramesA[] = new int[numberOfPageFrames];\n\t\t\tint tempFramesB[] = new int[numberOfPageFrames];\n\t\t\t\n\t\t\t//Set all values in frame arrays to -1\n\t\t\tfor(int i = 0; i < frames.length; i++) {\n\t\t\t\tframes[i] = -1;\n\t\t\t\ttempFramesA[i] = -1;\n\t\t\t\ttempFramesB[i] = -1;\n\t\t\t}\n\t\t\t\n\t\t\t//Recent page\n\t\t\tint recent = 0;\n\t\t\t//Total page faults\n\t\t\tint pageFaults = 0;\n\t\t\t//Check tests\n\t\t\tboolean check = true;\n\t\t\t\n\t\t\t//for-loop: Goes through all pages[] element\n\t\t\tfor(int i = 0; i < pages.length; i++) {\n\t\t\t\t//Current page number\n\t\t\t\tint page = pages[i];\n\t\t\t\tcheck = true;\n\t\t\t\t\n\t\t\t\t//If page is already in frames, nothing\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] == page) {\n\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//If page is already in frame, page is now our most recent\n\t\t\t\tfor(int j = 0; j < frames.length && check; j++) {\n\t\t\t\t\tif(frames[j] == tempFramesA[frames.length-1]) {\n\t\t\t\t\t\trecent = j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//If page is not in frames, add page to frames based on most recently used\n\t\t\t\tif(check) {\n\t\t\t\t\tframes[recent] = page;\n\t\t\t\t\t//Print our current frame\n\t\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t//Increment page faults\n\t\t\t\t\tpageFaults++;\n\t\t\t\t} else {\n\t\t\t\t\t//Print our current frame\n\t\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Page number\n\t\t\t\tint pageNumber = 1;\n\t\t\t\t//Copy page into b[]\n\t\t\t\ttempFramesB[0] = page;\n\t\t\t\t\n\t\t\t\t//for every element in a, copy into b[]\n\t\t\t\tfor(int j = 0; j < tempFramesA.length; j++) {\n\t\t\t\t\tif(page != tempFramesA[j] && pageNumber < frames.length) {\n\t\t\t\t\t\ttempFramesB[pageNumber] = tempFramesA[j];\n\t\t\t\t\t\tpageNumber++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Copy b[] into a[]\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\ttempFramesA[j] = tempFramesB[j];\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Print out total page faults\n\t\t\tSystem.out.println(\"Page faults: \" + pageFaults);\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\r\n\r\n\t\t// TODO\r\n\t\t//\r\n\t\t// Conducts multiple rounds of comparison of four sorting algorithms. Within\r\n\t\t// each round,\r\n\t\t// set up scanning as follows:\r\n\t\t//\r\n\t\t// a) If asked to scan random points, calls generateRandomPoints() to initialize\r\n\t\t// an array\r\n\t\t// of random points.\r\n\t\t//\r\n\t\t// b) Reassigns to the array scanners[] (declared below) the references to four\r\n\t\t// new\r\n\t\t// RotationalPointScanner objects, which are created using four different values\r\n\t\t// of the Algorithm type: SelectionSort, InsertionSort, MergeSort and QuickSort.\r\n\t\t//\r\n\t\t//\r\n\t\tint key = 0;\r\n\t\tint points;\r\n\t\tint trial = 1;\r\n\t\tboolean running = true;\r\n\t\tString fileName = \"\";\r\n\r\n\t\tRotationalPointScanner[] scanners = new RotationalPointScanner[4];\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Performances of Four Sorting Algorithms in Point Scanning\");\r\n\t\tSystem.out.println(\"keys: 1 (random integers) 2 (file input) 3 (exit)\");\r\n\r\n\t\twhile (running == true) {\r\n\t\t\t\r\n\t\t\tSystem.out.print(\"Trial \" + trial + \":\");\r\n\t\t\tkey = sc.nextInt();\r\n\t\t\t\r\n\t\t\tswitch (key) {\r\n\t\t\tcase 1:\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(\"Enter number of random points:\");\r\n\t\t\t\tpoints = sc.nextInt();\r\n\t\t\t\tPoint[] ps = new Point[points];\r\n\t\t\t\tps = generateRandomPoints(points, new Random());\r\n\t\t\t\tSystem.out.println(\"Algorithm size time (ns)\");\r\n\t\t\t\tSystem.out.println(\"----------------------------------\");\r\n\r\n\t\t\t\tscanners[0] = new RotationalPointScanner(ps, Algorithm.SelectionSort);\r\n\t\t\t\tscanners[0].scan();\r\n\t\t\t\tSystem.out.println(scanners[0].stats());\r\n\r\n\t\t\t\tscanners[1] = new RotationalPointScanner(ps, Algorithm.InsertionSort);\r\n\t\t\t\tscanners[1].scan();\r\n\t\t\t\tSystem.out.println(scanners[1].stats());\r\n\r\n\t\t\t\tscanners[2] = new RotationalPointScanner(ps, Algorithm.QuickSort);\r\n\t\t\t\tscanners[2].scan();\r\n\t\t\t\tSystem.out.println(scanners[2].stats());\r\n\r\n\t\t\t\tscanners[3] = new RotationalPointScanner(ps, Algorithm.MergeSort);\r\n\t\t\t\tscanners[3].scan();\r\n\t\t\t\tSystem.out.println(scanners[3].stats());\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tSystem.out.println(\"Points from a file\");\r\n\t\t\t\tSystem.out.print(\"File name:\");\r\n\t\t\t\tfileName = sc.next();\r\n\t\t\t\tSystem.out.println(\"Algorithm size time (ns)\");\r\n\t\t\t\tSystem.out.println(\"----------------------------------\");\r\n\r\n\t\t\t\tscanners[0] = new RotationalPointScanner(fileName, Algorithm.SelectionSort);\r\n\t\t\t\tscanners[0].scan();\r\n\t\t\t\tSystem.out.println(scanners[0].stats());\r\n\r\n\t\t\t\tscanners[1] = new RotationalPointScanner(fileName, Algorithm.InsertionSort);\r\n\t\t\t\tscanners[1].scan();\r\n\t\t\t\tSystem.out.println(scanners[1].stats());\r\n\r\n\t\t\t\tscanners[2] = new RotationalPointScanner(fileName, Algorithm.QuickSort);\r\n\t\t\t\tscanners[2].scan();\r\n\t\t\t\tSystem.out.println(scanners[2].stats());\r\n\r\n\t\t\t\tscanners[3] = new RotationalPointScanner(fileName, Algorithm.MergeSort);\r\n\t\t\t\tscanners[3].scan();\r\n\t\t\t\tSystem.out.println(scanners[3].stats());\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\trunning = false;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttrial++;\r\n\t\t\tSystem.out.println(\"----------------------------------\");\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t// For each input of points, do the following.\r\n\t\t//\r\n\t\t// a) Initialize the array scanners[].\r\n\t\t//\r\n\t\t// b) Iterate through the array scanners[], and have every scanner call the\r\n\t\t// scan() and draw()\r\n\t\t// methods in the RotationalPointScanner class. You can visualize the result of\r\n\t\t// each scan.\r\n\t\t// (Windows have to be closed manually before rerun.)\r\n\t\t//\r\n\t\t// c) After all four scans are done for the input, print out the statistics\r\n\t\t// table (cf. Section 2).\r\n\t\t//\r\n\t\t// A sample scenario is given in Section 2 of the project description.\r\n\r\n\t}", "private static void optimalAlgorithm() throws IOException {\n\t\tString fileBank[] = new String[] {\"ReferenceString1.txt\", \"ReferenceString2.txt\",\n\t\t\t\t\"ReferenceString3.txt\", \"ReferenceString4.txt\"};\n\t\tfor(int currentFile = 0; currentFile < fileBank.length; currentFile++) {\n\t\t\tSystem.out.println(\"\\nOptimal Algorithm using file: \" + fileBank[currentFile]\n\t\t\t\t\t+ \"\\nTest Case #\" + (currentFile+1));\n\t\t\tString fileName = fileBank[currentFile];\n\t\t\t\n\t\t\t//Pages for reference string\n\t\t\tint pages[] = new int[30];\n\t\t\t//Temp array to check \"future\" reference string\n\t\t\tint temp[] = new int[30];\n\t\t\t//Number of page frames value\n\t\t\tint numberOfPageFrames = 0;\n\t\t\t\n\t\t\t//Scan file for number page frames value and reference string\n\t\t\tFile pageFile = new File(fileName);\n\t\t\tScanner scan = new Scanner(pageFile);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i == 1) {\n\t\t\t\t\tString numberOfPageFrameValue = scan.nextLine();\n\t\t\t\t\tnumberOfPageFrames = Integer.parseInt(numberOfPageFrameValue);\n\t\t\t\t} else if(i == 3) {\n\t\t\t\t\tString referenceString = scan.nextLine();\n\t\t\t\t\tfor(int currentCharacter = 0; currentCharacter < 30; currentCharacter++) {\n\t\t\t\t\t\tpages[currentCharacter] = Character.getNumericValue(referenceString.charAt(currentCharacter));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tscan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tscan.close();\n\t\t\t\n\t\t\t//Frame array size depends on number of page frame value\n\t\t\tint frames[] = new int[numberOfPageFrames];\n\t\t\t\n\t\t\t//Set all values in frame arrays to -1\n\t\t\tfor(int i = 0; i < frames.length; i++) {\n\t\t\t\tframes[i] = -1;\n\t\t\t}\n\t\t\t\n\t\t\t//Check tests\n\t\t\tint check1 = 0, check2 = 0, check3 = 0;\n\t\t\t//Current position\n\t\t\tint position = 0;\n\t\t\t//Max value\n\t\t\tint max = 0;\n\t\t\t//Total page faults\n\t\t\tint pageFaults = 0;\n\t\t\t\n\t\t\t//for-loop goes through all pages[] element\n\t\t\tfor(int i = 0; i < pages.length; i++) {\n\t\t\t\t\n\t\t\t\t//Set check tests to 0\n\t\t\t\tcheck1 = check2 = 0;\n\t\t\t\t\n\t\t\t\t//If page number is already in page frames, set both checks to 1\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] == pages[i]) {\n\t\t\t\t\t\tcheck1 = check2 = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If check 1 is 0, page fault occured\n\t\t\t\tif(check1 == 0) {\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] == -1) {\n\t\t\t\t\t\t\tpageFaults++;\n\t\t\t\t\t\t\tframes[j] = pages[i];\n\t\t\t\t\t\t\tcheck2 = 1;\n\t\t\t\t\t\t\tbreak;\n\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\t//If check 2 is 0, page fault occurred, find a page that is never referenced in the future\n\t\t\t\tif(check2 == 0) {\n\t\t\t\t\tcheck3 = 0;\n\t\t\t\t\t\n\t\t\t\t\t//Go through each element in frames\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\ttemp[j] = -1;\n\t\t\t\t\t\t//For every page number after our current page number, check\n\t\t\t\t\t\t//if there a page referenced in our frames\n\t\t\t\t\t\tfor(int k = (i + 1); k < pages.length; k++) {\n\t\t\t\t\t\t\tif(frames[j] == pages[k]) {\n\t\t\t\t\t\t\t\ttemp[j] = k;\n\t\t\t\t\t\t\t\tbreak;\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\t\n\t\t\t\t\t//Skip elements that are not referenced\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(temp[j] == -1) {\n\t\t\t\t\t\t\tposition = j;\n\t\t\t\t\t\t\tcheck3 = 1;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//For pages referenced\n\t\t\t\t\tif(check3 == 0) {\n\t\t\t\t\t\t//Set max\n\t\t\t\t\t\tmax = temp[0];\n\t\t\t\t\t\t//Position of our farthest referenced page\n\t\t\t\t\t\tposition = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//loop through temp array to find farthest referenced page\n\t\t\t\t\t\tfor(int j = 1; j < frames.length; j++) {\n\t\t\t\t\t\t\tif(temp[j] > max) {\n\t\t\t\t\t\t\t\tmax = temp[j];\n\t\t\t\t\t\t\t\tposition = j;\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\t\n\t\t\t\t\t//Place page where farthest referenced page is at\n\t\t\t\t\tframes[position] = pages[i];\n\t\t\t\t\t//Increment page fault\n\t\t\t\t\tpageFaults++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Print out frames\n\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\n\t\t\t//Print out total page faults\n\t\t\tSystem.out.println(\"Page faults: \" + pageFaults);\n\t\t}\n\t}", "public static void main(String...args){\n try {\n long s, e;\n\n File input = Paths.get(\"/home/andrea/vector-1000000\").toFile();\n TestingReadingMethods rif = new TestingReadingMethods(input);\n\n System.out.print(\"Vector with Scanner: \");\n System.out.print(input.getName());\n s = System.currentTimeMillis();\n rif.readVector();\n e = System.currentTimeMillis();\n System.out.println(String.format(\" %d ms\", e-s));\n\n System.out.print(\"Vector with BufferedReader: \");\n System.out.print(input.getName());\n s = System.currentTimeMillis();\n rif.readVectorAlt();\n e = System.currentTimeMillis();\n System.out.println(String.format(\" %d ms\", e-s));\n\n\n input = Paths.get(\"/home/andrea/matrix-1000-1000\").toFile();\n rif = new TestingReadingMethods(input);\n\n System.out.print(\"Matrix with Scanner: \");\n System.out.print(input.getName());\n s = System.currentTimeMillis();\n rif.readMatrix();\n e = System.currentTimeMillis();\n System.out.println(String.format(\" %d ms\", e-s));\n\n System.out.print(\"Matrix with BufferedReader: \");\n System.out.print(input.getName());\n s = System.currentTimeMillis();\n rif.readMatrixAlt();\n e = System.currentTimeMillis();\n System.out.println(String.format(\" %d ms\", e-s));\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void processFiles(){\n\t\tfor(String file : files){\n\t\t\ttry{\n\t\t\t\tloadDataFromFile(file);\n\t\t\t\tprintInOrder();\t\t\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e){\n\t\t\t\tSystem.out.println(\"Can't open file: \" + file);\n\t\t\t}\n\t\t\t// After each file, clear studentList in preparation for the next file.\n\t\t\tstudentList.clear();\n\t\t\t\n\t\t}\t\t\n\t}", "void loadToHeap(String dbSetFileName) {\n String str=\"\",str1=\"\",str2 =\"\",str3=\"\",str4 =\"\",str5=\"\",str6 =\"\",str7=\"\",str8=\"\";\r\n try {\r\n \tlong startTime=System.currentTimeMillis(); //start time\r\n BufferedReader reader = new BufferedReader(new FileReader(dbSetFileName)); //dataset file\r\n count=0;\r\n int numPerPage=pageSize/275; //the number of records in one page\r\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"heap.\"+pageSize));//heap file\r\n reader.readLine(); //read headline\r\n int pageNumber=0;\r\n int recordNumber=0; \r\n while((str = reader.readLine())!=null){\r\n int pos=str.indexOf(\"\\t\");\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str1=str.substring(0,pos); //read fields of a record\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str2=str.substring(0,pos);\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str3=str.substring(0,pos);\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str4=str.substring(0,pos);\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str5=str.substring(0,pos);\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str6=str.substring(0,pos);\r\n str=str.substring(pos+1);\r\n pos=str.indexOf(\"\\t\");\r\n str7=str.substring(0,pos);\r\n str8=str.substring(pos+1); \r\n int from=count*275;\r\n copyToBuffer(from,str1); //copy fields to buffer\r\n copyToBuffer(from+200,str2);\r\n copyToBuffer(from+212,str3);\r\n copyToBuffer(from+222,str4);\r\n copyToBuffer(from+232,str5);\r\n copyToBuffer(from+242,str6);\r\n copyToBuffer(from+252,str7);\r\n copyToBuffer(from+255,str8);\r\n count++;\r\n if(count==numPerPage) { //if read one page \t\r\n \twriter.write(buffer); //write to heap file\r\n \tfor(int i=0;i<pageSize;i++) //reset buffer \r\n \t\tbuffer[i]=0;\r\n \tcount=0;\r\n \tpageNumber++; \r\n }\r\n }\r\n recordNumber=pageNumber*numPerPage+count; //total record number\r\n if(count!=0) { //if the last page is not full\r\n \twriter.write(buffer);\r\n \tpageNumber++;\r\n }\r\n writer.close();\r\n reader.close(); \r\n long endTime=System.currentTimeMillis(); //end time\r\n long totalTime=endTime-startTime;\r\n System.out.println(\"the number of records loaded is \"+recordNumber);\r\n System.out.println(\"the number of pages used is \"+pageNumber);\r\n System.out.println(\"the number of milliseconds to create the heap file is \"+totalTime);\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\t}", "public static void splitfiles () throws IOException\n\t{\n\t\t int counter =0 ;\n\t\t \n\t\t FileWriter fstream1 = new FileWriter(\"MainFolder/1.txt\");\n\t\t BufferedWriter out1 = new BufferedWriter(fstream1);\n\t\t FileWriter fstream2 = new FileWriter(\"MainFolder/2.txt\");\n\t\t BufferedWriter out2 = new BufferedWriter(fstream2);\n\t\t FileWriter fstream3 = new FileWriter(\"MainFolder/3.txt\");\n\t\t BufferedWriter out3 = new BufferedWriter(fstream3);\n\t\t FileWriter fstream4 = new FileWriter(\"MainFolder/4.txt\");\n\t\t BufferedWriter out4 = new BufferedWriter(fstream4);\n\t\t FileWriter fstream5 = new FileWriter(\"MainFolder/5.txt\");\n\t\t BufferedWriter out5 = new BufferedWriter(fstream5);\n\t\t \n\t\t \n\t\t \n\t\t File dirName = new File(\"MainFolder\");\n\t\t BufferedReader br_charlie;\n\t\t br_charlie = new BufferedReader(new FileReader(new File(dirName,\n\t\t\t\t \"charlie\")));\n\t\t BufferedReader br_joe;\n\t\t br_joe = new BufferedReader(new FileReader(new File(dirName,\n\t\t\t\t \"joe\")));\n\t\t BufferedReader br_josh;\n\t\t BufferedReader br_kari;\n\t\t BufferedReader br_mackenzie;\n\t\t br_josh = new BufferedReader(new FileReader(new File(dirName,\n\t\t \"josh\")));\n\t\t br_kari = new BufferedReader(new FileReader(new File(dirName,\n\t\t \"kari\")));\n\t\t br_mackenzie = new BufferedReader(new FileReader(new File(dirName,\n\t\t \"mackenzie\")));\n\t\t \n\t\t \n\t\t //while(counter<20)\n\t\t //{\n\t\t writeOnFile(out1,br_charlie,br_joe,br_josh,br_kari,br_mackenzie);\n\t\t writeOnFile(out2,br_charlie,br_joe,br_josh,br_kari,br_mackenzie);\n\t\t writeOnFile(out3,br_charlie,br_joe,br_josh,br_kari,br_mackenzie);\n\t\t writeOnFile(out4,br_charlie,br_joe,br_josh,br_kari,br_mackenzie);\n\t\t writeOnFile(out5,br_charlie,br_joe,br_josh,br_kari,br_mackenzie);\n\t\t counter++;\n\t\t //}\n\t\t \t\t \t\t \n\t\t //Close the output stream\n\t\t out1.close();\n\t\t out2.close();\n\t\t out3.close();\n\t\t out4.close();\n\t\t out5.close();\n\t\t\n\t}", "public void prepareNextTraceSimulationDataSetFromFiles(\r\n BufferedReader pSourceFile)\r\n{\r\n\r\n bufferAIndex = 0; bufferBIndex = 0;\r\n bufferADataEnd = 0; bufferADataEnd = 0;\r\n \r\n bufferADataEnd = \r\n loadDataSetFromFile(pSourceFile, bufferA, sourceAGroupIndex, \r\n sourceAChartIndex, sourceATraceIndex, sourceADataSetIndex);\r\n\r\n //set Group and Chart index to -2 so they won't be searched for as they\r\n //have already been found by the previous call\r\n \r\n bufferBDataEnd =\r\n loadDataSetFromFile(pSourceFile, bufferB, -2, \r\n -2, sourceBTraceIndex, sourceBDataSetIndex);\r\n \r\n}", "public int readPageHead() throws Exception\n {\n RandomAccessFile in = new RandomAccessFile(thefile, \"r\");\n in.seek(FileHandle.FILE_HEAD_SIZE + PAGE_SIZE * page_no);\n num_of_record = in.readShort();\n in.seek(FileHandle.FILE_HEAD_SIZE + PAGE_SIZE * page_no + 2);\n end_of_freespace = in.readShort();\n in.seek(FileHandle.FILE_HEAD_SIZE + PAGE_SIZE * page_no + 4);\n addr_of_record = new short[num_of_record];\n for(short i = 0; i < num_of_record; i++)\n {\n addr_of_record[i] = in.readShort();\n in.seek(FileHandle.FILE_HEAD_SIZE + PAGE_SIZE * page_no + 4 + 2 * (i + 1));\n }\n in.close();\n return 0;\n }", "public void prepareNextMapSimulationDataSetFromFiles(\r\n String pPath, int pCurrentDataSetIndex)\r\n{\r\n\r\n if (type != UTBoard.WALL_MAPPER){ return; }\r\n\r\n //if open, close the data file in current use\r\n closeMapSimDataFile();\r\n \r\n String mapSimDataFileName = \r\n createMapSimulationDataFilename(pPath, pCurrentDataSetIndex); \r\n\r\n try{\r\n\r\n fileInputStream = new FileInputStream(mapSimDataFileName);\r\n inputStreamReader = new InputStreamReader(fileInputStream);\r\n\r\n mapSimDataFile = new BufferedReader(inputStreamReader);\r\n \r\n } \r\n catch (FileNotFoundException e){\r\n //on error, force simulation type to RANDOM\r\n simulationType = Simulator.RANDOM;\r\n return;\r\n }\r\n\r\n //skip to the data section\r\n int retCode = \r\n findSectionWithIndex(mapSimDataFile, \"[Data Set 1]\", \"\", -1);\r\n \r\n //on error or failure to find section, force type to RANDOM\r\n if (retCode == -1) {\r\n closeMapSimDataFile();\r\n simulationType = Simulator.RANDOM;\r\n }\r\n\r\n}", "public static void process(File fileIn, File fileOut) throws IOException\n\t{\n // Initialization\n\t\t\n\t\t// Array \"array\" is the output array containing the\n\t\t// % of B answers in the 4 groups from left to right, Group 1-4\n\t\tint[] array = new int[4];\n \n\t\t// Array first contains all of the problem numbers for group 1\n int[] first = {1,8,15,22,29,36,43,50,57,64,0,0,0,0,0,0,0,0,0,0};\n \n\t\t// Array second contains all of the problem numbers for group 2\n int[] second = {2,3,9,10,16,17,23,24,30,31,37,38,44,45,51,52,58,59,65,66};\n \n\t\t// Array third contains all of the problem numbers for group 3\n int[] third = {4,5,11,12,18,19,25,26,32,33,39,40,46,47,53,54,60,61,67,68};\n \n\t\t// Array fourth contains all of the problem numbers for group 4\n int[] fourth = {6,7,13,14,20,21,27,28,34,35,41,42,48,49,55,56,62,63,69,70};\n\t\t\n //Scanning line by line, first to record name.\n\t\tScanner fileScan = new Scanner(fileIn);\n\t\tPrintStream writeStream = new PrintStream(fileOut);\n\t\t\n\t\t// The program will take each line and convert it into\n\t\t// a string while there still exists a line to be analyzed\n\t\twhile (fileScan.hasNextLine())\n\t\t{\n\t\t\t// Get person's name\n\t\t\t// There are 70 Q's, if the string contains less than 70\n\t\t\t// characters, the string must be the name\n\t\t\tString line = fileScan.nextLine();\n\t\t\tif ( line.length() < 70 ){\n\t\t\t\twriteStream.print(line + \": \");\n\t\t\t}\n\t\t\t\n\t\t\t//If it isn't a name, the string must be the test answers\n\t\t\telse {\n\t\t\t\n\t\t\t// The variables keep track of how many A's and B's \n\t\t\t// were answered in each group\n\t\t\tint countFA = 0;\n\t\t\tint countFB = 0;\n\t\t\tint countSA = 0;\n\t\t\tint countSB = 0;\n\t\t\tint countTA = 0;\n\t\t\tint countTB = 0;\n\t\t\tint countFOA = 0;\n\t\t\tint countFOB = 0;\n\t\t\t\n// Emil has stopped driving. Bryan is now Driving.\n\t\t\t\n\t\t\t//Checking each line for A's and B's, if found then compare to which group the problem answered belongs to.\n\t\t\t//If it is in a certain group, then increment counter for that group, for both A and B.\n\t\t\t\n\t\t\t\t// i keeps track of what problem # is currently\n\t\t\t\t// being examined and extracts the test taker's answer\n\t\t\t\t// for that question\n\t\t\t\tfor ( int i =1; i <= line.length();i++){\n\t\t\t\t\tchar ch = line.charAt(i-1);\n\t\t\t\t\t\tfor (int j=0; j < 20;j++)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t// Introvert/Extrovert\n\t\t\t\t\t\t\t// Checks to see if the answer is among\n\t\t\t\t\t\t\t// the first group\n\t\t\t\t\t\t\tif( first[j] == i )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( ch == 'a' || ch == 'A'){\n\t\t\t\t\t\t\t\t\tcountFA++;}\n\t\t\t\t\t\t\t\tif ( ch == 'B' || ch == 'b'){\n\t\t\t\t\t\t\t\t\tcountFB++;}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//Sensing/Intuition\n\t\t\t\t\t\t\t// Checks to see if the answer is among\n\t\t\t\t\t\t\t// the second group\n\t\t\t\t\t\t\tif( second[j] == i ){\n\t\t\t\t\t\t\t\tif ( ch == 'a' || ch == 'A'){\n\t\t\t\t\t\t\t\t\tcountSA++;}\n\t\t\t\t\t\t\t\tif ( ch =='B' || ch == 'b'){\n\t\t\t\t\t\t\t\t\tcountSB++;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Thinking/Feeling\n\t\t\t\t\t\t\t// Checks to see if the answer is among\n\t\t\t\t\t\t\t// the third group\n\t\t\t\t\t\t\tif( third[j] == i ){\n\t\t\t\t\t\t\t\tif ( ch == 'a' || ch == 'A'){\n\t\t\t\t\t\t\t\t\tcountTA++;}\n\t\t\t\t\t\t\t\tif ( ch =='B' || ch == 'b'){\n\t\t\t\t\t\t\t\t\tcountTB++;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Judging/Perceiving\n\t\t\t\t\t\t\t// Checks to see if the answer is among\n\t\t\t\t\t\t\t// the fourth group\n\t\t\t\t\t\t\tif( fourth[j] == i ){\n\t\t\t\t\t\t\t\tif ( ch == 'a' || ch == 'A'){\n\t\t\t\t\t\t\t\t\tcountFOA++;}\n\t\t\t\t\t\t\t\tif ( ch =='B' || ch == 'b'){\n\t\t\t\t\t\t\t\t\tcountFOB++;}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n//Bryan has stopped Driving. Emil is now Driving.\n\t\t\t\t\n\t\t\t\t//Output to file\n\t\t\t\n\t\t\t// String str contains the test taker's personality\n\t\t\tString str = \"\";\n\t\t\t\t\n\t\t\t//Group 1: Extrovert/Introvert\n\t\t\t\n\t\t\t//Taking how many A's and B's and printing to file, information.\n\t\t\t//If # of B's > # of A's, str gets I for Introvert\n\t\t\t//If # of B's < # of A's, str gets E for Extrovert\n\t\t\t//Otherwise if the # of B's = # of A's, str gets X.\n\t\t\tif(countFB > countFA){\n\t\t\t\tstr+=\"I\";}\n\t\t\telse if(countFB < countFA){\n\t\t\t\tstr += \"E\";}\n\t\t\telse {\n\t\t\t\tstr += \"X\";}\n\t\t\t\n\t\t\t// Gets the % of answers that were B in Group 1 and outputs it\n\t\t\t// to slot 1 of the output array\n\t\t\tdouble percent1 = (countFB* 100.0/(countFA+countFB) + .5);\n\t\t\tarray[0] = (int) percent1;\n\t\t\t\n\t\t\t\n\t\t\t//Group 2: Sensing/Intuition\n\t\t\t\n\t\t\t//Taking how many A's and B's and printing to file, information.\n\t\t\t//If # of B's > # of A's, str gets N for Intuition\n\t\t\t//If # of B's < # of A's, str gets S for Sensing\n\t\t\t//Otherwise if the # of B's = # of A's, str gets X.\n\t\t\tif(countSB > countSA)\n\t\t\t\tstr+=\"N\";\n\t\t\telse if(countSB < countSA)\n\t\t\t\tstr += \"S\";\n\t\t\telse \n\t\t\t\tstr += \"X\";\n\t\t\t\t\n\t\t\t// Gets the % of answers that were B in Group 2 and outputs it\n\t\t\t// to slot 2 of the output array\n\t\t\tdouble percent = (countSB* 100.0/(countSA+countSB) + .5);\n\t\t\tarray[1] = (int) percent;\n\t\t\t\t\n\t\t\t//Group 3: Thinking/Feeling\n\t\t\t\n\t\t\t//Taking how many A's and B's and printing to file, information.\n\t\t\t//If # of B's > # of A's, str gets F for Feeling\n\t\t\t//If # of B's < # of A's, str gets T for Thinking\n\t\t\t//Otherwise if the # of B's = # of A's, str gets X.\n\t\t\tif(countTB > countTA)\n\t\t\t\tstr+=\"F\";\n\t\t\telse if(countTB < countTA)\n\t\t\t\tstr += \"T\";\n\t\t\telse \n\t\t\t\tstr += \"X\";\n\t\t\t// Gets the % of answers that were B in Group 3 and outputs it\n\t\t\t// to slot 3 of the output array\n\t\t\tdouble percent2 = (countTB * 100.0 /(countTA+countTB)+.5);\n\t\t\tarray[2] = (int) percent2;\n\t\t\t\n\t\t\t//Group 4: Judging/Perceiving\n\t\t\t\n\t\t\t//Taking how many A's and B's and printing to file, information.\n\t\t\t//If # of B's > # of A's, str gets P for Perceiving\n\t\t\t//If # of B's < # of A's, str gets J for Judging\n\t\t\t//Otherwise if the # of B's = # of A's, str gets X.\n\t\t\tif(countFOB > countFOA)\n\t\t\t\tstr += \"P\";\n\t\t\telse if(countFOB < countFOA)\n\t\t\t\tstr += \"J\";\n\t\t\telse \n\t\t\t\tstr += \"X\";\n\t\t\t\n//Emil has stopped Driving. Bryan is Driving.\n\t\t\t\n\t\t\t// Gets the % of answers that were B in Group 4 and outputs it\n\t\t\t// to slot 4 of the output array\n\t\t\tdouble percent3 = (countFOB * 100.0 /(countFOA+countFOB) +.5);\n\t\t\tarray[3] = (int) percent3;\n\n\t\t\t// Converts the output array to a string and writes it\n\t\t\t// to the output file and also writes the person's\n\t\t\t// personality traits from the test.\n\t\t\tString a = Arrays.toString(array);\n\t\t\twriteStream.println(a + \" = \" + str);\n\t\t\t}\n\t\t}\n\t}", "public boolean scanFileHeaders(File [] files){\n for (File file : files) {\n String message = null;\n DicomDecoder dd = new DicomDecoder(file);\n \n try {\n FileInfo fi = dd.readFileInfo();\n setSeriesNumber(dd.seriesNumber);\n setStudyID(dd.studyId) ;\n\n // System.out.println(\"************\");\n //System.out.println(\"Series Number \"+ dd.seriesNumber);\n //System.out.println(\"StudyID \"+ dd.studyId);\n if( getSeriesList().contains(dd.seriesNumber) == false){\n getSeriesList().add(dd.seriesNumber);\n }\n if( getStudyList().contains(dd.studyId) == false){\n getStudyList().add(dd.studyId);\n }\n\n\n\n }\n catch (FileNotFoundException ex) {\n message = String.format( \"FileNotFoundException is thrown\\n\" +\n \"when reading header of the file.\\n\" +\n \"%s\\n\"+\n \"Error message is:\\n\" +\n \"%s\",file.getPath(),ex.getMessage() ) ;\n\n DisplayText.popupMessage(message);\n ex.printStackTrace();\n return false;\n }\n catch (IOException ex) {\n message = String.format( \"IOException is thrown\\n\" +\n \"when reading header of the file.\\n\" +\n \"%s\\n\"+\n \"Error message is:\\n\" +\n \"%s\",file.getPath(),ex.getMessage() ) ;\n\n DisplayText.popupMessage(message);\n ex.printStackTrace();\n return false;\n }\n \n }\n\n return true;\n }", "private void writeSortedRuns(int currentRun) {\n if (!phaseTwoFlag)\n fileStack.push(currentRun);\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(fileName + currentRun));\n\n /** There are still tuples in main memory */\n while (!mainMemTuples.isEmpty()) {\n Batch b = new Batch(batchSize);\n\n /** Buffer is not full, add tuples to the batch */\n while (!b.isFull()) {\n if (mainMemTuples.isEmpty()) { // All tuples have been put into a batch\n break;\n }\n\n// // phase 1 write attributes that we are interested into file\n// if (isDistinct && !phaseTwoFlag) {\n// Tuple outTuple;\n// Vector present = new Vector();\n//\n// // Add join Index at first element\n// present.add(mainMemTuples.get(0).dataAt(joinIndex));\n//\n// // Projection index\n// for (int i = 0; i < table.getSchema().getAttList().size(); i++) {\n// for (int j = 0; j < projectList.size(); j++) {\n// if (table.getSchema().getAttribute(i).equals((Attribute) projectList.get(j))) {\n// if (joinIndex != i) {// add those indexes that are projected except join index\n// present.add(mainMemTuples.get(0).dataAt(i));\n// attributeList.add(mainMemTuples.get(0).dataAt(i));\n// }\n// }\n// }\n// }\n//\n// outTuple = new Tuple(present);\n// b.add(outTuple);\n// mainMemTuples.remove(0);\n// } else {\n b.add(mainMemTuples.get(0));\n mainMemTuples.remove(0);\n// }\n }\n out.writeObject(b);\n }\n out.close();\n } catch (IOException io) {\n System.err.println(\"ExternalSort: error in writing file\");\n System.exit(1);\n }\n }", "public static void fileReader(String InpFile, String OutFile ) \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tthrows IOException {\r\n\t\tString line;\r\n\t\tFileReader inputStream = new FileReader(InpFile); // input file\r\n\t\tBufferedReader bReader = new BufferedReader(inputStream); // line reader\r\n\t\t\r\n\t\tint lines = (int)Files.lines(Paths.get(InpFile)).count();\r\n\t\tMyBinaryHeapTree heapTree = new MyBinaryHeapTree(lines);\r\n\t\tMyShellSort shellSort = new MyShellSort(lines);\r\n\t\tMyInsertionSort insSort = new MyInsertionSort(lines);\r\n\t\tint i = 0;\r\n\t\twhile ((line = bReader.readLine()) != null){\r\n\t\t\tint value = Integer.parseInt(line);\r\n\t\t\theapTree.InsertElementsAdHoc(value, i);\r\n\t\t\tshellSort.InsertElementsAdHoc(value, i);\r\n\t\t\tinsSort.InsertElementsAdHoc(value, i);\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tbReader.close();\r\n\t\tFileWriter outputStream = new FileWriter(OutFile+\"heapSort\"); // output file\r\n\t\toutputStream.write(heapTree.sort_and_print(lines).toString());\r\n\t\toutputStream.close();\r\n\t\tfor (int j = 0; j < 5; j++) {\r\n\t\t\toutputStream = new FileWriter(OutFile+\"shellSortGap\"+j);\r\n\t\t\toutputStream.write(shellSort.sort_and_print(shellSort.getGap(j)).toString());\r\n\t\t\toutputStream.close();\r\n\t\t}\r\n\t\toutputStream = new FileWriter(OutFile+\"insSort\"); // output file\r\n\t\toutputStream.write(insSort.sort_and_print().toString());\r\n\t\toutputStream.close();\r\n\t\t\t\r\n\t}", "public static void main(String[] args)\r\n\t{\r\n\t\t\r\n\t\tString path = System.getProperty(\"user.dir\") + \"\\\\TestFiles\" ;\r\n//\t\tString pathOut = System.getProperty(\"user.dir\") + \"\\\\TestFilesOut\" ;\t\r\n\t\t\r\n\t\tFile folder = new File( path ) ;\r\n\t\tFile[] listOfFiles = folder.listFiles() ;\r\n\t\t\r\n\t\tfor (int i = 0; i < listOfFiles.length; i++)\r\n\t\t{\r\n\t\t\t//System.out.printf(\"%-2s %s%n\",i ,listOfFiles[i].getName()) ;\r\n\t\t\tString nameIn = null , nameOut = null ;\r\n\t\t\tPrintWriter outputFile = null ; // keep compiler happy\r\n\t\t\tSymbolTable symbolTable ;\r\n\t\t\t\r\n\t\t\tnameIn = listOfFiles[i].getPath() ;\r\n\t\t\t\r\n\t\t\tif (nameIn.substring(nameIn.indexOf(\".\") + 1).equals(\"asm\"))\r\n\t\t\t{//System.out.printf(\"%s %n %s%n\",listOfFiles[i].getName(), nameOut) ;\r\n\t\t\t\t\r\n\t\t\t\tnameOut = listOfFiles[i].getName() ;\r\n\t\t\t\tnameOut = nameOut.substring(0, nameOut.lastIndexOf('.')) + \"0\" ;\r\n\t\t\t\tnameOut = path + \"\\\\\" + nameOut + \".hack\" ;\t\r\n\t\t\t\t\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\toutputFile = new PrintWriter(new FileOutputStream(nameOut)) ;\r\n\t\t\t\t}\r\n\t\t\t\tcatch (FileNotFoundException ex)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Could not open output file \" + nameOut) ;\r\n\t\t\t\t\tSystem.err.println(\"Run program again, make sure you have write permissions, etc.\") ;\r\n\t\t\t\t\tSystem.exit(0) ;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// TODO: finish driver as algorithm describes\r\n\t\t\r\n\t\t\t\tsymbolTable = new SymbolTable() ;\r\n\t\t\t\tfirstPass(nameIn, symbolTable) ;\t\t\r\n\t\t\t\tsecondPass(nameIn, symbolTable, outputFile) ;\t\t\t\t\r\n\t\t\t\toutputFile.close() ;\t\t\r\n\t\t\t\tSystem.out.println(listOfFiles[i].getName() + \" Done successfully!\") ;\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private static ArrayList<LabelOffset> pass1(String inFile, String dataFile, String codeFile)\n throws FileNotFoundException, RuntimeException {\n String path = \"\";\n File inf = new File(path + inFile);\n File daf = new File(path + dataFile);\n File cof = new File(path + codeFile);\n\n if (!inf.canRead()) {\n throw new FileNotFoundException(\"Invalid input file name: \" + inFile);\n }\n\n ArrayList<LabelOffset> labels = new ArrayList<LabelOffset>();\n\n int dataCount = 0;\n int offset = 0;\n\n Scanner input = new Scanner(inf);\n String line;\n\n //to keep track of how we should parse the line\n boolean isData = false;\n boolean isCode = false;\n\n String currLab = \"\";\n\n\n while (input.hasNextLine()) {\n\n line = input.nextLine().trim();\n\n\n if (line.equals(\".data\")) {\n isData = true;\n isCode = false;\n System.out.println(\"Reading data\");\n }\n if (line.equals(\".global main\")) {\n isData = false;\n isCode = true;\n\n System.out.println(\"Reading code\");\n\n }\n Scanner curr = new Scanner(line);\n\n if (isData) {\n if (line.startsWith(\".word\")) {\n //remove .word from line then split the integers with ',' as delimiter\n line = line.replace(\".word\", \"\");\n String[] nums = line.split(\",\");\n dataCount += nums.length;\n }\n\n }\n\n\n if (isCode) {\n // labels start <label>:\n if (line.endsWith(\":\")) {\n currLab = line.replace(\":\", \"\");\n LabelOffset currCom = new LabelOffset();\n currCom.label = currLab;\n currCom.offset = offset;\n labels.add(currCom);\n } else if (!line.startsWith(\".\")) {\n offset += 4;\n }\n\n }\n\n }\n\n\n PrintWriter dataOut = new PrintWriter(daf);\n PrintWriter codeOut = new PrintWriter(cof);\n dataOut.println(dataCount * 4);\n codeOut.println(offset + 4);\n\n dataOut.close();\n codeOut.close();\n\n\n return labels;\n }", "public static void main(String[] args) throws IOException {\n\t\t// step1\n\t\tloadMbr();\n\t\tretstructureHierarchy();\n////\t\t\n//\t\t\n//\t\t// step2\n\t findCompletelyIndependentPlaces();\n//\t\t\n//\t\t//step 3\n//\t\t// sorted the phase 1 file by first column and then compile it again..\n\t\t generatephase2();\n\t\t \n////\t\t step4\n//\t\t// assign notInRefined to the new hierarchy.\n//\t\t// // requires Load MBR\n\t\t loadMbr();\n\t\t assignWrongAndCompletelyIndependentPlace();\n\t\t \n//\t\tstep5 \n\t\tloadMbr();\n\t\t getCentreForAllPlaceInGeonames();\n\t\t calculateMoveAndDeleteAcc();\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
To remove the local subscription
public void removeLocalSubscription(LocalSubscription subscription) throws AndesException { localSubscriptionProcessor.removeSubscription(subscription); removeSubscriptionDirectly(subscription); }
[ "void removeSubscriptions(Subscription subscription);", "public void unsetSubscription()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SUBSCRIPTION$50, 0);\n }\n }", "void wipeSubscriptions(String sessionID);", "private void unsubscribe() {\n subscriber=null;\n }", "void unsubscribe(SubscriptionId id);", "void unsubscribe();", "public synchronized void createDisconnectOrRemoveLocalSubscription(LocalSubscription subscription,\n SubscriptionChange type) throws AndesException {\n\n if (SubscriptionChange.ADDED == type) {\n localSubscriptionProcessor.addSubscription(subscription);\n\n //Store the subscription\n andesContextStore.storeDurableSubscription(subscription);\n log.info(\"Local subscription \" + type + \" \" + subscription.toString());\n\n } else if (SubscriptionChange.DELETED == type) {\n localSubscriptionProcessor.removeSubscription(subscription);\n\n removeSubscriptionDirectly(subscription);\n log.info(\"Local Subscription \" + type + \" \" + subscription.toString());\n\n } else if (SubscriptionChange.DISCONNECTED == type) {\n updateLocalSubscription(subscription);\n log.info(\"Local subscription \" + type + \" \" + subscription.toString());\n }\n\n // Update channel id map\n if (type == SubscriptionChange.ADDED) {\n channelIdMap.put(subscription.getChannelID(), subscription);\n } else { //@DISCONNECT or REMOVE\n UUID channelIDOfSubscription = subscription.getChannelID();\n //when we delete the mock durable topic subscription it has no underlying channel\n if (null != channelIDOfSubscription) {\n channelIdMap.remove(channelIDOfSubscription);\n }\n }\n\n }", "void canceledSubscription();", "void unsubscribeActive();", "public boolean unsubscribe( Subscription sub ) throws IOException;", "@Override\n public synchronized void removeLocalRegistration()\n {\n log.debug(\"Removing local repository from cohort registry store.\");\n\n CohortMembership registryStoreProperties = this.retrieveRegistryStoreProperties();\n\n registryStoreProperties.setLocalRegistration(null);\n\n this.writeRegistryStoreProperties(registryStoreProperties);\n }", "private void unsubscribe(){\n\t\tsynchronized(subscribeLock){\n\t\t\tif( mqttClient != null && mqttClient.isConnected() ){\n\t\t\t\ttry {\n\t\t\t\t\tmqttClient.unsubscribe(this.subscribedTopicScopes.toArray(new String[this.subscribedTopicScopes.size()]));\n\t\t\t\t\tthis.subscribedTopicScopes.clear();\n\t\t\t\t} catch (MqttException e) {\n\t\t\t\t\tActivator.log(LogService.LOG_ERROR, \"Error unsubscribing to topic:\" + rootTopic + \" with client id: \" + (String)sReg.getReference().getProperty(Constants.SERVICE_PID) + \", error: \" + e.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void unsubscribe(Player player);", "void removeSubscriptionListener(SubscriptionListener listener);", "public void destroy(){\r\n\t\tunbindSubscriber(ContextProvider.getInstance().getSubscriber());\r\n\t}", "public void unsubscribe(String subscriptionId) {\n \n \t\tWebTarget wt = subscriptionsTarget.path(subscriptionId);\n \t\t\n \t\tResponse response = wt.request()\n \t\t\t .header(\"Authorization\", \"Bearer \" + playPlatformApiToken)\n \t\t\t .buildDelete()\n \t\t\t .invoke();\n \t\t\n \t\tlogger.debug(\"Unsubscribe response status : \"+response.getStatus());\n\t\tif (response.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {\n \t\t\tlogger.error(\"Unsubscription failed. HTTP Status Code: \"+response.getStatus());\n \t\t}\n\t\telse {\n \t\t\tsubscriptions.remove(subscriptionId);\n \t\t}\n \t\tresponse.close();\n \t}", "void unsubscribeAll(SubscriptionType type);", "protected void clearSubscriptions() {\n compositeSubscription.unsubscribe();\n compositeSubscription = new CompositeSubscription();\n }", "private void unsubscribe() {\n Log.i(TAG, \"Unsubscribing.\");\n Nearby.Messages.unsubscribe(mGoogleApiClient, mMessageListener);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests that when the RandomGeneration is fed a randomization string (see: Randomizer.java), for its height in args[6], it correctly sets the end column of the RandomGeneration to be startCol + [randomly generated number based on randomization String] In this case, endCol must be from 12 and 15 because the RandomGeneration can fill 3, 4, or 6 columns
@Test public void testRandomHeight() { String[] args = {"Random", "2", "RIGHT:DOWN", "7", "10", "2", "R(3,4,6;0.5,0.25,0.25)"}; RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args); assertEquals(10, inst.getStartCol()); assertTrue(inst.getEndCol() >= 12); assertTrue(inst.getEndCol() <= 15); }
[ "@Test\n public void testRandomStartCol() {\n String[] args = {\"Random\", \"2\", \"RIGHT:DOWN\", \"5\", \"U(4:13)\", \"3\", \"2\"};\n RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args);\n\n int maxStartCol = Integer.MIN_VALUE;\n int minStartCol = Integer.MAX_VALUE;\n\n for (int iteration = 1; iteration <= 100; iteration+=1) {\n inst.regenerate();\n maxStartCol = Math.max(maxStartCol, inst.getStartCol());\n minStartCol = Math.min(minStartCol, inst.getStartCol());\n }\n\n assertTrue(maxStartCol <= 13);\n assertTrue(minStartCol >= 4);\n }", "@Test\n public void testRandomWidth() {\n String[] args = {\"Random\", \"2\", \"RIGHT:DOWN\", \"5\", \"3\", \"R(1,2,3;0.5,0.25,0.25)\", \"2\"};\n RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args);\n\n assertEquals(5, inst.getStartRow());\n assertTrue(inst.getEndRow() >= 5);\n assertTrue(inst.getEndRow() <= 7);\n }", "@Test\n public void testRandomStartRow() {\n String[] args = {\"Random\", \"2\", \"RIGHT:DOWN\", \"U(2:9)\", \"10\", \"3\", \"2\"};\n RandomGeneration inst = new RandomGeneration(NUM_ROWS, NUM_COLS, args);\n\n int maxStartRow = Integer.MIN_VALUE;\n int minStartRow = Integer.MAX_VALUE;\n\n for (int iteration = 1; iteration <= 100; iteration+=1) {\n maxStartRow = Math.max(maxStartRow, inst.getStartRow());\n minStartRow = Math.min(minStartRow, inst.getStartRow());\n }\n\n assertTrue(maxStartRow <= 9);\n assertTrue(minStartRow >= 2);\n }", "public static String genGrid() {\n\t\t\n\t\tString grid = \"\"; \n\t\t\n\t\tint max_size_grid = 15;\n\t\tint min_size_grid = 5;\n\t\t\n\t\tint max_num_IMF = 10;\n\t\tint min_num_IMF = 5;\n\t\t\n\t\tint max_health = 99;\n\t\tint min_health = 1;\n\t\t\n\t\tint max_capacity = 10;\n\t\tint min_capacity = 1;\n\t\t\n\t\tint num_rows = (int)(Math.random()*((max_size_grid - min_size_grid)+1))+min_size_grid;\n\t\tint num_cols = (int)(Math.random()*((max_size_grid - min_size_grid)+1))+min_size_grid;\n\n\t\tint num_IMF = (int)(Math.random()*((max_num_IMF - min_num_IMF)+1))+min_num_IMF;\n\t\t\n\t\tint capacity = (int)(Math.random()*((max_capacity - min_capacity)+1))+min_capacity;\n\n\t\tint max_index = num_rows * num_cols - 1;\t\t\n\t\tint min_index = 0;\n\t\t\n\t\tint ethan_postion = (int)(Math.random()*((max_index - min_index)+1))+min_index;\n\t\t\t\n\t\tint submarine_postion = (int)(Math.random()*((max_index - min_index)+1))+min_index;\n\t\t\n\t\twhile (submarine_postion == ethan_postion) submarine_postion = (int)(Math.random()*((max_index - min_index)+1))+min_index;\n\t\t\n\t\tString IMF_postions = \"\";\n\t\tString IMF_healths = \"\";\n\t\tfor (int i =0; i < num_IMF; i++) \n\t\t{\n\t\t\tint IMF_member = (int)(Math.random()*((max_index - min_index)+1))+min_index;\n\t\t\twhile(IMF_member == ethan_postion || IMF_member == submarine_postion || IMF_postions.contains(IMF_member+\"\")) {\n\t\t\t\tIMF_member = (int)(Math.random()*((max_index - min_index)+1))+min_index;\n\t\t\t}\n\t\t\tIMF_postions += IMF_member;\n\t\t\tIMF_healths += (int)(Math.random()*((max_health - min_health)+1))+min_health;\n\t\t\tif(num_IMF - i != 1) \n\t\t\t{\n\t\t\t\tIMF_postions += \",\";\n\t\t\t\tIMF_healths += \",\";\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\tgrid += num_rows + \",\" + num_cols +\";\";\t\n\t\tgrid += indexConvertor(ethan_postion+\"\", num_cols) + \";\";\n\t\tgrid += indexConvertor(submarine_postion+\"\", num_cols) + \";\";\n\t\tgrid += indexConvertor(IMF_postions+\"\", num_cols) + \";\";\n\t\tgrid += IMF_healths + \";\";\n\t\tgrid += capacity;\n\t\n\t\treturn grid;\n\t}", "public void randomize() {\r\n\t\tfor (int row = 0; row < 7; row++) {\r\n\t\t\tleftColumn.setElement(row, Color.argb(255, rand.nextInt(255), rand.nextInt(255), rand.nextInt(255)));\r\n\t\t\trightColumn.setElement(row, Color.argb(255, rand.nextInt(255), rand.nextInt(255), rand.nextInt(255)));\r\n\t\t\tfor (int col = 0; col < 7; col++) {\r\n\t\t\t\tfor (int index = 0; index < array5x7x7.length; index++) {\r\n\t\t\t\t\tarray5x7x7[index].setElement(row, col,\r\n\t\t\t\t\t\t\tColor.argb(255, rand.nextInt(255), rand.nextInt(255), rand.nextInt(255)));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tui.updateScreen();\r\n\t}", "@Test\n public void testInvalidInput() {\n\n //Row out of bounds\n String[] args = {\"Random\", \"2\", \"RIGHT:DOWN\", \"11\", \"19\", \"3\", \"2\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args));\n\n //Col out of bounds\n String[] args2 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"5\", \"21\", \"3\", \"2\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args2));\n\n //Invalid row number (not number or \"U\")\n String[] args3 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"A\", \"21\", \"3\", \"2\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args3));\n\n //Invalid column number (not number or \"U\")\n String[] args4 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"2\", \"C\", \"3\", \"2\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args4));\n\n //Invalid width (not number or \"R(...)\")\n String[] args5 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"2\", \"2\", \"W\", \"2\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args5));\n\n //Invalid height (not number or \"R(...)\")\n String[] args6 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"2\", \"4\", \"3\", \"H\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args6));\n\n //Invalid array length\n String[] args7 = {\"Random\", \"2\", \"RIGHT:DOWN\", \"2\", \"4\", \"3\"};\n assertThrows(GenerationException.class,\n () -> new RandomGeneration(NUM_ROWS, NUM_COLS, args7));\n\n }", "public void randomizeRightColumn() {\r\n\t\tfor (int row = 0; row < ARRAY_SIZE; row++) {\r\n\t\t\trightColumn.setElement(row, Color.argb(255, rand.nextInt(255), rand.nextInt(255), rand.nextInt(255)));\r\n\t\t}\r\n\t\tui.updateScreen();\r\n\t}", "public void test_createCells_producesGridWithExpectedNumberOfColumns() {\r\n // Arrange\r\n\t\tint rows = 10;\r\n\t\tint columns = 5;\r\n\t\tdouble lat = 50;\r\n\t\tdouble lon = -10;\r\n\t\tint azimuth = 45;\r\n\t\tdouble resolution = 100;\r\n \t\r\n \t// Act\r\n\t\tGridCell[][] cells = cellGenerator.createCells(lat, lon, azimuth, rows, columns, resolution);\r\n \t\r\n \t// Assert\r\n \tAssert.assertEquals(cells[0].length, columns);\r\n }", "public void Random() {\r\n\t\t\t\r\n\t\tif(doesPathExist(startingRow, startingCol)) {\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < ROWS; i++) {\r\n\t\t\t\tfor (int j = 0; j < COLS; j++) {\r\n\t\t\t\t\tsolution[i][j] = false;\r\n\t\t\t\t\tvisited[i][j] = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tint currentRow = startingRow;\r\n\t\t\tint currentCol = startingCol;\r\n\t\t\tint roll;\r\n\t\t\tint counter=0;\r\n\t\t\t\r\n\t\t\twhile(currentRow != endingRow || currentCol != endingCol) {\r\n\r\n\t\t\t\troll = (int)(Math.random() * 4) + 1;\r\n\t\t\t\t\tif(roll == 1) {\r\n\t\t\t\t\t\tif((currentRow != ROWS-1) && (mazeMap[currentRow+1][currentCol]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentRow ++;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\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 if(roll == 2) {\r\n\t\t\t\t\t\tif((currentRow != 0) && (mazeMap[currentRow-1][currentCol]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentRow --;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\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}\r\n\t\t\t\t\telse if(roll == 3) {\r\n\t\t\t\t\t\tif((currentCol != COLS-1) && (mazeMap[currentRow][currentCol+1]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentCol ++;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\t\r\n\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 if(roll == 4) {\r\n\t\t\t\t\t\tif((currentCol != 0) && (mazeMap[currentRow][currentCol-1]!= 2)) {\r\n\t\t\t\t\t\t//\tpixelArray[currentRow][currentCol].setBackground(Color.WHITE);\r\n\t\t\t\t\t\t\tcurrentCol --;\r\n\t\t\t\t\t\t\tpixelArray[currentRow][currentCol].setBackground(Color.YELLOW);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\tcounter++;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tnumOfSteps.setText(\"Steps to Goal: \" + counter);\r\n\t\t\t\r\n\t\t}\r\n\t\telse {\r\n\t\t\tnumOfSteps.setText(\"NO PATH TO GOAL\");\r\n\t\t}\r\n\t\t\t\r\n\t}", "private void fillNumberingByColumn() {\n for (int r = 0; r < super.getGridHeight(); r++) {\n int val = r + super.getStartTile();\n\n for (int c = 0; c < super.getGridWidth(); c++) {\n String fileName = String.format(this.nameMatcher, val);\n super.setTileName(r, c, fileName);\n val += super.getGridHeight();\n }\n }\n }", "private int getRandomPositionY() {\r\n\t\treturn rnd.nextInt(GRID_ROWS);\r\n\t}", "private void generateRandomHeights() {\n heights = new double[arrSize];\n\n for(int i = 0; i < arrSize; i++) {\n double height = Math.random() * MAX_HEIGHT;\n if(height < MIN_HEIGHT)\n height += MIN_HEIGHT;\n heights[i] = height;\n }\n }", "public static String[][] genGrid(){\n\t\tString[][] grid = new String [m][n];\n\n\t\tString[][] gridCom = new String [m][n];\n\t\tfor (int i =0; i<m; i++){\n\t\t\tfor(int j=0 ; j<n ; j++){\n\t\t\t\tgridCom[i][j]=(i + \",\" + j);\n\t\t\t}\n\t\t}\n\t\tString[][] arr2 = shuffle(gridCom);\n\t\tgrid[Integer.parseInt(arr2[0][0].split(\",\")[0])][Integer.parseInt(arr2[0][0].split(\",\")[1])] = \"Agent\";\n\t\tgrid[Integer.parseInt(arr2[0][1].split(\",\")[0])][Integer.parseInt(arr2[0][1].split(\",\")[1])] = \"Teleportal\";\n\n\t\t//Number of rocks, pressure pads and obstacles in the grid\n\t\tobstaclesNumber = random.nextInt(((m*n)-4)+1) /2; //decrease number of obstacles\n\t\trocksNumber = random.nextInt(m)+1;\n\t\twhile(rocksNumber> ((m*n)-obstaclesNumber)/2)\n\t\t\trocksNumber = random.nextInt(m)+2;\n\t\tif(obstaclesNumber >=3)\n\t\t\tobstaclesNumber = obstaclesNumber -2;\n\t\tif(rocksNumber >=3){\n\t\t\trocksNumber = rocksNumber-2;\n\t\t}\n\t\t//pressurePadNumber = rocksNumber\n\n\t\t////generating obstacles\n\t\tint counter = 0;\n\t\tfor(int i =0; i<obstaclesNumber ; i++){\n\t\t\tfor(int x = 0; x<arr2.length; x++){\n\t\t\t\tfor(int y =0 ; y<arr2[i].length; y ++){\n\t\t\t\t\tif(grid[x][y] !=\"Agent\" && grid[x][y] !=\"Teleportal\" && (counter<obstaclesNumber)){\n\t\t\t\t\t\tgrid[x][y] = \"Obstacle\";\n\t\t\t\t\t\tcounter ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t////generating rocks\n\t\tcounter = 0;\n\t\tfor(int i =0; i<rocksNumber ; i++){\n\t\t\tfor(int x = 0; x<arr2.length; x++){\n\t\t\t\tfor(int y =0 ; y<arr2[i].length; y ++){\n\t\t\t\t\tif(grid[x][y] !=\"Agent\" && grid[x][y] !=\"Teleportal\" && grid[x][y] !=\"Obstacle\" && (counter<rocksNumber)){\n\t\t\t\t\t\tgrid[x][y] = \"Rock\";\n\t\t\t\t\t\tcounter ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t////generating pressure pads\n\t\tcounter = 0 ;\n\t\tfor(int i =0; i<rocksNumber ; i++){\n\t\t\tfor(int x = 0; x<arr2.length; x++){\n\t\t\t\tfor(int y =0 ; y<arr2[i].length; y ++){\n\t\t\t\t\tif(grid[x][y] !=\"Agent\" && grid[x][y] !=\"Teleportal\" && grid[x][y] !=\"Obstacle\" && grid[x][y] !=\"Rock\" && (counter<rocksNumber)){\n\t\t\t\t\t\tgrid[x][y] = \"Pressure pad\";\n\t\t\t\t\t\tcounter ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t/**printing the grid\n\t\tfor(int i =0;i<m; i++){\n\t\t\tArrayList<String> row = new ArrayList<String>();\n\t\t\tfor (int j=0;j<n;j++){\n\t\t\t\trow.add(grid[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println(row);\n\t\t}\n\t\t * \n\t\t */\n\n\t\treturn grid;\n\n\t}", "private void generateBoardLayout() {\n Collections.shuffle(availableDice);\n List<GameCube> row1 = Arrays.asList(availableDice.get(0), availableDice.get(1), availableDice.get(2), availableDice.get(3));\n List<GameCube> row2 = Arrays.asList(availableDice.get(4), availableDice.get(5), availableDice.get(6), availableDice.get(7));\n List<GameCube> row3 = Arrays.asList(availableDice.get(8), availableDice.get(9), availableDice.get(10), availableDice.get(11));\n List<GameCube> row4 = Arrays.asList(availableDice.get(12), availableDice.get(13), availableDice.get(14), availableDice.get(15));\n board = new ArrayList<>();\n board.add(0, row1);\n board.add(1, row2);\n board.add(2, row3);\n board.add(3, row4);\n }", "public void fillPuzzle(int numValues, int numHorizontal, int numVertical) {\r\n\r\n // There is repetition of code here, but removing the repetition\r\n // requires some functional manipulation which we haven't covered yet \r\n int[][] latin = getLatinSquare();\r\n int countHorizontal = 0;\r\n while(countHorizontal < numHorizontal) {\r\n Random rand = new Random();\r\n int x = rand.nextInt(gridsize);\r\n int y = rand.nextInt(gridsize-1);\r\n if(rowConstraints[x][y].value.equals(\" \")) {\r\n String s = randomConstraint();\r\n if(s.equals(\"<\") && (latin[x][y] < latin[x][y+1])){\r\n setRowConstraint(x, y, s,rowConstraints,squares);\r\n countHorizontal++;\r\n }\r\n else if(s.equals(\">\") && (latin[x][y] > latin[x][y+1])){\r\n setRowConstraint(x, y, s,rowConstraints,squares);\r\n countHorizontal++;\r\n }\r\n else{\r\n \r\n }\r\n }\r\n }\r\n int countVertical = 0;\r\n while(countVertical < numVertical) {\r\n Random rand = new Random();\r\n int x = rand.nextInt(gridsize);\r\n int y = rand.nextInt(gridsize-1);\r\n if(columnConstraints[x][y].value.equals(\" \")) {\r\n String s = randomConstraint();\r\n if(s.equals(\"<\") && (latin[y][x] < latin[y+1][x])){\r\n setColumnConstraint(x, y, s,columnConstraints,squares);\r\n countVertical++;\r\n }\r\n else if(s.equals(\">\") && (latin[y][x] > latin[y+1][x])){\r\n setColumnConstraint(x, y, s, columnConstraints, squares);\r\n countVertical++;\r\n }\r\n else{\r\n \r\n }\r\n }\r\n }\r\n int countValues = 0;\r\n while(countValues < numValues) {\r\n Random rand = new Random();\r\n int x = rand.nextInt(gridsize);\r\n int y = rand.nextInt(gridsize);\r\n if(squares[x][y].getValue() == 0) {\r\n squares[x][y] = new FutoshikiSquare(false, latin[x][y],x,y);\r\n countValues++;\r\n }\r\n }\r\n System.out.println(displayString());\r\n for (int i = 0; i < gridsize; i++) {\r\n for (int j = 0; j < gridsize; j++) {\r\n this.latinSquare[i][j] = new FutoshikiSquare(true, latin[i][j], i, j);\r\n //System.out.print(this.latinSquare[i][j].getValue() + \" \");\r\n }\r\n //System.out.println(\"\\n\");\r\n }\r\n }", "int randomHeight()\n {\n\tint v = 1;\n\twhile (randseq.nextBoolean()) { v++; }\n\treturn v;\n }", "@Test\n public void testHdrRange() throws Exception {\n try (Statement statement = connection.createStatement()) {\n double minVal = 0.001;\n double maxVal = 0.01;\n int iterations = 1000;\n statement.execute(\"select pg_stat_statements_reset()\");\n for (int i = 0; i < iterations; i++) {\n double randVal = minVal + (Math.random() * (maxVal - minVal));\n String randString = String.valueOf(randVal);\n statement.execute(\"select pg_sleep(\" + randString + \");\");\n }\n\n runCheckHdrArray(statement, iterations, DEFAULT_YB_HDR_BUCKET_FACTOR);\n }\n }", "public String randomCoordinate() { // coordinate for other action\n StringBuilder ans = new StringBuilder();\n int rowIndex = uppercaseLeft + (int)(random.nextFloat()*(uppercaseRight - uppercaseLeft + 1));\n ans.append((char)rowIndex);\n\n int colIndex = numLeft + (int)(random.nextFloat()*(numRight - numLeft + 1));\n ans.append(String.valueOf(colIndex));\n\n return ans.toString();\n }", "@Test\n public void testBuildRectangleRightColumn() throws Exception {\n System.out.println(\"testBuildRectangleRightColumn\");\n int h = 6;\n int w = 5;\n String [] expResult = new String [h-2];\n String [] []rectangle = Treatwell.buildRectangle(h, w);\n \n for(int i=0; i<expResult.length;i++){\n expResult[i] = \"|\"; \n }\n String [] result = new String [h-2];\n for(int i=0;i<result.length; i++){\n result[i]=rectangle[i+1][w-1];\n }\n System.out.print(\"Expected: \");\n for(int i=0; i<expResult.length;i++){\n System.out.print(expResult[i]);\n }\n System.out.println(\"\");\n System.out.print(\"Result: \");\n for(int i=0; i<expResult.length;i++){\n System.out.print(result[i]);\n }\n System.out.println(\"\");\n System.out.println(\"\");\n assertArrayEquals(expResult, result);\n \n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the last ram in the ordered set where time LIKE &63;.
public com.nlu.entity.model.Ram findByDate_Last(java.util.Date time, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException, com.nlu.entity.NoSuchRamException;
[ "public com.nlu.entity.model.Ram fetchByDate_Last(java.util.Date time,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public com.nlu.entity.model.Ram findByDate_First(java.util.Date time,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tcom.nlu.entity.NoSuchRamException;", "public com.nlu.entity.model.Ram[] findByDate_PrevAndNext(long ramId,\n\t\tjava.util.Date time,\n\t\tcom.liferay.portal.kernel.util.OrderByComparator orderByComparator)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException,\n\t\t\tcom.nlu.entity.NoSuchRamException;", "public static String mostRAM(){\n double low = 0;\n int card = 0;\n \n for (int i = 0; i< Stuff.stats.length; i++){\n\n if (low > Stuff.stats[i][Stuff.RAM]){\n low = Stuff.stats[i][Stuff.RAM];\n card = i;\n }\n \n }\n return Stuff.names[card];\n }", "public DataTime getLatestTime() {\n\n if (latestTime.isNull()) {\n return (System.currentTimeMillis() - cacheTime < cacheHoldTime ? latestTime\n : null);\n } else if (inUriCatalog) {\n return latestTime;\n } else if (System.currentTimeMillis() - cacheTime < cacheHoldTime) {\n return latestTime;\n } else { // TODO : should we go ahead and query the inventory now?\n return null;\n }\n // // sanity check\n // if( latestTime != null &&\n // !latestTime.isNull() ) {\n //\n // if( !dataTimes.isEmpty() &&\n // latestTime.getValidTime().getTimeInMillis() !=\n // dataTimes.get( dataTimes.size()-1 ).getValidTime().getTimeInMillis()\n // ) {\n // out.println(\"??latestTime and lastTime in availTimes list don't match\");\n // }\n // }\n }", "long getSearchTime();", "Node<K, V> findBucket(long time) {\n long duration = time - nanos;\n int length = wheel.length - 1;\n for (int i = 0; i < length; i++) {\n if (duration < SPANS[i + 1]) {\n int ticks = (int) (time >> SHIFT[i]);\n int index = ticks & (wheel[i].length - 1);\n return wheel[i][index];\n }\n }\n return wheel[length][0];\n }", "private Pair<Integer,Integer> locateLatest(TemporalPeriod time) {\n\n while (addChunkInProgress);\n\n //locate chunck where the latest timestamp exists\n if(currChunkFirstTimestamp < time.to().getTime()) {\n //search currChunk\n int recordInd = KiteUtils.binarySearch(currChunk, 0, dataInd - 1,\n time.to());\n return new Pair<>(-1, recordInd);\n }\n\n int endOverlapPeriod = KiteUtils.binarySearch_EndOverlap(dataTimes,\n time);\n\n if(endOverlapPeriod >= 0) {\n //determine latest recod index\n int recordInd = KiteUtils.binarySearch(data.get(endOverlapPeriod)\n , 0, data.get(endOverlapPeriod).length-1, time.to());\n return new Pair<>(endOverlapPeriod, recordInd);\n } else {\n //search old data in disk\n return new Pair<>(-1, -1);\n }\n }", "static private int FindLastArrival(String type, ArrayList<Job> Table) {\n Job Result = null;\n for (Job J : Table) {\n if (J.getType().equals(type)) {\n Result = J;\n }\n }\n if (Result == null) {\n return 0;\n } else {\n return Result.getArrivalTime();\n }\n }", "public long getSearchTime();", "public Search getLastSearch() {\r\n SQLiteDatabase db = helper.getReadableDatabase();\r\n\r\n Cursor cursor = db.rawQuery(\"SELECT * FROM \" + DBConsts.Table_SearchHistory.TABLE_NAME + \" ORDER BY \" + DBConsts.Table_SearchHistory.COLUMN_Date + \" DESC LIMIT 1\", null);\r\n\r\n if (cursor.moveToNext())\r\n return this.createSearchFromCursor(cursor);\r\n else\r\n return null;\r\n }", "public Cursor getRecordsAfter(long timestamp) {\n String selection = WeightDBContract.WeightEntry.COLUMN_NAME_TIME + \" >= ?\";\n String[] selectionArgs = { String.valueOf(timestamp) };\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n\n Cursor cursor = db.query(\n WeightDBContract.WeightEntry.TABLE_NAME,\n WEIGHT_PROJECTION, selection, selectionArgs, null, null, DESC_SORT_ORDER\n );\n\n return cursor;\n\n\n }", "public int getTimePosition(Integer time) {\n for (int position = 0; position < getCount(); ++position) {\n if (getItem(position).second.equals(time)) {\n return position;\n }\n }\n\n return -1;\n }", "public String getLastItem();", "public PlannerHistory latestHistoryRec(){\n return getHistoryList().get(sizeHistory()-1);\n }", "public long getMaxTime(){\n long max;\n if(myPlaces_ra != null){\n // max variable set to the first time element in the array\n max = myPlaces_ra.get(0).getTime();\n\n for (int i = 0; i < myPlaces_ra.size(); i++) {\n //compare if the current is bigger than the one hold in the max variable\n if(myPlaces_ra.get(i).getTime() > max ){\n max = myPlaces_ra.get(i).getTime();\n\n }\n }\n Log.d(TAG, \"getMaxTime: \" + max);\n\n }else{\n Log.d(TAG, \"array is empty\");\n max = -1;\n return max;\n }\n return max;\n\n }", "String findLastUpdateTime(Long processId);", "public int locateTime(float t) {\n int i = -1;\n while (i+1 < time.size() && time.get(i+1) <= t) i++;\n return i;\n }", "@Override\n public String getLastFileByTime(int time) throws IllegalAccessException {\n MDSParameters params = new MDSParamBuilder().time(time).buildMDSParams();\n MDSQueue m = new MDSQueue();\n return m.getLastFilenameByParam(params);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the result of interpreting the object as an instance of 'Task Definition'. This implementation returns null; returning a nonnull result will terminate the switch.
public Object caseSpem_TaskDefinition(org.topcased.spem.TaskDefinition object) { return null; }
[ "public Object caseTaskDefinition(TaskDefinition object) {\n\t\treturn null;\n\t}", "public Object caseLanguageTaskDefinition(LanguageTaskDefinition object) {\n\t\treturn null;\n\t}", "public String getTaskDefinition() {\n return this.taskDefinition;\n }", "public Object caseDomainTaskDefinition(DomainTaskDefinition object) {\n\t\treturn null;\n\t}", "public T caseTask(Task object) {\n\t\treturn null;\n\t}", "public T caseTask(Task object) {\r\n\t\treturn null;\r\n\t}", "public T caseTask(Task object)\n {\n return null;\n }", "public T caseTaskInstance(TaskInstance object) {\r\n\t\treturn null;\r\n\t}", "public T caseSimpleTask(SimpleTask object) {\n\t\treturn null;\n\t}", "firmament.TaskDesc.TaskDescriptor.TaskType getTaskType();", "public Object caseMethodTaskDefinition(MethodTaskDefinition object) {\n\t\treturn null;\n\t}", "public T caseResultTask(ResultTask object) {\n\t\treturn null;\n\t}", "@Override\n\t\tpublic Task<?> getTask(){\n\t\t\treturn task;\n\t\t}", "Task getTask();", "public T caseGenerationTask(GenerationTask object)\n {\n return null;\n }", "public T caseDefinition(Definition object)\n {\n return null;\n }", "public static Task getTaskFromRepresentation(String taskRepresentation) throws InvalidTaskDataException {\n String[] taskData = taskRepresentation.split(\" \\\\|;; \");\n try {\n boolean isDone = taskData[1].equals(\"X\");\n\n switch (TaskType.valueOf(taskData[0])) {\n case DEADLINE:\n return new Deadline(taskData[2], isDone, LocalDate.parse(taskData[3]));\n case EVENT:\n return new Event(taskData[2], isDone, taskData[3]);\n case TODO:\n return new ToDo(taskData[2], isDone);\n default:\n return null;\n }\n } catch (ArrayIndexOutOfBoundsException | DateTimeParseException e) {\n throw new InvalidTaskDataException();\n }\n }", "public T caseSystemTask(SystemTask object) {\n\t\treturn null;\n\t}", "public Task translateTask(String line) {\n assert line != null; //if not it will cause exceptions that will break code\n String[] contents = line.split(\"\\\\|\");\n String taskType = contents[0];\n Task result;\n switch (taskType) {\n case \"T\":\n result = new ToDo(contents[2], Integer.parseInt(contents[3]));\n break;\n case \"E\":\n result = new Event(contents[2], contents[3], Integer.parseInt(contents[4]));\n break;\n default:\n result = new Deadline(contents[2], contents[3], Integer.parseInt(contents[4])); // means deadline\n }\n if (contents[1].equals(\"1\")) {\n result.setDone();\n }\n return result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches for ShopMaterial associated with currency character.
public static ShopMaterial getCurrency(final char currencyIdentifier) throws InvalidSignException { final Character searchCharacter = Character.valueOf(currencyIdentifier); if(!currencies.containsKey(searchCharacter)) throw new InvalidSignException(); return currencies.get(searchCharacter); }
[ "public static ShopMaterial getShopMaterial(final String name) throws InvalidMaterialException {\r\n\t\treturn getShopMaterial(name,true);\r\n\t}", "private Optional<MaterialCompactorInfo> findForMaterial(Material material) {\n for (MaterialCompactorInfo info : materialCompactorInfoList) {\n if (info.sourceMaterial.equals(material))\n return Optional.of(info);\n }\n return Optional.empty();\n }", "public CleaningMaterial findByName(String name);", "Material findMaterial(String name) throws ReadException;", "public Material getCrateItem();", "io.opencannabis.schema.content.MaterialsContent.MaterialsData getMaterial();", "public String getMaterial() {\n return material;\n }", "public CurrencyNode getCurrency(final String symbol) {\n \n ReadLock commodityReadLock = commodityLock.readLock();\n commodityReadLock.lock();\n \n try {\n CurrencyNode rNode = null;\n \n for (CurrencyNode node : getCurrencies()) {\n if (node.getSymbol().equals(symbol)) {\n rNode = node;\n break;\n }\n }\n return rNode;\n } finally {\n commodityReadLock.unlock();\n }\n }", "@Test\n void testFindBySymbol() {\n String symbol = service.findAll().stream().findAny().get().getSymbol();\n Currency currency = service.findBySymbol(symbol);\n assertNotNull(currency);\n assertEquals(symbol, currency.getSymbol());\n }", "public java.lang.String getMaterial() {\r\n return material;\r\n }", "public void setMaterial(java.lang.String material) {\r\n this.material = material;\r\n }", "public String obetener_material (){ return material; }", "public void getProductLookup() {\n String searchedProduct = searchProduct.getText();\n productInventory = Inventory.lookupProduct(searchedProduct);\n }", "private void findProduct()\n\t{\n\t\tString query = f_name1.getText();\n\t\tif (query == null || query.length() == 0)\n\t\t\treturn;\n\t\tquery = query.toUpperCase();\n\t\t//\tTest Number\n\t\tboolean allNumber = true;\n\t\ttry\n\t\t{\n\t\t\tInteger.getInteger(query);\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tallNumber = false;\n\t\t}\n\t\tString Value = query;\n\t\tString Name = query;\n\t\tString UPC = (allNumber ? query : null);\n\t\tString SKU = (allNumber ? query : null);\n\t\t\n\t\tMWarehousePrice[] results = null;\n\t\tsetParameter();\n\t\t//\n\t\tresults = MWarehousePrice.find (p_ctx,\n\t\t\tm_M_PriceList_Version_ID, m_M_Warehouse_ID,\n\t\t\tValue, Name, UPC, SKU, null);\n\t\t\n\t\t//\tSet Result\n\t\tif (results.length == 0)\n\t\t{\n\t\t\tString message = Msg.translate(p_ctx, \"search.product.notfound\");\n\t\t\tFDialog.warn(0, null, message + query,\"\");\n\t\t\tsetM_Product_ID(0);\n\t\t\tsetPrice(Env.ZERO);\n\t\t}\n\t\telse if (results.length == 1)\n\t\t{\n\t\t\tsetM_Product_ID(results[0].getM_Product_ID());\n\t\t\tsetQty(Env.ONE);\n\t\t\tf_name.setText(results[0].getName());\n\t\t\tsetPrice(results[0].getPriceStd());\n\t\t\tsaveLine();\n\t\t}\n\t\telse\t//\tmore than one\n\t\t{\n\t\t\tWQueryProduct qt = new WQueryProduct(v_POSPanel);\n\t\t\tqt.setResults(results);\n\t\t\tqt.setQueryData(m_M_PriceList_Version_ID, m_M_Warehouse_ID);\n\t\t\tqt.setVisible(true);\n\t\t}\n\t}", "public ItemBuilder material(String material) {\n this.material = Material.valueOf(material);\n return this;\n }", "default Optional<ItemStack> matchItemStack(String material) {\n return matchItemStack(material, 0);\n }", "ExpMaterial getExpMaterial(Container c, User u, int rowId, @Nullable ExpSampleType sampleType);", "@Nonnull\n public static XMaterial matchXMaterial( @Nonnull Material material )\n {\n Objects.requireNonNull( material, \"Cannot match null material\" );\n return matchDefinedXMaterial( material.name(), (byte) -1 )\n .orElseThrow( () -> new IllegalArgumentException( \"Unsupported Material With No Bytes: \" + material.name() ) );\n }", "public Product searchProduct(String s){\r\n\t\treturn products.get(s);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the xml format for this document, for example "oai_dc," "adn," "dlese_ims," or "dlese_anno".
public String getDocType() throws Exception { return (String) getConfigAttributes().get("xmlFormat"); }
[ "public String getXmlFormat();", "protected String xmlType()\n {\n return PRS_XML;\n }", "String documentFormat();", "public String getDocumentFormat() {\n return this.documentFormat;\n }", "private String getFormatTypeToIndex() {\n\t\t// Format type 'canonical_nsdl_dc' or 'native'\n\t\tString formatType = configXmlDoc.valueOf(\"/NR_Collections/ncsManagedCollections/formatType\");\n\t\tif (formatType == null || formatType.trim().length() == 0 || !(formatType.equalsIgnoreCase(\"canonical_nsdl_dc\") || formatType.equalsIgnoreCase(\"native\")))\n\t\t\tformatType = \"canonical_nsdl_dc\";\n\t\treturn formatType;\n\t}", "java.lang.String getXmlLang();", "String getNegotiationXML();", "public String getFormatDesign() {\n return (String) getAttributeInternal(FORMATDESIGN);\n }", "public String getFormatDesign() {\n return (String)getAttributeInternal(FORMATDESIGN);\n }", "java.lang.String getDesignation();", "public java.lang.String getXml() {\n return xml;\n }", "public Document exportAsXML() {\r\n StringBuffer sb = new StringBuffer( \"<?xml version=\\\"1.0\\\" encoding=\\\"iso-8859-1\\\"?>\" );\r\n\r\n sb.append( \"<DatastoreConfiguration name=\\\"\" + getName() + \"\\\" type=\\\"\" );\r\n\r\n switch ( getType() ) {\r\n case DatastoreConfiguration.GMLDB:\r\n sb.append( \"GMLDB\\\">\" );\r\n break;\r\n case DatastoreConfiguration.ORACLESPATIAL:\r\n sb.append( \"ORACLESPATIAL\\\">\" );\r\n break;\r\n case DatastoreConfiguration.POINTDB:\r\n sb.append( \"POINTDB\\\">\" );\r\n break;\r\n case DatastoreConfiguration.SHAPEFILES:\r\n sb.append( \"SHAPEFILES\\\">\" );\r\n break;\r\n }\r\n\r\n if ( getType() != DatastoreConfiguration.SHAPEFILES ) {\r\n Connection con = getConnection();\r\n sb.append( \"<Connection><driver>\" + con.getDriver() + \"</driver>\" );\r\n sb.append( \"<logon>\" + con.getLogon() + \"</logon>\" );\r\n sb.append( \"<user>\" + con.getUser() + \"</user>\" );\r\n sb.append( \"<password>\" + con.getPassword() + \"</password>\" );\r\n\r\n if ( getType() == DatastoreConfiguration.ORACLESPATIAL ) {\r\n sb.append( \"<spatialversion>\" + con.getSpatialVersion() + \"</spatialversion>\" );\r\n }\r\n\r\n sb.append( \"</Connection>\" );\r\n }\r\n\r\n FeatureType[] ft = getFeatureTypes();\r\n\r\n for ( int i = 0; i < ft.length; i++ ) {\r\n sb.append( \"<FeatureType name=\\\"\" + ft[i].getName() + \"\\\">\" );\r\n\r\n // handle output format\r\n sb.append( \"<OutputFormat>\" );\r\n\r\n OutputFormat[] of = ft[i].getOutputFormat();\r\n\r\n for ( int j = 0; j < of.length; j++ ) {\r\n sb.append( \"<\" + of[j].getName() + \" responsibleClass=\\\"\" );\r\n sb.append( of[j].getResponsibleClass() + \"\\\">\" );\r\n\r\n ParameterList pl = of[j].getParameter();\r\n Parameter[] param = pl.getParameters();\r\n\r\n for ( int k = 0; k < param.length; k++ ) {\r\n sb.append( \"<Param name=\\\"\" + param[k].getName() + \"\\\" \" );\r\n sb.append( \"value=\\\"\" + param[k].getValue() + \"\\\"/>\" );\r\n }\r\n\r\n URL url = of[j].getSchemaLocation();\r\n\r\n if ( url != null ) {\r\n sb.append( \"<SchemaLocation>\" );\r\n sb.append( url.toString() + \"</SchemaLocation>\" );\r\n }\r\n\r\n sb.append( \"</\" + of[j].getName() + \">\" );\r\n }\r\n\r\n sb.append( \"</OutputFormat>\" );\r\n\r\n // handle mappings\r\n HashMap mappings = ft[i].getMappings();\r\n Iterator iterator = mappings.keySet().iterator();\r\n\r\n while ( iterator.hasNext() ) {\r\n String prop = (String)iterator.next();\r\n int propType = ft[i].getPropertyType( prop );\r\n String dbField = ( (String[])mappings.get( prop ) )[0];\r\n int dbFieldType = ft[i].getDatastoreFieldType( dbField );\r\n sb.append( \"<MappingField>\" );\r\n sb.append( \"<Property name=\\\"\" + prop + \"\\\" \" );\r\n sb.append( \"type=\\\"\" + getDataType( propType ) + \"\\\"/>\" );\r\n sb.append( \"<DatastoreField name=\\\"\" + dbField + \"\\\" \" );\r\n sb.append( \"type=\\\"\" + getDataType( dbFieldType ) + \"\\\"/>\" );\r\n sb.append( \"</MappingField>\" );\r\n }\r\n\r\n //handle MasterTable\r\n MasterTable mt = ft[i].getMasterTable();\r\n sb.append( \"<MasterTable name=\\\"\" + mt.getName() + \"\\\" \" );\r\n sb.append( \"targetName=\\\"\" + mt.getTargetName() + \"\\\">\" );\r\n sb.append( \"<IdField number=\\\"\" + mt.isIdFieldNumber() + \"\\\" \" );\r\n sb.append( \"auto=\\\"\" + mt.isIdFieldAutoIncremented() + \"\\\">\" );\r\n sb.append( mt.getIdField() + \"</IdField>\" );\r\n\r\n Reference[] ref = mt.getReferences();\r\n\r\n for ( int j = 0; j < ref.length; j++ ) {\r\n sb.append( \"<Reference tableField=\\\"\" + ref[j].getTableField() + \"\\\" \" );\r\n sb.append( \"replaceable=\\\"\" + ref[j].isReplaceable() + \"\\\" \" );\r\n sb.append( \"targetTable=\\\"\" + ref[j].getTargetTable() + \"\\\" \" );\r\n sb.append( \"targetField=\\\"\" + ref[j].getTargetField() + \"\\\"/>\" );\r\n }\r\n\r\n GeoFieldIdentifier[] gfi = mt.getGeoFieldIdentifier();\r\n\r\n for ( int j = 0; j < gfi.length; j++ ) {\r\n if ( getType() == DatastoreConfiguration.POINTDB ) {\r\n sb.append( \"<GeoFieldIdentifier dimension=\\\"\" + gfi[j].getDimension() + \r\n \"\\\">\" );\r\n } else {\r\n sb.append( \"<GeoFieldIdentifier>\" );\r\n }\r\n\r\n sb.append( gfi[j].getDatastoreFieldBaseName() + \"</GeoFieldIdentifier>\" );\r\n }\r\n\r\n sb.append( \"</MasterTable>\" );\r\n\r\n // handle related tables\r\n RelatedTable[] td = ft[i].getRelatedTables();\r\n\r\n for ( int k = 0; k < td.length; k++ ) {\r\n sb.append( \"<RelatedTable name=\\\"\" + td[k].getName() + \"\\\" \" );\r\n sb.append( \"targetName=\\\"\" + td[k].getTargetName() + \"\\\"\" );\r\n sb.append( \"joinTable=\\\"\" + td[k].isJoinTable() + \"\\\">\" );\r\n sb.append( \"<IdField number=\\\"\" + td[k].isIdFieldNumber() + \"\\\" \" );\r\n sb.append( \"auto=\\\"\" + td[k].isIdFieldAutoIncremented() + \"\\\">\" );\r\n sb.append( td[k].getIdField() + \"</IdField>\" );\r\n ref = td[k].getReferences();\r\n\r\n for ( int j = 0; j < ref.length; j++ ) {\r\n sb.append( \"<Reference tableField=\\\"\" + ref[j].getTableField() + \"\\\" \" );\r\n sb.append( \"replaceable=\\\"\" + ref[j].isReplaceable() + \"\\\" \" );\r\n sb.append( \"targetTable=\\\"\" + ref[j].getTargetTable() + \"\\\" \" );\r\n sb.append( \"targetField=\\\"\" + ref[j].getTargetField() + \"\\\"/>\" );\r\n }\r\n\r\n gfi = mt.getGeoFieldIdentifier();\r\n\r\n for ( int j = 0; j < gfi.length; j++ ) {\r\n if ( getType() == DatastoreConfiguration.POINTDB ) {\r\n sb.append( \"<GeoFieldIdentifier dimension=\\\"\" + gfi[j].getDimension() + \r\n \"\\\">\" );\r\n } else {\r\n sb.append( \"<GeoFieldIdentifier>\" );\r\n }\r\n\r\n sb.append( gfi[j].getDatastoreFieldBaseName() + \"</GeoFieldIdentifier>\" );\r\n }\r\n\r\n sb.append( \"</RelatedTable>\" );\r\n }\r\n\r\n if ( ft[i].getCRS() != null ) {\r\n sb.append( \"<CRS>\" + ft[i].getCRS() + \"</CRS>\" );\r\n }\r\n\r\n sb.append( \"</FeatureType>\" );\r\n }\r\n\r\n sb.append( \"</DatastoreConfiguration>\" );\r\n\r\n StringReader sr = new StringReader( sb.toString() );\r\n Document doc = null;\r\n\r\n try {\r\n doc = XMLTools.parse( sr );\r\n } catch ( Exception e ) {\r\n System.out.println( this.getClass().getName() + \":\" );\r\n System.out.println( e );\r\n }\r\n\r\n return doc;\r\n }", "public String getXMLTypeAttr();", "public static tools.fsa2xml.codec.api.FSACodec getDLoXml(){\n return DLoXml.INSTANCE;\n }", "org.apache.xmlbeans.XmlString xgetMediaType();", "public String getXml()\n {\n StringBuffer result = new StringBuffer(256);\n\n result.append(\"<importOptions>\");\n\n result.append(m_fileOptions.asXML());\n result.append(getOtherXml());\n\n result.append(\"</importOptions>\");\n\n return result.toString();\n }", "public String getFormatToIndex() {\n\t\t\tif (_format_to_index == null) {\n\t\t\t\t// Format type 'canonical_nsdl_dc' or 'native'\n\t\t\t\tString formatType = getFormatTypeToIndex();\n\n\t\t\t\t// List of related formats to include with canonical_nsdl_dc:\n\t\t\t\tList relatedCanonicalNsdlDcFormatsVals = configXmlDoc.selectNodes(\"/NR_Collections/ncsManagedCollections/canonicalNsdlDcRelatedFormats/relatedFormat\");\n\t\t\t\tMap relatedCanonicalNsdlDcFormats = new HashMap();\n\t\t\t\tfor (int i = 0; i < relatedCanonicalNsdlDcFormatsVals.size(); i++)\n\t\t\t\t\trelatedCanonicalNsdlDcFormats.put(((Node) relatedCanonicalNsdlDcFormatsVals.get(i)).getText(), new Object());\n\n\t\t\t\t_format_to_index = \"nsdl_dc\";\n\t\t\t\tString libraryFormat = getLibraryFormat();\n\n\t\t\t\t// Handle native:\n\t\t\t\tif (formatType.equalsIgnoreCase(\"native\")) {\n\t\t\t\t\t_format_to_index = libraryFormat;\n\t\t\t\t}\n\t\t\t\t// Handle canonical_nsdl_dc:\n\t\t\t\telse {\n\t\t\t\t\tif (relatedCanonicalNsdlDcFormats.containsKey(libraryFormat))\n\t\t\t\t\t\t_format_to_index = libraryFormat;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn _format_to_index;\n\t\t}", "public String getFormat() throws Exception {\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@metaFormat\").getText();\n\t}", "public String getXmlExtension() {\n return xmlExtension;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests if the given name is an empty string.
private Boolean isNameEmpty(String name) { return name.equals(""); }
[ "public boolean noName() {\n\t\treturn name == null || name.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn name.isEmpty();\n\t}", "public boolean isEmpty(String studentName)\r\n {\r\n return (studentName.isEmpty() || studentName.trim().isBlank());\r\n }", "public boolean empty(String s){\n if (s.matches(\"\")) {\n return true;\n }\n return false;\n }", "public boolean testBlank(String in) {return in.equals(\"\");}", "@NullSafe\n public static boolean isEmpty(String value) {\n return EMPTY_STRING.equals(value);\n }", "public boolean checkNameLength(String name) {\n return name.isEmpty();\n }", "public boolean isEmpty(String value) {\n\t\treturn (isNull(value) || (value.trim().length() <= 0));\n\t}", "public static boolean isEmpty(String s) {\n\t\treturn s != null && s.length() == 0;\n\t}", "@Test\n public void testIsEmptyValidName() {\n FieldVerifier service = new FieldVerifier();\n String name = \"\";\n boolean result = service.isValidName(name);\n assertEquals(false, result);\n }", "private boolean isStringEmpty(String str){\r\n return str==null||str.isEmpty();\r\n }", "private final static boolean isEmpty(String field) {\n return field == null || field.trim().length() == 0;\n }", "private static boolean isEmpty(final String in)\n {\n return in == null || \"-\".equals(in) || \"\".equals(in);\n }", "public static boolean isBlankOrNullString(String s){\n return s == null || s.isEmpty() || s.equalsIgnoreCase(\"\");\n }", "static boolean isNullOrEmpty(String s) {\n return s == null || s.isEmpty();\n }", "public static boolean isStringEmpty(String str) {\n\t\treturn (str == null || TextUtils.isEmpty(str));\n\t}", "public boolean isEmpty(String param){\r\n return param == null || param.length() == 0;\r\n }", "public static boolean no_data( String s )\n\t{\n\t\treturn s == null || s.trim().length() == 0;\n\t}", "public static boolean argIsEmpty(final String arg) {\n if (\"\".equals(arg) || arg.matches(\"\\\\s+\")) {\n return true;\n }\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets (as xml) the "IsTrialAccount" element
public org.apache.xmlbeans.XmlBoolean xgetIsTrialAccount() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlBoolean target = null; target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ISTRIALACCOUNT$60, 0); return target; } }
[ "public boolean getIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "public boolean isSetIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ISTRIALACCOUNT$60) != 0;\n }\n }", "public org.apache.xmlbeans.XmlBoolean xgetIsTestAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ISTESTACCOUNT$34, 0);\n return target;\n }\n }", "public String getIsTrial() {\n return isTrial;\n }", "public void setIsTrialAccount(boolean isTrialAccount)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ISTRIALACCOUNT$60);\n }\n target.setBooleanValue(isTrialAccount);\n }\n }", "public boolean getIsTestAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ISTESTACCOUNT$34, 0);\n if (target == null)\n {\n return false;\n }\n return target.getBooleanValue();\n }\n }", "public void xsetIsTrialAccount(org.apache.xmlbeans.XmlBoolean isTrialAccount)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_element_user(ISTRIALACCOUNT$60, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_element_user(ISTRIALACCOUNT$60);\n }\n target.set(isTrialAccount);\n }\n }", "public Boolean accountEnabled() {\n return this.accountEnabled;\n }", "boolean hasHasAccount();", "boolean getFeeAccount();", "public void unsetIsTrialAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ISTRIALACCOUNT$60, 0);\n }\n }", "public int getTrial_type() {\n return trial_type;\n }", "public java.lang.String getAccountFlag() {\n return accountFlag;\n }", "public\n boolean\n hasAccount()\n {\n return getAccount() != null;\n }", "public String getWeixingaccount() {\n return weixingaccount;\n }", "public String getAccountType();", "public Trial getTrial()\n {\n return this.trial;\n }", "public String getAccount() {\n return (String) getAttributeInternal(ACCOUNT);\n }", "public boolean isSetIsTestAccount()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ISTESTACCOUNT$34) != 0;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__EInterfaceType__Group__4" $ANTLR start "rule__EInterfaceType__Group__4__Impl" InternalAADMParser.g:8137:1: rule__EInterfaceType__Group__4__Impl : ( RULE_END ) ;
public final void rule__EInterfaceType__Group__4__Impl() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalAADMParser.g:8141:1: ( ( RULE_END ) ) // InternalAADMParser.g:8142:1: ( RULE_END ) { // InternalAADMParser.g:8142:1: ( RULE_END ) // InternalAADMParser.g:8143:2: RULE_END { if ( state.backtracking==0 ) { before(grammarAccess.getEInterfaceTypeAccess().getENDTerminalRuleCall_4()); } match(input,RULE_END,FOLLOW_2); if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getEInterfaceTypeAccess().getENDTerminalRuleCall_4()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__EInterfaceType__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8130:1: ( rule__EInterfaceType__Group__4__Impl )\n // InternalAADMParser.g:8131:2: rule__EInterfaceType__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceDefinition__Group__4__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:14750:1: ( ( RULE_END ) )\n // InternalAADMParser.g:14751:1: ( RULE_END )\n {\n // InternalAADMParser.g:14751:1: ( RULE_END )\n // InternalAADMParser.g:14752:2: RULE_END\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEInterfaceDefinitionAccess().getENDTerminalRuleCall_4()); \n }\n match(input,RULE_END,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEInterfaceDefinitionAccess().getENDTerminalRuleCall_4()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceDefinition__Group__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:14739:1: ( rule__EInterfaceDefinition__Group__4__Impl )\n // InternalAADMParser.g:14740:2: rule__EInterfaceDefinition__Group__4__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceDefinition__Group__4__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceTypeBody__Group_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8292:1: ( rule__EInterfaceTypeBody__Group_1_1__1__Impl )\n // InternalAADMParser.g:8293:2: rule__EInterfaceTypeBody__Group_1_1__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypeBody__Group_1_1__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceTypeBody__Group_1_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8238:1: ( rule__EInterfaceTypeBody__Group_1_0__1__Impl )\n // InternalAADMParser.g:8239:2: rule__EInterfaceTypeBody__Group_1_0__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypeBody__Group_1_0__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleEInterfaceType() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:803:2: ( ( ( rule__EInterfaceType__Group__0 ) ) )\n // InternalAADMParser.g:804:2: ( ( rule__EInterfaceType__Group__0 ) )\n {\n // InternalAADMParser.g:804:2: ( ( rule__EInterfaceType__Group__0 ) )\n // InternalAADMParser.g:805:3: ( rule__EInterfaceType__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEInterfaceTypeAccess().getGroup()); \n }\n // InternalAADMParser.g:806:3: ( rule__EInterfaceType__Group__0 )\n // InternalAADMParser.g:806:4: rule__EInterfaceType__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEInterfaceTypeAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceType__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8022:1: ( rule__EInterfaceType__Group__0__Impl rule__EInterfaceType__Group__1 )\n // InternalAADMParser.g:8023:2: rule__EInterfaceType__Group__0__Impl rule__EInterfaceType__Group__1\n {\n pushFollow(FOLLOW_8);\n rule__EInterfaceType__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceType__Group__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8103:1: ( rule__EInterfaceType__Group__3__Impl rule__EInterfaceType__Group__4 )\n // InternalAADMParser.g:8104:2: rule__EInterfaceType__Group__3__Impl rule__EInterfaceType__Group__4\n {\n pushFollow(FOLLOW_6);\n rule__EInterfaceType__Group__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__4();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceTypeBody__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8184:1: ( rule__EInterfaceTypeBody__Group__1__Impl )\n // InternalAADMParser.g:8185:2: rule__EInterfaceTypeBody__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypeBody__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__InterfaceType__Group__4() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:6728:1: ( rule__InterfaceType__Group__4__Impl )\r\n // InternalGo.g:6729:2: rule__InterfaceType__Group__4__Impl\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__InterfaceType__Group__4__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__EInterfaceTypes__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:7988:1: ( rule__EInterfaceTypes__Group__1__Impl )\n // InternalAADMParser.g:7989:2: rule__EInterfaceTypes__Group__1__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypes__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceType__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8076:1: ( rule__EInterfaceType__Group__2__Impl rule__EInterfaceType__Group__3 )\n // InternalAADMParser.g:8077:2: rule__EInterfaceType__Group__2__Impl rule__EInterfaceType__Group__3\n {\n pushFollow(FOLLOW_27);\n rule__EInterfaceType__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceType__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8049:1: ( rule__EInterfaceType__Group__1__Impl rule__EInterfaceType__Group__2 )\n // InternalAADMParser.g:8050:2: rule__EInterfaceType__Group__1__Impl rule__EInterfaceType__Group__2\n {\n pushFollow(FOLLOW_5);\n rule__EInterfaceType__Group__1__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceType__Group__2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceTypeBody__Group_1_2__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8400:1: ( rule__EInterfaceTypeBody__Group_1_2__3__Impl )\n // InternalAADMParser.g:8401:2: rule__EInterfaceTypeBody__Group_1_2__3__Impl\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypeBody__Group_1_2__3__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void ruleEInterfaceTypes() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:778:2: ( ( ( rule__EInterfaceTypes__Group__0 ) ) )\n // InternalAADMParser.g:779:2: ( ( rule__EInterfaceTypes__Group__0 ) )\n {\n // InternalAADMParser.g:779:2: ( ( rule__EInterfaceTypes__Group__0 ) )\n // InternalAADMParser.g:780:3: ( rule__EInterfaceTypes__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEInterfaceTypesAccess().getGroup()); \n }\n // InternalAADMParser.g:781:3: ( rule__EInterfaceTypes__Group__0 )\n // InternalAADMParser.g:781:4: rule__EInterfaceTypes__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypes__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEInterfaceTypesAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceType__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8088:1: ( ( RULE_BEGIN ) )\n // InternalAADMParser.g:8089:1: ( RULE_BEGIN )\n {\n // InternalAADMParser.g:8089:1: ( RULE_BEGIN )\n // InternalAADMParser.g:8090:2: RULE_BEGIN\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getEInterfaceTypeAccess().getBEGINTerminalRuleCall_2()); \n }\n match(input,RULE_BEGIN,FOLLOW_2); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getEInterfaceTypeAccess().getBEGINTerminalRuleCall_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__EInterfaceTypes__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:7961:1: ( rule__EInterfaceTypes__Group__0__Impl rule__EInterfaceTypes__Group__1 )\n // InternalAADMParser.g:7962:2: rule__EInterfaceTypes__Group__0__Impl rule__EInterfaceTypes__Group__1\n {\n pushFollow(FOLLOW_11);\n rule__EInterfaceTypes__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypes__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Interface__Group_4__2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5818:1: ( rule__Interface__Group_4__2__Impl )\r\n // ../org.waml.w3c.webidl.ui/src-gen/org/waml/w3c/webidl/ui/contentassist/antlr/internal/InternalWebIDL.g:5819:2: rule__Interface__Group_4__2__Impl\r\n {\r\n pushFollow(FOLLOW_rule__Interface__Group_4__2__Impl_in_rule__Interface__Group_4__211792);\r\n rule__Interface__Group_4__2__Impl();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__EInterfaceTypeBody__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalAADMParser.g:8157:1: ( rule__EInterfaceTypeBody__Group__0__Impl rule__EInterfaceTypeBody__Group__1 )\n // InternalAADMParser.g:8158:2: rule__EInterfaceTypeBody__Group__0__Impl rule__EInterfaceTypeBody__Group__1\n {\n pushFollow(FOLLOW_27);\n rule__EInterfaceTypeBody__Group__0__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__EInterfaceTypeBody__Group__1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ renamed from: android.support.v4.media.session.b / compiled from: IMediaSession
public interface C0394b extends IInterface { /* renamed from: android.support.v4.media.session.b$a */ /* compiled from: IMediaSession */ public static abstract class C0395a extends Binder implements C0394b { /* renamed from: android.support.v4.media.session.b$a$a */ /* compiled from: IMediaSession */ private static class C0396a implements C0394b { /* renamed from: a */ private IBinder f822a; C0396a(IBinder iBinder) { this.f822a = iBinder; } public IBinder asBinder() { return this.f822a; } /* renamed from: a */ public void mo716a(String str, Bundle bundle, ResultReceiverWrapper resultReceiverWrapper) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (resultReceiverWrapper != null) { obtain.writeInt(1); resultReceiverWrapper.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(1, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public boolean mo719a(KeyEvent keyEvent) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); boolean z = true; if (keyEvent != null) { obtain.writeInt(1); keyEvent.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(2, obtain, obtain2, 0); obtain2.readException(); if (obtain2.readInt() == 0) { z = false; } return z; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo714a(C0391a aVar) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null); this.f822a.transact(3, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo726b(C0391a aVar) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeStrongBinder(aVar != null ? aVar.asBinder() : null); this.f822a.transact(4, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public boolean mo718a() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); boolean z = false; this.f822a.transact(5, obtain, obtain2, 0); obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } return z; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public String mo720b() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(6, obtain, obtain2, 0); obtain2.readException(); return obtain2.readString(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: c */ public String mo729c() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(7, obtain, obtain2, 0); obtain2.readException(); return obtain2.readString(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: d */ public PendingIntent mo732d() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(8, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (PendingIntent) PendingIntent.CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: e */ public long mo734e() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(9, obtain, obtain2, 0); obtain2.readException(); return obtain2.readLong(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: f */ public ParcelableVolumeInfo mo736f() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(10, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (ParcelableVolumeInfo) ParcelableVolumeInfo.CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo707a(int i, int i2, String str) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(i); obtain.writeInt(i2); obtain.writeString(str); this.f822a.transact(11, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo722b(int i, int i2, String str) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(i); obtain.writeInt(i2); obtain.writeString(str); this.f822a.transact(12, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: g */ public MediaMetadataCompat mo737g() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(27, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (MediaMetadataCompat) MediaMetadataCompat.CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: h */ public PlaybackStateCompat mo738h() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(28, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (PlaybackStateCompat) PlaybackStateCompat.CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: i */ public List<QueueItem> mo739i() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(29, obtain, obtain2, 0); obtain2.readException(); return obtain2.createTypedArrayList(QueueItem.CREATOR); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: j */ public CharSequence mo740j() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(30, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (CharSequence) TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: k */ public Bundle mo741k() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(31, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt() != 0 ? (Bundle) Bundle.CREATOR.createFromParcel(obtain2) : null; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: l */ public int mo742l() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(32, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: m */ public boolean mo743m() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); boolean z = false; this.f822a.transact(45, obtain, obtain2, 0); obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } return z; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: n */ public int mo744n() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(37, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: o */ public boolean mo745o() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); boolean z = false; this.f822a.transact(38, obtain, obtain2, 0); obtain2.readException(); if (obtain2.readInt() != 0) { z = true; } return z; } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: p */ public int mo746p() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(47, obtain, obtain2, 0); obtain2.readException(); return obtain2.readInt(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo710a(MediaDescriptionCompat mediaDescriptionCompat) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (mediaDescriptionCompat != null) { obtain.writeInt(1); mediaDescriptionCompat.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(41, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo711a(MediaDescriptionCompat mediaDescriptionCompat, int i) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (mediaDescriptionCompat != null) { obtain.writeInt(1); mediaDescriptionCompat.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } obtain.writeInt(i); this.f822a.transact(42, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo725b(MediaDescriptionCompat mediaDescriptionCompat) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (mediaDescriptionCompat != null) { obtain.writeInt(1); mediaDescriptionCompat.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(43, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo706a(int i) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(i); this.f822a.transact(44, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: q */ public void mo747q() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(33, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo715a(String str, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(34, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo727b(String str, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(35, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo709a(Uri uri, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (uri != null) { obtain.writeInt(1); uri.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(36, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: r */ public void mo748r() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(13, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: c */ public void mo731c(String str, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(14, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: d */ public void mo733d(String str, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(15, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo724b(Uri uri, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (uri != null) { obtain.writeInt(1); uri.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(16, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo708a(long j) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeLong(j); this.f822a.transact(17, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: s */ public void mo749s() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(18, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: t */ public void mo750t() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(19, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: u */ public void mo751u() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(20, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: v */ public void mo752v() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(21, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: w */ public void mo753w() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(22, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: x */ public void mo754x() throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); this.f822a.transact(23, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo723b(long j) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeLong(j); this.f822a.transact(24, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo712a(RatingCompat ratingCompat) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (ratingCompat != null) { obtain.writeInt(1); ratingCompat.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(25, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo713a(RatingCompat ratingCompat, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); if (ratingCompat != null) { obtain.writeInt(1); ratingCompat.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(51, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: a */ public void mo717a(boolean z) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(z ? 1 : 0); this.f822a.transact(46, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo721b(int i) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(i); this.f822a.transact(39, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: b */ public void mo728b(boolean z) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(z ? 1 : 0); this.f822a.transact(40, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: c */ public void mo730c(int i) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeInt(i); this.f822a.transact(48, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } /* renamed from: e */ public void mo735e(String str, Bundle bundle) throws RemoteException { Parcel obtain = Parcel.obtain(); Parcel obtain2 = Parcel.obtain(); try { obtain.writeInterfaceToken("android.support.v4.media.session.IMediaSession"); obtain.writeString(str); if (bundle != null) { obtain.writeInt(1); bundle.writeToParcel(obtain, 0); } else { obtain.writeInt(0); } this.f822a.transact(26, obtain, obtain2, 0); obtain2.readException(); } finally { obtain2.recycle(); obtain.recycle(); } } } public IBinder asBinder() { return this; } /* renamed from: a */ public static C0394b m1153a(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("android.support.v4.media.session.IMediaSession"); if (queryLocalInterface == null || !(queryLocalInterface instanceof C0394b)) { return new C0396a(iBinder); } return (C0394b) queryLocalInterface; } /* JADX WARNING: type inference failed for: r1v0 */ /* JADX WARNING: type inference failed for: r1v1, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v3, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v4, types: [android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper] */ /* JADX WARNING: type inference failed for: r1v6, types: [android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper] */ /* JADX WARNING: type inference failed for: r1v7, types: [android.view.KeyEvent] */ /* JADX WARNING: type inference failed for: r1v9, types: [android.view.KeyEvent] */ /* JADX WARNING: type inference failed for: r1v10, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v12, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v13, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v15, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v16, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v18, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v19, types: [android.support.v4.media.RatingCompat] */ /* JADX WARNING: type inference failed for: r1v21, types: [android.support.v4.media.RatingCompat] */ /* JADX WARNING: type inference failed for: r1v22, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v24, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v25, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v27, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v28, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v30, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v31, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v33, types: [android.os.Bundle] */ /* JADX WARNING: type inference failed for: r1v34, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v36, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v37, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v39, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v40, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v42, types: [android.support.v4.media.MediaDescriptionCompat] */ /* JADX WARNING: type inference failed for: r1v43 */ /* JADX WARNING: type inference failed for: r1v44 */ /* JADX WARNING: type inference failed for: r1v45 */ /* JADX WARNING: type inference failed for: r1v46 */ /* JADX WARNING: type inference failed for: r1v47 */ /* JADX WARNING: type inference failed for: r1v48 */ /* JADX WARNING: type inference failed for: r1v49 */ /* JADX WARNING: type inference failed for: r1v50 */ /* JADX WARNING: type inference failed for: r1v51 */ /* JADX WARNING: type inference failed for: r1v52 */ /* JADX WARNING: type inference failed for: r1v53 */ /* JADX WARNING: type inference failed for: r1v54 */ /* JADX WARNING: type inference failed for: r1v55 */ /* JADX WARNING: type inference failed for: r1v56 */ /* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r1v0 assigns: [?[int, float, boolean, short, byte, char, OBJECT, ARRAY], android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper, android.os.Bundle, android.view.KeyEvent, android.support.v4.media.RatingCompat, android.support.v4.media.MediaDescriptionCompat] uses: [android.os.Bundle, android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper, android.view.KeyEvent, android.support.v4.media.RatingCompat, android.support.v4.media.MediaDescriptionCompat] mth insns count: 440 at jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:99) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:92) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27) at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13) at jadx.core.ProcessClass.process(ProcessClass.java:30) at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:49) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:49) at jadx.core.ProcessClass.process(ProcessClass.java:35) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217) */ /* JADX WARNING: Unknown variable types count: 15 */ /* Code decompiled incorrectly, please refer to instructions dump. */ public boolean onTransact(int r4, android.os.Parcel r5, android.os.Parcel r6, int r7) throws android.os.RemoteException { /* r3 = this; r0 = 51 r1 = 0 r2 = 1 if (r4 == r0) goto L_0x042d r0 = 1598968902(0x5f4e5446, float:1.4867585E19) if (r4 == r0) goto L_0x0427 r0 = 0 switch(r4) { case 1: goto L_0x03f8; case 2: goto L_0x03d9; case 3: goto L_0x03c5; case 4: goto L_0x03b1; case 5: goto L_0x03a1; case 6: goto L_0x0391; case 7: goto L_0x0381; case 8: goto L_0x0368; case 9: goto L_0x0358; case 10: goto L_0x033f; case 11: goto L_0x0327; case 12: goto L_0x030f; case 13: goto L_0x0303; case 14: goto L_0x02e4; case 15: goto L_0x02c5; case 16: goto L_0x029a; case 17: goto L_0x028a; case 18: goto L_0x027e; case 19: goto L_0x0272; case 20: goto L_0x0266; case 21: goto L_0x025a; case 22: goto L_0x024e; case 23: goto L_0x0242; case 24: goto L_0x0232; case 25: goto L_0x0217; case 26: goto L_0x01f8; case 27: goto L_0x01df; case 28: goto L_0x01c6; case 29: goto L_0x01b6; case 30: goto L_0x019d; case 31: goto L_0x0184; case 32: goto L_0x0174; case 33: goto L_0x0168; case 34: goto L_0x0149; case 35: goto L_0x012a; case 36: goto L_0x00ff; case 37: goto L_0x00ef; case 38: goto L_0x00df; case 39: goto L_0x00cf; case 40: goto L_0x00bc; case 41: goto L_0x00a1; case 42: goto L_0x0082; case 43: goto L_0x0067; case 44: goto L_0x0057; case 45: goto L_0x0047; case 46: goto L_0x0034; case 47: goto L_0x0024; case 48: goto L_0x0014; default: goto L_0x000f; } L_0x000f: boolean r4 = super.onTransact(r4, r5, r6, r7) return r4 L_0x0014: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() r3.mo730c(r4) r6.writeNoException() return r2 L_0x0024: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r3.mo746p() r6.writeNoException() r6.writeInt(r4) return r2 L_0x0034: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x0040 r0 = 1 L_0x0040: r3.mo717a(r0) r6.writeNoException() return r2 L_0x0047: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) boolean r4 = r3.mo743m() r6.writeNoException() r6.writeInt(r4) return r2 L_0x0057: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() r3.mo706a(r4) r6.writeNoException() return r2 L_0x0067: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x007b android.os.Parcelable$Creator<android.support.v4.media.MediaDescriptionCompat> r4 = android.support.p041v4.media.MediaDescriptionCompat.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) r1 = r4 android.support.v4.media.MediaDescriptionCompat r1 = (android.support.p041v4.media.MediaDescriptionCompat) r1 L_0x007b: r3.mo725b(r1) r6.writeNoException() return r2 L_0x0082: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x0096 android.os.Parcelable$Creator<android.support.v4.media.MediaDescriptionCompat> r4 = android.support.p041v4.media.MediaDescriptionCompat.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) r1 = r4 android.support.v4.media.MediaDescriptionCompat r1 = (android.support.p041v4.media.MediaDescriptionCompat) r1 L_0x0096: int r4 = r5.readInt() r3.mo711a(r1, r4) r6.writeNoException() return r2 L_0x00a1: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x00b5 android.os.Parcelable$Creator<android.support.v4.media.MediaDescriptionCompat> r4 = android.support.p041v4.media.MediaDescriptionCompat.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) r1 = r4 android.support.v4.media.MediaDescriptionCompat r1 = (android.support.p041v4.media.MediaDescriptionCompat) r1 L_0x00b5: r3.mo710a(r1) r6.writeNoException() return r2 L_0x00bc: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x00c8 r0 = 1 L_0x00c8: r3.mo728b(r0) r6.writeNoException() return r2 L_0x00cf: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() r3.mo721b(r4) r6.writeNoException() return r2 L_0x00df: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) boolean r4 = r3.mo745o() r6.writeNoException() r6.writeInt(r4) return r2 L_0x00ef: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r3.mo744n() r6.writeNoException() r6.writeInt(r4) return r2 L_0x00ff: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x0113 android.os.Parcelable$Creator r4 = android.net.Uri.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) android.net.Uri r4 = (android.net.Uri) r4 goto L_0x0114 L_0x0113: r4 = r1 L_0x0114: int r7 = r5.readInt() if (r7 == 0) goto L_0x0123 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x0123: r3.mo709a(r4, r1) r6.writeNoException() return r2 L_0x012a: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x0142 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x0142: r3.mo727b(r4, r1) r6.writeNoException() return r2 L_0x0149: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x0161 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x0161: r3.mo715a(r4, r1) r6.writeNoException() return r2 L_0x0168: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo747q() r6.writeNoException() return r2 L_0x0174: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r3.mo742l() r6.writeNoException() r6.writeInt(r4) return r2 L_0x0184: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.os.Bundle r4 = r3.mo741k() r6.writeNoException() if (r4 == 0) goto L_0x0199 r6.writeInt(r2) r4.writeToParcel(r6, r2) goto L_0x019c L_0x0199: r6.writeInt(r0) L_0x019c: return r2 L_0x019d: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.CharSequence r4 = r3.mo740j() r6.writeNoException() if (r4 == 0) goto L_0x01b2 r6.writeInt(r2) android.text.TextUtils.writeToParcel(r4, r6, r2) goto L_0x01b5 L_0x01b2: r6.writeInt(r0) L_0x01b5: return r2 L_0x01b6: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.util.List r4 = r3.mo739i() r6.writeNoException() r6.writeTypedList(r4) return r2 L_0x01c6: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.support.v4.media.session.PlaybackStateCompat r4 = r3.mo738h() r6.writeNoException() if (r4 == 0) goto L_0x01db r6.writeInt(r2) r4.writeToParcel(r6, r2) goto L_0x01de L_0x01db: r6.writeInt(r0) L_0x01de: return r2 L_0x01df: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.support.v4.media.MediaMetadataCompat r4 = r3.mo737g() r6.writeNoException() if (r4 == 0) goto L_0x01f4 r6.writeInt(r2) r4.writeToParcel(r6, r2) goto L_0x01f7 L_0x01f4: r6.writeInt(r0) L_0x01f7: return r2 L_0x01f8: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x0210 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x0210: r3.mo735e(r4, r1) r6.writeNoException() return r2 L_0x0217: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x022b android.os.Parcelable$Creator<android.support.v4.media.RatingCompat> r4 = android.support.p041v4.media.RatingCompat.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) r1 = r4 android.support.v4.media.RatingCompat r1 = (android.support.p041v4.media.RatingCompat) r1 L_0x022b: r3.mo712a(r1) r6.writeNoException() return r2 L_0x0232: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) long r4 = r5.readLong() r3.mo723b(r4) r6.writeNoException() return r2 L_0x0242: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo754x() r6.writeNoException() return r2 L_0x024e: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo753w() r6.writeNoException() return r2 L_0x025a: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo752v() r6.writeNoException() return r2 L_0x0266: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo751u() r6.writeNoException() return r2 L_0x0272: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo750t() r6.writeNoException() return r2 L_0x027e: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo749s() r6.writeNoException() return r2 L_0x028a: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) long r4 = r5.readLong() r3.mo708a(r4) r6.writeNoException() return r2 L_0x029a: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x02ae android.os.Parcelable$Creator r4 = android.net.Uri.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) android.net.Uri r4 = (android.net.Uri) r4 goto L_0x02af L_0x02ae: r4 = r1 L_0x02af: int r7 = r5.readInt() if (r7 == 0) goto L_0x02be android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x02be: r3.mo724b(r4, r1) r6.writeNoException() return r2 L_0x02c5: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x02dd android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x02dd: r3.mo733d(r4, r1) r6.writeNoException() return r2 L_0x02e4: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x02fc android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x02fc: r3.mo731c(r4, r1) r6.writeNoException() return r2 L_0x0303: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) r3.mo748r() r6.writeNoException() return r2 L_0x030f: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() int r7 = r5.readInt() java.lang.String r5 = r5.readString() r3.mo722b(r4, r7, r5) r6.writeNoException() return r2 L_0x0327: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() int r7 = r5.readInt() java.lang.String r5 = r5.readString() r3.mo707a(r4, r7, r5) r6.writeNoException() return r2 L_0x033f: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.support.v4.media.session.ParcelableVolumeInfo r4 = r3.mo736f() r6.writeNoException() if (r4 == 0) goto L_0x0354 r6.writeInt(r2) r4.writeToParcel(r6, r2) goto L_0x0357 L_0x0354: r6.writeInt(r0) L_0x0357: return r2 L_0x0358: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) long r4 = r3.mo734e() r6.writeNoException() r6.writeLong(r4) return r2 L_0x0368: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.app.PendingIntent r4 = r3.mo732d() r6.writeNoException() if (r4 == 0) goto L_0x037d r6.writeInt(r2) r4.writeToParcel(r6, r2) goto L_0x0380 L_0x037d: r6.writeInt(r0) L_0x0380: return r2 L_0x0381: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r3.mo729c() r6.writeNoException() r6.writeString(r4) return r2 L_0x0391: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r3.mo720b() r6.writeNoException() r6.writeString(r4) return r2 L_0x03a1: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) boolean r4 = r3.mo718a() r6.writeNoException() r6.writeInt(r4) return r2 L_0x03b1: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.os.IBinder r4 = r5.readStrongBinder() android.support.v4.media.session.a r4 = android.support.p041v4.media.session.C0391a.C0392a.m1090a(r4) r3.mo726b(r4) r6.writeNoException() return r2 L_0x03c5: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) android.os.IBinder r4 = r5.readStrongBinder() android.support.v4.media.session.a r4 = android.support.p041v4.media.session.C0391a.C0392a.m1090a(r4) r3.mo714a(r4) r6.writeNoException() return r2 L_0x03d9: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x03ed android.os.Parcelable$Creator r4 = android.view.KeyEvent.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) r1 = r4 android.view.KeyEvent r1 = (android.view.KeyEvent) r1 L_0x03ed: boolean r4 = r3.mo719a(r1) r6.writeNoException() r6.writeInt(r4) return r2 L_0x03f8: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) java.lang.String r4 = r5.readString() int r7 = r5.readInt() if (r7 == 0) goto L_0x0410 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r7 = r7.createFromParcel(r5) android.os.Bundle r7 = (android.os.Bundle) r7 goto L_0x0411 L_0x0410: r7 = r1 L_0x0411: int r0 = r5.readInt() if (r0 == 0) goto L_0x0420 android.os.Parcelable$Creator<android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper> r0 = android.support.p041v4.media.session.MediaSessionCompat.ResultReceiverWrapper.CREATOR java.lang.Object r5 = r0.createFromParcel(r5) r1 = r5 android.support.v4.media.session.MediaSessionCompat$ResultReceiverWrapper r1 = (android.support.p041v4.media.session.MediaSessionCompat.ResultReceiverWrapper) r1 L_0x0420: r3.mo716a(r4, r7, r1) r6.writeNoException() return r2 L_0x0427: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r6.writeString(r4) return r2 L_0x042d: java.lang.String r4 = "android.support.v4.media.session.IMediaSession" r5.enforceInterface(r4) int r4 = r5.readInt() if (r4 == 0) goto L_0x0441 android.os.Parcelable$Creator<android.support.v4.media.RatingCompat> r4 = android.support.p041v4.media.RatingCompat.CREATOR java.lang.Object r4 = r4.createFromParcel(r5) android.support.v4.media.RatingCompat r4 = (android.support.p041v4.media.RatingCompat) r4 goto L_0x0442 L_0x0441: r4 = r1 L_0x0442: int r7 = r5.readInt() if (r7 == 0) goto L_0x0451 android.os.Parcelable$Creator r7 = android.os.Bundle.CREATOR java.lang.Object r5 = r7.createFromParcel(r5) r1 = r5 android.os.Bundle r1 = (android.os.Bundle) r1 L_0x0451: r3.mo713a(r4, r1) r6.writeNoException() return r2 */ throw new UnsupportedOperationException("Method not decompiled: android.support.p041v4.media.session.C0394b.C0395a.onTransact(int, android.os.Parcel, android.os.Parcel, int):boolean"); } } /* renamed from: a */ void mo706a(int i) throws RemoteException; /* renamed from: a */ void mo707a(int i, int i2, String str) throws RemoteException; /* renamed from: a */ void mo708a(long j) throws RemoteException; /* renamed from: a */ void mo709a(Uri uri, Bundle bundle) throws RemoteException; /* renamed from: a */ void mo710a(MediaDescriptionCompat mediaDescriptionCompat) throws RemoteException; /* renamed from: a */ void mo711a(MediaDescriptionCompat mediaDescriptionCompat, int i) throws RemoteException; /* renamed from: a */ void mo712a(RatingCompat ratingCompat) throws RemoteException; /* renamed from: a */ void mo713a(RatingCompat ratingCompat, Bundle bundle) throws RemoteException; /* renamed from: a */ void mo714a(C0391a aVar) throws RemoteException; /* renamed from: a */ void mo715a(String str, Bundle bundle) throws RemoteException; /* renamed from: a */ void mo716a(String str, Bundle bundle, ResultReceiverWrapper resultReceiverWrapper) throws RemoteException; /* renamed from: a */ void mo717a(boolean z) throws RemoteException; /* renamed from: a */ boolean mo718a() throws RemoteException; /* renamed from: a */ boolean mo719a(KeyEvent keyEvent) throws RemoteException; /* renamed from: b */ String mo720b() throws RemoteException; /* renamed from: b */ void mo721b(int i) throws RemoteException; /* renamed from: b */ void mo722b(int i, int i2, String str) throws RemoteException; /* renamed from: b */ void mo723b(long j) throws RemoteException; /* renamed from: b */ void mo724b(Uri uri, Bundle bundle) throws RemoteException; /* renamed from: b */ void mo725b(MediaDescriptionCompat mediaDescriptionCompat) throws RemoteException; /* renamed from: b */ void mo726b(C0391a aVar) throws RemoteException; /* renamed from: b */ void mo727b(String str, Bundle bundle) throws RemoteException; /* renamed from: b */ void mo728b(boolean z) throws RemoteException; /* renamed from: c */ String mo729c() throws RemoteException; /* renamed from: c */ void mo730c(int i) throws RemoteException; /* renamed from: c */ void mo731c(String str, Bundle bundle) throws RemoteException; /* renamed from: d */ PendingIntent mo732d() throws RemoteException; /* renamed from: d */ void mo733d(String str, Bundle bundle) throws RemoteException; /* renamed from: e */ long mo734e() throws RemoteException; /* renamed from: e */ void mo735e(String str, Bundle bundle) throws RemoteException; /* renamed from: f */ ParcelableVolumeInfo mo736f() throws RemoteException; /* renamed from: g */ MediaMetadataCompat mo737g() throws RemoteException; /* renamed from: h */ PlaybackStateCompat mo738h() throws RemoteException; /* renamed from: i */ List<QueueItem> mo739i() throws RemoteException; /* renamed from: j */ CharSequence mo740j() throws RemoteException; /* renamed from: k */ Bundle mo741k() throws RemoteException; /* renamed from: l */ int mo742l() throws RemoteException; /* renamed from: m */ boolean mo743m() throws RemoteException; /* renamed from: n */ int mo744n() throws RemoteException; /* renamed from: o */ boolean mo745o() throws RemoteException; /* renamed from: p */ int mo746p() throws RemoteException; /* renamed from: q */ void mo747q() throws RemoteException; /* renamed from: r */ void mo748r() throws RemoteException; /* renamed from: s */ void mo749s() throws RemoteException; /* renamed from: t */ void mo750t() throws RemoteException; /* renamed from: u */ void mo751u() throws RemoteException; /* renamed from: v */ void mo752v() throws RemoteException; /* renamed from: w */ void mo753w() throws RemoteException; /* renamed from: x */ void mo754x() throws RemoteException; }
[ "public interface IMediaControllerCallback extends IInterface {\n\n /* renamed from: android.support.v4.media.session.IMediaControllerCallback$Stub */\n public static abstract class Stub extends Binder implements IMediaControllerCallback {\n private static final String DESCRIPTOR = \"android.support.v4.media.session.IMediaControllerCallback\";\n static final int TRANSACTION_onEvent = 1;\n static final int TRANSACTION_onExtrasChanged = 7;\n static final int TRANSACTION_onMetadataChanged = 4;\n static final int TRANSACTION_onPlaybackStateChanged = 3;\n static final int TRANSACTION_onQueueChanged = 5;\n static final int TRANSACTION_onQueueTitleChanged = 6;\n static final int TRANSACTION_onSessionDestroyed = 2;\n static final int TRANSACTION_onVolumeInfoChanged = 8;\n\n /* renamed from: android.support.v4.media.session.IMediaControllerCallback$Stub$Proxy */\n private static class Proxy implements IMediaControllerCallback {\n private IBinder mRemote;\n\n public String getInterfaceDescriptor() {\n return Stub.DESCRIPTOR;\n }\n\n Proxy(IBinder iBinder) {\n this.mRemote = iBinder;\n }\n\n public IBinder asBinder() {\n return this.mRemote;\n }\n\n public void onEvent(String str, Bundle bundle) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n obtain.writeString(str);\n if (bundle != null) {\n obtain.writeInt(1);\n bundle.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(1, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onSessionDestroyed() throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n this.mRemote.transact(2, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onPlaybackStateChanged(PlaybackStateCompat playbackStateCompat) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n if (playbackStateCompat != null) {\n obtain.writeInt(1);\n playbackStateCompat.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(3, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onMetadataChanged(MediaMetadataCompat mediaMetadataCompat) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n if (mediaMetadataCompat != null) {\n obtain.writeInt(1);\n mediaMetadataCompat.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(4, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onQueueChanged(List<QueueItem> list) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n obtain.writeTypedList(list);\n this.mRemote.transact(5, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onQueueTitleChanged(CharSequence charSequence) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n if (charSequence != null) {\n obtain.writeInt(1);\n TextUtils.writeToParcel(charSequence, obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(6, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onExtrasChanged(Bundle bundle) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n if (bundle != null) {\n obtain.writeInt(1);\n bundle.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(7, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n\n public void onVolumeInfoChanged(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException {\n Parcel obtain = Parcel.obtain();\n try {\n obtain.writeInterfaceToken(Stub.DESCRIPTOR);\n if (parcelableVolumeInfo != null) {\n obtain.writeInt(1);\n parcelableVolumeInfo.writeToParcel(obtain, 0);\n } else {\n obtain.writeInt(0);\n }\n this.mRemote.transact(8, obtain, null, 1);\n } finally {\n obtain.recycle();\n }\n }\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public static IMediaControllerCallback asInterface(IBinder iBinder) {\n if (iBinder == null) {\n return null;\n }\n IInterface queryLocalInterface = iBinder.queryLocalInterface(DESCRIPTOR);\n if (queryLocalInterface == null || !(queryLocalInterface instanceof IMediaControllerCallback)) {\n return new Proxy(iBinder);\n }\n return (IMediaControllerCallback) queryLocalInterface;\n }\n\n /* JADX WARNING: type inference failed for: r0v1 */\n /* JADX WARNING: type inference failed for: r0v2, types: [android.os.Bundle] */\n /* JADX WARNING: type inference failed for: r0v4, types: [android.os.Bundle] */\n /* JADX WARNING: type inference failed for: r0v5, types: [android.support.v4.media.session.PlaybackStateCompat] */\n /* JADX WARNING: type inference failed for: r0v7, types: [android.support.v4.media.session.PlaybackStateCompat] */\n /* JADX WARNING: type inference failed for: r0v8, types: [android.support.v4.media.MediaMetadataCompat] */\n /* JADX WARNING: type inference failed for: r0v10, types: [android.support.v4.media.MediaMetadataCompat] */\n /* JADX WARNING: type inference failed for: r0v11, types: [java.lang.CharSequence] */\n /* JADX WARNING: type inference failed for: r0v13, types: [java.lang.CharSequence] */\n /* JADX WARNING: type inference failed for: r0v14, types: [android.os.Bundle] */\n /* JADX WARNING: type inference failed for: r0v16, types: [android.os.Bundle] */\n /* JADX WARNING: type inference failed for: r0v17, types: [android.support.v4.media.session.ParcelableVolumeInfo] */\n /* JADX WARNING: type inference failed for: r0v19, types: [android.support.v4.media.session.ParcelableVolumeInfo] */\n /* JADX WARNING: type inference failed for: r0v20 */\n /* JADX WARNING: type inference failed for: r0v21 */\n /* JADX WARNING: type inference failed for: r0v22 */\n /* JADX WARNING: type inference failed for: r0v23 */\n /* JADX WARNING: type inference failed for: r0v24 */\n /* JADX WARNING: type inference failed for: r0v25 */\n /* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r0v1\n assigns: [?[int, float, boolean, short, byte, char, OBJECT, ARRAY], android.support.v4.media.session.PlaybackStateCompat, android.os.Bundle, android.support.v4.media.MediaMetadataCompat, java.lang.CharSequence, android.support.v4.media.session.ParcelableVolumeInfo]\n uses: [android.os.Bundle, android.support.v4.media.session.PlaybackStateCompat, android.support.v4.media.MediaMetadataCompat, java.lang.CharSequence, android.support.v4.media.session.ParcelableVolumeInfo]\n mth insns count: 77\n \tat jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53)\n \tat jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:99)\n \tat jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:92)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14)\n \tat jadx.core.dex.visitors.DepthTraversal.lambda$visit$0(DepthTraversal.java:13)\n \tat java.base/java.util.ArrayList.forEach(ArrayList.java:1540)\n \tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:13)\n \tat jadx.core.ProcessClass.process(ProcessClass.java:30)\n \tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311)\n \tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n \tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217)\n */\n /* JADX WARNING: Unknown variable types count: 7 */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public boolean onTransact(int r4, android.os.Parcel r5, android.os.Parcel r6, int r7) throws android.os.RemoteException {\n /*\n r3 = this;\n r0 = 1598968902(0x5f4e5446, float:1.4867585E19)\n r1 = 1\n java.lang.String r2 = \"android.support.v4.media.session.IMediaControllerCallback\"\n if (r4 == r0) goto L_0x00ad\n r0 = 0\n switch(r4) {\n case 1: goto L_0x0093;\n case 2: goto L_0x008c;\n case 3: goto L_0x0076;\n case 4: goto L_0x0060;\n case 5: goto L_0x0053;\n case 6: goto L_0x003d;\n case 7: goto L_0x0027;\n case 8: goto L_0x0011;\n default: goto L_0x000c;\n }\n L_0x000c:\n boolean r4 = super.onTransact(r4, r5, r6, r7)\n return r4\n L_0x0011:\n r5.enforceInterface(r2)\n int r4 = r5.readInt()\n if (r4 == 0) goto L_0x0023\n android.os.Parcelable$Creator<android.support.v4.media.session.ParcelableVolumeInfo> r4 = android.support.p000v4.media.session.ParcelableVolumeInfo.CREATOR\n java.lang.Object r4 = r4.createFromParcel(r5)\n r0 = r4\n android.support.v4.media.session.ParcelableVolumeInfo r0 = (android.support.p000v4.media.session.ParcelableVolumeInfo) r0\n L_0x0023:\n r3.onVolumeInfoChanged(r0)\n return r1\n L_0x0027:\n r5.enforceInterface(r2)\n int r4 = r5.readInt()\n if (r4 == 0) goto L_0x0039\n android.os.Parcelable$Creator r4 = android.os.Bundle.CREATOR\n java.lang.Object r4 = r4.createFromParcel(r5)\n r0 = r4\n android.os.Bundle r0 = (android.os.Bundle) r0\n L_0x0039:\n r3.onExtrasChanged(r0)\n return r1\n L_0x003d:\n r5.enforceInterface(r2)\n int r4 = r5.readInt()\n if (r4 == 0) goto L_0x004f\n android.os.Parcelable$Creator r4 = android.text.TextUtils.CHAR_SEQUENCE_CREATOR\n java.lang.Object r4 = r4.createFromParcel(r5)\n r0 = r4\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n L_0x004f:\n r3.onQueueTitleChanged(r0)\n return r1\n L_0x0053:\n r5.enforceInterface(r2)\n android.os.Parcelable$Creator<android.support.v4.media.session.MediaSessionCompat$QueueItem> r4 = android.support.p000v4.media.session.MediaSessionCompat.QueueItem.CREATOR\n java.util.ArrayList r4 = r5.createTypedArrayList(r4)\n r3.onQueueChanged(r4)\n return r1\n L_0x0060:\n r5.enforceInterface(r2)\n int r4 = r5.readInt()\n if (r4 == 0) goto L_0x0072\n android.os.Parcelable$Creator<android.support.v4.media.MediaMetadataCompat> r4 = android.support.p000v4.media.MediaMetadataCompat.CREATOR\n java.lang.Object r4 = r4.createFromParcel(r5)\n r0 = r4\n android.support.v4.media.MediaMetadataCompat r0 = (android.support.p000v4.media.MediaMetadataCompat) r0\n L_0x0072:\n r3.onMetadataChanged(r0)\n return r1\n L_0x0076:\n r5.enforceInterface(r2)\n int r4 = r5.readInt()\n if (r4 == 0) goto L_0x0088\n android.os.Parcelable$Creator<android.support.v4.media.session.PlaybackStateCompat> r4 = android.support.p000v4.media.session.PlaybackStateCompat.CREATOR\n java.lang.Object r4 = r4.createFromParcel(r5)\n r0 = r4\n android.support.v4.media.session.PlaybackStateCompat r0 = (android.support.p000v4.media.session.PlaybackStateCompat) r0\n L_0x0088:\n r3.onPlaybackStateChanged(r0)\n return r1\n L_0x008c:\n r5.enforceInterface(r2)\n r3.onSessionDestroyed()\n return r1\n L_0x0093:\n r5.enforceInterface(r2)\n java.lang.String r4 = r5.readString()\n int r6 = r5.readInt()\n if (r6 == 0) goto L_0x00a9\n android.os.Parcelable$Creator r6 = android.os.Bundle.CREATOR\n java.lang.Object r5 = r6.createFromParcel(r5)\n r0 = r5\n android.os.Bundle r0 = (android.os.Bundle) r0\n L_0x00a9:\n r3.onEvent(r4, r0)\n return r1\n L_0x00ad:\n r6.writeString(r2)\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.p000v4.media.session.IMediaControllerCallback.Stub.onTransact(int, android.os.Parcel, android.os.Parcel, int):boolean\");\n }\n }\n\n void onEvent(String str, Bundle bundle) throws RemoteException;\n\n void onExtrasChanged(Bundle bundle) throws RemoteException;\n\n void onMetadataChanged(MediaMetadataCompat mediaMetadataCompat) throws RemoteException;\n\n void onPlaybackStateChanged(PlaybackStateCompat playbackStateCompat) throws RemoteException;\n\n void onQueueChanged(List<QueueItem> list) throws RemoteException;\n\n void onQueueTitleChanged(CharSequence charSequence) throws RemoteException;\n\n void onSessionDestroyed() throws RemoteException;\n\n void onVolumeInfoChanged(ParcelableVolumeInfo parcelableVolumeInfo) throws RemoteException;\n}", "public MediaStreamMediaDeviceSession()\n {\n super(VideoTranslatorMediaDevice.this);\n }", "public interface MediaListener {\n /**\n * listen response preview sample\n * @param data preview sample data\n * @param size preview sample data size\n */\n void onPreview(ByteBuffer data, int size);\n\n /**\n * listen response preview stop\n */\n void onPreviewStop();\n\n /**\n * listen preview start record\n */\n void onPreviewStartRecord();\n\n /**\n * listen preview stop record\n */\n void onPreviewStopRecord();\n\n /**\n * listen preview take photo\n */\n void onPreviewTakePhoto();\n\n /**\n * listen playback video info and audio info\n * @param videoInfo video info\n * @param audioInfo audio info\n */\n void onPlaybackInfo(VideoInfo videoInfo, AudioInfo audioInfo);\n\n /**\n * listen playback stop\n */\n void onPlaybackStop();\n\n /**\n * listen playback pause\n */\n void onPlaybackPause();\n\n /**\n * listen playback seek\n * @param sample seek sample\n */\n void onPlaybackSeek(int sample);\n\n /**\n * listen playback video sample data\n * @param data video sample data\n * @param timestamp video sample timestamp\n * @param size video sample data size\n */\n void onVideoSampleData(ByteBuffer data, int timestamp, int size);\n\n /**\n * listen playback audio sample data\n * @param data audio sample data\n * @param size audio sample data size\n */\n void onAudioSampleData(ByteBuffer data, int size);\n\n /**\n * listen playback sample end\n */\n void onSampleEnd();\n\n /**\n * listen playback photo bitmap data\n * @param picname photo name\n * @param bitmap bitmap data\n */\n void onPhoto(String picname, Bitmap bitmap);\n }", "public interface IMediaBrowserServiceCompat\n extends IInterface\n{\n\n public abstract void addSubscription(String s, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void connect(String s, Bundle bundle, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void disconnect(IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n\n public abstract void getMediaItem(String s, ResultReceiver resultreceiver);\n\n public abstract void removeSubscription(String s, IMediaBrowserServiceCompatCallbacks imediabrowserservicecompatcallbacks);\n}", "interface MediaBrowserImpl {\n void connect();\n\n void disconnect();\n\n @Nullable\n Bundle getExtras();\n\n void getItem(@NonNull String str, @NonNull ItemCallback itemCallback);\n\n @Nullable\n Bundle getNotifyChildrenChangedOptions();\n\n @NonNull\n String getRoot();\n\n ComponentName getServiceComponent();\n\n @NonNull\n MediaSessionCompat.Token getSessionToken();\n\n boolean isConnected();\n\n void search(@NonNull String str, Bundle bundle, @NonNull SearchCallback searchCallback);\n\n void sendCustomAction(@NonNull String str, Bundle bundle, @Nullable CustomActionCallback customActionCallback);\n\n void subscribe(@NonNull String str, @Nullable Bundle bundle, @NonNull SubscriptionCallback subscriptionCallback);\n\n void unsubscribe(@NonNull String str, SubscriptionCallback subscriptionCallback);\n }", "private void initializeMediaSession(){\n //Create a MediaSessionCompat.\n mMediaSession = new MediaSessionCompat(getContext(), TAG);\n\n //Enable callbacks from MediaButtons and Transport controls.\n\n mMediaSession.setFlags(\n MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |\n MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Do not let MediaButtons restart the player, when the app is not visible\n mMediaSession.setMediaButtonReceiver(null);\n //Set an initial PlaybackState with Action\n mStateBuilder = new PlaybackStateCompat.Builder()\n .setActions(\n PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n //My SessionCallbacks has methods that handle callbacks from the media controller\n mMediaSession.setCallback(new MySessionCallback());\n\n mMediaSession.setActive(true);\n\n\n }", "private void initializeMediaSession() {\n\n mediaSession = new MediaSessionCompat(this.getActivity(), TAG);\n\n mediaSession.setFlags(\n MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |\n MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n mediaSession.setMediaButtonReceiver(null);\n\n stateBuilder = new PlaybackStateCompat.Builder()\n .setActions(\n PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n mediaSession.setPlaybackState(stateBuilder.build());\n\n mediaSession.setCallback(new MySessionCallback());\n\n mediaSession.setActive(true);\n\n }", "private void mediaSessionInitializer() {\n mMediaSessionCompat = new MediaSessionCompat(getContext(), TAG);\n\n // Set flags for external clients in a car and media buttons\n mMediaSessionCompat.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS\n | MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Don't let external client restart the player when not in UI\n mMediaSessionCompat.setMediaButtonReceiver(null);\n\n // Set available actions to support outside UI\n mStateBuilder = new PlaybackStateCompat.Builder()\n .setActions(PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PLAY_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n // Set the playback state for compat\n mMediaSessionCompat.setPlaybackState(mStateBuilder.build());\n\n // Handle callbacks from media controller\n mMediaSessionCompat.setCallback(new SessionCallbacks());\n\n // Start the Media Session since the activity is active\n mMediaSessionCompat.setActive(true);\n }", "VideoMediaInfo mediaInfo();", "private void initializeMediaSession() {\n if (Util.SDK_INT >= 23) {\n\n // Create a MediaSessionCompat.\n mediaSessionCompat = new MediaSessionCompat(getContext(), TAG);\n\n // Enable callbacks from MediaButtons and TransportControls.\n mediaSessionCompat.setFlags(\n MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |\n MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Do not let MediaButtons restart the player when the app is not visible.\n mediaSessionCompat.setMediaButtonReceiver(null);\n\n // Set an initial PlaybackState with ACTION_PLAY, so media buttons can start the player.\n playbackStateCompatBuilder = new PlaybackStateCompat.Builder()\n .setActions(\n PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n mediaSessionCompat.setPlaybackState(playbackStateCompatBuilder.build());\n\n\n // MySessionCallback has methods that handle callbacks from a media controller.\n mediaSessionCompat.setCallback(new MediaSessionCallback());\n\n // Start the Media Session since the activity is active.\n mediaSessionCompat.setActive(true);\n }\n }", "private void updateSessionToken() {\n MediaSessionCompat.Token freshToken = mService.getSessionToken();\n if (mSessionToken == null || !mSessionToken.equals(freshToken)) {\n if (mMediaController != null) {\n mMediaController.unregisterCallback(mControllerCallback);\n }\n mSessionToken = freshToken;\n try {\n mMediaController = new MediaControllerCompat(mService, mSessionToken);\n } catch (RemoteException e) {\n Log.e(\"WUVA\", e.getLocalizedMessage());\n }\n mTransportControls = mMediaController.getTransportControls();\n if (mStarted) {\n mMediaController.registerCallback(mControllerCallback);\n }\n }\n }", "interface MediaBrowserServiceCallbackImpl {\n void onConnectionFailed(Messenger messenger);\n\n void onLoadChildren(Messenger messenger, String str, List list, Bundle bundle, Bundle bundle2);\n\n void onServiceConnected(Messenger messenger, String str, MediaSessionCompat.Token token, Bundle bundle);\n }", "private void initializeMediaSession() {\n\n // Create a MediaSessionCompat.\n mMediaSession = new MediaSessionCompat(getActivity(), LOG_TAG);\n\n // Enable callbacks from MediaButtons and TransportControls.\n mMediaSession.setFlags(\n MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |\n MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Do not let MediaButtons restart the player when the app is not visible.\n mMediaSession.setMediaButtonReceiver(null);\n\n // Set an initial PlaybackState with ACTION_PLAY, so media buttons can start the player.\n mStateBuilder = new PlaybackStateCompat.Builder()\n .setActions(\n PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n mMediaSession.setPlaybackState(mStateBuilder.build());\n\n // MySessionCallback has methods that handle callbacks from a media controller.\n mMediaSession.setCallback(new MySessionCallback());\n\n // Start the Media Session since the activity is active.\n mMediaSession.setActive(true);\n }", "private void initializeMediaSession() {\n\n // Create a MediaSessionCompat.\n mMediaSession = new MediaSessionCompat(requireContext(), LOG_TAG);\n\n // Enable callbacks from MediaButtons and TransportControls.\n mMediaSession.setFlags(\n MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS |\n MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Do not let MediaButtons restart the player when the app is not visible.\n mMediaSession.setMediaButtonReceiver(null);\n\n // Set an initial PlaybackState with ACTION_PLAY, so media buttons can start the player.\n mStateBuilder = new PlaybackStateCompat.Builder()\n .setActions(\n PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n mMediaSession.setPlaybackState(mStateBuilder.build());\n\n\n // MySessionCallback has methods that handle callbacks from a media controller.\n mMediaSession.setCallback(new MySessionCallback());\n\n // Start the Media Session since the activity is active.\n mMediaSession.setActive(true);\n\n }", "public static com.androidmediaplayer.mp3player.IMediaPlayerService asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.androidmediaplayer.mp3player.IMediaPlayerService))) {\nreturn ((com.androidmediaplayer.mp3player.IMediaPlayerService)iin);\n}\nreturn new com.androidmediaplayer.mp3player.IMediaPlayerService.Stub.Proxy(obj);\n}", "interface StreamingRecognitionSession\n {\n /**\n * Give the next fragment of audio on the continuous stream of\n * audio.\n *\n * @param request a TranscriptionRequest which holds the next fragment\n * of audio in a continuous stream\n */\n void sendRequest(TranscriptionRequest request);\n\n /**\n * Gracefully end the session. Audio which was send but has not been\n * transcribed should still be processed\n */\n void end();\n\n /**\n * Get whether this StreamingRecognitionSession has already been told\n * to stop or has been stopped\n *\n * @return true when the session is stopping or has been stopped\n */\n boolean ended();\n\n /**\n * Add a TranscriptionListener which will be notified when a new\n * transcription result will come in\n *\n * @param listener a listener which should be notified of any incoming\n * results\n */\n void addTranscriptionListener(TranscriptionListener listener);\n }", "public interface IVideoPlayView extends IVideoPlayControllerView, OnVideoSizeChangedListener, VideoPlayPresenter.AbstractC23627a {\n void aA_();\n\n /* renamed from: c_ */\n void mo104113c_(boolean z);\n\n /* renamed from: l */\n void mo104132l();\n\n /* renamed from: m */\n ZHMediaPlayer mo104133m();\n\n /* renamed from: n */\n View mo104134n();\n\n /* renamed from: q */\n void mo104138q();\n}", "@Override\n public synchronized MediaDeviceSession createSession()\n {\n MediaStreamMediaDeviceSession streamDeviceSession\n = new MediaStreamMediaDeviceSession();\n\n streamDeviceSessions.add(streamDeviceSession);\n return streamDeviceSession;\n }", "public MediaControllerCompat(Context context, MediaSessionCompat session) {\n if (session == null) {\n throw new IllegalArgumentException(\"session must not be null\");\n }\n\n if (android.os.Build.VERSION.SDK_INT >= 21) {\n mImpl = new MediaControllerImplApi21(context, session);\n } else {\n mImpl = new MediaControllerImplBase();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Override for custom equals method. Checks if the passed object is equal to the instance of RankingHistory
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof RankingHistory)) return false; RankingHistory rank = (RankingHistory) o; return Objects.equals(this.player, rank.player) && Objects.equals(this.topScore, rank.topScore) && Objects.equals(this.lowScore, rank.lowScore) && Objects.equals(this.avgScore, rank.avgScore) && Objects.equals(this.allScore, rank.allScore); }
[ "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj instanceof RevisionData) {\n\t\t\treturn this.getRevision().equals(((RevisionData) obj).getRevision());\n\t\t}\n\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object o) {\r\n // If 2 data objects are being compared\r\n if (o instanceof Data) {\r\n Data other = (Data) o;\r\n return other.accountNum == accountNum;\r\n // If a data object and an integer are being compared\r\n } else if (o instanceof Integer) {\r\n int other = (Integer) o;\r\n return other == accountNum;\r\n // If a data object and a string are being compared, ignoring case\r\n } else if (o instanceof String) {\r\n String other = (String) o;\r\n return other.toLowerCase().equals(neighbourhood.toString().toLowerCase());\r\n }\r\n return false;\r\n }", "public boolean equals(Object obj)\n {\n //first, make sure objects are equal at the base\n //which also handles null and type for person check\n boolean baseResult = super.equals(obj);\n if (!baseResult)\n {\n return false;\n }\n \n //next, make sure it's a commander, and not just any old person\n if (!(obj instanceof Commander))\n {\n return false;\n }\n \n //cast and compare specific properties for equality:\n Commander c = (Commander)obj;\n return (this.getSerialNumber().equals(c.getSerialNumber())\n && this.getRank().equals(c.getRank()));\n }", "@Override\n public boolean equals(Object obj) {\n Stock other = (Stock)obj;\n return symbol.equals(other.getSymbol());\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Historial)) {\n return false;\n }\n Historial other = (Historial) object;\n if ((this.id_historial == null && other.id_historial != null) || (this.id_historial != null && !this.id_historial.equals(other.id_historial))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if (obj instanceof Candidate) {\n Candidate other = (Candidate) obj;\n if (hypotheses != other.hypotheses || phrases != other.phrases || span != other.span)\n return false;\n \n if (ranks.length != other.ranks.length)\n return false;\n \n for (int i = 0; i < ranks.length; i++)\n if (ranks[i] != other.ranks[i])\n return false;\n \n return true;\n }\n return false;\n }", "@Override\n public boolean equals(Object obj) {\n if (!(obj instanceof Entry<?>)) {\n return false;\n }\n\n var entry = (Entry<?>) obj;\n\n if (!this.registry.equals(entry.registry)) {\n return false;\n }\n\n if (this.index != entry.index) {\n return false;\n }\n\n if (this.value.getClass() != entry.value.getClass()) {\n return false;\n }\n\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if (this == obj) {\n return true;\n }\n if (obj == null || this.getClass() != obj.getClass()) {\n return false;\n }\n HeartRateRecording recorder = (HeartRateRecording) obj;\n if (recorder.bpm == this.bpm && recorder.getDate().equals(this.getDate())) {\n return true;\n }\n return false;\n }", "@Override // Ask compiler to verify this is a proper Override - same name, same parameters, same return-type\n\t// since the Object class' .equals receives an Object and returns a boolean, we must do the same thing\n\tpublic boolean equals(Object obj) { // Receive any type of Object\n\t\tif (this == obj) { // If compare a PlayingCard to itself - this. represents the object to the left of .equals\n\t\t\treturn true;\n\t\t}\n\t\tif (obj == null) { // If compare to an undefined PlayingCard\n\t\t\treturn false;\n\t\t}\n\t\tif (getClass() != obj.getClass()) { // If compare to an object of a different class\n\t\t\treturn false; // getClass() return the Class of an object\n\t\t}\n\t\tPlayingCard other = (PlayingCard) obj; // Define a PlayingCard for the object that was passed\n\t\tif (color != other.color) {\n\t\t\treturn false;\n\t\t}\n\t\tif (suit != other.suit) {\n\t\t\treturn false;\n\t\t}\n\t\tif (value != other.value) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (TkRefexIntRevision.class.isAssignableFrom(obj.getClass())) {\n TkRefexIntRevision another = (TkRefexIntRevision) obj;\n\n // =========================================================\n // Compare properties of 'this' class to the 'another' class\n // =========================================================\n // Compare intValue\n if (this.intValue != another.intValue) {\n return false;\n }\n\n // Compare their parents\n return super.equals(obj);\n }\n\n return false;\n }", "@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 }", "@Override\n public boolean equals(Object obj) {\n if (obj instanceof Link) {\n Link l = (Link) obj;\n return account == l.account && budget == l.budget;\n }\n throw new IllegalArgumentException(\"the argument is not a \"\n + getClass());\n }", "@Override\n public boolean equals(\n Object obj) {\n\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 RichSymbol richSymbol = (RichSymbol) obj;\n\n if (this.isLookahead != richSymbol.isLookahead) {\n return false;\n }\n\n return this.symbol.equals(richSymbol.symbol);\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 }", "@Override\n public boolean equals(final Object o) {\n if (this == o) {\n return true;\n }\n if (o instanceof Card) {\n return ((suit == ((Card) o).suit)\n && (rank == ((Card) o).rank));\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object obj) {\n if (obj == null) {\n return false;\n }\n\n if (getClass() != obj.getClass()) {\n return false;\n }\n\n RootHashState otherObj = (RootHashState)obj;\n\n // if legal then equal\n return (otherObj.createHash() == this.createHash()) ? true : false;\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof OrderRow)\n\t\t\treturn id == ((OrderRow) obj).id;\n\t\treturn super.equals(obj);\n\t}", "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 }", "@Override\r\n public boolean equals(Object o) {\r\n if (!(o instanceof ScoreBoard)) {\r\n return false;\r\n }\r\n\r\n ScoreBoard other = (ScoreBoard) o;\r\n return this.currentScore == other.currentScore\r\n && this.scores.equals(other.scores);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set accessor for persistent attribute: fecha_termino
public abstract void setFecha_termino(java.lang.String newFecha_termino);
[ "public abstract java.lang.String getFecha_termino();", "public void setFecha(Fecha fecha){\n this.fecha = fecha;\n }", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public void setFecha(Fecha fecha) {\r\n this.fecha = fecha;\r\n }", "public abstract void setFechaRegistro( java.util.Date fechaRegistro );", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public Date getFechaRegistro() {\r\n return fechaRegistro;\r\n }", "public java.util.Calendar getTerminOd() {\n return terminOd;\n }", "public Date getFechaInicioContrato() {\r\n\t\t\r\n\t\treturn (this.fechaInicioContrato);\r\n\t}", "public java.lang.String getEntregaFecha() {\n return entregaFecha;\n }", "@Test\n public void testSetFechaPrestamo() {\n System.out.println(\"setFechaPrestamo\");\n Date fechaPrestamo = null;\n Ejemplar instance = new Ejemplar();\n instance.setFechaPrestamo(fechaPrestamo);\n \n }", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "public void setFechaRegistro(Date fechaRegistro) {\r\n this.fechaRegistro = fechaRegistro;\r\n }", "public Date getFechaInicioSesion() {\n return fechaInicioSesion;\n }", "public abstract java.lang.String getFecha_inicio();", "public Date getDtEntrega() {\n\t\treturn dtEntrega;\n\t}", "public int getFechaInicio() {\n return fechaInicio;\n }", "public void ordenaPorFecha() {\n ordenActualDias = DiarioContract.DiaDiarioEntries.FECHA;\n leeAdaptador();\n }", "public Date getFechahoraentrada() {\n return fechahoraentrada;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the module groups
public void setModuleGroups(Collection<ModuleGroup> groups) { this.groups = new HashMap<>(); for (ModuleGroup group : groups) { this.groups.put(group.getName(), group); } }
[ "public void setGroups(Set<SymbolGroup> groups) {\n this.groups = groups;\n }", "public void setAllGroups(String groups)\n {\n m_allGroups = groups;\n }", "void setGroup(InternalGroup group);", "public void setLookupGroups( String[] groups ) throws RemoteException {\n\t\tStringBuffer l = new StringBuffer();\n\t\tl.append(\"Set lookup groups:\");\n\t\tfor( int i = 0; i< groups.length; ++i ) {\n\t\t\tl.append(\" \"+groups[i] );\n\t\t}\n\t\tlog.log(Level.CONFIG, l.toString() );\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdata.groups = groups;\n\t\t\tio.writeState( data );\n\t\t\tdisco.setGroups(data.groups);\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}", "public void setGroupEnabled(int group, boolean enabled);", "public void setAttributeGroups(AttributeGroups attributeGroups) {\n\t\tthis.attributeGroups = attributeGroups;\n\t}", "public void setGroupsAllRegs(String[] groups) throws RemoteException {\n Set eSet = getRegistrationMap().entrySet();\n Iterator iter = eSet.iterator();\n for(int i=0;iter.hasNext();i++) {\n setGroupsOneReg( groups, (Map.Entry)iter.next() );\n }//end loop\n if( groups == DiscoveryGroupManagement.ALL_GROUPS ) {\n logger.log(Level.FINE, \" all regs -- groups set to ALL_GROUPS\");\n } else if( groups.length <= 0 ) {\n logger.log(Level.FINE, \" all regs -- groups set to NO_GROUPS\");\n } else {\n GroupsUtil.displayGroupSet(groups,\n \" all regs -- group\",Level.FINE);\n }//endif\n }", "void setGroupmappings(final Set<Groupmapping> groupmapping);", "void setGroupId(int groupId);", "public void setModules(List modules) {\n _modules = modules;\n }", "public void setGroup1(Group group) {\n this.group = group;\n }", "void enableGroup(String groupName);", "public void setGroup(int group) {\r\n\t\tthis.group = group;\r\n\t}", "public void setGroupsToken(String groupsToken);", "public void setModules(String[] modules) {\n clearModules();\n if (modules == null) {\n return;\n }\n for (int i = 0; i < modules.length; i++) {\n String module = modules[i];\n this.modules.add(module);\n }\n }", "interface GROUPS {\n /**\n * This group define which users can access to the LW WCM editor application.\n * All users that belongs to this group have grant to access LW WCM Editor.\n * Users with membership MANAGER (@see Wcm.MANAGER) also have administrator role in LW WCM editor.\n */\n static final String WCM = (System.getProperty(\"wcm.groups.wcm\") == null ? \"/wcm\" : System.getProperty(\"wcm.groups.wcm\"));\n /**\n * Wildcard to refer all groups under Wcm.WCM.\n * Used for ACLs to define a grant for all groups under Wcm.WCM\n */\n\t\tstatic final String ALL = \"*\";\n /**\n * Users with membership MANAGER in @see Wcm.WCM group have administrator role in LW WCM editor.\n */\n static final String MANAGER = (System.getProperty(\"wcm.groups.manager\") == null ? \"manager\" : System.getProperty(\"wcm.groups.manager\"));\n /**\n * Users\n */\n static final String LOST = (System.getProperty(\"wcm.groups.lost\") == null ? \"/wcm/lost\" : System.getProperty(\"wcm.groups.lost\"));\n /**\n * Default editor\n */\n static final String EDITOR = (System.getProperty(\"wcm.groups.editor\") == null ? \"/wcm/editor\" : System.getProperty(\"wcm.groups.editor\"));\n\t}", "protected abstract Set getUserGroups();", "public void setGroup(entity.Group value);", "boolean setChannelGroup(String newGroup);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Example using window operator > It periodically subdivide items from an Observable into Observable windows and emit these windows rather than emitting the items one at a time
protected void doSomeWorkWindow() { Observable.interval(1, TimeUnit.SECONDS).take(12) .window(3, TimeUnit.SECONDS) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(getConsumer()); }
[ "public static void main(String[] args) throws InterruptedException {\n /*\n Observable.range(1,30)\n .buffer(4)\n .subscribe(System.out::println);\n\n Observable.interval(500, TimeUnit.MILLISECONDS)\n .buffer(1,TimeUnit.SECONDS,2) //as time based worked on computation based scheduler.\n .subscribe(System.out::println);\n\n Observable<Long> intervalObservable = Observable.interval(1, TimeUnit.SECONDS);\n Observable.interval(500, TimeUnit.MILLISECONDS)\n .buffer(intervalObservable)\n .subscribe(System.out::println);*/\n Observable<Long> intervalObservable = Observable.interval(1, TimeUnit.SECONDS);\n Observable.interval(500, TimeUnit.MILLISECONDS)\n .window(intervalObservable)\n .subscribe(System.out::println);\n Thread.sleep(6000);\n }", "<R> ContinuousStream<R> aggregateWindow(MISTFunction<WindowData<T>, R> aggregateFunc);", "@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\tint size, \r\n\t\t\tlong timespan, \r\n\t\t\t@Nonnull TimeUnit unit) {\r\n\t\treturn window(source, size, timespan, unit, scheduler());\r\n\t}", "private void doSomeWorkBuffer() {\n\n Observable<List<String>> buffered = getObservableBuffer().buffer(3, 1);\n\n // 3 means, it takes max of three from its start index and create list\n // 1 means, it jumps one step every time\n // so the it gives the following list\n // 1 - one, two, three\n // 2 - two, three, four\n // 3 - three, four, five\n // 4 - four, five\n // 5 - five\n\n buffered.subscribe(getObserverBuffer());\n }", "private static void zipStreams() {\n Observable<Long> a = Observable.interval(1, TimeUnit.SECONDS);\n Observable<Long> b = Observable.interval(2, TimeUnit.SECONDS);\n a.zipWith(b, new Func2<Long, Long, Pair<Long, Long>>() {\n @Override\n public Pair<Long, Long> call(Long a_val, Long b_bal) {\n return new Pair<Long, Long>(a_val, b_bal);\n }\n }).subscribe(value -> Utils.printVerbose(\"mergeStreams:\" + value.first + \", \" + value.second));\n\n Utils.threadSleep(10000);\n }", "public static void flatMap() {\n List<String> data = Utils.getData();\n Observable.fromIterable(data)\n .flatMap((item) -> Observable.just(item + \" flat mapped\").repeat(2)\n ).subscribe(new MyObserver<>());\n }", "private void sampleOfTheGeneratedWindowedAggregate() {\n Iterator<Integer[]> iterator = null;\n\n // builder3\n Integer[] rows = iterator.next();\n\n int prevStart = -1;\n int prevEnd = -1;\n\n for ( int i = 0; i < rows.length; i++ ) {\n // builder4\n Integer row = rows[i];\n\n int start = 0;\n int end = 100;\n if ( start != prevStart || end != prevEnd ) {\n // builder5\n int actualStart = 0;\n if ( start != prevStart || end < prevEnd ) {\n // builder6\n // recompute\n actualStart = start;\n // implementReset\n } else { // must be start == prevStart && end > prevEnd\n actualStart = prevEnd + 1;\n }\n prevStart = start;\n prevEnd = end;\n\n if ( start != -1 ) {\n for ( int j = actualStart; j <= end; j++ ) {\n // builder7\n // implementAdd\n }\n }\n // implementResult\n // list.add(new Xxx(row.deptno, row.empid, sum, count));\n }\n }\n // multiMap.clear(); // allows gc\n // source = Linq4j.asEnumerable(list);\n }", "@Test\r\n\tpublic void exerciseInterruptible() {\n\t\t\r\n\t\tList<String> articlesTopicA = Arrays.asList(\"Article A-1\",\"Article A-2\",\"Article A-3\");\r\n\t\tList<String> articlesTopicB = Arrays.asList(\"Article B-1\",\"Article B-2\",\"Article B-3\");\r\n\t\tList<String> articlesTopicC = Arrays.asList(\"Article C-1\",\"Article C-2\",\"Article C-3\");\r\n\t\t\r\n\t\tList<Observable<String>> topicObservables = Arrays.asList(\r\n\t\t\t\tObservable.interval(0, 80L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicA.get(i.intValue())),\r\n\t\t\t\tObservable.interval(50, 60L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicB.get(i.intValue())),\r\n\t\t\t\tObservable.interval(0, 40L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> articlesTopicC.get(i.intValue())));\r\n\t\t\r\n\t\tObservable<Observable<String>> topics = Observable.interval(0, 100L, TimeUnit.MILLISECONDS, testScheduler)\r\n\t\t\t\t.take(3)\r\n\t\t\t\t.map(i -> topicObservables.get(i.intValue()));\r\n\t\t\r\n\t\t//\t\t t[ms]: 0 100 200 300\r\n\t\t//\t\ttopics: A---------B---------C---------| \r\n\t\t//\t\t A: 1-------2-|-----3---|---------|\r\n\t\t//\t\t B: |---------|----1----|2-----3--|\r\n\t\t//\t\t C: |---------|---------1---2---3-|\r\n\t\t//\t\tResult: A-1 A-2 B-1 C-1 C-2 C-3\r\n\t\t\t\t\r\n\t\t// TODO: always switch to the latest topic\r\n\t\t// HINT: http://reactivex.io/documentation/operators/switch.html\r\n\t\tObservable<String> latestInteresting = Observable.empty();\r\n\r\n\t\t// verify\r\n\t\tTestSubscriber<String> testSubscriber = new TestSubscriber<>();\r\n\t\tlatestInteresting\r\n\t\t\t.doOnNext(article -> log(String.format(\" doOnNext(): %s Time: %d\", article, testScheduler.now())))\r\n\t\t\t.subscribe(testSubscriber);\r\n\t\t\r\n\t\t// let the time elapse until completion\r\n\t\ttestScheduler.advanceTimeBy(300, TimeUnit.MILLISECONDS);\r\n\t\t\r\n\t\ttestSubscriber.assertCompleted();\r\n\t\ttestSubscriber.assertNoErrors();\r\n\t\tList<String> expectedArticles = Arrays.asList(\r\n\t\t\t\t\"Article A-1\",\"Article A-2\", \r\n\t\t\t\t\"Article B-1\", \r\n\t\t\t\t\"Article C-1\", \"Article C-2\", \"Article C-3\");\r\n\t\ttestSubscriber.assertReceivedOnNext(expectedArticles);\r\n\t\t\r\n\t}", "public void slidetimewindow(ObservableList<? extends PublicationGraphEvent> items, int pub_id, String window_name,\r\n\t\t\tlong window_len_time, long window_slide) {\r\n\t\tList<PublicationGraphEvent> window = new ArrayList<PublicationGraphEvent>();\r\n\t\tif (items != null) {\r\n\t\t\titems.addListener((ListChangeListener<PublicationGraphEvent>) c -> {\r\n\t\t\t\twhile (c.next()) {\r\n\t\t\t\t\tif (c.wasAdded()) {\r\n\t\t\t\t\t\twindow.addAll(c.getAddedSubList());\r\n\t\t\t\t\t\tSystem.out.println(\"Publisher_\" + pub_id + \" SLidingTimeWindow_\" + window_name + \" :size= \"\r\n\t\t\t\t\t\t\t\t+ window.size() + \" Time: \" + Instant.now().getEpochSecond());\r\n\r\n\t\t\t\t\t\t// logic for count window both tumbling and sliding\r\n\t\t\t\t\t\tshift_time = start_time + window_slide;\r\n\t\t\t\t\t\tif (Instant.now().getEpochSecond() == shift_time) {\r\n\t\t\t\t\t\t\t// mid_tym = Instant.now().getEpochSecond();\r\n\t\t\t\t\t\t\tslide_index = window.size();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tend_time = start_time + window_len_time;\r\n\t\t\t\t\t\tif (Instant.now().getEpochSecond() == end_time) {\r\n\t\t\t\t\t\t\t// call trigger function\r\n\t\t\t\t\t\t\t// Trigger function\r\n\t\t\t\t\t\t\tStateObject win_state= new StateObject();\r\n\t\t\t\t\t\t\twin_state.setState(window);\r\n\t\t\t\t\t\t\twin_state.setWin_name(window_name.split(\"\\\\*\")[0]);\r\n\t\t\t\t\t\t\twin_state.setQuery_name(window_name.split(\"\\\\*\")[1]);\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tCreateQueryStateStore.querystatestore.get(window_name.split(\"\\\\*\")[1]).put(win_state);\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\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\twindow.subList(0, slide_index - 1).clear();\r\n\t\t\t\t\t\t\tstart_time = shift_time;\r\n\t\t\t\t\t\t\tSystem.out.println(\"New Window:\");\r\n\t\t\t\t\t\t\t// flag =0;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (c.wasRemoved()) {\r\n\t\t\t\t\t\twindow.removeAll(c.getRemoved());\r\n\t\t\t\t\t\tSystem.out.println(window.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tfor (PublicationGraphEvent item : items) {\r\n\t\t\t\twindow.add(item);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\tint size, \r\n\t\t\tlong timespan, \r\n\t\t\t@Nonnull TimeUnit unit, \r\n\t\t\t@Nonnull Scheduler pool) {\r\n\t\treturn new Windowing.WithTimeOrSize<T>(source, size, timespan, unit, pool);\r\n\t}", "private static void createColdObservable() {\n var observable = Observable.just(1, 2, 3, 4, 5);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n\n pause(1000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n }", "private void doSomeWork() {\n\n PublishSubject<Integer> source = PublishSubject.create();\n ConnectableObservable<Integer> connectableObservable = source.replay(3); // bufferSize = 3 to retain 3 values to replay\n connectableObservable.connect(); // connecting the connectableObservable\n\n connectableObservable.subscribe(getFirstObserver());\n\n source.onNext(1);\n source.onNext(2);\n source.onNext(3);\n source.onNext(4);\n source.onComplete();\n\n /*\n * it will emit 2, 3, 4 as (count = 3), retains the 3 values for replay\n */\n connectableObservable.subscribe(getSecondObserver());\n\n }", "private void dropoutInObservable() {\n Observable.just(1)\n .flatMap(new Func1<Integer, Observable<Integer>>() {\n @Override\n public Observable<Integer> call(Integer integer) {\n Log.v(\"ttangliang ttdropout\", \"DropoutActivity.flatMap().call() \" + \" thread id=\" + Thread.currentThread().getId());\n return Observable.just(integer + 20);\n }\n })\n //switch to ui thread for updating ui in half way\n .observeOn(AndroidSchedulers.mainThread())\n .doOnNext(new Action1<Integer>() {\n @Override\n public void call(Integer integer) {\n Log.v(\"ttangliang ttdropout\", \"DropoutActivity.doOnNext().call() dropout result=\" + integer + \" thread id=\" + Thread.currentThread().getId());\n setupUi(integer);\n }\n })\n //switch to background thread for time-consuming operation\n .observeOn(Schedulers.computation())\n .map(new Func1<Integer, Integer>() {\n @Override\n public Integer call(Integer integer) {\n int map = integer*100 ;\n Log.v(\"ttangliang ttdropout\", \"DropoutActivity.map().call() dropout result=\" + map + \" thread id=\" + Thread.currentThread().getId());\n return map;\n }\n })\n .subscribeOn(Schedulers.computation())\n //the final result will be in ui thread\n .subscribeOn(Schedulers.computation())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(new Subscriber<Integer>() {\n @Override\n public void onCompleted() {\n\n }\n\n @Override\n public void onError(Throwable e) {\n Log.e(\"ttangliang ttdropout\", \"DropoutActivity.onError() error=\" + e);\n }\n\n @Override\n public void onNext(Integer integer) {\n Log.v(\"ttangliang ttdropout\", \"DropoutActivity.onNext() \" + \" result=\" + integer);\n updateUi(integer);\n }\n });\n }", "@Test\n public void testObserveOnWithNewThreadScheduler() {\n final AtomicInteger count = new AtomicInteger();\n final int _multiple = 99;\n\n Observable.range(1, 100000).map(new Func1<Integer, Integer>() {\n\n @Override\n public Integer call(Integer t1) {\n return t1 * _multiple;\n }\n\n }).observeOn(Schedulers.newThread())\n .toBlockingObservable().forEach(new Action1<Integer>() {\n\n @Override\n public void call(Integer t1) {\n assertEquals(count.incrementAndGet() * _multiple, t1.intValue());\n assertTrue(Thread.currentThread().getName().startsWith(\"RxNewThreadScheduler\"));\n }\n\n });\n }", "@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source, int size) {\r\n\t\treturn window(source, size, size);\r\n\t}", "public interface WindowedStream<T> extends MISTStream<WindowData<T>> {\n\n /**\n * It reduces the windowed stream by an user-designated key.\n * @param keyFieldNum key index\n * @param keyType the type of the key\n * @param reduceFunc the reduce function\n * @param <K> the type of key in resulting stream\n * @param <V> the type of value in resulting stream\n * @return new reduced continuous stream after applying the operation\n */\n <K, V> ContinuousStream<Map<K, V>> reduceByKeyWindow(\n int keyFieldNum, Class<K> keyType, MISTBiFunction<V, V, V> reduceFunc);\n\n /**\n * It aggregates the windowed stream by an user-defined aggregation function.\n * @param aggregateFunc the function that aggregates input WindowData\n * @param <R> the type of result\n * @return new aggregated continuous stream after applying the aggregation function\n */\n <R> ContinuousStream<R> aggregateWindow(MISTFunction<WindowData<T>, R> aggregateFunc);\n\n /**\n * It applies an user-defined stateful operation to the collection of data received from upstream window operator.\n * @param applyStatefulFunction the user-defined ApplyStatefulFunction\n * @param <R> the type of result\n * @return new aggregated continuous stream after applying the stateful operation\n */\n <R> ContinuousStream<R> applyStatefulWindow(ApplyStatefulFunction<T, R> applyStatefulFunction);\n}", "@Nonnull\r\n\tpublic static <T> Observable<List<T>> forkJoin(\r\n\t\t\t@Nonnull final Iterable<? extends Observable<? extends T>> sources) {\r\n\t\treturn new Observable<List<T>>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super List<T>> observer) {\r\n\t\t\t\tfinal CompositeCloseable closeables = new CompositeCloseable();\r\n\t\t\t\tfinal List<AtomicReference<T>> lastValues = new ArrayList<AtomicReference<T>>();\r\n\t\t\t\tfinal List<Observable<? extends T>> observableList = new ArrayList<Observable<? extends T>>();\r\n\t\t\t\tfinal List<Observer<T>> observers = new ArrayList<Observer<T>>();\r\n\t\t\t\tfinal AtomicInteger wip = new AtomicInteger(observableList.size() + 1);\r\n\r\n\t\t\t\tint i = 0;\r\n\t\t\t\tfor (Observable<? extends T> o : sources) {\r\n\t\t\t\t\tfinal int j = i;\r\n\t\t\t\t\tobservableList.add(o);\r\n\t\t\t\t\tlastValues.add(new AtomicReference<T>());\r\n\t\t\t\t\tobservers.add(new Observer<T>() {\r\n\t\t\t\t\t\t/** The last value. */\r\n\t\t\t\t\t\tT last;\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void error(@Nonnull Throwable ex) {\r\n\t\t\t\t\t\t\tobserver.error(ex);\r\n\t\t\t\t\t\t\tcloseables.closeSilently();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void finish() {\r\n\t\t\t\t\t\t\tlastValues.get(j).set(last);\r\n\t\t\t\t\t\t\trunIfComplete(observer, lastValues, wip);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void next(T value) {\r\n\t\t\t\t\t\t\tlast = value;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\ti = 0;\r\n\t\t\t\tfor (Observable<? extends T> o : observableList) {\r\n\t\t\t\t\tcloseables.add(Observers.registerSafe(o, observers.get(i)));\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\r\n\t\t\t\trunIfComplete(observer, lastValues, wip);\r\n\t\t\t\treturn closeables;\r\n\t\t\t}\r\n\t\t\t/**\r\n\t\t\t * Runs the completion sequence once the WIP drops to zero.\r\n\t\t\t * @param observer the observer who will receive the values\r\n\t\t\t * @param lastValues the array of last values\r\n\t\t\t * @param wip the work in progress counter\r\n\t\t\t */\r\n\t\t\tpublic void runIfComplete(\r\n\t\t\t\t\tfinal Observer<? super List<T>> observer,\r\n\t\t\t\t\tfinal List<AtomicReference<T>> lastValues,\r\n\t\t\t\t\tfinal AtomicInteger wip) {\r\n\t\t\t\tif (wip.decrementAndGet() == 0) {\r\n\t\t\t\t\tList<T> values = new ArrayList<T>();\r\n\t\t\t\t\tfor (AtomicReference<T> r : lastValues) {\r\n\t\t\t\t\t\tvalues.add(r.get());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tobserver.next(values);\r\n\t\t\t\t\tobserver.finish();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}", "private void doSomeWorkFlowable() {\n\n Flowable<Integer> observable = Flowable.just(1, 2, 3, 4);\n\n observable.reduce(50, new BiFunction<Integer, Integer, Integer>() {\n @Override\n public Integer apply(Integer t1, Integer t2) {\n return t1 + t2;\n }\n }).subscribe(getObserverFlowable());\n\n }", "private static void createObservableUsingInterval() {\n LOG.info(LINE);\n var observable = Observable.interval(1, TimeUnit.SECONDS);\n\n observable.subscribe(item -> LOG.info(\"Observer 1: {}\", item));\n sleep(2000);\n\n observable.subscribe(item -> LOG.info(\"Observer 2: {}\", item));\n sleep(3000);\n\n // this is a cold obervable as interval creates new instance for each observer\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Encapsulates settings affecting the overall execution of a view process.
public interface ViewExecutionOptions { /** * Gets the cycle execution sequence. * * @return the cycle execution sequence, not null */ ViewCycleExecutionSequence getExecutionSequence(); /** * Gets the set of flags defining aspects of the execution behaviour in relation to the execution options. * * @return the set of flags, not null */ EnumSet<ViewExecutionFlags> getFlags(); /** * Gets the maximum number of delta cycles following a full computation cycles. * * @return the maximum number of delta cycles following a full computation cycle, null for no limit */ Integer getMaxSuccessiveDeltaCycles(); /** * Gets the default execution options. * * @return the default execution options, null if not specified */ ViewCycleExecutionOptions getDefaultExecutionOptions(); /** * Gets the version-correction to apply during execution. * <p> * The version-correction affects the data used by the running view process. If the version-correction has either the * version or correction set to 'latest' then the view process will track real-time changes to any data on which it * depends. * * @return the version-correction, not null */ VersionCorrection getVersionCorrection(); }
[ "public abstract void viewRun();", "View(Process p){\n\t\t\tthis.process = p;\n\t\t}", "@Override\n public void updateView() {\n mainSettingsController.getProgramView().getMidiSettingsPage().getScored().setSetting(mainSettingsController.getProgramModel().getSaveFile().getMidiSettingsRowData(MIDI_POINT));\n mainSettingsController.getProgramView().getMidiSettingsPage().getHide().setSetting(mainSettingsController.getProgramModel().getSaveFile().getMidiSettingsRowData(MIDI_HIDE));\n mainSettingsController.getProgramView().getMidiSettingsPage().getShow().setSetting(mainSettingsController.getProgramModel().getSaveFile().getMidiSettingsRowData(MIDI_SHOW));\n }", "ViewCycleExecutionOptions getDefaultExecutionOptions();", "public void handleSettings(View view) {\n\t Intent intent = new Intent();\n\t ComponentName cp = new ComponentName(\"com.onskreen.cornerstone.panel\", \"com.onskreen.cornerstone.panel.CSSettings\");\n\t intent.setComponent(cp);\n\t ActivityLauncher aLauncher = new ActivityLauncher(intent, -2);\n\t aLauncher.launch();\n\t}", "public SettingsMainView() {\n\t\tinitComponents();\n Adaptation.automaticallySetRuntime(this);\n\t\tAdaptation.automaticallyAdapt(this);\n\t\t\n\t\tselecteButton(generalButton);\n\t\tshowPanel(new AdaptableGeneralSettingsView());\n }", "public ViewProcessImpl(final UniqueId viewDefinitionId, final ViewExecutionOptions executionOptions, final ViewProcessContext viewProcessContext,\n final ViewProcessorImpl viewProcessor, final int permissionCheckInterval, final boolean runPersistently) {\n _viewDefinitionId = ArgumentChecker.notNull(viewDefinitionId, \"viewDefinitionId\");\n _executionOptions = ArgumentChecker.notNull(executionOptions, \"executionOptions\");\n _viewProcessContext = ArgumentChecker.notNull(viewProcessContext, \"viewProcessContext\");\n _viewProcessor = ArgumentChecker.notNull(viewProcessor, \"viewProcessor\");\n _permissionCheckInterval = permissionCheckInterval;\n _isPersistentViewProcess = runPersistently;\n\n if (_viewDefinitionId.isVersioned()) {\n _viewDefinitionChangeListener = null;\n } else {\n final ObjectId viewDefinitionObject = viewDefinitionId.getObjectId();\n final ViewDefinition viewDefinition = getProcessContext().getConfigSource().getConfig(ViewDefinition.class, getDefinitionId());\n final Set<ObjectId> scenarioIds = Sets.newHashSet(viewDefinitionObject);\n for (final ViewCalculationConfiguration calcConfig : viewDefinition.getAllCalculationConfigurations()) {\n final UniqueId scenarioId = calcConfig.getScenarioId();\n final UniqueId parametersId = calcConfig.getScenarioParametersId();\n if (scenarioId != null) {\n scenarioIds.add(scenarioId.getObjectId());\n }\n if (parametersId != null) {\n scenarioIds.add(parametersId.getObjectId());\n }\n }\n _viewDefinitionChangeListener = new ChangeListener() {\n @SuppressWarnings(\"incomplete-switch\")\n @Override\n public void entityChanged(final ChangeEvent event) {\n if (viewDefinitionObject.equals(event.getObjectId())) {\n switch (event.getType()) {\n case REMOVED:\n LOGGER.error(\"Shutting down view process after removal of view definition {}\", viewDefinitionObject);\n shutdown();\n break;\n case CHANGED:\n viewDefinitionChanged();\n break;\n }\n } else if (scenarioIds.contains(event.getObjectId())) {\n viewDefinitionChanged();\n forceGraphRebuild();\n }\n }\n };\n }\n _currentViewDefinition = getProcessContext().getConfigSource().getConfig(ViewDefinition.class, getDefinitionId());\n // Start up immediately if persistent, otherwise we'll wait for\n // the first listener to be attached\n if (runPersistently) {\n startComputationJobIfRequired();\n }\n }", "public void emitChangeView() {\n \n int view = getCurrentViewNumber();\n Object lpid = getLocalServerID();\n \n JDSUtility.debug(\"[emitChangeView()] s\" + lpid + \", at time \" + getClockValue() + \", is going to emit a change view message for (v + 1 = \" + (view + 1) + \")\");\n\n /* the replica makes sure that no timer is currently working. If the view change was trigged by a suspect of failure of the primary then probably it's \n been already true. */\n revokeSendBatch();\n revokeViewChange();\n\n /* an exponetial timeout has to be considered to guarantee liveness when the end-to-end delay is too long (it's prevent uncessary view-changes)*/\n PBFTTimeoutDetector ttask = (PBFTTimeoutDetector) getViewTimer().getTask();\n long timeout = (Long) ttask.get(\"TIMEOUT\");\n ttask.put(\"TIMEOUT\", 2 * timeout);\n\n /* the replica moves to the next view. After that, this replica isn't accepting any message from view v < v+1. */\n setCurrentViewNumber(view +1);\n \n /* clean-up the sets P (prepare set) and Q (pre-prepare set)*/\n preprepareset.clear();\n prepareset.clear();\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n\n /* compute Q (pre-prepare set) and P (prepare set) */\n for(long seqn = lcwm + 1; seqn <=hcwm; seqn++){\n /*If I have a prepare then its digests will be added to pre-prepared and prepared sets */\n PBFTPrepare pr = getPrepareInfo().get(lpid, seqn);\n if(pr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, pr.getSequenceNumber(), null);\n pp.getDigests().addAll(pr.getDigests());\n preprepareset.add(pp);\n \n prepareset.add(new PBFTPrepare(pp, null));\n\n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n\n continue;\n }\n\n /*If I have a pre-prepare then its digests will be added to pre-prepared set*/\n PBFTPrePrepare ppr = getPrePrepareInfo().get(seqn);\n if(ppr != null){\n PBFTPrePrepare pp = new PBFTPrePrepare(view, ppr.getSequenceNumber(), null);\n pp.getDigests().addAll(ppr.getDigests());\n preprepareset.add(pp);\n \n for(String digest: pp.getDigests()){\n getRequestInfo().assign(digest, RequestState.WAITING);\n getRequestInfo().assign(digest, (Long)null);\n }\n } \n }\n\n \n try{\n doRollback();\n }catch(Exception e){\n e.printStackTrace();\n }\n\n /* update the controls for sequence number execution */\n getStateLog().setNextPrePrepareSEQ(lcwm + 1);\n getStateLog().setNextExecuteSEQ (lcwm + 1);\n\n PBFTChangeView cv = createChangeViewMessage();\n \n try {\n /* gets the root of the checkpoint partition tree */\n PartEntry centry = rStateManager.getPart(0, 0);\n\n /* adds the pair (last stable sequence number and state digest) to compose checkpoint set C */\n if(centry != null){\n cv.addCheckpoint(centry.getPartCheckpoint(), centry.getDigest());\n }else{\n cv.addCheckpoint(lcwm, \"\");\n }\n } catch (Exception ex) {\n Logger.getLogger(PBFTServer.class.getName()).log(Level.SEVERE, null, ex);\n cv.getCheckpointSet().clear();\n cv.addCheckpoint(lcwm, \"\");\n }\n\n /* add the pre-prepare set to current change-view message*/\n cv.getPrePrepareSet().clear();\n cv.getPrePrepareSet().addAll(preprepareset);\n\n /* add the prepare set to current change-view message*/\n cv.getPrepareSet().clear();\n cv.getPrepareSet().addAll(prepareset);\n\n /*emit the change view message to group of replicas */\n emit(cv, getLocalGroup().minus(getLocalProcess()));\n\n getChangeViewInfo().setMinimumViewNumber(view);\n getChangeViewInfo().put(cv);\n\n if(isPrimary()){\n getNewViewConstructor().addChangeView(cv);\n }else{\n finalizeNewViewConstructor();\n }\n\n getChangeViewInfo().gc(view);\n getChangeViewACKInfo().gc(view);\n getNewViewConstructor().gc(view);\n getNewViewInfo().gc(view);\n getPrePrepareInfo().gc(view);\n getPrepareInfo().gc(view);\n getPrePreparebackupInfo().gc(view);\n getCommitInfo().gc(view);\n\n\n emitChangeViewACK();\n\n\n uncertanty = true; \n }", "private void applyViewOptions(OptionsParam options) {\n if (getView() == null) {\n return;\n }\n\n breakPanel.setButtonsLocation(options.getViewParam().getBrkPanelViewOption());\n breakPanel.setButtonMode(options.getParamSet(BreakpointsParam.class).getButtonMode());\n breakPanel.setShowIgnoreFilesButtons(\n options.getParamSet(BreakpointsParam.class).isShowIgnoreFilesButtons());\n breakPanel.updateIgnoreFileTypesRegexs();\n }", "void customiseView(A analysisView);", "public abstract void setViewsEnability(boolean enabled);", "public void updateView() {\n if (settingsController != null) {\n settingsController.recreateView();\n settingsController.updateView();\n remoteHandler.createAndAddRemoteSettingsView(settingsController.getProgramView());\n }\n if (programController != null) {\n programController.recreateView();\n programController.updateView();\n setView(programController.getProgramView());\n }\n\n }", "private void setWorkingView() { //Sets the view.\n checkInButton.setDisable(true);\n startButton.setDisable(true);\n workNrTextField.setDisable(true);\n endButton.setDisable(false);\n checkOutButton.setDisable(false);\n amountTextField.setDisable(false);\n trashTextField.setDisable(false);\n reasonComboBox.setDisable(false);\n }", "@Override\r\n public void displaySettings() {\r\n settingsView.setFocus();\r\n }", "protected abstract void setSpecificViewThemes();", "void setActiveView(int streamID);", "public void applyPreferences() { \t\n \t// To update to Bubble position.\n \tsetToolbarsVisibility(false);\n \t\n \tupdateSwitchTabsMethod();\n \t\n \tfor (CustomWebView view : mWebViews) {\n \t\tview.initializeOptions();\n \t}\n }", "public TournamentSetting_View(RiskStart_View start_view, boolean modality)\r\n\t{\r\n\t\tsetTitle(\"Setting Tournament Mode\");\r\n setPreferredSize(new Dimension(200, 200));\r\n setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\r\n setResizable(false);\r\n add(tournamentSettingPanel());\r\n setLocationRelativeTo(null);\r\n pack();\r\n\t}", "void viewBasic(String viewType) throws LogicException {\n\t\tString exceptionMsg;\n\t\t\n\t\tswitch (viewType) {\n\t\t\tcase \"general\":\n\t\t\t\ttaskLists.set(INDEX_ACTION, new ArrayList<Task>(taskLists.get(INDEX_FLOATING)));\n\t\t\t\texceptionMsg = String.format(LogicException.MSG_SUCCESS_VIEW, viewType) + \" tasks.\";\n\t\t\t\tthrow new LogicException(exceptionMsg);\n\t\t\t\n\t\t\tcase \"deadlines\":\n\t\t\t\ttaskLists.set(INDEX_ACTION, new ArrayList<Task>(taskLists.get(INDEX_DEADLINE)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"events\":\n\t\t\t\ttaskLists.set(INDEX_ACTION, new ArrayList<Task>(taskLists.get(INDEX_EVENT)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"archive\":\n\t\t\t\ttaskLists.set(INDEX_ACTION, new ArrayList<Task>(taskLists.get(INDEX_COMPLETED)));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"high\":\n\t\t\tcase \"medium\":\n\t\t\tcase \"low\":\n\t\t\t\tclearActionList();\n\t\t\t\t// viewPriority(taskLists.get(INDEX_EXPIRED), viewType);\n\t\t\t\tviewPriority(taskLists.get(INDEX_PENDING), viewType);\n\t\t\t\texceptionMsg = String.format(LogicException.MSG_SUCCESS_VIEW_PRIORITY, viewType);\n\t\t\t\tthrow new LogicException(exceptionMsg);\n\t\t\t\t\t\t\t\n\t\t\tcase \"help\": // Display of help will be handled by UI. UI should disallow any commands while in help mode.\n\t\t\t\tclearActionList();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"today\":\n\t\t\t\tclearActionList();\n\t\t\t\tviewToday(taskLists.get(INDEX_PENDING));\n\t\t\t\tthrow new LogicException(LogicException.MSG_SUCCESS_VIEW_TODAY);\n\t\t\t\n\t\t\tcase \"tomorrow\":\n\t\t\t\tclearActionList();\n\t\t\t\tviewTomorrow(taskLists.get(INDEX_PENDING));\n\t\t\t\tthrow new LogicException(LogicException.MSG_SUCCESS_VIEW_TOMORROW);\n\t\t\t\n\t\t\tdefault: // Should not reach this point\n\t\t\t\texceptionMsg = String.format(LogicException.MSG_ERROR_VIEWTYPE, viewType);\n\t\t\t\tthrow new LogicException(exceptionMsg);\n\t\t}\n\t\t\n\t\texceptionMsg = String.format(LogicException.MSG_SUCCESS_VIEW, viewType) + \".\";\n\t\tthrow new LogicException(exceptionMsg);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Triangle triangle=new Triangle(); BeanFactory factory=new XmlBeanFactory(new FileSystemResource("spring.xml")); Triangle triangle=(Triangle) factory.getBean("triangle");
public static void main(String[] args) { ApplicationContext context=new ClassPathXmlApplicationContext("spring.xml"); Triangle triangle=(Triangle) context.getBean("triangle"); triangle.draw(); }
[ "public static void main(String[] args) {\n\t\n\t\n\tResource r = new ClassPathResource(\"employee.xml\");\n\tBeanFactory bf = new XmlBeanFactory(r);\n\tObject obj = bf.getBean(\"t\");\n\tTest t1=(Test)obj;\n\n}", "@Test\n public void testOrders(){\n ClassPathXmlApplicationContext context=\n new ClassPathXmlApplicationContext(\"bean4.xml\");\n Orders orders = context.getBean(\"orders\", Orders.class);\n System.out.println(\"第四步 得到bean实例\");\n System.out.println(orders);\n// orders.initMethod();\n context.close();\n }", "public void defaltMethod(){\n ApplicationContext context = new FileSystemXmlApplicationContext(\"D:/1. Projects/2. Aplikasi/19. Partner-Agent//simulator/src/java/Beans.xml\");\r\n HelloWorld obj = (HelloWorld) context.getBean(\"helloWorld\");\r\n obj.getMessages();\r\n }", "public static void main(String[] args) {\n ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext(new String[] {\"spring-config.xml\"});\r\n Rat rat = (Rat) ac.getBean(\"rat\");\r\n // Rat rat = (Rat)ac.getBean(\"rat\");\r\n rat.sayHello();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n// ApplicationContext context = new ClassPathXmlApplicationContext(\"spring-config.xml\");\r\n// HelloService helloService = context.getBean(HelloService.class);\r\n// System.out.println(helloService.sayHello());\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tApplicationContext applicationContext = new ClassPathXmlApplicationContext(\"spring.xml\");\n\t\tTriangle traingle = (Triangle)applicationContext.getBean(\"triangle\");\n\t\t\n\t\t\n\t\t\n\t\ttraingle.draw();\n\t\t\n\n\t}", "public static void main(String []args){\n ApplicationContext context1 = new FileSystemXmlApplicationContext(\"E:\\\\Project\\\\Java\\\\springFrameworkStudy\\\\WebContent\\\\WEB-INF\\\\classes\\\\saybeans.xml\");\r\n\t\tSystem.out.println(\"create context1\");\r\n\t\tsayHello printer1= (sayHello) context1.getBean(\"sayhello\");\r\n\t\tprinter1.getInnername();\r\n\r\n//\t\tcontext1.registerShutdownHook(); //用来在非web应用中关闭IoC容器的...\r\n\t}", "public static void main(String[] args) {new Spring().a.displayInfo();\n// Resource r = new ClassPathResource(\"applicationContext.xml\");\n// BeanFactory factory = new XmlBeanFactory(r);\n\n// Question a = (Question) factory.getBean(\"a\");\n\n // Question b = (Question) factory.getBean(\"b\");\n// a.displayInfo();\n// // b.displayInfo();\n//\n AbstractApplicationContext context = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n QuestionA a = context.getBean(\"a\", QuestionA.class);\n System.out.println(a.getQuestion().getName() + \"???a\");\n QuestionA aa = context.getBean(\"aa\", QuestionA.class);\n System.out.println(aa.getQuestion().getName() + \"???aa\");\n a.getQuestion().setName(\"from AAA\");\n System.out.println(a.getQuestion().getName() + \"???a\");\n System.out.println(aa.getQuestion().getName() + \"???aa\");\n\n\n }", "@Test\r\n public void func1()\r\n {\n BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource(\"com/itcast/b_create/applicationContext.xml\"));\r\n User user = (User) beanFactory.getBean(\"user\");\r\n Assert.assertEquals(\"test\",user.getName());\r\n\r\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\tApplicationContext ctxt=new FileSystemXmlApplicationContext(\"spring.xml\");\n\t\t\n\t\t\n\t\tPatient pat=ctxt.getBean( Patient.class);\n\t\tMedicine med =ctxt.getBean(Medicine.class);\n\t\tBill bill =ctxt.getBean(Bill.class);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(bill);\n\t\tSystem.out.println(med);\n\t\tSystem.out.println(pat);\n\t\t\n\t\t\n\n\t}", "@Test\n public void beanFactoryPostProcessir() {\n Person p1 = (Person) applicationContext.getBean(\"p1\");\n //System.out.println(p1.getAge());\n\n // applicationContext.getBean(\"p3\");\n }", "public static void main(String[] args) {\n\n ApplicationContext applicationContext3=new ClassPathXmlApplicationContext(\"constructorbean.xml\");\n// Movie movie1=(Movie)applicationContext3.getBean(\"movie1\");\n// Actor actor1=(Actor)applicationContext3.getBean(\"actor1\");\n //System.out.println(movie1.toString());\n\n Movie movie3=(Movie)applicationContext3.getBean(\"movie4\");\n// Actor actor3=(Actor)applicationContext3.getBean(\"Actor\");\n System.out.println(movie3.toString());\n\n\n }", "public static void main(String[] args) {\n\n\n\n\n\n ClassPathXmlApplicationContext contexto=new ClassPathXmlApplicationContext(\"applicationContext3.xml\");\n \n \n\n Empleados Maria=contexto.getBean(\"secretarioEmpleado2\",Empleados.class);\n\n \n \n \n //System.out.println(\"Tareas del director: \"+Maria.getTareas());\n System.out.println(\"Informes del director: \"+Maria.getInformes());\n //System.out.println(\"El correo es: \"+Maria.getEmail());\n //System.out.println(\"El nombre de la empresa es: \"+Maria.getNombreEmpresa());\n \n\n contexto.close();\n\n\n \n }", "@Test\r\n\tpublic void test() {\n\t\t BeanFactory beanFactory=new ClassPathXmlApplicationContext(\"spring.xml\");\r\n\t\t CommentTest commentTest=(CommentTest)beanFactory.getBean(\"commentTest\");\r\n//\t\tSystem.out.println(commentTest.a+\"——————————————————\");\r\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"1\");\r\n\t\tClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\t\r\n\t\tSystem.out.println(\"2\");\r\n\t\tPersonel alic = ctx.getBean(\"ali\", Personel.class);\r\n\t\t\r\n\t\tSystem.out.println(\"3\");\r\n\t\tSystem.out.println(alic);\r\n\t\tSystem.out.println(\"4\");\r\n\r\n\t\talic.destroyPersonel();//prototype olduğu için alic'nin destroy metodunu ben çağırıyorum\r\n\t\tctx.close();\r\n\t\tSystem.out.println(\"5\");\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tResource resource = new FileSystemResource(\"src/main/resources/beanContainer.xml\");\t\t// 경로 지정해서 설정\n\t\tBeanFactory factory = new XmlBeanFactory(resource);\n\t\t\n\t\tHello obj = (Hello)factory.getBean(\"hello\");\n\t\tobj.printMsg();\n\t\t\n\t\tHello obj2 = (Hello)factory.getBean(\"hello2\");\n\t\tobj2.printMsg();\n\t\t\n\t\tHello obj3 = (Hello)factory.getBean(\"hello\");\n\t\tobj3.printMsg();\n\t\t\n\t\tSystem.out.println(obj);\n\t\tSystem.out.println(obj2);\n\t\tSystem.out.println(obj3);\n\t}", "public static void main(String args[]) {\r\n\t\tApplicationContext appContext=new ClassPathXmlApplicationContext(\"beans.xml\");\r\n\t\tEmployeeBean emp1=(EmployeeBean) appContext.getBean(\"Employee\");\r\n\t\tSystem.out.println(emp1.getName());\r\n\t}", "public SpringBeanHelper (ApplicationContext applicationContext) {\t\n\t\tthis.context= applicationContext;\t\n\t}", "@Test\n public void test_BeanFactoryMethod() {\n Resource res = new ClassPathResource(\"beanfactory-example.xml\");\n BeanFactory factory = new XmlBeanFactory(res);\n User user = (User) factory.getBean(\"user\");\n\n assertTrue(factory.isSingleton(\"user\"));\n assertTrue(factory.getBean(\"user\") instanceof User);\n assertTrue(factory.isTypeMatch(\"user\", User.class));\n assertTrue(factory.getAliases(\"user\").length > 0);\n }", "@Override\n protected AbstractXmlApplicationContext createBeanFactory() {\n return new ClassPathXmlApplicationContext(\n \"org/apache/servicemix/cxfbc/ws/policy/xbean.xml\");\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Helper method check ssidBytes if all Ascii.
public static boolean isAllAscii(byte[] ssidBytes) { if (ssidBytes == null) { return false; } int length = ssidBytes.length; for (int i = 0; i < length; i ++) { if (ssidBytes[i] < 0) { return false; } } return true; }
[ "private static boolean judgeSSID(String ssid) {\n\t\tchar[] contentCharArr = ssid.toCharArray();\n\t\tfor (int i = 0; i < contentCharArr.length; i++) {\n\t\t\tif (contentCharArr[i] <= 0x20 || contentCharArr[i] == 0x7F) {\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private static boolean validateApConfigSsid(String ssid) {\n if (TextUtils.isEmpty(ssid)) {\n Log.d(TAG, \"SSID for softap configuration must be set.\");\n return false;\n }\n\n try {\n byte[] ssid_bytes = ssid.getBytes(StandardCharsets.UTF_8);\n\n if (ssid_bytes.length < SSID_MIN_LEN || ssid_bytes.length > SSID_MAX_LEN) {\n Log.d(TAG, \"softap SSID is defined as UTF-8 and it must be at least \"\n + SSID_MIN_LEN + \" byte and not more than \" + SSID_MAX_LEN + \" bytes\");\n return false;\n }\n } catch (IllegalArgumentException e) {\n Log.e(TAG, \"softap config SSID verification failed: malformed string \" + ssid);\n return false;\n }\n return true;\n }", "private boolean containsOnlyASCII(String input) {\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) > 127) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean isCorrectSSID()\n {\n WifiManager wifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE);\n WifiInfo wifiInfo = wifiManager.getConnectionInfo();\n if (wifiInfo.getSSID().equals(\"\\\"Wines\\\"\"))\n return true;\n else\n //return false;\n return true;\n }", "public static boolean validStringAsBytes(String input)\n {\n char orChar = 0;\n int length = input.length();\n for (int i = 0; i < length; ++i)\n {\n char c = input.charAt(i);\n orChar |= c;\n }\n return ((orChar & 0xff00) == 0);\n }", "private static boolean isAllASCII(String input) {\n if (StringUtils.isBlank(input)) {\n return false;\n }\n boolean isASCII = true;\n for (int i = 0; i < input.length(); i++) {\n int c = input.charAt(i);\n if (c > MAX_ASCII_CODE) {\n isASCII = false;\n break;\n }\n }\n return isASCII;\n }", "public static boolean isGbk(byte[] ssidBytes) {\n // Return false if matches UTF rule.\n String ssid = encodeSsid(ssidBytes, \"UTF-8\");\n if (ssid != null) {\n return false;\n }\n\n // Return false if not matches Gbk rule\n ssid = encodeSsid(ssidBytes, \"GBK\");\n if (ssid == null) {\n return false;\n }\n\n return true;\n }", "public static String encodeSsid(byte[] ssidBytes, String name) {\n String ssid = null;\n try {\n Charset charset = Charset.forName(name);\n CharsetDecoder decoder = charset.newDecoder();\n CharBuffer decoded = decoder.decode(ByteBuffer.wrap(ssidBytes));\n ssid = \"\\\"\" + decoded.toString() + \"\\\"\";\n } catch (UnsupportedCharsetException cce) {\n } catch (CharacterCodingException cce) {\n }\n\n int maxlen = \"UTF-8\".equals(name) ?\n MAX_SSID_UTF_LENGTH : MAX_SSID_LENGTH;\n if (ssid != null && ssid.length() > (maxlen + 2)) {\n loge(\"encodeSsid - converted SSID exceed max length \" +\n maxlen + \", ssid=\" + ssid);\n ssid = null;\n }\n\n return ssid;\n }", "private boolean isHex(String s) {\n char b;\n int n = s.length();\n for(int i=0; i<n; i++) {\n b = s.charAt(i);\n if(b >= '0' && b <='9') continue;\n if(b >= 'a' && b <='f') continue;\n return false;\n }\n\treturn true; \t\n }", "static boolean isLocalUnique(String s) {\n\t\tboolean result = false;\n\t\tif (s != null && s.length() > 8) {\n\t\t\tresult = true;\n\t\t\tfor (int i = 0; i < s.length(); i++) {\n\t\t\t\tchar c = s.charAt(i);\n\t\t\t\tif (isHex(c) == false) {\n\t\t\t\t\tresult = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static boolean isAllASCII(final InputStream in) throws IOException {\n boolean ret = true;\n int read = -1;\n do {\n read = in.read();\n if (read > 0x7F) {\n ret = false;\n break;\n }\n\n } while (read != -1);\n return ret;\n }", "public static byte[] getSsidBytes(String ssid, String charsetName) {\n if (ssid == null) {\n return null;\n }\n\n String bareSsid = NativeUtil.removeEnclosingQuotes(ssid);\n byte ssidBytes[] = null;\n try {\n ssidBytes = bareSsid.getBytes(charsetName);\n } catch (UnsupportedEncodingException cce) {\n // Unsupported\n }\n\n int maxlen = \"UTF-8\".equals(charsetName) ?\n MAX_SSID_UTF_LENGTH : MAX_SSID_LENGTH;\n if (ssidBytes.length > maxlen) {\n loge(\"getSsidBytes - converted SSID exceed max length \" +\n maxlen + \", ssid=\" + ssid);\n ssidBytes = null;\n }\n return ssidBytes;\n }", "private static boolean isPureAscii(String v) {\r\n System.out.println(\"AttributeCleaner.isPureAscii(\" + v + \")\");\r\n return asciiEncoder.canEncode(v);\r\n }", "abstract boolean isStringEncoded();", "public static boolean isAllAscii(String text) {\n for (int i = 0; i < text.length(); i++) {\n if (text.charAt(i) > 0x7f) { // non-ascii\n return false; }\n }\n return true;\n }", "public static boolean hasStringKey(byte[] bytes) {\n\n if (bytes.length != 8) {\n return true;\n } else {\n return (bytes[4] >= '0' && bytes[4] <= '9');\n }\n }", "private static boolean looksLikeValidUtf8(byte[] input) {\n int i = 0;\n if (input.length >= 3 &&\n (input[0] & 0xFF) == 0xEF &&\n (input[1] & 0xFF) == 0xBB &&\n (input[2] & 0xFF) == 0xBF) {\n // Skip BOM.\n i = 3;\n }\n\n int endOfSequence;\n for (int j = input.length; i < j; ++i) {\n int bite = input[i];\n if ((bite & 0x80) == 0) {\n continue; // ASCII\n }\n\n // Determine number of bytes in the sequence.\n if ((bite & 0x0E0) == 0x0C0) {\n endOfSequence = i + 1;\n } else if ((bite & 0x0F0) == 0x0E0) {\n endOfSequence = i + 2;\n } else if ((bite & 0x0F8) == 0xF0) {\n endOfSequence = i + 3;\n } else {\n // Not a valid utf-8 byte sequence. Skip.\n return false;\n }\n\n if (endOfSequence >= j) {\n // End of sequence reached, not a valid sequence\n return false;\n }\n\n while (i < endOfSequence) {\n i++;\n bite = input[i];\n if ((bite & 0xC0) != 0x80) {\n // High bit not set, not a valid sequence\n return false;\n }\n }\n }\n return true;\n }", "int IsEncrypt(byte[] buf) {\n /*\n ** These tests were deduced from inspection from encrypted NOAAPORT files.\n */\n String b = new String(buf, StandardCharsets.UTF_8);\n if (b.startsWith(\"R3\")) {\n return 1;\n }\n\n return 0;\n }", "private static boolean isSingleAsciiValue(byte[] bytes) {\n\n\t\tint lsbIndex = bytes.length - 1;\n\t\tif (bytes[lsbIndex] < 0) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 0; i < lsbIndex; i++) {\n\t\t\tif (bytes[i] != 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[Output Only] Last start timestamp in RFC3339 text format. optional string last_start_timestamp = 443830736;
@java.lang.Override public java.lang.String getLastStartTimestamp() { java.lang.Object ref = lastStartTimestamp_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); lastStartTimestamp_ = s; return s; } }
[ "public java.lang.String getLastStartTimestamp() {\n java.lang.Object ref = lastStartTimestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n lastStartTimestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getLastStartTimestampBytes() {\n java.lang.Object ref = lastStartTimestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n lastStartTimestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString getLastStartTimestampBytes() {\n java.lang.Object ref = lastStartTimestamp_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n lastStartTimestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getLastStopTimestamp() {\n java.lang.Object ref = lastStopTimestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n lastStopTimestamp_ = s;\n return s;\n }\n }", "public Builder setLastStartTimestamp(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n lastStartTimestamp_ = value;\n bitField0_ |= 0x00040000;\n onChanged();\n return this;\n }", "public java.lang.String getLastStopTimestamp() {\n java.lang.Object ref = lastStopTimestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n lastStopTimestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "com.google.protobuf.TimestampOrBuilder getCurrentEpochStartTimeOrBuilder();", "java.lang.String getUserEndYmd();", "com.google.protobuf.Timestamp getCurrentEpochStartTime();", "@java.lang.Override\n public com.google.protobuf.ByteString getLastStopTimestampBytes() {\n java.lang.Object ref = lastStopTimestamp_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n lastStopTimestamp_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "long getEndTimestampMs();", "com.google.protobuf.Timestamp getLastLocalStreamCreatedTimestamp();", "private String calculateTimeStamp() {\n LocalDateTime parseTime = LocalDateTime.now();\n return parseTime.format(formatter);\n }", "com.google.protobuf.TimestampOrBuilder getLastLocalStreamCreatedTimestampOrBuilder();", "public String getLastModifiedTimeNicelyFormatted();", "int getLastTime();", "int getLastlogtime();", "public java.lang.String getUserEndYmd() {\n java.lang.Object ref = userEndYmd_;\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 userEndYmd_ = s;\n }\n return s;\n }\n }", "public long getEndTimestamp() {\n\t\treturn this.endTimestamp;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/To get the ComputerName
public static String getComputerName() throws Exception{ String hostname = "Unknown"; try { InetAddress addr; addr = InetAddress.getLocalHost(); hostname = addr.getHostName(); } catch (UnknownHostException ex) { ex.fillInStackTrace(); System.out.println("Hostname can not be resolved"); } return (hostname); }
[ "public static String getComputerName()\r\n {\r\n String rval = \"null\";\r\n if(queryRegistry(COMPUTER_NAME_CMD, REGSTR_TOKEN) != null)\r\n {\r\n rval = queryRegistry(COMPUTER_NAME_CMD, REGSTR_TOKEN);\r\n }\r\n return rval;\r\n }", "public String getComputerName() {\n\t\treturn super.getProperty(\"ComputerName\", String.class);\n\t}", "public static String getComputerName() {\n return System.getenv(\"COMPUTERNAME\");\n }", "public String computerName() {\n return this.computerName;\n }", "public static String name() {\r\n String _computername=\"\";\r\n InetAddress _address=null;\r\n \r\n try {\r\n _address=InetAddress.getLocalHost();\r\n _computername=_address.getHostName();\r\n }\r\n catch (Exception ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n \r\n if (_address!=null) {\r\n _address=null; System.gc();\r\n }\r\n \r\n return _computername;\r\n }", "public static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return getComputerName();\n }\n }", "public String getName() {\n\t\treturn computerName;\n\t}", "public static String CurrentMachineName() throws UnknownHostException {\n final var localMachineIP = InetAddress.getLocalHost();\n return localMachineIP.getHostName();\n }", "static String getHostName() {\n try {\n return InetAddress.getLocalHost().getHostName();\n } catch (UnknownHostException e) {\n return \"unknown\";\n }\n }", "public String getRemoteComputerString(){\n return this.remoteComputerString;\n }", "public static String ComputerNamePending() {\n final var key = \"System\\\\ControlSet001\\\\Control\\\\ComputerName\\\\ComputerName\";\n final var value = \"ComputerName\";\n final var text = RegistryInfo.getStringValue(RegistryInfo.HKEY.LOCAL_MACHINE, key, value);\n return text.trim().isEmpty() ? \"N/A\" : text;\n }", "public String getClientMachine();", "private String getHostname() {\n ServerConfigurationService serverConfigurationService = CxfDiscoveryDataHolder.getInstance()\n .getServerConfigurationService();\n if (serverConfigurationService.getFirstProperty(HOST_NAME_) != null) {\n return serverConfigurationService.getFirstProperty(HOST_NAME_);\n } else {\n return System.getProperty(HOST_NAME_LOCAL);\n }\n }", "String getRemoteHostName();", "public java.lang.String getServer_machine_name() {\n return server_machine_name;\n }", "public String getMachineName() {\n\t\treturn machineName;\n\t}", "java.lang.String getHostname();", "public static String getCPUName()\r\n {\r\n String rval = \"null\";\r\n if(queryRegistry(CPU_NAME_CMD, REGSTR_TOKEN) != null)\r\n {\r\n rval = queryRegistry(CPU_NAME_CMD, REGSTR_TOKEN);\r\n }\r\n return rval;\r\n }", "public String getMACHINE_NAME_IP() {\r\n return MACHINE_NAME_IP;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensures compaction instant is in expected state and performs Compaction for the workload stored in instanttime.
private JavaRDD<WriteStatus> compact(String compactionInstantTime, boolean shouldComplete) { HoodieTable<T> table = HoodieTable.create(config, hadoopConf); HoodieTimeline pendingCompactionTimeline = table.getActiveTimeline().filterPendingCompactionTimeline(); HoodieInstant inflightInstant = HoodieTimeline.getCompactionInflightInstant(compactionInstantTime); if (pendingCompactionTimeline.containsInstant(inflightInstant)) { rollbackInflightCompaction(inflightInstant, table); table.getMetaClient().reloadActiveTimeline(); } compactionTimer = metrics.getCompactionCtx(); HoodieWriteMetadata compactionMetadata = table.compact(jsc, compactionInstantTime); JavaRDD<WriteStatus> statuses = compactionMetadata.getWriteStatuses(); if (shouldComplete && compactionMetadata.getCommitMetadata().isPresent()) { completeCompaction(compactionMetadata.getCommitMetadata().get(), statuses, table, compactionInstantTime); } return statuses; }
[ "public boolean scheduleCompactionAtInstant(String instantTime, Option<Map<String, String>> extraMetadata) throws HoodieIOException {\n LOG.info(\"Scheduling compaction at instant time :\" + instantTime);\n Option<HoodieCompactionPlan> plan = HoodieTable.create(config, hadoopConf)\n .scheduleCompaction(jsc, instantTime, extraMetadata);\n return plan.isPresent();\n }", "@Override\n public Option<HoodieCompactionPlan> execute() {\n table.getActiveTimeline().getCommitsTimeline().filterPendingExcludingCompaction().firstInstant()\n .ifPresent(earliestInflight -> ValidationUtils.checkArgument(\n HoodieTimeline.compareTimestamps(earliestInflight.getTimestamp(), HoodieTimeline.GREATER_THAN, instantTime),\n \"Earliest write inflight instant time must be later than compaction time. Earliest :\" + earliestInflight\n + \", Compaction scheduled at \" + instantTime));\n\n // Committed and pending compaction instants should have strictly lower timestamps\n List<HoodieInstant> conflictingInstants = table.getActiveTimeline()\n .getCommitsAndCompactionTimeline().getInstants()\n .filter(instant -> HoodieTimeline.compareTimestamps(\n instant.getTimestamp(), HoodieTimeline.GREATER_THAN_OR_EQUALS, instantTime))\n .collect(Collectors.toList());\n ValidationUtils.checkArgument(conflictingInstants.isEmpty(),\n \"Following instants have timestamps >= compactionInstant (\" + instantTime + \") Instants :\"\n + conflictingInstants);\n\n HoodieCompactionPlan plan = scheduleCompaction();\n if (plan != null && (plan.getOperations() != null) && (!plan.getOperations().isEmpty())) {\n extraMetadata.ifPresent(plan::setExtraMetadata);\n HoodieInstant compactionInstant =\n new HoodieInstant(HoodieInstant.State.REQUESTED, HoodieTimeline.COMPACTION_ACTION, instantTime);\n try {\n table.getActiveTimeline().saveToCompactionRequested(compactionInstant,\n TimelineMetadataUtils.serializeCompactionPlan(plan));\n } catch (IOException ioe) {\n throw new HoodieIOException(\"Exception scheduling compaction\", ioe);\n }\n return Option.of(plan);\n }\n return Option.empty();\n }", "public void commitCompaction(String compactionInstantTime, JavaRDD<WriteStatus> writeStatuses,\n Option<Map<String, String>> extraMetadata) throws IOException {\n HoodieTable<T> table = HoodieTable.create(config, hadoopConf);\n HoodieCommitMetadata metadata = CompactHelpers.createCompactionMetadata(\n table, compactionInstantTime, writeStatuses, config.getSchema());\n extraMetadata.ifPresent(m -> m.forEach(metadata::addMetadata));\n completeCompaction(metadata, writeStatuses, table, compactionInstantTime);\n }", "private CompactionOperation(CompactionController controller)\n {\n this.controller = controller;\n\n this.strategy = cfs.getCompactionStrategy();\n this.fullyExpiredSSTables = controller.getFullyExpiredSSTables();\n this.taskId = transaction.opId();\n\n // select SSTables to compact based on available disk space.\n buildCompactionCandidatesForAvailableDiskSpace(fullyExpiredSSTables);\n\n // sanity check: all sstables must belong to the same cfs\n assert !Iterables.any(transaction.originals(), sstable -> !sstable.descriptor.cfname.equals(cfs.name));\n\n this.limiter = CompactionManager.instance.getRateLimiter();\n this.startNanos = System.nanoTime();\n this.startTime = System.currentTimeMillis();\n this.actuallyCompact = Sets.difference(transaction.originals(), fullyExpiredSSTables);\n this.progress = new Progress();\n this.newSStables = Collections.emptyList();\n this.totalKeysWritten = 0;\n this.estimatedKeys = 0;\n this.completed = false;\n\n Directories dirs = getDirectories();\n\n try\n {\n // resources that need closing, must be created last in case of exceptions and released if there is an exception in the c.tor\n this.sstableRefs = Refs.ref(actuallyCompact);\n this.scanners = strategy.getScanners(actuallyCompact);\n this.compactionIterator = new CompactionIterator(compactionType, scanners.scanners, controller, FBUtilities.nowInSeconds(), taskId);\n this.op = compactionIterator.getOperation();\n this.writer = getCompactionAwareWriter(cfs, dirs, transaction, actuallyCompact);\n this.obsCloseable = opObserver.onOperationStart(op);\n\n compObservers.forEach(obs -> obs.onInProgress(progress));\n }\n catch (Throwable t)\n {\n t = Throwables.close(t, obsCloseable, writer, compactionIterator, scanners, sstableRefs); // ok to close even if null\n\n Throwables.maybeFail(t);\n }\n }", "private void autoCleanOnCommit(String instantTime) {\n if (config.isAutoClean()) {\n // Call clean to cleanup if there is anything to cleanup after the commit,\n if (config.isAsyncClean()) {\n LOG.info(\"Cleaner has been spawned already. Waiting for it to finish\");\n AsyncCleanerService.waitForCompletion(asyncCleanerService);\n LOG.info(\"Cleaner has finished\");\n } else {\n LOG.info(\"Auto cleaning is enabled. Running cleaner now\");\n clean(instantTime);\n }\n }\n }", "protected void performActions(int time) {\r\n \t//System.out.println(\"performing actions at time \" + time);\r\n \t\r\n // See what has to happen at this moment, according to the schedule.\r\n SchedulingElem task = timeTable.get(time);\r\n SimpleLock lock = (SimpleLock) getLock();\r\n // if task is null or transit, nothing needs to be done.\r\n // if it is starttransit or endtransit, ships need to be moved.\r\n if (task != null && task.getEvent() == SchedulingEvent.ENDTRANSIT) {\r\n Vessel v = lock.getVesselInChamber();\r\n if (v.getPreviousSegment() == lock.getSideOne()) {\r\n v.setCurrentPosition(lock.getSideTwo());\r\n v.setPreviousSegment(getLock());\r\n }\r\n else if (v.getPreviousSegment() == lock.getSideTwo()) {\r\n v.setCurrentPosition(lock.getSideOne());\r\n v.setPreviousSegment(getLock());\r\n }\r\n lock.setVesselInChamber(null);\r\n //removeReservationsBy(v);\r\n }\r\n else if (task != null && task.getEvent() == SchedulingEvent.STARTTRANSIT) {\r\n Vessel currentVessel = task.getVessel();\r\n if (lock.getWaitingSideOne().contains(currentVessel)) {\r\n // The scheduled vessel is waiting at side one\r\n lock.getWaitingSideOne().remove(currentVessel);\r\n lock.setVesselInChamber(currentVessel);\r\n }\r\n else if (lock.getWaitingSideTwo().contains(currentVessel)) {\r\n // The scheduled vessel is waiting at side two\r\n lock.getWaitingSideTwo().remove(currentVessel);\r\n lock.setVesselInChamber(currentVessel);\r\n }\r\n else {\r\n // The scheduled vessel is not present\r\n // Remove his reservation\r\n removeReservationsBy(currentVessel);\r\n //System.out.println(getReservationOf(currentVessel));\r\n updateScheduling(time);\r\n System.out.println(\"a vessel did not show up on time\");\r\n }\r\n }\r\n }", "@Override\n protected void runMayThrow() throws Exception\n {\n // The collection of sstables passed may be empty (but not null); even if\n // it is not empty, it may compact down to nothing if all rows are deleted.\n assert transaction != null;\n\n if (transaction.originals().isEmpty())\n return;\n\n if (DatabaseDescriptor.isSnapshotBeforeCompaction())\n cfs.snapshotWithoutMemtable(System.currentTimeMillis() + \"-compact-\" + cfs.name);\n\n try (CompactionController controller = getCompactionController(transaction.originals());\n CompactionOperation operation = new CompactionOperation(controller))\n {\n operation.execute();\n }\n }", "static AbstractCompactionTask forTesting(ColumnFamilyStore cfs, LifecycleTransaction txn, int gcBefore)\n {\n return new CompactionTask(cfs, txn, gcBefore, false, null);\n }", "protected void await_time(long dt) {\n OpId id = thisOpId;\n try {\n commitObsStateChanges();\n lock.unlock();\n Thread.sleep(dt);\n lock.lock();\n this.restoreOpExecContext(id);\n } catch (Exception ex) {\n // ex.printStackTrace();\n throw new IllegalArgumentException(\"Exception in await \" + dt);\n }\n }", "public abstract CompactionContext createCompaction() throws IOException;", "void reachedCashierAt(int time) {\n reachedCashier = true;\n timeSpentInQueue = time - timeCreated;\n }", "void runPendingClean(HoodieTable<T, I, K, O> table, HoodieInstant cleanInstant) {\n try {\n HoodieCleanerPlan cleanerPlan = CleanerUtils.getCleanerPlan(table.getMetaClient(), cleanInstant);\n runClean(table, cleanInstant, cleanerPlan);\n } catch (IOException e) {\n throw new HoodieIOException(e.getMessage(), e);\n }\n }", "private void checkOperation() throws IgniteCheckedException {\n if (shouldFail)\n throw new IgniteCheckedException(\"Store exception.\");\n\n if (operationDelay > 0)\n U.sleep(operationDelay);\n }", "protected void buildCompactionCandidatesForAvailableDiskSpace(final Set<SSTableReader> fullyExpiredSSTables)\n {\n if(!cfs.isCompactionDiskSpaceCheckEnabled() && compactionType == OperationType.COMPACTION)\n {\n logger.info(\"Compaction space check is disabled\");\n return; // try to compact all SSTables\n }\n\n final Set<SSTableReader> nonExpiredSSTables = Sets.difference(transaction.originals(), fullyExpiredSSTables);\n CompactionStrategy strategy = cfs.getCompactionStrategy();\n int sstablesRemoved = 0;\n\n while(!nonExpiredSSTables.isEmpty())\n {\n // Only consider write size of non expired SSTables\n long expectedWriteSize = cfs.getExpectedCompactedFileSize(nonExpiredSSTables, compactionType);\n long estimatedSSTables = Math.max(1, expectedWriteSize / strategy.getMaxSSTableBytes());\n\n if(cfs.getDirectories().hasAvailableDiskSpace(estimatedSSTables, expectedWriteSize))\n break;\n\n if (!reduceScopeForLimitedSpace(nonExpiredSSTables, expectedWriteSize))\n {\n // we end up here if we can't take any more sstables out of the compaction.\n // usually means we've run out of disk space\n\n // but we can still compact expired SSTables\n if(partialCompactionsAcceptable() && fullyExpiredSSTables.size() > 0 )\n {\n // sanity check to make sure we compact only fully expired SSTables.\n assert transaction.originals().equals(fullyExpiredSSTables);\n break;\n }\n\n String msg = String.format(\"Not enough space for compaction, estimated sstables = %d, expected write size = %d\", estimatedSSTables, expectedWriteSize);\n logger.warn(msg);\n CompactionManager.instance.incrementAborted();\n throw new RuntimeException(msg);\n }\n\n sstablesRemoved++;\n logger.warn(\"Not enough space for compaction, {}MB estimated. Reducing scope.\",\n (float) expectedWriteSize / 1024 / 1024);\n }\n\n if(sstablesRemoved > 0)\n {\n CompactionManager.instance.incrementCompactionsReduced();\n CompactionManager.instance.incrementSstablesDropppedFromCompactions(sstablesRemoved);\n }\n\n }", "@Override\r\n\tpublic boolean Action(double currentTime) {\t\r\n\t\r\n\t\ts.printStatus(currentTime);\t\r\n\t\ts.antmove();\r\n\t\t\r\n\t\tboolean Hamiltoncheck = col.colonySearch(ant).antMove(next_node);\r\n\t\t\r\n\t\tif(Hamiltoncheck){\r\n\t\t\tcol.colonySearch(ant).getPath().add(g.nest_node()-1);\r\n\t\t\ts.hamilton_eval(col.colonySearch(ant).getPath());\r\n\t\t\taddEvapEvents(col.colonySearch(ant).getPath(),currentTime);\r\n\t\t\tg.addPheromones(col.colonySearch(ant).getPath()); \t\t\t\t\t\r\n\t\t\t\r\n\t\t\tcol.colonySearch(ant).resetAnt();\r\n\t\t}\r\n\r\n\t\ttime = currentTime;\r\n\t\tnext_node = g.getNextPath(col.colonySearch(ant).getPath());\r\n\t\tfinal_time = time+g.travTime(col.colonySearch(ant).getCurrentNode(), next_node);\r\n\t\tsuper.time=final_time;\r\n\t\treturn true;\r\n\t}", "public static AbstractCompactionTask forGarbageCollection(ColumnFamilyStore cfs, LifecycleTransaction txn, int gcBefore, CompactionParams.TombstoneOption tombstoneOption)\n {\n AbstractCompactionTask task = new CompactionTask(cfs, txn, gcBefore, false, null)\n {\n @Override\n protected CompactionController getCompactionController(Set<SSTableReader> toCompact)\n {\n return new CompactionController(cfs, toCompact, gcBefore, null, tombstoneOption);\n }\n\n @Override\n protected int getLevel()\n {\n return txn.onlyOne().getSSTableLevel();\n }\n };\n task.setUserDefined(true);\n task.setCompactionType(OperationType.GARBAGE_COLLECT);\n return task;\n }", "@Test\n public void periodicCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n PersistentCorfuTable<String, Long> tableB = openTable(rt, streamNameB);\n\n // thread 1: populates the maps with mapSize items\n scheduleConcurrently(1, ignored_task_num -> {\n populateMaps(tableSize, tableA, tableB);\n });\n\n // thread 2: periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times\n // thread 1: perform a periodic checkpoint of the maps, repeating ITERATIONS_VERY_LOW times\n scheduleConcurrently(1, ignored_task_num -> {\n mapCkpoint(rt, tableA, tableB);\n });\n\n // thread 3: repeated ITERATION_LOW times starting a fresh runtime, and instantiating the maps.\n // they should rebuild from the latest checkpoint (if available).\n // performs some sanity checks on the map state\n scheduleConcurrently(PARAMETERS.NUM_ITERATIONS_LOW, ignored_task_num -> {\n validateMapRebuild(tableSize, false, false);\n });\n\n executeScheduled(PARAMETERS.CONCURRENCY_SOME, PARAMETERS.TIMEOUT_LONG);\n\n // finally, after all three threads finish, again we start a fresh runtime and instantiate the maps.\n // This time the we check that the new map instances contains all values\n validateMapRebuild(tableSize, true, false);\n\n rt.shutdown();\n }", "public boolean isReadyForAction(long time) {\n return System.currentTimeMillis() - lastAction > time;\n }", "public boolean updateTimeForTask(CountedTime countedTime) throws SQLException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create new arena settings
@Override protected ArenaSettings createSettings() { return new MobArenaSettings(this); }
[ "void setArena(Arena arena);", "@Before\n public void ArenaSetUp() {\n arena = new Arena();\n }", "public void setup() {\n\t\tarenas.clear();\n\t\tSet<String> arenas = SettingsManager.getInstance().getArenas().getKeys(false);\n\t\tfor (String arena : arenas) {\n\t\t\tif (!arena.equals(\"main-spawn\")) {\n\t\t\t\tthis.arenas.add(new Arena(arena));\n\t\t\t\tif (SettingsManager.getInstance().getConfig().getBoolean(\"debug\")) {\n\t\t\t\t\tMain.getInstance().getLogger().info(\"Loaded arena \" + arena);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n public void BuildArena() {\r\n competition.setArena(FactoryArena.buildDefaultArena());\r\n }", "void setArenaCreature(ArenaCreature arenaCreature);", "R create(String key, String displayName, Location regenerationPoint, ArenaType arenaType, GameExtension extension);", "private static void createArenaControlPoints(ConfigArena arena, World world, Arena activeArena) throws CivException {\n\t\t\n\t\tfor (ConfigArenaTeam team : arena.teams) {\n\t\t\tfor (BlockCoord c : team.controlPoints) \n\t\t\t{\n\t\t\t\tBlockCoord bcoord = new BlockCoord(world.getName(), c.getX(), c.getY(), c.getZ());\n\t\t\t\tArenaControlBlock acb = new ArenaControlBlock(bcoord, team.number, arena.control_block_hp, activeArena);\n\t\t\t\tarenaControlBlocks.put(bcoord, acb);\n\t\t\t}\n\t\t\t\n\t\t\t/* Create teleport signs. */\n\t\t\tBlockCoord coord = team.respawnSign;\n\t\t\tLocation loc = coord.getCenteredLocation();\n\t\t\tloc.setWorld(world);\n\t\t\t\n\t\t\tif (loc.getBlock().getType().equals(Material.SIGN_POST) ||\n\t\t\t loc.getBlock().getType().equals(Material.WALL_SIGN)) {\n\t\t\t\tSign sign = (Sign)loc.getBlock().getState();\n\t\t\t\tsign.setLine(0, \"\");\n\t\t\t\tsign.setLine(1, \"Respawn\");\n\t\t\t\tsign.setLine(2, \"At Arena\");\n\t\t\t\tsign.setLine(3, \"\");\n\n\t\t\t\tsign.update();\n\t\t\t\trespawnSigns.put(new BlockCoord(loc), activeArena);\n\t\t\t} else {\n\t\t\t\tCivLog.error(\"Couldn't find sign for respawn sign for arena:\"+arena.name);\n\t\t\t}\n\n\t\t\tfor (BlockCoord c : team.chests) {\n\t\t\t\tBlockCoord bcoord = new BlockCoord(world.getName(), c.getX(), c.getY(), c.getZ());\n\t\t\t\tchests.put(bcoord, activeArena);\n\t\t\t\t\n\t\t\t\tItemManager.setTypeId(bcoord.getBlock(), ItemManager.getId(Material.ENDER_CHEST));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private Arena() {}", "private ArenaManager() {}", "private void resetArena() {\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-X:\" + SPAWN_CIRCLE0_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Y:\" + SPAWN_CIRCLE0_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team0-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-X:\" + SPAWN_CIRCLE1_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Y:\" + SPAWN_CIRCLE1_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team1-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-X:\" + SPAWN_CIRCLE2_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Y:\" + SPAWN_CIRCLE2_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team2-Radius:1\");\r\n\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-X:\" + SPAWN_CIRCLE3_X);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Y:\" + SPAWN_CIRCLE3_Y);\r\n m_botAction.sendUnfilteredPublicMessage(\"?set Spawn:Team3-Radius:1\");\r\n\r\n if(m_ensureLock) {\r\n m_ensureLock = false;\r\n m_botAction.toggleLocked();\r\n }\r\n }", "public static ConfigOptions getArenaConfigOptions (File arenafile) {\n \tif(globalConfigOptions == null) {\n \t\tglobalConfigOptions = ctp.getGlobalConfigOptions();\n \t}\n \t\n setArenaConfigOptions(arenafile);\n FileConfiguration config = ctp.load(arenafile);\n\n ConfigOptions co = new ConfigOptions();\n\n String pointCapture = \"GlobalSettings.GameMode.PointCapture.\";\n String pointCaptureWithScore = \"GlobalSettings.GameMode.PointCaptureWithScoreGeneration.\";\n String global = \"GlobalSettings.\";\n\n //Game mode configuration\n co.pointsToWin = config.getInt(pointCapture + \"PointsToWin\", globalConfigOptions.pointsToWin);\n co.playTime = config.getInt(pointCapture + \"PlayTime\", globalConfigOptions.playTime);\n\n // Score mod\n co.useScoreGeneration = config.getBoolean(pointCaptureWithScore + \"UseScoreGeneration\", globalConfigOptions.useScoreGeneration);\n co.scoreMyltiplier = config.getInt(pointCaptureWithScore + \"ScoreMultiplier\", globalConfigOptions.scoreMyltiplier);\n if(co.scoreMyltiplier < 1) {\n co.scoreMyltiplier = 2;\n config.addDefault(pointCaptureWithScore + \"ScoreMultiplier\", co.scoreMyltiplier);\n }\n co.scoreToWin = config.getInt(pointCaptureWithScore + \"ScoreToWin\", globalConfigOptions.scoreToWin);\n co.onePointGeneratedScoreEvery30sec = config.getInt(pointCaptureWithScore + \"OnePointGeneratedScoreEvery30sec\", globalConfigOptions.onePointGeneratedScoreEvery30sec);\n co.scoreAnnounceTime = config.getInt(pointCaptureWithScore + \"ScoreAnnounceTime\", globalConfigOptions.scoreAnnounceTime);\n\n\n // Global configuration\n // Kj -- documentation for the different options, including their default values, can be found under the ConfigOptions class.\n co.allowBlockBreak = config.getBoolean(global + \"AllowBlockBreak\", globalConfigOptions.allowBlockBreak);\n co.allowBlockPlacement = config.getBoolean(global + \"AllowBlockPlacement\", globalConfigOptions.allowBlockPlacement);\n co.allowBreakingOwnCapturedPointWool = config.getBoolean(global + \"AllowBreakingOwnCapturedPointWool\", globalConfigOptions.allowBreakingOwnCapturedPointWool);\n co.allowCommands = globalConfigOptions.allowCommands;\n co.allowDropItems = config.getBoolean(global + \"AllowDropItems\", globalConfigOptions.allowDropItems);\n co.allowLateJoin = globalConfigOptions.allowLateJoin;\n co.autoStart = globalConfigOptions.autoStart;\n co.breakingBlocksDropsItems = config.getBoolean(global + \"BreakingBlocksDropsItems\", globalConfigOptions.breakingBlocksDropsItems);\n co.protectionDistance = config.getInt(global + \"DamageImmunityNearSpawnDistance\", globalConfigOptions.protectionDistance);\n co.dropWoolOnDeath = config.getBoolean(global + \"DropWoolOnDeath\", globalConfigOptions.dropWoolOnDeath);\n co.exactTeamMemberCount = config.getBoolean(global + \"ExactTeamMemberCount\", globalConfigOptions.exactTeamMemberCount);\n co.economyMoneyCostForJoiningArena = config.getInt(global + \"EconomyMoneyCostForJoiningArena\", globalConfigOptions.economyMoneyCostForJoiningArena);\n co.balanceTeamsWhenPlayerLeaves = config.getInt(global + \"BalanceTeamsWhenPlayerLeaves\", globalConfigOptions.balanceTeamsWhenPlayerLeaves);\n co.giveNewRoleItemsOnRespawn = config.getBoolean(global + \"GiveNewRoleItemsOnRespawn\", globalConfigOptions.giveNewRoleItemsOnRespawn);\n co.givenWoolNumber = config.getInt(global + \"GivenWoolNumber\", 64) <= 0\n ? -1\n : config.getInt(global + \"GivenWoolNumber\", globalConfigOptions.givenWoolNumber);\n co.lobbyKickTime = globalConfigOptions.lobbyKickTime;\n co.maxPlayerHealth = config.getInt(global + \"MaxPlayerHealth\", globalConfigOptions.maxPlayerHealth);\n co.regainHealth = config.getBoolean(global + \"HealthRegenFromHunger\", globalConfigOptions.regainHealth);\n co.moneyAtTheLobby = config.getInt(global + \"MoneyAtTheLobby\", globalConfigOptions.moneyAtTheLobby);\n co.moneyEvery30Sec = config.getInt(global + \"MoneyEvery30sec\", globalConfigOptions.moneyEvery30Sec);\n co.moneyForKill = config.getInt(global + \"MoneyForKill\", globalConfigOptions.moneyForKill);\n co.moneyForPointCapture = config.getInt(global + \"MoneyForPointCapture\", globalConfigOptions.moneyForPointCapture);\n co.ringBlock = globalConfigOptions.ringBlock;\n co.useSelectedArenaOnly = globalConfigOptions.useSelectedArenaOnly;\n KillStreakMessages ksm = new KillStreakMessages();\n\n HashMap<Integer, String> hm = new HashMap<Integer, String>();\n for (int i = 0; i < 50; i++) {\n if (config.getString(\"StreakMessage.\" + i) != null) {\n hm.put(i, config.getString(\"StreakMessage.\" + i));\n } else if (!ksm.getMessage(i).isEmpty()) {\n hm.put(i, ksm.getMessage(i));\n config.addDefault(\"StreakMessage.\" + i, ksm.getMessage(i));\n }\n }\n co.killStreakMessages = new KillStreakMessages(hm);\n\n try {\n config.options().copyDefaults(true);\n config.save(arenafile);\n } catch (IOException ex) {\n ex.printStackTrace();\n ctp.logSevere(\"Unable to save the config file for an arena, see the StackTrace above.\");\n }\n\n return co;\n }", "public Arena buildArena(String arenaType, double length, int maxRacers) {\n Arena tempArena = null;\n ArenaFactory factory = new ArenaFactory();\n try {\n tempArena = factory.makeArena(arenaType,length,maxRacers);\n } catch (ClassNotFoundException | NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace(); }\n return tempArena;\n }", "protected Arena makeGame(Arena one, Arena two){\n\t\tGameMap map = maps.get(random.nextInt(maps.size()));\n\t\tfinalBuilder.setArenas(one, two);\n\t\tArena arena = finalBuilder.newArena();\n\t\tarena.setGameMap(map);\n\t\tUser leader = null;\n\t\tfor(ArenaSlot slot:arena.getSlots()){\n\t\t\tif (slot.getUser()!=null){\n\t\t\t\tleader = slot.getUser();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tassert leader != null;\n\t\tarena.getAttributes().put(\"hostID\", String.valueOf(leader.getId()));\n\t\tarena.setName(leader.getName() + \"的房间\");\n\t\treturn arena;\n\t}", "private void generateSettings()\n {\n settings = new Accordion();\n VBox vBox = new VBox();\n TitledPane simulation = new TitledPane(\"Simulation\" , vBox);\n vBox.getChildren().addAll(\n createTextField(\"Max food on tile:\",\"50\"),\n createTextField(\"Food spawn amount:\",\"250\"),\n createTextField(\"Food spawn prob:\",\"0.3\"),\n createTextField(\"millis/frame:\",\"200\")\n );\n vBox.setSpacing(5);\n\n settings.getPanes().addAll(simulation);\n addAnthill(\"#DC143C\",50,50,20,0.5,1000);\n addAntGenome(100,50,3,50,8,20,200);\n addAntGenome(200,100,3,200,5,20,200);\n }", "public ArenaTest(String name) {\n\t\tsuper(name);\n\t}", "static private void defineSettings()\n {\n //\n // Define the AK settings (parameters) that will be allowed for setting by the Ds effect.\n // Default values are also set here which will be used to initialize new DsAkSettings objects.\n // Settings other than those defined here will not be able to be set in the Ds effect.\n //\n int paramIndex = 0, elemIndex = 0, nElemPerParam = 0, elemLen = 0;\n\n //\n // Get the AK parameter array's total length.\n //\n for (paramIndex = 0; paramIndex < akParams_.length; ++paramIndex)\n {\n if (isParamSettable(akParams_[paramIndex].paramName))\n elemLen += akParams_[paramIndex].len;\n }\n settingsDefaults_ = new int[elemLen];\n\n //\n // Initialise internal collections.\n //\n for (paramIndex = 0; paramIndex < akParams_.length; ++paramIndex)\n {\n if (isParamSettable(akParams_[paramIndex].paramName))\n {\n nElemPerParam = akParams_[paramIndex].len;\n if (nElemPerParam == 1)\n {\n settingsDefinitions_.put(new SettingDefn(paramIndex, 0), elemIndex);\n settingsDefaults_[elemIndex] = 0;\n ++elemIndex;\n }\n else\n {\n for (int i = 0; i < nElemPerParam; ++i)\n {\n settingsDefinitions_.put(new SettingDefn(paramIndex, i), elemIndex);\n settingsDefaults_[elemIndex] = 0;\n ++elemIndex;\n }\n }\n }\n }\n }", "public Arena getArena()\r\n {\r\n return arena;\r\n }", "Arena getArena(String name);", "@Nonnull\n HashMap<String, Object> createAgentConfiguration();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Execute process and optionally wait for its completion
@PublicAtsApi public void execute( boolean waitForCompletion ) { isProcessAlreadyStarted = true; this.processExecutor.execute(waitForCompletion); }
[ "public void waitForCompletion()\n {\n if ( null != process )\n {\n try\n {\n final int rc = process.waitFor();\n setReturnCode(rc);\n setError(errorGobbler.getResult());\n setResultat(outputGobbler.getResult());\n }\n catch ( final InterruptedException e )\n {\n System.err.println(\"ERROR: \"+e);\n }\n }\n }", "@Override\n \tprotected void doWaitExecution() throws CoreException {\n \t\ttry {\n \t\t\tstderrObserver.join();\n \t\t} catch (InterruptedException e1) {\n \t\t\te1.printStackTrace();\n \t\t}\n //\t\tSystem.err.println(\"stderr finished\");\n \t\ttry {\n \t\t\tstdoutObserver.join();\n \t\t} catch (InterruptedException e1) {\n \t\t\te1.printStackTrace();\n \t\t}\n //\t\tSystem.err.println(\"stdout finished\");\n \t\t/*\n \t\t * Still experience has shown that remote process might not have yet terminated, although stdout and stderr is closed.\n \t\t */\n \t\ttry {\n \t\t\tprocess.waitFor();\n \t\t} catch (InterruptedException e) {\n \t\t\t// Ignore\n \t\t}\n \t}", "private void executeSequentially() {\n String[] commandArgs = SysLib.stringToArgs(command);\n prevPID = SysLib.exec(commandArgs); //run command\n while (SysLib.join() != prevPID) ; //wait for the termination of the\n // command\n command = \"\"; //clear the command\n }", "public final int execute() throws IOException, TimeOutException {\r\n\t\tThread waiter = new Thread(new Runnable() {\r\n\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tprocess = Runtime.getRuntime().exec(params, env, baseDir);\r\n\t\t\t\t\tprocess.waitFor();\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// timeout !!\r\n\t\t\t\t\tLOGGER.warning(e.getMessage());\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tLOGGER.warning(e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\twaiter.start();\r\n\r\n\t\tlong waittime = 100;\r\n\t\tlong waitperiods = timeLimit / waittime;\r\n\t\tif (timeLimit == 0) {\r\n\t\t\twaittime = 0;\r\n\t\t\twaitperiods = 1;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tfor (int i = 0; i < waitperiods; ++i) {\r\n\t\t\t\t// join 0 waits indefinitely\r\n\t\t\t\twaiter.join(waittime);\r\n\t\t\t\tforwardStreams();\r\n\t\t\t}\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tmarkFinished();\r\n\t\t\tforwardStreams();\r\n\t\t\treturn process.exitValue();\r\n\t\t}\r\n\t\tif (waiter.isAlive()) {\r\n\t\t\twaiter.interrupt();\r\n\t\t\tkill();\r\n\t\t}\r\n\t\tif (wasKilled()) {\r\n\t\t\tthrow new TimeOutException();\r\n\t\t}\r\n\t\treturn process.exitValue();\r\n\t}", "private void executeConcurrently() {\n String[] commandArgs = SysLib.stringToArgs(command);\n prevPID = SysLib.exec(commandArgs); //run command\n command = \"\"; //clear command\n }", "public String waitForProcess() throws CommandRunnerProcessException {\n int exit = 0;\n try {\n exit = process.waitFor();\n outputGobbler.join();\n errorGobbler.join();\n } catch (InterruptedException e) {\n throw new CommandRunnerProcessException(\"Error Handling Thread.\");\n }\n\n if (exit == 0) {\n return outputGobbler.getValue();\n } else {\n String errorMessage = \"Error returned from command \";\n errorMessage += command + \" on path \";\n errorMessage += path.toString() + \" :\\n\" + errorGobbler.getValue();\n throw new CommandRunnerProcessException(errorMessage);\n }\n }", "protected void waitFor(Process process) {\n try {\n process.waitFor();\n setExitValue(process.exitValue());\n } catch (InterruptedException e) {\n process.destroy();\n }\n }", "@Test\n public void testExecuteProcess() throws Exception {\n Logger.getLogger(getClass()).debug(\"TEST \" + name.getMethodName());\n\n // Get the pre-defined test process\n ProcessConfig processConfig =\n processService.findProcessConfigs(project.getId(),\n \"name:\\\"Test Process\\\"\", null, authToken).getObjects().get(0);\n assertNotNull(processConfig);\n\n // Execute the process\n Long processExecutionId = processService.prepareAndExecuteProcess(\n project.getId(), processConfig.getId(), true, authToken);\n\n // Wait a couple seconds until it gets set up and going\n Thread.sleep(2000);\n\n // Make sure the processExecution was created\n ProcessExecution processExecution = processService\n .getProcessExecution(project.getId(), processExecutionId, authToken);\n assertNotNull(processExecution);\n assertNotNull(processExecution.getStartDate());\n assertNull(processExecution.getFailDate());\n assertNull(processExecution.getFinishDate());\n\n // Make sure the process is showing up as a currentlyExecutingProcesses\n ProcessExecutionList runningProcessExecutions = processService\n .findCurrentlyExecutingProcesses(project.getId(), authToken);\n\n Boolean processFound = false;\n for (ProcessExecution pe : runningProcessExecutions.getObjects()) {\n if (pe.getId().equals(processExecutionId)) {\n processFound = true;\n break;\n }\n }\n assertTrue(processFound);\n\n // Wait until the process finishes completely\n Thread.sleep(10000);\n\n // Test to make sure the process completed successfully\n processExecution = processService.getProcessExecution(project.getId(),\n processExecutionId, authToken);\n assertNull(processExecution.getFailDate());\n assertNotNull(processExecution.getFinishDate());\n\n // Make sure all of the process' algorithms completed successfully\n for (AlgorithmExecution ae : processExecution.getSteps()) {\n assertNull(ae.getFailDate());\n assertNotNull(ae.getFinishDate());\n }\n\n }", "public void waitFor() {\n try {\n myProcess.waitFor();\n }\n catch (final InterruptedException ie) {\n final AssertionError error = new AssertionError(\n \"Failed to wait for the process to exit gracefully.\");\n error.initCause(ie);\n\n throw error;\n }\n }", "public static native int exec(String command, String args, int launchCode, boolean wait);", "void waitCommand();", "private void runProcess(String command){\n\t\t//avoid multiple calls\n\t\tif (isProcessing){\n\t\t\tabortProcess = true;\n\t\t\twaitForProcess(2000);\n\t\t\tif (process.isAlive()){\n\t\t\t\tSystem.err.println(\"TTS LOG - MULTIPLE CALLS OF PROCESS DETECTED AND OLD PROCESS DID NOT STOP IN TIME!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//start new\n\t\tisProcessing = true;\n\t\tabortProcess = false;\n\t\tisTimedOut = false;\n\t\tThreadManager.run(() -> {\n\t \ttry {\n\t\t\t\tProcessBuilder pb = new ProcessBuilder(command.split(\"\\\\s+\"));\n\t\t\t\tpb.redirectErrorStream(true);\n\t\t\t\tprocess = pb.start();\n\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\n\t\t\t\tString line;\n\t\t\t\twhile ((line = reader.readLine()) != null){\n\t\t\t\t System.out.println(\"TTS LOG: \" + line);\n\t\t\t\t}\n\t\t\t\tprocess.waitFor();\n\t\t\t\tisProcessing = false;\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tisProcessing = false;\n\t\t\t}\n\t });\n\t}", "private void waitFor() throws Exception {\n //If we don't have a time out then we just want to wait until we're done\n long timeWaiting = 0;\n long sleepTime = 100;\n int timeoutMillis = (int) TimeUnit.SECONDS.toMillis(timeoutSeconds);\n while ( !finished) {\n try {\n synchronized (this) {\n wait(sleepTime);\n }\n } catch (InterruptedException e) {\n // Trace.msg(\"***** interrupted \");\n return;\n }\n timeWaiting += sleepTime;\n if ( !finished && (timeoutMillis > 0)\n && (timeWaiting > timeoutMillis)) {\n // Trace.msg(\"***** Timed out\");\n processTimedOut = true;\n process.destroy();\n\n return;\n }\n }\n }", "public void run() {\n\t\t\t\tString command = \"psexec -u ACCUSYSARGBSAS\\\\martin.zaragoza -p Marzo2015 D:\\\\Temp\\\\testScripts\\\\a.exe a\";\n\t\t\t\tProcess process;\n\t\t\t\ttry {\n\t\t\t\t\tprocess = Runtime.getRuntime().exec(command);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tint pid = getPid(process);\n\t\t\t\t\tSystem.out.println(\"pid=\" + pid);\n\t\t\t\t\tprintStdout(process.getInputStream());\n\t\t\t\t\tThread.sleep(500);\n\n\t\t\t\t\tProcess exec = Runtime.getRuntime().exec(\"echo %errorlevel%\");\n\t\t\t\t\tprintStdout(exec.getInputStream());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "private void waitForProcess(long maxiWait_ms){\n\t\tlong startTime = System.currentTimeMillis();\n\t\tlong currentTime = System.currentTimeMillis();\n\t\twhile (isProcessing && !abortProcess){\n\t\t\tDebugger.sleep(50);\n\t\t\tcurrentTime = System.currentTimeMillis();\n\t\t\tif ((currentTime-startTime) >= maxiWait_ms){\n\t\t\t\tisTimedOut = true;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\tisTimedOut = false;\n\t\t\t}\n\t\t}\n\t\tif (isTimedOut || abortProcess){\n\t\t\tprocess.destroyForcibly();\n\t\t}\n\t}", "public void waitForExit()\n {\n if (m_process == null)\n return;\n try\n {\n m_process.waitFor();\n m_errorThread.join();\n m_inputThread.join();\n }\n catch (InterruptedException e)\n {\n System.err.println(\"GtpClient: InterruptedException\");\n } \n }", "public void spawn() throws IOException {\n if (workingDirectory != null && !workingDirectory.exists()) {\n throw new BuildException(workingDirectory + \" doesn't exist.\");\n }\n final Process process = launch(project, getCommandline(),\n getEnvironment(), workingDirectory,\n useVMLauncher);\n if (Os.isFamily(\"windows\")) {\n try {\n Thread.sleep(ONE_SECOND);\n } catch (InterruptedException e) {\n project.log(\"interruption in the sleep after having spawned a\"\n + \" process\", Project.MSG_VERBOSE);\n }\n }\n OutputStream dummyOut = new OutputStream() {\n @Override\n public void write(int b) throws IOException {\n // Method intended to swallow whatever comes at it\n }\n };\n \n ExecuteStreamHandler handler = new PumpStreamHandler(dummyOut);\n handler.setProcessErrorStream(process.getErrorStream());\n handler.setProcessOutputStream(process.getInputStream());\n handler.start();\n process.getOutputStream().close();\n \n project.log(\"spawned process \" + process.toString(),\n Project.MSG_VERBOSE);\n }", "private boolean executeCommand(String command) {\n Log.d(\"executeCommand(): cmd=\" + command);\n try {\n Process proc = Runtime.getRuntime().exec(command);\n TimeoutThread tt = new TimeoutThread(proc, SHORT_DELAY);\n tt.start();\n proc.waitFor(); // ignore exit value\n tt.interrupt(); // wake timeout thread\n } catch (Exception e) {\n return false;\n }\n return true;\n }", "private void waitNextTaskResult() throws InterruptedException,\n ExecutionException, TimeoutException, IpfExecutionWorkerProcessExecutionException {\n final TaskResult r = completionSrv.take().get(this.tmProcessOneTaskS,\n TimeUnit.SECONDS);\n final int exitCode = r.getExitCode();\n final String task = r.getBinary();\n if (exitCode == 0) {\n LOGGER.info(\"{} 2 - Task {} successfully executed\", this.prefixLogs,\n task);\n } else if ((exitCode >= 0 && exitCode < 128) || exitCode == 255 && task.contains(\"S1AIOProcessor\")/* special case aio single channel session S1PRO-1512 FIXME*/) {\n LOGGER.warn(\"{} 2 - Task {} exit with warning code {}\",\n this.prefixLogs, task, exitCode);\n } else {\n this.stopAllTasks();\n throw new IpfExecutionWorkerProcessExecutionException(exitCode,\n \"Task \" + task + \" failed\");\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__AstType__Group_0_1_1_2__1__Impl" $ANTLR start "rule__AstType__Group_0_1_1_2__2" ../org.caltoopia.frontend.ui/srcgen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20489:1: rule__AstType__Group_0_1_1_2__2 : rule__AstType__Group_0_1_1_2__2__Impl ;
public final void rule__AstType__Group_0_1_1_2__2() throws RecognitionException { int stackSize = keepStackSize(); try { // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20493:1: ( rule__AstType__Group_0_1_1_2__2__Impl ) // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20494:2: rule__AstType__Group_0_1_1_2__2__Impl { pushFollow(FOLLOW_rule__AstType__Group_0_1_1_2__2__Impl_in_rule__AstType__Group_0_1_1_2__241106); rule__AstType__Group_0_1_1_2__2__Impl(); state._fsp--; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__AstType__Group_0_1_0_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20305:1: ( rule__AstType__Group_0_1_0_2__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20306:2: rule__AstType__Group_0_1_0_2__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0_2__2__Impl_in_rule__AstType__Group_0_1_0_2__240734);\n rule__AstType__Group_0_1_0_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20211:1: ( rule__AstType__Group_0_1_0__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20212:2: rule__AstType__Group_0_1_0__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_0__2__Impl_in_rule__AstType__Group_0_1_0__240548);\n rule__AstType__Group_0_1_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_0__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20222:1: ( ( ( rule__AstType__Group_0_1_0_2__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20223:1: ( ( rule__AstType__Group_0_1_0_2__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20223:1: ( ( rule__AstType__Group_0_1_0_2__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20224:1: ( rule__AstType__Group_0_1_0_2__0 )*\n {\n before(grammarAccess.getAstTypeAccess().getGroup_0_1_0_2()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20225:1: ( rule__AstType__Group_0_1_0_2__0 )*\n loop161:\n do {\n int alt161=2;\n int LA161_0 = input.LA(1);\n\n if ( (LA161_0==81) ) {\n alt161=1;\n }\n\n\n switch (alt161) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20225:2: rule__AstType__Group_0_1_0_2__0\n \t {\n \t pushFollow(FOLLOW_rule__AstType__Group_0_1_0_2__0_in_rule__AstType__Group_0_1_0__2__Impl40575);\n \t rule__AstType__Group_0_1_0_2__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop161;\n }\n } while (true);\n\n after(grammarAccess.getAstTypeAccess().getGroup_0_1_0_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20718:1: ( rule__AstType__Group_0_1_2_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20719:2: rule__AstType__Group_0_1_2_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_1__1__Impl_in_rule__AstType__Group_0_1_2_1__141546);\n rule__AstType__Group_0_1_2_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20781:1: ( rule__AstType__Group_0_1_2_1_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20782:2: rule__AstType__Group_0_1_2_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_1_1__1__Impl_in_rule__AstType__Group_0_1_2_1_1__141670);\n rule__AstType__Group_0_1_2_1_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20649:1: ( rule__AstType__Group_0_1_2__4__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20650:2: rule__AstType__Group_0_1_2__4__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__4__Impl_in_rule__AstType__Group_0_1_2__441417);\n rule__AstType__Group_0_1_2__4__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_1__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20399:1: ( rule__AstType__Group_0_1_1__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20400:2: rule__AstType__Group_0_1_1__2__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_1__2__Impl_in_rule__AstType__Group_0_1_1__240920);\n rule__AstType__Group_0_1_1__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20842:1: ( rule__AstType__Group_0_1_2_3__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20843:2: rule__AstType__Group_0_1_2_3__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__1__Impl_in_rule__AstType__Group_0_1_2_3__141791);\n rule__AstType__Group_0_1_2_3__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20905:1: ( rule__AstType__Group_0_1_2_3_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20906:2: rule__AstType__Group_0_1_2_3_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3_1__1__Impl_in_rule__AstType__Group_0_1_2_3_1__141915);\n rule__AstType__Group_0_1_2_3_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__3() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20620:1: ( rule__AstType__Group_0_1_2__3__Impl rule__AstType__Group_0_1_2__4 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20621:2: rule__AstType__Group_0_1_2__3__Impl rule__AstType__Group_0_1_2__4\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__3__Impl_in_rule__AstType__Group_0_1_2__341356);\n rule__AstType__Group_0_1_2__3__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2__4_in_rule__AstType__Group_0_1_2__341359);\n rule__AstType__Group_0_1_2__4();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20121:1: ( rule__AstType__Group_0__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20122:2: rule__AstType__Group_0__1__Impl\n {\n pushFollow(FOLLOW_rule__AstType__Group_0__1__Impl_in_rule__AstType__Group_0__140366);\n rule__AstType__Group_0__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2__3__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20632:1: ( ( ( rule__AstType__Group_0_1_2_3__0 )? ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20633:1: ( ( rule__AstType__Group_0_1_2_3__0 )? )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20633:1: ( ( rule__AstType__Group_0_1_2_3__0 )? )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20634:1: ( rule__AstType__Group_0_1_2_3__0 )?\n {\n before(grammarAccess.getAstTypeAccess().getGroup_0_1_2_3()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20635:1: ( rule__AstType__Group_0_1_2_3__0 )?\n int alt165=2;\n int LA165_0 = input.LA(1);\n\n if ( (LA165_0==RULE_ID||(LA165_0>=38 && LA165_0<=45)||LA165_0==58||LA165_0==81) ) {\n alt165=1;\n }\n switch (alt165) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20635:2: rule__AstType__Group_0_1_2_3__0\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__0_in_rule__AstType__Group_0_1_2__3__Impl41386);\n rule__AstType__Group_0_1_2_3__0();\n\n state._fsp--;\n\n\n }\n break;\n\n }\n\n after(grammarAccess.getAstTypeAccess().getGroup_0_1_2_3()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7012:1: ( rule__AstTypeDefinition__Group_2_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7013:2: rule__AstTypeDefinition__Group_2_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2_1__1__Impl_in_rule__AstTypeDefinition__Group_2_1__114546);\n rule__AstTypeDefinition__Group_2_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6947:1: ( rule__AstTypeDefinition__Group_2__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6948:2: rule__AstTypeDefinition__Group_2__2__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__2__Impl_in_rule__AstTypeDefinition__Group_2__214421);\n rule__AstTypeDefinition__Group_2__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2_1__1__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7023:1: ( ( ( rule__AstTypeDefinition__Group_2_1_1__0 )* ) )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7024:1: ( ( rule__AstTypeDefinition__Group_2_1_1__0 )* )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7024:1: ( ( rule__AstTypeDefinition__Group_2_1_1__0 )* )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7025:1: ( rule__AstTypeDefinition__Group_2_1_1__0 )*\n {\n before(grammarAccess.getAstTypeDefinitionAccess().getGroup_2_1_1()); \n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7026:1: ( rule__AstTypeDefinition__Group_2_1_1__0 )*\n loop58:\n do {\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==62) ) {\n alt58=1;\n }\n\n\n switch (alt58) {\n \tcase 1 :\n \t // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7026:2: rule__AstTypeDefinition__Group_2_1_1__0\n \t {\n \t pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2_1_1__0_in_rule__AstTypeDefinition__Group_2_1__1__Impl14573);\n \t rule__AstTypeDefinition__Group_2_1_1__0();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop58;\n }\n } while (true);\n\n after(grammarAccess.getAstTypeDefinitionAccess().getGroup_2_1_1()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstType__Group_0_1_2_3__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20813:1: ( rule__AstType__Group_0_1_2_3__0__Impl rule__AstType__Group_0_1_2_3__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:20814:2: rule__AstType__Group_0_1_2_3__0__Impl rule__AstType__Group_0_1_2_3__1\n {\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__0__Impl_in_rule__AstType__Group_0_1_2_3__041731);\n rule__AstType__Group_0_1_2_3__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstType__Group_0_1_2_3__1_in_rule__AstType__Group_0_1_2_3__041734);\n rule__AstType__Group_0_1_2_3__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6887:1: ( rule__AstTypeDefinition__Group_2__0__Impl rule__AstTypeDefinition__Group_2__1 )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:6888:2: rule__AstTypeDefinition__Group_2__0__Impl rule__AstTypeDefinition__Group_2__1\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__0__Impl_in_rule__AstTypeDefinition__Group_2__014298);\n rule__AstTypeDefinition__Group_2__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2__1_in_rule__AstTypeDefinition__Group_2__014301);\n rule__AstTypeDefinition__Group_2__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeDefinition__Group_2_1_1__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7075:1: ( rule__AstTypeDefinition__Group_2_1_1__1__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:7076:2: rule__AstTypeDefinition__Group_2_1_1__1__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeDefinition__Group_2_1_1__1__Impl_in_rule__AstTypeDefinition__Group_2_1_1__114670);\n rule__AstTypeDefinition__Group_2_1_1__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__AstTypeParam__Group_0__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21440:1: ( rule__AstTypeParam__Group_0__2__Impl )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:21441:2: rule__AstTypeParam__Group_0__2__Impl\n {\n pushFollow(FOLLOW_rule__AstTypeParam__Group_0__2__Impl_in_rule__AstTypeParam__Group_0__242967);\n rule__AstTypeParam__Group_0__2__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use reflection to create and return a monitor class of the specified name. Note that the monitor must have a default (no arguments) constructor.
public final static RuntimeMonitor createMonitor(String monitorName) { ReflectionFactory rf = new ReflectionFactory(); List<String> packagePath = new ArrayList<String>(); packagePath.add("simulator.elevatorcontrol."); packagePath.add("simulator.elevatormodules."); RuntimeMonitor monitor = null; try { monitor = (RuntimeMonitor)rf.createObject(monitorName, packagePath); } catch (Exception ex) { throw new RuntimeException("Exception while creating runtime monitor: " + ex, ex); } return monitor; }
[ "private ChainMonitor createMonitor(String monitorClassName) {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n try {\n return (ChainMonitor) classLoader.loadClass(monitorClassName)\n .newInstance();\n } catch (Exception e) {\n return new ConsoleChainMonitor();\n }\n }", "private ChainMonitor createMonitor(String monitorClassName) {\n\t\tClassLoader classLoader = Thread.currentThread()\n\t\t\t\t.getContextClassLoader();\n\t\ttry {\n\t\t\treturn (ChainMonitor) classLoader.loadClass(monitorClassName)\n\t\t\t\t\t.newInstance();\n\t\t} catch (Exception e) {\n\t\t\treturn new ConsoleChainMonitor();\n\t\t}\n\t}", "private static FaxJobMonitor createFaxJobMonitor(Map<String, String> systemConfig) {\n // get class name\n String className = systemConfig.get(FaxClientSpiFactory.FAX_JOB_MONITOR_CLASS_NAME_PROPERTY_KEY);\n if (className == null || className.length() == 0) {\n className = FaxJobMonitorImpl.class.getName();\n }\n\n // create new instance\n FaxJobMonitor faxJobMonitorInstance = (FaxJobMonitor) ReflectionHelper.createInstance(className);\n\n return faxJobMonitorInstance;\n }", "public Monitor createMonitor(String templateName) {\n\n\t\treturn createMonitor(templateName, null);\n\t}", "Monitor createMonitor();", "public abstract Monitor newMonitor(Simulator s);", "JZLemurMonitor createJZLemurMonitor();", "MonitorType getMonitor();", "public Monitor createMonitor(String templateName, String id) {\n\n\t\tif (templateName == null || !templates.containsKey(templateName)) {\n\t\t\treturn null;\n\t\t}\n\n\t\tMonitorTemplate monitorTemplate = templates.get(templateName);\n\n\t\tMonitor mon = new Monitor();\n\n\t\tmon.setMonitorID(id);\n\t\tmon.setMonitorType(monitorTemplate.getType());\n\t\tmon.setTargetType(monitorTemplate.getTargetType());\n\t\tmon.setMonitorableActions(monitorTemplate.getMonitorableActions());\n\t\tmon.setBigraphERStatment(monitorTemplate.getBigraphERMonitoringExpression());\n\n\t\treturn mon;\n\t}", "public Monitor newMonitor(Simulator s) {\n return new Mon(s);\n }", "private static ModuleFactory getMonitor()\n {\n return AccessController.doPrivileged\n (\n new PrivilegedAction<ModuleFactory>()\n {\n public ModuleFactory run()\n {\n return Monitor.getMonitor();\n }\n }\n );\n }", "public Monitor() {\r\n}", "public AbstractCompositeMonitor(String name) {\n this(name, MonitoringLevel.INFO, null);\n }", "NamedClass createNamedClass();", "public static Class<?> fromName(String name) {\n return name2Class.get(name);\n }", "public String getMonitorName() {\n return name;\n }", "ProcessMonitor findMonitor(URI id) ;", "@DuckTyped\n ContainerMonitoring getContainerMonitoring(String name);", "public AbstractCompositeMonitor(String name, MonitoringLevel monitoringLevel) {\n this(name, monitoringLevel, null);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The frame converter used to convert STOMP frames into HazelcastMQ messages.
public FrameConverter getFrameConverter() { return frameConverter; }
[ "public void setFrameConverter(FrameConverter frameConverter) {\n this.frameConverter = frameConverter;\n }", "public T convert(MessageContainer message);", "public StompFrameDecoder() {\n this(DEFAULT_MAX_FRAME_SIZE);\n }", "public interface FMPPacket {\n\n /**\n * Represent the PACKET_MAX_BYTE_SIZE = 1024\n */\n\tpublic static final int PACKET_MAX_BYTE_SIZE = 1024;\n\n /**\n * Get the sender of the packet\n *\n * @return String\n */\n\tpublic String getSender();\n\n /**\n * Get the destination of the packet\n *\n * @return String\n */\n\tpublic String getDestination();\n\n /**\n * Get the type of the packet\n *\n * @return FermatPacketType\n */\n\tpublic FMPPacketType getType();\n\n /**\n * Get the message of the packet\n *\n * @return String\n */\n\tpublic String getMessage();\n\n /**\n * Get the signature of the packet\n *\n * @return String\n */\n\tpublic String getSignature();\n\n /**\n * Get the network service type of the packet\n *\n * @return NetworkServices\n */\n\tpublic NetworkServices getNetworkServices();\n\n /**\n * Set the network service type of the packet\n *\n * @param networkServicesType\n */\n\tpublic void setNetworkServices(NetworkServices networkServicesType);\n\n /**\n * Convert this object to json string\n *\n * @return String json\n */\n public String toJson();\n\n /**\n * Convert to FermatPacketCommunication from json\n *\n * @param json string object\n * @return FermatPacketCommunication\n */\n public FMPPacket fromJson(String json);\n\n\n /**\n * Package type definitions\n */\n\tenum FMPPacketType {\n\t\tCONNECTION_REQUEST,\n\t\tCONNECTION_ACCEPT,\n\t\tCONNECTION_ACCEPT_FORWARD,\n\t\tCONNECTION_DENY,\n\t\tCONNECTION_REGISTER,\n\t\tCONNECTION_DEREGISTER,\n\t\tCONNECTION_END,\n\t\tDATA_TRANSMIT,\n\t\tREGISTER_NETWORK_SERVICES_LIST_REQUEST\n\t}\n\n\n}", "Object receiveAndConvert() throws AmqpException;", "public MessageEncoder<MessageType> getMessageEncoder();", "MessageEncoder<MessageType> getMessageEncoder();", "public interface MessageConverter {\n\n /**\n * Converts the given JMS message to a block of bytes.\n * \n * @param message\n * the message to convert\n * @return the message as bytes\n * @throws IOException\n * @throws JMSException\n */\n public byte[] fromMessage(Message message) throws IOException, JMSException;\n\n /**\n * Converts the given block of bytes into a JMS message.\n * \n * @param data\n * the data to convert\n * @return the bytes as a message\n * @throws IOException\n * @throws JMSException\n */\n public Message toMessage(byte[] data) throws IOException, JMSException;\n\n}", "Object convertSendAndReceive(Object message) throws AmqpException;", "public void setMessageEncoder(MessageEncoder<MessageType> messageEncoder);", "public interface ProtosMessageConverter {\n\tMessageWrapper convertFromProtos2Bean(Message msg) throws Exception;\n\tMessage convertFromBean2Protos(MessageWrapper wrapper) throws Exception;\n}", "interface MessageCodec extends JsonEncoderDecoder<ServerMessage> {\n }", "protected abstract ByteBuffer toMedia(Object object) throws BeanConversionException;", "static MessageCodec<Object> getCodec() {\n return new StandardMessageCodec();\n }", "void setMessageEncoder(MessageEncoder<MessageType> messageEncoder);", "private MessageConverter getMessageConverter() throws SClientException {\n if (messageConverter == null) {\n messageConverter = getDefaultMessageConverter();\n }\n return messageConverter;\n }", "@Override\n public void processFrame(Frame frame) {\n }", "@Override\n\tpublic Message toMessage(Object object, Session session) throws JMSException, MessageConversionException {\n\t\tif (object instanceof Message message) {\n\t\t\treturn message;\n\t\t}\n\t\telse if (object instanceof String text) {\n\t\t\treturn createMessageForString(text, session);\n\t\t}\n\t\telse if (object instanceof byte[] bytes) {\n\t\t\treturn createMessageForByteArray(bytes, session);\n\t\t}\n\t\telse if (object instanceof Map<?, ?> map) {\n\t\t\treturn createMessageForMap(map, session);\n\t\t}\n\t\telse if (object instanceof Serializable serializable) {\n\t\t\treturn createMessageForSerializable(serializable, session);\n\t\t}\n\t\telse {\n\t\t\tthrow new MessageConversionException(\"Cannot convert object of type [\" +\n\t\t\t\t\tObjectUtils.nullSafeClassName(object) + \"] to JMS message. Supported message \" +\n\t\t\t\t\t\"payloads are: String, byte array, Map<String,?>, Serializable object.\");\n\t\t}\n\t}", "public VideoEncoderCore2(int width, int height, int bitRate)\n throws IOException {\n\n mHandlerThread = new HandlerThread(\"encode_worker\");\n mHandlerThread.start();\n mHandler = new PushStreamHandler(mHandlerThread.getLooper(), mFrameMessages);\n\n\n MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, width, height);\n\n // Set some properties. Failing to specify some of these can cause the MediaCodec\n // configure() call to throw an unhelpful exception.\n format.setInteger(MediaFormat.KEY_COLOR_FORMAT,\n MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);\n format.setInteger(MediaFormat.KEY_BIT_RATE, bitRate);\n format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE);\n format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL);\n if (VERBOSE) Log.d(TAG, \"format: \" + format);\n\n // Create a MediaCodec encoder, and configure it with our format. Get a Surface\n // we can use for input and wrap it with a class that handles the EGL work.\n mEncoder = MediaCodec.createEncoderByType(MIME_TYPE);\n mEncoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);\n mInputSurface = mEncoder.createInputSurface();\n mEncoder.setCallback(new MediaCodec.Callback() {\n @Override\n public void onInputBufferAvailable(@NonNull MediaCodec codec, int index) {\n\n }\n\n @Override\n public void onOutputBufferAvailable(@NonNull MediaCodec codec, int outputBufferIndex, @NonNull MediaCodec.BufferInfo bufferInfo) {\n try {\n ByteBuffer outputBuffer = codec.getOutputBuffer(outputBufferIndex);\n byte[] outData = new byte[bufferInfo.size];\n outputBuffer.get(outData);\n FrameHolder frameHolder;\n if (bufferInfo.flags == MediaCodec.BUFFER_FLAG_CODEC_CONFIG) {\n configbyte = outData;\n } else if (bufferInfo.flags == MediaCodec.BUFFER_FLAG_KEY_FRAME) {\n Log.d(TAG, \"send key frame\");\n byte[] keyframe = new byte[bufferInfo.size + configbyte.length];\n System.arraycopy(configbyte, 0, keyframe, 0, configbyte.length);\n System.arraycopy(outData, 0, keyframe, configbyte.length, outData.length);\n frameHolder = new FrameHolder(keyframe, true);\n mFrameMessages.add(frameHolder);\n } else {\n frameHolder = new FrameHolder(outData, false);\n mFrameMessages.add(frameHolder);\n }\n //如果队列的数据在容纳范围说明消费端没有阻塞,继续发消息处理;否则推出最旧的数据,保持队列是最新的编码数据\n if (mFrameMessages.size() < FRAME_BUFFER_SIZE) {\n mHandler.obtainMessage(1).sendToTarget();\n }else{\n Log.d(TAG, \"update frame\");\n mFrameMessages.poll();\n }\n\n codec.releaseOutputBuffer(outputBufferIndex, false);\n } catch (Exception e) {\n Log.e(TAG, \"onframe available\" + e.toString());\n }\n }\n\n @Override\n public void onError(@NonNull MediaCodec codec, @NonNull MediaCodec.CodecException e) {\n Log.e(TAG, \"onError\" + e.toString());\n }\n\n @Override\n public void onOutputFormatChanged(@NonNull MediaCodec codec, @NonNull MediaFormat format) {\n Log.d(TAG, \"onOutputFormatChanged\");\n }\n });\n mEncoder.start();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the selected icon.
public void setSelectedIcon(String selectedIcon) { myButton.setSelectedIcon(getIcon(selectedIcon)); }
[ "@Override\n\tpublic ImageIcon getSelectedIcon() {\n\t\treturn new ImageIcon(highlightedImage);\n\t}", "public void setIcon(String value) {\n icon = value;\n }", "Icon getSelectedIcon(final String key);", "private void onIconSetClicked(PageIconSet selectedIconSet) {\n setValue(selectedIconSet);\n getDialog().dismiss();\n }", "private void changeCurrentIcon(Icon icon) {\r\n\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), icon);\r\n\t}", "public void setOpenIcon(Icon icon);", "@FXML public final void updateIcon() {\r\n if (iconList.getSelectionModel().getSelectedIndex() == -1) {\r\n //Nothing has been selected\r\n return;\r\n }\r\n ImageView selected = iconList.getSelectionModel().getSelectedItem();\r\n profileIcon.setImage(selected.getImage());\r\n profileIcon.setId(selected.getId());\r\n iconList.setVisible(false);\r\n }", "public void setSelectedImg(YuiImage selectedImg) {\r\n\t\tthis.selectedImg = selectedImg;\r\n\t}", "void setIconPath(String iconPath);", "public void setIcon(Resource icon) {\r\n\t\t\tsetResource(state.id, icon);\r\n\t\t}", "public final void setIcon(Icon icon) {\r\n if (icon instanceof ImageIcon) {\r\n super.setIcon(new DropDownIcon((ImageIcon) icon));\r\n }\r\n else {\r\n super.setIcon(icon);\r\n }\r\n }", "protected Object getSelectedIcon() {\n Object selected = null;\n if (selection.size() != 0) {\n selected = ((ClickableIcon) selection.get(0));\n }\n return selected;\n }", "public void setPressedIcon(String pressedIcon)\n {\n myButton.setPressedIcon(getIcon(pressedIcon));\n }", "public OptionDialogBuilder setIcon(Icon icon) {\n\t\tthis.icon = icon;\n\t\treturn this;\n\t}", "public void setIcon(String defaultIcon)\n {\n myButton.setIcon(getIcon(defaultIcon));\n }", "public void setClosedIcon(Icon icon);", "private void setFavoriteIcon() {\n if (stopId == null) {\n return;\n }\n if (SavedStopUtils.isStopSaved(getContext(), stopId)) {\n ibFavorite.setImageDrawable(getResources().getDrawable(R.drawable.ic_star));\n } else {\n ibFavorite.setImageDrawable(getResources().getDrawable(R.drawable.ic_star_outline));\n }\n }", "protected void setIcons() {\n setIcons(data);\n }", "void setIconState(IconState state);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build all the tunnels, from cheapest to most expensive
private static void buildTunnels() { //Initialize necessary member variables totalCost = 0; connectedHills = 1; //Create a disjoint set for all of the hills on the current campus h = scan.nextInt(); campus = new DisjointSet(h); //Read how many tunnels can be built t = scan.nextInt(); //Create an array for all the possible tunnels edges = new edge[t]; //Loop through all of the possible tunnels for (tunnel = 0; tunnel < t; tunnel++) { //Save all information for the current possible tunnel edges[tunnel] = new edge(); } //Sort the array of tunnels by their costs Arrays.sort(edges); //Loop through all the possible tunnels again for (tunnel = 0; tunnel < t; tunnel++) { //Try to connect the hills with the current tunnel and check if it was successful if (campus.union(edges[tunnel].x - 1, edges[tunnel].y - 1)) { //Add the cost to build that tunnel to the total cost totalCost += edges[tunnel].d; //Incrememnt the amount of total hills connected connectedHills++; } //Check if the tunnels have connected all of the hills if (connectedHills == h) { //Stop trying to build tunnels return; } } }
[ "public void tunnel() {\r\n\t\tboolean status = true;\r\n\t\tfor (CellStorage i : node) {\r\n\t\t\tif (i.getCell().tunnelTo != null) {\r\n\t\t\t\tCellStorage tunnelTo = null;\r\n\t\t\t\t// Searching for destinated node from the tunnel\r\n\t\t\t\tfor (int k = 0; k < node.size(); k++) {\r\n\t\t\t\t\tif (node.get(k).getCell() == i.getCell().tunnelTo) {\r\n\t\t\t\t\t\ttunnelTo = node.get(k);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ti.setTunnel(tunnelTo);\r\n\r\n\t\t\t\t// Calling validateConnection method to make sure that no duplicated connection\r\n\t\t\t\t// is made.\r\n\t\t\t\t// Create new connection if no duplicate.\r\n\r\n\t\t\t\tstatus = validateConnection(i, tunnelTo);\r\n\t\t\t\tif (status == false) {\r\n\t\t\t\t\tHashMapConnectedNodes tunnelSet = new HashMapConnectedNodes();\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(i.getIndex(), i);\r\n\t\t\t\t\ttunnelSet.hmConnectedNodesObj.put(tunnelTo.getIndex(), tunnelTo);\r\n\t\t\t\t\thshMConnectedNodes.add(tunnelSet);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void connectVirtualSites() { \n int i = 1;\n while (i < gridEdgeLength+1) {\n uf.union(0 , i);\n i++;\n }\n i = gridSize;\n while (i > gridSize-gridEdgeLength) {\n uf.union(gridSize+1 , i);\n i--;\n }\n }", "protected synchronized List<SolutionStep> getAllForcingNets() {\r\n initialize();\r\n sudoku = finder.getSudoku();\r\n List<SolutionStep> oldSteps = steps;\r\n steps = new ArrayList<SolutionStep>();\r\n long millis1 = System.currentTimeMillis();\r\n //withGroupNodes = true;\r\n withGroupNodes = true;\r\n withAlsNodes = Options.getInstance().isAllowAlsInTablingChains();\r\n getForcingNets();\r\n Collections.sort(steps, tablingComparator);\r\n millis1 = System.currentTimeMillis() - millis1;\r\n if (DEBUG) {\r\n System.out.println(\"getAllForcingNets() gesamt: \" + millis1 + \"ms\");\r\n }\r\n List<SolutionStep> result = steps;\r\n steps = oldSteps;\r\n return result;\r\n }", "public void buildAllPossibleTrain() {\n while (depotOnThisLine.checkOnPossibilityCreatingTrain()) {\n try {\n trains.add(Factory.buildNewTrain(depotOnThisLine));\n } catch (DepotNotExistException e) {\n e.printStackTrace();\n }\n }\n }", "public void buildPathes() {\n\n for (Fruit fruit :game.getFruits()) {\n\n GraphNode.resetCounterId();\n changePlayerPixels();\n addBlocksVertices();\n Point3D fruitPixels = new Point3D(fruit.getPixels()[0],fruit.getPixels()[1]);\n GraphNode fruitNode = new GraphNode(fruitPixels);\n vertices.add(fruitNode);\n Target target = new Target(fruitPixels, fruit);\n\n //find the neigbours\n BFS();\n\n // build the grpah\n buildGraph(target);\n }\n }", "public void buildNPuzzleObjects()\n\t{\n\t\t\n\t\tProblem problem = new NPuzzleProblem(PUZZLE_DIMENSION);\n\t\tHeuristicFunction heuristic = new AggregateHeuristic(multiplier, new PathCostHeuristic(), new ManhattanDistanceHeuristic(problem.getGoalNode()));\n\t\t//HeuristicFunction heuristic = new ManhattanDistanceHeuristic(problem.getGoalNode());\n\t\tthis.search = SearchFactory.buildSearch(problem, heuristic);\n\t\t//This step involves the actual search operation which consumes the bulk of the computational resources of this class.\n\t\t//the this.search.search() operation performs the search, returning the linked list of action objects needed to animate the graph.\n\t\tthis.graph = new NPuzzleGraph((NPuzzleNode)problem.getOriginNode(), this.GRAPH_DIMENSION, this.INITIAL_GRAPH_POINT, this.INITIAL_GRAPH_POINT, this.search.search());\n\t}", "private void buildTopology() {\n\t\t// Variables we need\n\t\tMap<DatapathId, Set<Link>> linkMap;\n\t\t\n\t\tlinkMap = topologyService.getAllLinks();\n\t\tlog.info(\"No. of Nodes: \" + linkMap.size());\n\t\tlog.info(\"Complete Topology: \" + linkMap.toString());\n\n\t\tFDMTopology top = new FDMTopology(1, linkMap);\n\t\tlog.info(\"All Links: \" + top.allLinks);\n\t\tlog.info(\"All Nodes: \" + top.nodes);\n\t\tlog.info(\"No. of Links: \" + top.getNoLinks());\n\t\tFloat[] a_cap = {\n\t\t\t\t5.0f, 6.0f, 7.0f, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE, \n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE,\n\t\t\t\tFloat.MAX_VALUE, Float.MAX_VALUE, Float.MAX_VALUE};\n\t\ttop.initCapacity(a_cap);\n\t\tFloat[][] a_req = { \n\t\t\t\t{0f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{0f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{0f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{0f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{7f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{8f, 0f, 0f, 0f, 0f, 0f, 0f },\n\t\t\t\t{6f, 0f, 0f, 0f, 0f, 0f, 0f } };\n\t\tlog.info(\"All Req: \" + Arrays.deepToString(a_req));\n\t\ttop.initRequirements(a_req);\n\t\t\n\t\tfloat delta = 0.002f;\n\t\tfloat epsilon = 0.00001f;\n float step = 0.5f;\n FlowDeviationMethod fdm = new FlowDeviationMethod(delta, epsilon, step);\n\t\tglobalLinkFlows = fdm.runFDM(top);\n\t\t\n\t\tlog.info(\"Global Flows: \" + globalLinkFlows);\n\t\t\n\t}", "private void initializeNeighbours() {\n\t\tneighbours = new int[N][T];\n\t\tponderi = UtilsMoeadQoS.ponderi;\n\t\t\n\t\tdouble[][] distMatrix = new double[N][N];\n\t\tfor(int i=0;i<N;i++){\n\t\t\tdistMatrix[i][i] = 0;\n\t\t\tfor(int j=i+1;j<N;j++){\n\t\t\t\tdistMatrix[i][j] = UtilsMOO.getInstance().distanta(ponderi[i], ponderi[j]);\n\t\t\t\tdistMatrix[j][i] = distMatrix[i][j];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint[] index = sortare(distMatrix[i]);\n\t\t\tint[] array = new int[T];\n\t\t\tSystem.arraycopy(index, 0, array, 0, T);\n\t\t\tneighbours[i] = array;\n\t\t}\n\t}", "private TunnelStatistics buildTunnelStatistics(PcepTunnelStatistics statistics) {\n DefaultTunnelStatistics.Builder builder = new DefaultTunnelStatistics.Builder();\n DefaultTunnelStatistics tunnelStatistics = builder.setBwUtilization(statistics.bandwidthUtilization())\n .setPacketLossRatio(statistics.packetLossRate())\n .setFlowDelay(statistics.flowDelay())\n .setAlarms(statistics.alarms())\n .build();\n return tunnelStatistics;\n }", "public void build() {\n for (byte i = 0; i < this.layers.size(); i++) { //Creates nodes for all the layers specified in \"layers\"\n Node[] nodeArray = new Node[this.layers.get(i).getLayerSize()];\n for (int j = 0; j < nodeArray.length; j++) { //Creates the right amount of nodes for the number specified in \"parameters\"\n Node newNode = new Node(); //Creates a new object of the Node class\n newNode.setLayerPosition(i); //Sets the layer position to the right value\n newNode.setIndexInLayer(j);\n\n if (i > 0) { //Check whether the the node is in the input layer\n Weight[] weights = new Weight[this.layers.get(i - 1).getLayerSize()]; //Create an array with the size of the amount of nodes in the previous layer\n for (int k = 0; k < weights.length; k++) {\n weights[k] = new Weight(randomValue(-Math.sqrt(this.layers.get(i - 1).getLayerSize()), Math.sqrt(this.layers.get(i - 1).getLayerSize()))); //Generate a random weight\n }\n newNode.setWeights(weights); //Add the weight array to the node\n }\n\n if (this.useBias && i > 0) {\n newNode.setBias(new Bias(randomValue(-Math.sqrt(this.layers.get(i - 1).getLayerSize()), Math.sqrt(this.layers.get(i - 1).getLayerSize())))); //Assigns a bias to the node\n }\n nodeArray[j] = newNode; //Adds the new node to the node array\n }\n this.layers.get(i).setNodes(nodeArray); //Adds the node array to the layer list\n }\n inputLayer = this.layers.get(0); //Assigns the first layer to \"inputLayer\"\n outputLayer = this.layers.get(this.layers.size() - 1); //Assigns the last Layer to \"outputLayer\"\n\n link();\n }", "private Stack<Cell> constructPlan(WorldMap worldMap, Cell target, Hashtable<Cell, Cell> prev) {\n\n\t\t// Starting from the target and backtracking to find the route plan\n\t\tStack<Cell> newPlan = new Stack<Cell>();\n\n\t\tCell cell = target;\n\t\twhile (prev.containsKey(cell)) {\n\t\t\tnewPlan.push(cell);\n\t\t\tcell = prev.get(cell);\n\t\t}\n\t\treturn newPlan;\n\t}", "public static void TraverseTunnel() {\n\t\tif (orientation[0]) {// case where the tunnel is vertical\n\t\t\tif (orientation[1]) {// case where we need to go UP\n\t\t\t\tdouble distLeft = getDist((Tunnel_Corners[0][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[0][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tdouble distright = getDist((Tunnel_Corners[1][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[1][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tif (distLeft < distright) {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[0][0] - 0.5, Tunnel_Corners[0][1] - 0.5);\n\t\t\t\t\tnavigation.turnTo(90 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT(Tunnel_Corners[0][0] * TILE_SIZE, (Tunnel_Corners[0][1] - 0.5) * TILE_SIZE, 90);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[0][0] + 0.5, Tunnel_Corners[0][1] - 0.5);\n\t\t\t\t\tnavigation.turnBy(-93);\n\t\t\t\t} else {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[1][0] + 0.5, Tunnel_Corners[1][1] - 0.5);\n\t\t\t\t\tnavigation.turnTo(270 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT(Tunnel_Corners[1][0] * TILE_SIZE, (Tunnel_Corners[1][1] - 0.7) * TILE_SIZE, 270);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[1][0] - 0.5, Tunnel_Corners[1][1] - 0.7);\n\t\t\t\t\tnavigation.turnBy(87);\n\t\t\t\t}\n\t\t\t\tlocalization.linedetect_move();\n\t\t\t\todometer.setXYT((Tunnel_Corners[0][0] + 0.5) * TILE_SIZE, (Tunnel_Corners[0][1]) * TILE_SIZE, 0);\n\t\t\t\tnavigation.speed_offset = offset_speed;\n\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] + 0.5, Tunnel_Corners[2][1] + 0.5);\n\t\t\t\tnavigation.speed_offset = 0;\n\n\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 1)\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 1 }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 1)) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[2][0]) * TILE_SIZE, (Tunnel_Corners[2][1] + 1) * TILE_SIZE, 270);\n\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 1)\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 1 }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 1)) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[3][0]) * TILE_SIZE, (Tunnel_Corners[3][1] + 1) * TILE_SIZE, 90);\n\t\t\t\t} else {\n\n\t\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 2)\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 2 }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[2][0], Tunnel_Corners[2][1] + 2)) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[2][0]) * TILE_SIZE, (Tunnel_Corners[2][1] + 2) * TILE_SIZE,\n\t\t\t\t\t\t\t\t270);\n\t\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 2)\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 2 }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[3][0], Tunnel_Corners[3][1] + 2)) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[3][0]) * TILE_SIZE, (Tunnel_Corners[3][1] + 2) * TILE_SIZE, 90);\n\t\t\t\t\t} else {\n\t\t\t\t\t\todometer.setXYT(Tunnel_Corners[2][0] + 0.5, Tunnel_Corners[2][1] + 0.5, 0);\n\t\t\t\t\t\ttree_obstruct = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {// case where we need to go DOWN\n\t\t\t\tdouble distLeft = getDist((Tunnel_Corners[2][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[2][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tdouble distright = getDist((Tunnel_Corners[3][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[3][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tif (distLeft < distright) {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] - 0.5, Tunnel_Corners[2][1] + 0.5);\n\t\t\t\t\tnavigation.turnTo(90 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT(Tunnel_Corners[2][0] * TILE_SIZE, (Tunnel_Corners[2][1] - 0.5) * TILE_SIZE, 90);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] + 0.5, Tunnel_Corners[2][1] - 0.5);\n\t\t\t\t\tnavigation.turnBy(87);\n\t\t\t\t} else {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[3][0] + 0.5, Tunnel_Corners[3][1] + 0.5);\n\t\t\t\t\tnavigation.turnTo(270 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT(Tunnel_Corners[3][0] * TILE_SIZE, (Tunnel_Corners[3][1] + 0.5) * TILE_SIZE, 270);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[3][0] - 0.5, Tunnel_Corners[3][1] + 0.5);\n\t\t\t\t\tnavigation.turnBy(-93);\n\t\t\t\t}\n\t\t\t\tlocalization.linedetect_move();\n\t\t\t\todometer.setXYT((Tunnel_Corners[2][0] + 0.5) * TILE_SIZE, (Tunnel_Corners[2][1]) * TILE_SIZE, 180);\n\t\t\t\tnavigation.speed_offset = offset_speed;\n\t\t\t\tnavigation.travelTo(Tunnel_Corners[0][0] + 0.5, Tunnel_Corners[0][1] - 0.5);\n\t\t\t\tnavigation.speed_offset = 0;\n\n\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 1)\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 1 }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 1)) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[1][0]) * TILE_SIZE, (Tunnel_Corners[1][1] - 1) * TILE_SIZE, 90);\n\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 1)\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 1 }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 1)) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[0][0]) * TILE_SIZE, (Tunnel_Corners[0][1] - 1) * TILE_SIZE, 270);\n\t\t\t\t} else {\n\t\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 2)\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 2 }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[1][0], Tunnel_Corners[1][1] - 2)) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[1][0]) * TILE_SIZE, (Tunnel_Corners[1][1] - 2) * TILE_SIZE, 90);\n\t\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 2)\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 2 }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[0][0], Tunnel_Corners[0][1] - 2)) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[0][0]) * TILE_SIZE, (Tunnel_Corners[0][1] - 2) * TILE_SIZE,\n\t\t\t\t\t\t\t\t270);\n\t\t\t\t\t} else {\n\t\t\t\t\t\todometer.setXYT(Tunnel_Corners[0][0] + 0.5, Tunnel_Corners[0][1] - 0.5, 180);\n\t\t\t\t\t\ttree_obstruct = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {// case where the tunnel is horizontal\n\t\t\tif (orientation[1]) {// case where we need to go right\n\t\t\t\tdouble distUp = getDist((Tunnel_Corners[2][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[2][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tdouble distDown = getDist((Tunnel_Corners[0][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[0][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tif (distUp < distDown) {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] - 0.5, Tunnel_Corners[2][1] + 0.5);\n\t\t\t\t\tnavigation.turnTo(180 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[2][0] - 0.5) * TILE_SIZE, (Tunnel_Corners[2][1]) * TILE_SIZE, 180);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] - 0.5, Tunnel_Corners[2][1] - 0.5);\n\t\t\t\t\tnavigation.turnBy(-93);\n\t\t\t\t} else {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[0][0] - 0.5, Tunnel_Corners[0][1] - 0.5);\n\t\t\t\t\tnavigation.turnTo(0 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[0][0] - 0.7) * TILE_SIZE, (Tunnel_Corners[0][1]) * TILE_SIZE, 0);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[0][0] - 0.7, Tunnel_Corners[0][1] + 0.5);\n\t\t\t\t\tnavigation.turnBy(87);\n\t\t\t\t}\n\t\t\t\tlocalization.linedetect_move();\n\t\t\t\todometer.setXYT((Tunnel_Corners[2][0]) * TILE_SIZE, (Tunnel_Corners[2][1] - 0.5) * TILE_SIZE, 90);\n\t\t\t\tnavigation.speed_offset = offset_speed;\n\t\t\t\tnavigation.travelTo(Tunnel_Corners[3][0] + 0.5, Tunnel_Corners[3][1] - 0.5);\n\t\t\t\tnavigation.speed_offset = 0;\n\n\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[1][0] + 1, Tunnel_Corners[1][1])\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[1][0] + 1, Tunnel_Corners[1][1] }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[1][0] + 1, Tunnel_Corners[1][1])) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[1][0] + 1) * TILE_SIZE, (Tunnel_Corners[1][1]) * TILE_SIZE, 180);\n\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[3][0] + 1, Tunnel_Corners[3][1])\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[3][0] + 1, Tunnel_Corners[3][1] }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[3][0] + 1, Tunnel_Corners[3][1])) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[3][0] + 1) * TILE_SIZE, (Tunnel_Corners[3][1]) * TILE_SIZE, 0);\n\t\t\t\t} else {\n\t\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[1][0] + 2, Tunnel_Corners[1][1])\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[1][0] + 2, Tunnel_Corners[1][1] }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[1][0] + 2, Tunnel_Corners[1][1])) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[1][0] + 2) * TILE_SIZE, (Tunnel_Corners[1][1]) * TILE_SIZE,\n\t\t\t\t\t\t\t\t180);\n\t\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[3][0] + 1, Tunnel_Corners[3][1])\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[3][0] + 1, Tunnel_Corners[3][1] }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[3][0] + 2, Tunnel_Corners[3][1])) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[3][0] + 2) * TILE_SIZE, (Tunnel_Corners[3][1]) * TILE_SIZE, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\todometer.setXYT(Tunnel_Corners[3][0] + 0.5, Tunnel_Corners[3][1] - 0.5, 90);\n\t\t\t\t\t\ttree_obstruct = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {// case where we need to go left.\n\t\t\t\tdouble distUp = getDist((Tunnel_Corners[3][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[3][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tdouble distDown = getDist((Tunnel_Corners[1][0] * TILE_SIZE - odometer.getXYT()[0]),\n\t\t\t\t\t\t(Tunnel_Corners[1][1] * TILE_SIZE - odometer.getXYT()[1]));\n\t\t\t\tif (distUp < distDown) {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[3][0] + 0.5, Tunnel_Corners[3][1] + 0.5);\n\t\t\t\t\tnavigation.turnTo(180 * Math.PI / 180);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[3][0] + 0.5) * TILE_SIZE, (Tunnel_Corners[3][1]) * TILE_SIZE, 180);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[3][0] + 0.5, Tunnel_Corners[3][1] - 0.5);\n\t\t\t\t\tnavigation.turnBy(87);\n\t\t\t\t} else {\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[1][0] + 0.5, Tunnel_Corners[1][1] - 0.5);\n\t\t\t\t\tnavigation.turnTo(0);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[1][0] + 0.5) * TILE_SIZE, (Tunnel_Corners[1][1]) * TILE_SIZE, 0);\n\t\t\t\t\tnavigation.travelTo(Tunnel_Corners[1][0] + 0.5, Tunnel_Corners[1][1] + 0.5);\n\t\t\t\t\tnavigation.turnBy(-93);\n\t\t\t\t}\n\t\t\t\tlocalization.linedetect_move();\n\t\t\t\todometer.setXYT((Tunnel_Corners[1][0]) * TILE_SIZE, (Tunnel_Corners[1][1] + 0.5) * TILE_SIZE, 270);\n\t\t\t\tnavigation.speed_offset = offset_speed;\n\t\t\t\tnavigation.speed_offset = 0;\n\t\t\t\tnavigation.travelTo(Tunnel_Corners[2][0] - 0.5, Tunnel_Corners[2][1] - 0.5);\n\n\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[2][0] - 1, Tunnel_Corners[2][1])\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[2][0] - 1, Tunnel_Corners[2][1] }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[2][0] - 1, Tunnel_Corners[2][1])) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[2][0] - 1) * TILE_SIZE, (Tunnel_Corners[2][1]) * TILE_SIZE, 0);\n\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[0][0] - 1, Tunnel_Corners[0][1])\n\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[0][0] - 1, Tunnel_Corners[0][1] }))\n\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[0][0] - 1, Tunnel_Corners[0][1])) {\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\todometer.setXYT((Tunnel_Corners[0][0] - 1) * TILE_SIZE, (Tunnel_Corners[0][1]) * TILE_SIZE, 180);\n\t\t\t\t} else {\n\t\t\t\t\tif ((withinIslandBoundary(Tunnel_Corners[2][0] - 2, Tunnel_Corners[2][1])\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[2][0] - 2, Tunnel_Corners[2][1] }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[2][0] - 2, Tunnel_Corners[2][1])) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[2][0] - 2) * TILE_SIZE, (Tunnel_Corners[2][1]) * TILE_SIZE, 0);\n\t\t\t\t\t} else if ((withinIslandBoundary(Tunnel_Corners[0][0] - 2, Tunnel_Corners[0][1])\n\t\t\t\t\t\t\t|| isInStartIsland(new int[] { Tunnel_Corners[0][0] - 2, Tunnel_Corners[0][1] }))\n\t\t\t\t\t\t\t&& !IsTree(Tunnel_Corners[0][0] - 2, Tunnel_Corners[0][1])) {\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\tnavigation.turnBy(-90);\n\t\t\t\t\t\tlocalization.linedetect_move();\n\t\t\t\t\t\todometer.setXYT((Tunnel_Corners[0][0] - 2) * TILE_SIZE, (Tunnel_Corners[0][1]) * TILE_SIZE,\n\t\t\t\t\t\t\t\t180);\n\t\t\t\t\t} else {\n\t\t\t\t\t\todometer.setXYT(Tunnel_Corners[2][0] - 0.5, Tunnel_Corners[2][1] - 0.5, 270);\n\t\t\t\t\t\ttree_obstruct = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void calcCitySpots() {\n\t\tfor (Center center : connected) {\r\n\t\t\tif (center.water) continue;\r\n\t\t\tif (!cityCenters.contains(center)) {\r\n\t\t\t\taddToAvailableCenters(center);\r\n\t\t\t\tcityCenters.add(center);\r\n\t\t\t\tfor (Corner corner : center.corners) {\r\n\t\t\t\t\tif (!cityCorners.contains(corner)) {\r\n\t\t\t\t\t\tboolean river = false;\r\n\t\t\t\t\t\t// don't allow cities on rivers\r\n\t\t\t\t\t\tfor (Edge e : corner.protrudes) {\r\n\t\t\t\t\t\t\tif (e.river >= RIVER_THRESHOLD)\r\n\t\t\t\t\t\t\t\triver = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (river) continue;\r\n\t\t\t\t\t\tcityCorners.add(corner);\r\n\t\t\t\t\t\taddToAvailableCorners(corner);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (Edge edge : center.borders) {\r\n\t\t\t\tif (edge.river >= RIVER_THRESHOLD) continue;\r\n\t\t\t\taddToAvailableCorners(edge.v0);\t\r\n\t\t\t\taddToAvailableCorners(edge.v1);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testParallelPropagationLoopBack3Sites() {\n // Create locators\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n // create cache and receivers on all the 3 sites\n createCacheInVMs(lnPort, vm3, vm6);\n createReceiverInVMs(vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createReceiverInVMs(vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n createReceiverInVMs(vm5);\n\n\n // create senders on all the 3 sites\n vm3.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln\", 2, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny\", 3, true, 100, 10, false, false, null, true));\n\n vm5.invoke(() -> WANTestBase.createSender(\"tk\", 1, true, 100, 10, false, false, null, true));\n\n // create PR on the 3 sites\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln\", 0, 100,\n isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny\", 0, 100,\n isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk\", 0, 100,\n isOffHeap()));\n\n // start senders on all the sites\n startSenderInVMs(\"ln\", vm3, vm6);\n\n startSenderInVMs(\"ny\", vm4, vm7);\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk\"));\n\n // pause senders on site1 and site3. Site2 has the sender running to pass along events\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk\"));\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln\", 100));\n vm5.invoke(() -> WANTestBase.verifyQueueSize(\"tk\", 100));\n\n // resume sender on site1 so that events reach site2 and from there to site3\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln\"));\n vm6.invoke(() -> waitForSenderRunningState(\"ln\"));\n vm3.invoke(() -> waitForSenderRunningState(\"ln\"));\n\n // validate region size on site2 (should have 100) and site3 (should have 200)\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size remains same on site3 which means event loopback did not happen\n // this means events coming from site1 are not enqueued back into the sender\n vm5.invoke(() -> WANTestBase.verifyQueueSize(\"tk\", 100));\n\n // resume sender on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk\"));\n vm5.invoke(() -> waitForSenderRunningState(\"tk\"));\n\n // validate region size\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }", "private void initNeighbors() {\n \t// the problem of getting itself as neighbor is not yet solved\n \tList<Agent> poplist = new ArrayList<Agent>(population);\n \tfor (Agent human: population) {\n \t\tCollections.shuffle(poplist);\n \t\thuman.setNeighbors(poplist.subList(0, pref.neighbors));\n \t}\n \tpopulation = new ArrayList<Agent>(poplist);\n \tpoplist = null;\n }", "protected void buildGraph(Array<Polygon> walkablePolys) {\n\n // Aggregate walkable polygon triangles into a flat list\n int triangleCount = 0;\n for(Polygon p : walkablePolys) {\n if(p.getTriangles() != null) {\n for(DelaunayTriangle dt : p.getTriangles()) {\n if(dt.isInterior()) {\n ++triangleCount;\n }\n }\n }\n }\n final List<DelaunayTriangle> triangles = new ArrayList<>(triangleCount);\n for(Polygon p : walkablePolys) {\n if(p.getTriangles() != null) {\n for(DelaunayTriangle dt : p.getTriangles()) {\n if(dt.isInterior()) {\n triangles.add(dt);\n }\n }\n }\n }\n\n // Guard: no triangle case\n if(triangles.size() < 1) {\n nodes = new Array<>(0);\n nextIndex = 0;\n portalToNode = new HashMap<>(0);\n return;\n }\n\n\n portalToNode = new HashMap<>(triangles.size() * MAX_NODES_PER_TRI);\n nodes = new Array<>(triangles.size() * MAX_NODES_PER_TRI);\n\n DelaunayTriangle tNeighborI;\n NavMeshPortal nextPortal, nextNeighborPortal;\n NavMeshPathNode nextNode;\n int tNeighborIndices[] = new int[2];\n NavMeshPathNode nextNeighborNode;\n\n QtTriNode nextQtTriNode;\n final Quadtree qt = nodesQt.getQt();\n\n\n for(DelaunayTriangle t : triangles) {\n\n // Add triangle to spatial index\n nextQtTriNode = new QtTriNode(t, new Array<>(MAX_CONNS_PER_NODE));\n qt.insert(nextQtTriNode.getEnvelope(), nextQtTriNode);\n\n\n for(int i = 0; i < t.neighbors.length; ++i) {\n\n nextPortal = getPortal(t, i);\n if(nextPortal != null) {\n tNeighborI = t.neighbors[i];\n\n nextNode = getNodeAndCreate(nextPortal);\n nextNode.setDtA(t);\n nextNode.setDtB(tNeighborI);\n\n // Spatial index reference to nextPortal\n nextQtTriNode.getNodes().add(nextNode);\n\n // Other portal connections in t\n tNeighborIndices[0] = (i + 1) % 3;\n tNeighborIndices[1] = (i + 2) % 3;\n for(int j = 0; j < tNeighborIndices.length; ++j) {\n if((nextNeighborPortal = getPortal(t, j)) != null) {\n nextNeighborNode = getNodeAndCreate(nextNeighborPortal);\n nextNode.connections.add(new NavMeshPathConn(nextNode, nextNeighborNode));\n\n // Spatial index reference to neighbor portal\n nextQtTriNode.getNodes().add(nextNeighborNode);\n }\n }\n\n // Portal connections in tNeighborI, must check equality to avoid self-connection (shared edge)\n for(int j = 0; j < 3; ++j) {\n if((nextNeighborPortal = getPortal(tNeighborI, j)) != null\n && !nextNeighborPortal.equals(nextPortal)) {\n nextNeighborNode = getNodeAndCreate(nextNeighborPortal);\n nextNode.connections.add(new NavMeshPathConn(nextNode, nextNeighborNode));\n }\n }\n }\n }\n\n // Check for triangle islands\n nextNode = getNodeAndCreate(getIslandPortal(t));\n nextNode.setDtA(t);\n nextNode.setDtB(null);\n if(nextQtTriNode.getNodes().size < 1) {\n nextQtTriNode.getNodes().add(nextNode);\n }\n }\n }", "public void generateHotspots(){\n for(int i=0;i<Parameters.NUMBER_OF_HOTSPOTS;i++){\n Peer p;\n Random r = new Random();\n int x = r.nextInt(Parameters.BOARD_WIDTH) + 1;\n int y = r.nextInt(Parameters.BOARD_HEIGHT) + 1;\n Parameters.OS os = Parameters.OS.HOTSPOT;\n p = new Peer(x, y, os, i);\n hotspots.add(p);\n }\n }", "void computeRoutes() {\r\n\r\n\t\t// Works out which nodes have no uphill node, and are therefore valid\r\n\t\t// start points for traversing the piste\r\n\t\tList<Node> startNodes = new ArrayList<Node>();\r\n\r\n\t\tfor (Node node : nodes.values()) {\r\n\t\t\tif (node.getUphill().isEmpty()) {\r\n\t\t\t\tstartNodes.add(node);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tList<OSMNode> route = new ArrayList<OSMNode>();\r\n\r\n\t\tfor (Node start : startNodes) {\r\n\t\t\tcomputeRoutesFrom(start, route);\r\n\t\t}\r\n\r\n\t\tCollections.sort(routes);\r\n\r\n\t}", "@Test\n public void testParallelPropagationLoopBack3SitesNtoNTopologyPutFromOneDS() {\n Integer lnPort = vm0.invoke(() -> WANTestBase.createFirstLocatorWithDSId(1));\n Integer nyPort = vm1.invoke(() -> WANTestBase.createFirstRemoteLocator(2, lnPort));\n Integer tkPort = vm2.invoke(() -> WANTestBase.createFirstRemoteLocator(3, lnPort));\n\n createCacheInVMs(lnPort, vm3, vm6);\n createCacheInVMs(nyPort, vm4, vm7);\n createCacheInVMs(tkPort, vm5);\n vm3.invoke(WANTestBase::createReceiver);\n vm4.invoke(WANTestBase::createReceiver);\n vm5.invoke(WANTestBase::createReceiver);\n\n // site1\n vm3.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln1\", 2, true, 100, 10, false, false, null, true));\n\n vm3.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n vm6.invoke(() -> WANTestBase.createSender(\"ln2\", 3, true, 100, 10, false, false, null, true));\n\n // site2\n vm4.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny1\", 1, true, 100, 10, false, false, null, true));\n\n vm4.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n vm7.invoke(() -> WANTestBase.createSender(\"ny2\", 3, true, 100, 10, false, false, null, true));\n\n // site3\n vm5.invoke(() -> WANTestBase.createSender(\"tk1\", 1, true, 100, 10, false, false, null, true));\n vm5.invoke(() -> WANTestBase.createSender(\"tk2\", 2, true, 100, 10, false, false, null, true));\n\n // create PR\n vm3.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n vm6.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ln1,ln2\", 0,\n 1, isOffHeap()));\n\n vm4.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n vm7.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"ny1,ny2\", 0,\n 1, isOffHeap()));\n\n vm5.invoke(() -> WANTestBase.createPartitionedRegion(getTestMethodName() + \"_PR\", \"tk1,tk2\", 0,\n 1, isOffHeap()));\n\n // start all the senders\n vm3.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.startSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.startSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.startSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.startSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.startSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.startSender(\"tk2\"));\n\n // pause senders on all the sites\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm3.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.pauseSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.pauseSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk1\"));\n vm5.invoke(() -> WANTestBase.pauseSender(\"tk2\"));\n\n // this is required since sender pause doesn't take effect immediately\n Wait.pause(1000);\n\n // do puts on site1\n vm3.invoke(() -> WANTestBase.doPuts(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site1 and site3\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln1\", 100));\n vm3.invoke(() -> WANTestBase.verifyQueueSize(\"ln2\", 100));\n\n // resume sender (from site1 to site2) on site1\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln1\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 100));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as the events from site1 should not go back to site1\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as events from site1 will reach site3 directly..site2 need not send to\n // site3 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // do more puts on site3\n vm5.invoke(() -> WANTestBase.doPutsFrom(getTestMethodName() + \"_PR\", 100, 200));\n\n // resume sender (from site3 to site2) on site3\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk2\"));\n\n // validate region size on site2\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n\n // verify queue size on site2 (sender 2 to 3)\n // should remain at 0 as the events from site3 should not go back to site3\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny2\", 0));\n\n // verify queue size on site2 (sender 2 to 1)\n // should remain at 0 as events from site3 will reach site1 directly..site2 need not send to\n // site1 again\n vm4.invoke(() -> WANTestBase.verifyQueueSize(\"ny1\", 0));\n\n // resume all senders\n vm3.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n vm6.invoke(() -> WANTestBase.resumeSender(\"ln2\"));\n\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm4.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny1\"));\n vm7.invoke(() -> WANTestBase.resumeSender(\"ny2\"));\n\n vm5.invoke(() -> WANTestBase.resumeSender(\"tk1\"));\n\n // validate region size on all sites\n vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm4.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() + \"_PR\", 200));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
1 finding the highest int in the 2d array x
public static int findMax(int [][] x){ int max = x[0][0]; for (int rows=0; rows<x.length; rows++){ for (int cols=0; cols<x[rows].length; cols++){ if (x[rows][cols]>max){ max = x[rows][cols]; } } } return max; }
[ "public int theHighest() {\r\n\t\tint highest = 0;\r\n\t\tfor(int i = 0; i < rows_size; i++) {\r\n\t\t\tfor(int j = 0; j < columns_size; j++) {\r\n\t\t\t\tif(game[i][j].getValue() > highest)\r\n\t\t\t\t\thighest = game[i][j].getValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn highest;\r\n\t}", "public static int findMax(int[][] matrix){\n int highestValue = 0; //set variable to lowest non negative value\n for(int i = 0; i < ROWS; i++){ //loop through the 2D array\n for(int j = 0; j < COLUMNS; j++){\n if(matrix[i][j] > highestValue){ //if element > highestValue, save value\n highestValue = matrix[i][j];\n }\n\n } //end nested\n\n } //end outer\n return highestValue; // return the highest value\n }", "public Integer max(){\n int max=data[0][0];\n for(int i=0; i<countRowTable; i++)\n for(int j=0; j<countColumnTable; j++) {\n if(data[i][j]>max){\n max=data[i][j];\n }\n }\n return max;\n }", "public int getLargest() {\r\n \r\n int largestInteger = 0;\r\n \r\n for (int r = 0; r < matrix.length; r++) {\r\n \r\n for (int c = 0; c < matrix[0].length; c++) {\r\n \r\n if (matrix[r][c] > largestInteger) {\r\n \r\n largestInteger = matrix[r][c]; \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n return largestInteger;\r\n \r\n }", "private int maxIndex() {\r\n\t\tint result = 0;\r\n\t\tfor (int i = 1; i < this.evaluationBoard.length; i++) {\r\n\t\t\tif (this.evaluationBoard[i] > this.evaluationBoard[result]) {\r\n\t\t\t\tresult = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }", "private static int max(int[] array) {\n int result = array[0];\n for (int x : array)\n result = Math.max(x, result);\n return result;\n }", "public static int arrayMax2D(int[][] array)\n\t{\n\t\tint max = array[0][0];\n\t\tfor(int i = 0; i < array.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < array[i].length; j++)\n\t\t\t{\n\t\t\t\tif(max < array[i][j])\n\t\t\t\t{\n\t\t\t\t\tmax = array[i][j];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "static int getBiggestInt( int array[] )\n {\n return 0; // TODO\n }", "int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}", "public static int\tgetHighestInRowIndex(double[][] data, int row) {\r\n\t\tdouble highest = data[0][0];\r\n for (int j = 0; j < data.length; j++) { // loop for as many collums they are\r\n if (data[row][j] > highest) {\r\n \thighest = data[row][j];\r\n }\r\n }\r\n return (int) highest;\r\n\t\t\r\n\t\t\r\n\t}", "private int getYmax(int[] yt){\n\t\tint max = -1;\n\t\tfor(int i = 0;i<=3;i++){\n\t\t\tif(max < yt[i]){\n\t\t\t\tmax = yt[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}", "private static int[] FindHighest(int[][] terrainMap) {\n\n int[] highestPosition = {-1, -1};\n int highestValue = terrainMap[0][0];\n\n int i, j;\n\n for (i = 0; i < terrainMap.length; i++) {\n for (j = 0; j < terrainMap[0].length; j++) {\n if (terrainMap[i][j] > highestValue) {\n highestValue = terrainMap[i][j];\n highestPosition[0] = i;\n highestPosition[1] = j;\n }\n }\n }\n\n return highestPosition;\n }", "private static int maxH(int[][] m){\n\t \n\t //if the array has no elements, the result is zero.\n\t int totalMax = 0;\n\t \n\t //this loop is executed once per row (as many times as the width of the input array)\n\t for(int i = 0; i < m.length; i++){\n\t\t \n\t\t /* a function call to maxHH does the heavy lifting, and is called\n\t\t * x times, where x is the width of the given array\n\t\t */\n\t\t int rowMax = maxHH(m, i);\n\t\t \n\t\t //each row max result is given the opportunity to be the largest\n\t\t if(i == 0)\n\t\t\t totalMax = rowMax;\n\t\t else\n\t\t\t totalMax = max(totalMax, rowMax);\n\t }\n\t return totalMax;\n }", "public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }", "int[] argmax() throws MatrixException;", "public int findHighestTemp() {\n\t\t\n\t\tint max = 0;\n\t\tint indexHigh = 0;\n\t\tfor (int i=0; i<temps.length; i++)\n\t\t\tif (temps[i][0] > max) {\n\t\t\t\tmax = temps[i][0];\n\t\t\t\tindexHigh = i;\n\t\t\t}\n\t\t\n\t\treturn indexHigh;\n\t\t\n\t}", "private static int maxXIndex(int y, int lo, int hi, int[][] nums) {\n int maxIndex = -1;\n for (int x = lo; x < hi; x++) {\n if (maxIndex == -1 || nums[y][x] > nums[y][maxIndex])\n maxIndex = x;\n }\n return maxIndex;\n }", "public int findMax(int array[]){\n \n max = array[0];\n \n for(int i = 0; i < array.length; i++){\n \n if(max < array[i]){\n \n max = array[i];\n \n }\n \n }\n \n return max;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets a count of how many grades fall within 10% bounds. This is used to determine the size of each bar in the graph.
public int[] getGraphCount() { int[] count = new int[10]; float totalRange = upperBound - lowerBound; // Determine what falls within what range for (int i = 0; i < data.size(); i++) { float rawValue = data.get(i); float percent = (rawValue - lowerBound) / totalRange; if (percent >= .9) { count[9]++; } else if (percent >= .8) { count[8]++; } else if (percent >= .7) { count[7]++; } else if (percent >= .6) { count[6]++; } else if (percent >= .5) { count[5]++; } else if (percent >= .4) { count[4]++; } else if (percent >= .3) { count[3]++; } else if (percent >= .2) { count[2]++; } else if (percent >= .1) { count[1]++; } else { count[0]++; } } return count; }
[ "public int[] countGrades(int[] grades) {\n int[] gradeFrequencies = new int[11];\n for (int grade : grades) {\n gradeFrequencies[grade]++;\n }\n return gradeFrequencies;\n }", "public double getPercentageOfStudentsPassed(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n double numberOfStudentsPassed = 0;\n double percentageOfStudentsPassed;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n \n if (currentGrade >= 40) {\n numberOfStudentsPassed += 1;\n }\n }\n percentageOfStudentsPassed = (numberOfStudentsPassed / NUMBER_OF_STUDENTS) * 100;\n return percentageOfStudentsPassed;\n }", "public int getNumGrades(){\n\t\treturn numGrades;\n\t}", "public int rangeCount() {\n\t\treturn rangeMax-rangeMin;\n\t}", "private int numOfBuckets(){\r\n \treturn (int) Math.floor((1.4404*(Math.log10(this.size)/Math.log10(2))+2));\r\n }", "private int countInBounds(HashMap<Integer, Point> pieces, Point upperLeft, Point lowerRight) {\n\t\tint num_in_bounds = 0;\n\t\tfor (int i=0; i<this.n; i++) {\n\t\t\tif (inBounds(pieces.get(i), upperLeft, lowerRight)) {num_in_bounds += 1;}\n\t\t}\n\t\treturn num_in_bounds;\n\t}", "public int getPaintRequired() {\n return (int)Math.ceil(wallArea / coverage);\n }", "protected int getLevel (Rect bounds)\n {\n int level = FloatMath.round(\n FloatMath.log(bounds.getLongestEdge() / _granularity) / FloatMath.log(0.5f));\n return Math.min(Math.max(level, 0), _levels - 1);\n }", "public int totalGrade(){\r\n\t\tint retval = 0;\r\n\t\t\r\n\t\tfor(Street s : streets){\r\n\t\t\tretval += s.getGrade();\r\n\t\t}\r\n\t\t\r\n\t\treturn retval;\r\n\t}", "private float getBarLength() {\n return (getWidth() - 2 * getMarginLeft());\n }", "public int getNumOfPlaces() {\n return (WIDTH * WIDTH) / 2;\n }", "public int countLevelbyPoints() {\n int temp = points / 200;\n if (level < temp) {\n level = temp;\n }\n return level;\n }", "public long totalMembersInScoreRangeIn(String leaderboardName, double minScore, double maxScore) {\n\t\treturn _jedis.zcount(leaderboardName, minScore, maxScore);\n\t}", "public double calcNumberOfAreas() {\r\n\t\tint[][] testMap = new int[map.length][map.length];\r\n\t\tfor (int i = 0; i < testMap.length; i++) {\r\n\t\t\tfor (int j = 0; j < testMap.length; j++) {\r\n\t\t\t\ttestMap[i][j] = map[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdouble areaCount = 0;\r\n\r\n\t\tfor (int x = 0; x < testMap.length; x++) {\r\n\t\t\tfor (int y = 0; y < testMap.length; y++) {\r\n\t\t\t\tif (floodQueue(testMap, x, y)) {\r\n\t\t\t\t\tareaCount++;\r\n\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 areaCount;\r\n\t}", "public static int getBucketCount(double area, double areaPerBucket) {\n if (area > 0 && areaPerBucket > 0) {\n double width = Math.sqrt(area);\n double height = width;\n return getBucketCount(width, height, areaPerBucket, 0);\n }\n\n return - 1;\n }", "private int count(String type, double min, double max, boolean cancelled) {\n\t\tint count = 0;\n\t\tfloat value = 0;\n\t\tfor (int i = start; i < start + 80; i++) {\n\t\t\tif (type.equals(\"rewards\")) {\n\t\t\t\tvalue = jobMap.get(i).getTotalReward();\n\t\t\t} else if (type.equals(\"weights\")) {\n\t\t\t\tvalue = jobMap.get(i).getTotalWeight();\n\t\t\t} else if (type.equals(\"number\")) {\n\t\t\t\tvalue = jobMap.get(i).getTotalN();\n\t\t\t}\n\t\t\tif (value >= min && value < max && cancelled == jobMap.get(i).getCancelled()) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public int getBarCount(){\n \tList<WebElement> bars = chart.findElements(By.cssSelector(\"g.highcharts-tracker > rect\"));\r\n \t//List<WebElement> barsWithData = new ArrayList<WebElement>();\r\n \tint barCount = 0;\r\n \t\r\n \tfor(WebElement ele : bars){\r\n \t\tdouble x = Double.parseDouble(ele.getAttribute(\"x\"));\r\n \t\tint height = Integer.parseInt(ele.getAttribute(\"height\"));\r\n \t\tif(x>0 && height > 0){\r\n \t\t\tbarCount=barCount+1;\r\n \t\t}\r\n \t\t//System.out.println(\"x =\" +ele.getAttribute(\"x\"));\r\n \t}\r\n \t//return chart.findElements(By.cssSelector(\"g.highcharts-tracker > g:nth-of-type(\" + seriesIndex + \") > rect\")).size();\r\n \treturn barCount;\r\n }", "public int grasperCount(){\n \n return numLegs+numArms;\n }", "int calculateTotalCapacity();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fill in between layers of a stack. Interpolate between image intensities.
public ImageStack fillShort(ImageStack stack, int fillLayers) { int slices = stack.getSize(); int height = stack.getHeight(); int width = stack.getWidth(); ImageStack filledStack = new ImageStack(width, height); ImageProcessor prevProc = stack.getProcessor(2); short[] prevPixels = (short[])prevProc.getPixels(); int sliceNum = 1; filledStack.addSlice(""+sliceNum, prevProc); for (int i=2; i <= slices; i++) { sliceNum++; ImageProcessor curProc = stack.getProcessor(i); short[] curPixels = (short[])curProc.getPixels(); filledStack.addSlice(""+sliceNum, curProc); ImageProcessor[] fillProcs = new ImageProcessor[fillLayers]; short[][] fillPixels = new short[fillLayers][]; for (int j=0; j < fillLayers; j++) { sliceNum++; ImageProcessor fillProc = new ShortProcessor(width, height); fillProcs[j] = fillProc; fillPixels[j] = (short[])fillProc.getPixels(); filledStack.addSlice(""+sliceNum, fillProc); } for (int x=0; x < width; x++) { for (int y=0; y < height; y++) { short prevPixel = prevPixels[y*width+x]; short curPixel = curPixels[y*width+x]; if (prevPixel > 0 && curPixel > 0) { short range = (short)Math.abs(curPixel-prevPixel); double step = (double)range/(fillLayers+1); if (prevPixel > curPixel) step = -step; double val = (double)prevPixel; for (int k=0; k < fillLayers; k++) { val+=step; fillPixels[k][y*width+x] = (short)Math.round(val); } } } } prevPixels = curPixels; } return filledStack; }
[ "private void createNewStack(){\n\t\taltStack = new ImageStack(width, height);\n\t\t\n\t\tfor(int i = 1 ; i <= depth ; i++){\n\t\t\tbyte[] slice = new byte[height * width];\n\t\t\tSystem.arraycopy(raw, (i-1) * height * width, slice, 0, height * width);\n\t\t\taltStack.addSlice(new ByteProcessor(width,height,slice,null));\n \t} \n\t}", "private void changeLayers() {\n int i =MAX_LAYER-1;\n int imgIndex = currentImage-1;\n while (i>=0) {\n Bitmap b = project.getLayer(imgIndex);\n if (imgIndex>=0 && b != null) {\n layers[i].setImageBitmap(b);\n }\n else{\n layers[i].setImageBitmap(null);\n }\n i--;\n imgIndex -= pellures_freq;\n }\n }", "public static int[][] blendLaplace(int[][] img1, int[][] img2, float[][] stencil, float a){\n ResolutionPyramid left = laplacianPyramid(img1,a);\n ResolutionPyramid right = laplacianPyramid(img2,a);\n int[][] result = new int[img1.length][img1[0].length];\n for(int i = left.levels.size(); i > 0 ;i--){\n int[][] tmpLeft = left.levels.get(i);\n int[][] tmpRight = right.levels.get(i);\n for(int x = 0; x < tmpLeft.length; x++){\n for(int y = 0; y < tmpRight.length; y++){\n int tmp = (int) (stencil[x][y] * tmpLeft[x][y] + 1-stencil[x][y] * tmpRight[x][y]);\n result[x][y] += tmp;\n }\n }\n }\n return result;\n }", "protected void processStack ()\n\t\t{\n\t\tverbose=false;\n\t\tcanvas = img.getCanvas();\n\t\tocanvas = null;\n\n\t\tfor (int i=firstSlice; i <= lastSlice; i++)\n\t\t\t{\n\t\t\tslice=i;\n\t\t\timg.setSlice(i);\n\t\t\timg.updateImage();\n\t\t\tif (starOverlay || skyOverlay)\n\t\t\t\t{\n\t\t\t\tocanvas = OverlayCanvas.getOverlayCanvas (img);\n\t\t\t\tcanvas = ocanvas;\n\t\t\t\tocanvas.clearRois();\n\t\t\t\t}\n\t\t\timp = img.getProcessor();\n\t\t\tprocessImage();\n\t\t\tif (cancelled || IJ.escapePressed())\n\t\t\t\t{\n\t\t\t\tIJ.beep();\n\t\t\t\tshutDown();\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\tif (processingStack)\n\t\t\t{\n\t\t\tIJ.beep();\n\t\t\tshutDown();\n\t\t\treturn;\n\t\t\t}\n\t\t}", "private static void fillStacks(List<List<Integer>> stackAssignments, Solution sol) {\n for (int i = 0; i < stackAssignments.size(); i++) {\n for (int j = 0; j < stackAssignments.get(i).size(); j++) {\n sol.getFilledStacks()[i][j] = stackAssignments.get(i).get(j);\n }\n }\n }", "public static void applyPack(Integer[] pack) {\r\n Map.terrainSmooth = pack[0];\r\n Map.grassSmooth = pack[1];\r\n Map.rockSmooth = pack[2];\r\n\r\n Map.seaBias = pack[3];\r\n Map.landBias = pack[4];\r\n Map.sandBias = pack[5];\r\n Map.plainsBias = pack[6];\r\n Map.grassBias = pack[7];\r\n Map.highLandBias = pack[8];\r\n Map.shoreBias = pack[9];\r\n }", "@Test\n\tpublic void testGetNSlices() {\n\t\tip = new ImagePlus(\"Groening\", (Image)null);\n\t\tst = new ImageStack(2,3);\n\t\tst.addSlice(\"silly\",new byte[] {1,2,3,4,5,6});\n\t\tip.setStack(\"AyeCarumba\",st);\n\t\tip.setDimensions(1,1,3);\n\t\tassertEquals(1,ip.getNSlices());\n\t\tip.setDimensions(1,3,1);\n\t\tassertEquals(1,ip.getNSlices());\n\t\tip.setDimensions(3,1,1);\n\t\tassertEquals(1,ip.getNSlices());\n\n\t\t// stack matches dimensions\n\t\tip = new ImagePlus(\"Agent007\", (Image)null);\n\t\tst = new ImageStack(2,3);\n\t\tst.addSlice(\"suave\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"debonair\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"sophisticated\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"handsome\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"humorous\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"aloof\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"calm\",new byte[] {1,2,3,4,5,6});\n\t\tst.addSlice(\"composed\",new byte[] {1,2,3,4,5,6});\n\t\tip.setStack(\"MoneyPenny\", st);\n\n\t\t// one dim > 1\n\t\tip.setDimensions(1,1,8);\n\t\tassertEquals(1,ip.getNSlices());\n\t\tip.setDimensions(1,8,1);\n\t\tassertEquals(8,ip.getNSlices());\n\t\tip.setDimensions(8,1,1);\n\t\tassertEquals(1,ip.getNSlices());\n\n\t\t// two dims > 1\n\t\tip.setDimensions(1,2,4);\n\t\tassertEquals(2,ip.getNSlices());\n\t\tip.setDimensions(1,4,2);\n\t\tassertEquals(4,ip.getNSlices());\n\t\tip.setDimensions(2,1,4);\n\t\tassertEquals(1,ip.getNSlices());\n\t\tip.setDimensions(2,4,1);\n\t\tassertEquals(4,ip.getNSlices());\n\t\tip.setDimensions(4,1,2);\n\t\tassertEquals(1,ip.getNSlices());\n\t\tip.setDimensions(4,2,1);\n\t\tassertEquals(2,ip.getNSlices());\n\n\t\t// three dims > 1\n\t\tip.setDimensions(2,2,2);\n\t\tassertEquals(2,ip.getNSlices());\n\t}", "public void floodfill(int row, int collumn)\n {\n //Fill the dda with zeros\n for (int q = 0; q<10; q++)\n {\n for (int w = 0; q<10; q++ )\n {\n pixels[q][w] = 0;\n }\n }\n \n //Makes stack\n Stack<Pair> stack = new Stack<>();\n \n //Creates initial Pair\n Pair start = new Pair(row,collumn,1);\n \n pixels[row][collumn] = 1;\n \n //Sets current value at 1\n int currentValue = 2;\n \n stack.push(start);\n \n \n while (currentValue<=100){\n \n //Pops the top value off the stack\n Pair x = stack.pop();\n \n if (x.getRow()>0 && pixels[x.getRow() -1][x.getCollumn()] == 0)\n {\n stack.push(new Pair(x.getRow() -1,x.getCollumn(),currentValue));\n pixels[x.getRow() -1][x.getCollumn()] = currentValue;\n currentValue++;\n }\n \n if (x.getCollumn()<9 && pixels[x.getRow()][x.getCollumn()+1] == 0)\n {\n stack.push(new Pair(x.getRow(),x.getCollumn()+1,currentValue));\n pixels[x.getRow()][x.getCollumn()+1] = currentValue;\n currentValue++;\n }\n \n if (x.getRow()<9 && pixels[x.getRow() +1][x.getCollumn()] == 0)\n {\n stack.push(new Pair(x.getRow() +1,x.getCollumn(),currentValue));\n pixels[x.getRow() +1][x.getCollumn()] = currentValue;\n currentValue++;\n }\n \n if (x.getCollumn()>0 && pixels[x.getRow()][x.getCollumn()-1] == 0)\n {\n stack.push(new Pair(x.getRow(),x.getCollumn()-1,currentValue));\n pixels[x.getRow()][x.getCollumn()-1] = currentValue;\n currentValue++;\n }\n \n }\n \n }", "public static void fillBand(InterleavedF32 image, int band, float value) {\n//\t\tconcurrent isn't faster in benchmark results\n//\t\tif( runConcurrent(image) ) {\n//\t\t\tImplImageMiscOps_MT.fillBand(image, band, value);\n//\t\t} else {\n\t\t\tImplImageMiscOps.fillBand(image, band, value);\n//\t\t}\n\t}", "public void setStacks(GMap<Integer, Stack> stacks);", "private void _fillPattern() {\n // FIXME: We probably want a fill pattern rather than\n // just a gray scale.\n int red = _currentColor.getRed();\n int green = _currentColor.getGreen();\n int blue = _currentColor.getBlue();\n\n // Scaling constants so that fully saturated R, G, or B appear\n // different.\n double bluescale = 0.6; // darkest\n double redscale = 0.8;\n double greenscale = 1.0; // lightest\n double fullscale = Math.sqrt(255.0 * 255.0 * ((bluescale * bluescale)\n + (redscale * redscale) + (greenscale * greenscale)));\n double graylevel = Math.sqrt(((red * red * redscale * redscale)\n + (blue * blue * bluescale * bluescale) + (green * green\n * greenscale * greenscale)))\n / fullscale;\n _buffer.append(\"\" + graylevel + \" setgray\\n\");\n\n // NOTE -- for debugging, output color spec in comments\n _buffer.append(\"%---- rgb: \" + red + \" \" + green + \" \" + blue + \"\\n\");\n }", "void setResizeDimLayer(boolean visible, int targetStackId, float alpha);", "@Override\n public void computeTileStack(Map<Band, Tile> targetTileMap, Rectangle targetRectangle, ProgressMonitor pm)\n throws OperatorException {\n try {\n \n int x0 = targetRectangle.x;\n int y0 = targetRectangle.y;\n int w = targetRectangle.width;\n int h = targetRectangle.height;\n // System.out.println(\"x0 = \" + x0 + \", y0 = \" + y0 + \", w = \" + w + \", h = \" + h);\n \n ComplexFloatMatrix cplxMatrixMaster = null;\n ComplexFloatMatrix cplxMatrixSlave = null;\n RenderedImage srcImage;\n float[] dataArray;\n \n // pm.beginTask(\"Computation of interferogram\", targetProduct.getNumBands());\n \n // these are not very optimal loops: redo the looping to a single for Band loop with using HashMaps\n for (Band sourceBand : sourceProduct.getBands()) {\n \n String sourceBandUnit = sourceBand.getUnit();\n \n if (sourceBand == masterBand1) {\n } else if (sourceBand == masterBand2) {\n \n Tile masterRasterI = getSourceTile(masterBand1, targetRectangle);\n srcImage = masterRasterI.getRasterDataNode().getSourceImage();\n dataArray = srcImage.getData(targetRectangle).getSamples(x0, y0, w, h, 0, (float[]) null);\n \n FloatMatrix dataRealMatrix = new FloatMatrix(masterRasterI.getHeight(), masterRasterI.getWidth(), dataArray);\n \n Tile masterRasterQ = getSourceTile(masterBand2, targetRectangle);\n srcImage = masterRasterQ.getRasterDataNode().getSourceImage();\n dataArray = srcImage.getData(targetRectangle).getSamples(x0, y0, w, h, 0, (float[]) null);\n \n // FloatMatrix dataImagMatrix = new FloatMatrix(masterRasterQ.getWidth(), masterRasterQ.getHeight(), dataArray);\n FloatMatrix dataImagMatrix = new FloatMatrix(masterRasterQ.getHeight(), masterRasterQ.getWidth(), dataArray);\n \n cplxMatrixMaster = new ComplexFloatMatrix(dataRealMatrix, dataImagMatrix);\n \n } else if (sourceBandUnit != null && sourceBandUnit.contains(Unit.REAL)) {\n \n Tile slaveRasterI = getSourceTile(sourceBand, targetRectangle);\n srcImage = slaveRasterI.getRasterDataNode().getSourceImage();\n dataArray = srcImage.getData(targetRectangle).getSamples(x0, y0, w, h, 0, (float[]) null);\n \n // FloatMatrix dataRealMatrix = new FloatMatrix(slaveRasterI.getWidth(), slaveRasterI.getHeight(), dataArray);\n FloatMatrix dataRealMatrix = new FloatMatrix(slaveRasterI.getHeight(), slaveRasterI.getWidth(), dataArray);\n \n Tile slaveRasterQ = getSourceTile(slaveRasterMap.get(sourceBand), targetRectangle, pm);\n srcImage = slaveRasterQ.getRasterDataNode().getSourceImage();\n dataArray = srcImage.getData(targetRectangle).getSamples(x0, y0, w, h, 0, (float[]) null);\n \n FloatMatrix dataImagMatrix = new FloatMatrix(slaveRasterQ.getHeight(), slaveRasterQ.getWidth(), dataArray);\n \n cplxMatrixSlave = new ComplexFloatMatrix(dataRealMatrix, dataImagMatrix);\n \n }\n }\n \n // TODO: integrate subtraction of Reference Phase\n ComplexFloatMatrix cplxIfg = cplxMatrixMaster.muli(cplxMatrixSlave.conji());\n \n // if flat earth phase flag is on\n // ------------------------------------------------\n \n // normalize pixel :: range_axis\n DoubleMatrix rangeAxisNormalized;\n rangeAxisNormalized = DoubleMatrix.linspace(x0, x0 + w - 1, cplxIfg.columns);\n rangeAxisNormalized.subi(0.5 * (1 + sourceImageWidth));\n rangeAxisNormalized.divi(0.25 * (sourceImageWidth-1));\n \n DoubleMatrix azimuthAxisNormalized;\n azimuthAxisNormalized = DoubleMatrix.linspace(y0, y0 + h - 1, cplxIfg.rows);\n azimuthAxisNormalized.subi(0.5 * (1 + sourceImageHeight));\n azimuthAxisNormalized.divi(0.25 * (sourceImageHeight - 1));\n \n DoubleMatrix realReferencePhase = polyValOnGrid(azimuthAxisNormalized, rangeAxisNormalized,\n flatEarthPolyCoefs, degreeFromCoefficients(flatEarthPolyCoefs.length));\n \n FloatMatrix realReferencePhaseFlt = MatrixFunctions.doubleToFloat(realReferencePhase);\n ComplexFloatMatrix cplxReferencePhase = new ComplexFloatMatrix(MatrixFunctions.cos(realReferencePhaseFlt),\n MatrixFunctions.sin(realReferencePhaseFlt));\n \n // cplxIfg = cplxIfg.muli(cplxReferencePhase.transpose().conji());\n cplxIfg.muli(cplxReferencePhase.transpose().conji());\n \n for (Band targetBand : targetProduct.getBands()) {\n \n String targetBandUnit = targetBand.getUnit();\n \n final Tile targetTile = targetTileMap.get(targetBand);\n \n // all bands except for virtual ones\n if (targetBandUnit.contains(Unit.REAL)) {\n \n dataArray = cplxIfg.real().toArray();\n targetTile.setRawSamples(ProductData.createInstance(dataArray));\n \n } else if (targetBandUnit.contains(Unit.IMAGINARY)) {\n \n dataArray = cplxIfg.imag().toArray();\n targetTile.setRawSamples(ProductData.createInstance(dataArray));\n \n }\n \n }\n \n } catch (Throwable e) {\n \n OperatorUtils.catchOperatorException(getId(), e);\n \n }\n }", "public void crossDissolve(ArrayList<Bitmap> frames1, ArrayList<Bitmap> frames2) {\n int width = view1.getWidth();\n int height = view1.getHeight();\n int factor1 = 1;\n int factor2 = frameCount-factor1;\n for(int i=0; i < frames1.size();i++) {\n Bitmap view1Background = frames1.get(i);\n Bitmap view2Background = frames2.get(i);\n Bitmap blank = Bitmap.createBitmap(400, 400, Bitmap.Config.ARGB_8888);\n for(int x=0;x<width;x++) {\n for(int y=0;y<height;y++) {\n int pixel1 = view1Background.getPixel(x, y);\n int pixel2 = view2Background.getPixel(x, y);\n int red = Color.red(pixel1)*factor2/frameCount+Color.red(pixel2)*factor1/frameCount;\n int green = Color.green(pixel1)*factor2/frameCount+Color.green(pixel2)*factor1/frameCount;\n int blue = Color.blue(pixel1)*factor2/frameCount+Color.blue(pixel2)*factor1/frameCount;\n blank.setPixel(x, y, Color.rgb(red, green, blue));\n }\n }\n pictures.add(blank);\n factor1++;\n factor2 = frameCount-factor1;\n }\n }", "public int[][] interpolateImage( ) {\n\t\tlong ti = System.currentTimeMillis();\n\t\t\n\n //para inicializar a interpolacao para depois usar max e min\n int maxValue = 257, minValue = -1; \n\n //interpolation tem tamanho 4 vezes para x e y\n // tem 2 valores ( 0 -> menor e 1 -> maior )\n this.interpWidth = (imgWidth*4-3);\n this.interpHeight = (imgHeight*4-3);\n int interpolation[][] = new int[interpWidth * interpHeight][2];\n \n for(int i=0; i < interpolation.length; i++){\n \tinterpolation[i][0] = maxValue;\n \tinterpolation[i][1] = minValue;\n }\n \n //executar interpolation\n //NOTES:\n // y e x sao os verdadeiros pixels da imagem, m sao as 16 translacoes desde os pixels aos 15 outros blocos criados na interpolacao\n // para m = 0 eh uma copiar\n // para os outros eh necessario ver as relacoes de vizinhanza\n // para m = 1 ate m = 3, se calcula o maior dos vizinhos\n // para m = 4 ate m = 15, se realiza a operacao de span \n for (int m = 0; m < 16; m++) { // para todos os moves\n for (int y = 0; y < imgHeight; y++) { //para todos os pixels\n for (int x = 0; x < imgWidth; x++) { \n int px = x * 4 + moves[m][1]; // em x\n int py = y * 4 + moves[m][0]; // em y\n \n // check bounds!!\n if (py < 0 || py >= interpHeight || px < 0 || px >= interpWidth)\n continue;\n \n int pixel = px + py * interpWidth;\n if (m == 0) { //copy original values\n \tinterpolation[pixel][0] = interpolation[pixel][1] = img.getPixel(x + y * imgWidth);\n \t//interpolation[pixel][0] = img.getPixel(x + y * imgWidth);\n //interpolation[pixel][1] = img.getPixel(x + y * imgWidth);\n }\n else { // percorrer vizinhos\n for (int k = 0; k < vizinhos[m].length; k++) {\n int vx = px + vizinhos[m][k][1]; \n int vy = py + vizinhos[m][k][0]; \n \n // check bounds!!\n if (vy < 0 || vy >= interpHeight || vx < 0 || vx >= interpWidth)\n continue;\n \n int pixelV = vx + vy * interpWidth; \n \n \n // para m = 1 ate m = 3 se tem o maximo para os 2 valores\n if (m >= 1 && m <= 3) {\n if (interpolation[pixel][1] < interpolation[pixelV][1]) {\n \t//interpolation[pixel][0] = interpolation[pixelV][1];\n \tinterpolation[pixel][0] = interpolation[pixelV][0];\n interpolation[pixel][1] = interpolation[pixelV][1];\n }\n }\n else { //m = [4 .. 15], maximo e minimo \n if (interpolation[pixel][0] > interpolation[pixelV][0])\n interpolation[pixel][0] = interpolation[pixelV][0];\n \n if (interpolation[pixel][1] < interpolation[pixelV][1])\n interpolation[pixel][1] = interpolation[pixelV][1];\n }\n }\n }\n }\n }\n }\n long tf = System.currentTimeMillis();\n if(isLog)\n \tSystem.out.println(\"Tempo de execucao [interpolacao] \"+ ((tf - ti) /1000.0) + \"s\");\n return interpolation;\n\t}", "public void emboss(BufferedImage source, BufferedImage bump)\n{\n // Code adapted from Graphics Gems IV - Fast Embossing Effects on Raster Image Data (by John Schlag)\n WritableRaster srcRaster = source.getRaster();\n Raster bumpRaster = bump.getRaster();\n int w = source.getWidth();\n int h = source.getHeight();\n double pixelScale = 255.9;\n \n // Normalized light source vector\n double az = getAzimuth()*Math.PI/180;\n double alt = getAltitude()*Math.PI/180;\n int Lx = (int)(Math.cos(az) * Math.cos(alt) * pixelScale);\n int Ly = (int)(Math.sin(az) * Math.cos(alt) * pixelScale);\n int Lz = (int)(Math.sin(alt) * pixelScale);\n \n // Constant z component of surface normal\n int Nz = 3*255/Math.abs(getRadius());\n int Nz2 = Nz*Nz;\n int NzLz = Nz*Lz;\n int background = Lz;\n \n DataBuffer buf = srcRaster.getDataBuffer();\n \n // Assertion. We created the BufferedImage, so this is what we expect the data to look like.\n if(buf.getDataType() != DataBuffer.TYPE_INT || buf.getNumBanks() != 1)\n throw new RuntimeException(\"unknown data format\");\n \n int srcPixels[] = ((DataBufferInt)buf).getData();\n int bumpPixels[] = ((DataBufferInt)bumpRaster.getDataBuffer()).getData();\n int offset = 0;\n int brow = w + Math.abs(getRadius()) + Math.abs(getRadius());\n int boff = brow*Math.abs(getRadius()) + Math.abs(getRadius());\n \n // Bump map is an ARGB image - Turn it into an array of signed ints\n isolateHeightSample(bumpPixels, brow, h + Math.abs(getRadius()) + Math.abs(getRadius()));\n \n // Shade the pixels based on bump height & light source location\n for(int y=0; y<h; ++y) {\n for(int x=0; x<w; ++x) {\n \n // Normal calculation from alpha sample of bump map\n int Nx = (bumpPixels[boff-brow-1]+bumpPixels[boff-1]+bumpPixels[boff-1+brow]\n -bumpPixels[boff-brow+1]-bumpPixels[boff+1]-bumpPixels[boff+brow+1]);\n int Ny = (bumpPixels[boff+brow-1]+bumpPixels[boff+brow]+bumpPixels[boff+brow+1]\n -bumpPixels[boff-brow-1]-bumpPixels[boff-brow]-bumpPixels[boff-brow+1]);\n \n // If negative, negate everything\n if(getRadius()<0) { Nx = -Nx; Ny = -Ny; }\n \n // Declare variable for shade, initialized to background\n int shade = background;\n \n // If normal isn't normal, calculate shade \n if(Nx!=0 || Ny!=0) {\n int NdotL = Nx*Lx + Ny*Ly + NzLz;\n if(NdotL<0)\n shade = 0;\n else shade = (int)(NdotL / Math.sqrt(Nx*Nx + Ny*Ny + Nz2));\n } \n \n // scale each sample by shade\n int p = srcPixels[offset];\n \n //if(shade < Lz) { p=0xff202020; } else {p=0xff808080;}; \n //srcPixels[offset]= (0x010101*shade) | alpha;\n \n // Recalculate components\n int red = (((p&0xff0000)*shade)>>8) & 0xff0000;\n int green = (((p&0xff00)*shade)>>8) & 0xff00;\n int blue = (((p&0xff)*shade)>>8);\n int alpha = p & 0xff000000; //((p>>8)*shade) & 0xff000000;\n \n // Reconstruct pixel\n srcPixels[offset] = alpha|red|green|blue;\n \n // assumption is that rowbytes==width\n ++offset;\n ++boff;\n }\n \n boff += 2*Math.abs(getRadius());\n }\n}", "public static void fill(InterleavedI8 image, int value) {\n//\t\tconcurrent isn't faster in benchmark results\n//\t\tif( runConcurrent(image) ) {\n//\t\t\tImplImageMiscOps_MT.fill(image, value);\n//\t\t} else {\n\t\t\tImplImageMiscOps.fill(image, value);\n//\t\t}\n\t}", "public void adjustIntensity()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n\tdouble dbL = (double)(L-1);\r\n\tshort maxI;\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tmaxI = (short)Math.min(L-1, \r\n\t\t Math.round((L-1) * maxIntensity(hue[row][col]/dbL,\r\n\t\t saturation[row][col]/dbL)));\r\n\t\tintensity[row][col] =\r\n\t\t (short)Math.min(intensity[row][col], maxI);\r\n\t }\r\n\t}\r\n }", "public void interpolateMissing() {\n if (keyframes.size()==1)\n return;\n fillTrans();\n fillRots();\n fillScales();\n for (int objIndex=0;objIndex<numObjects;objIndex++)\n pivots[objIndex].applyToSpatial(toChange[objIndex]);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Interface for DIACHRON records.
public interface Record extends DiachronEntity { public String getSubject(); public void setSubject(String subject); public void addRecordAttribute(RecordAttribute recAttr); public Collection<RecordAttribute> getRecordAttributes(); }
[ "public interface BaseRecord extends Serializable {\n\t/**\n\t * @return comma separated representation\n\t */\n\tpublic String csvData();\n\n\t/**\n\t * @return description of csv fields\n\t */\n\tpublic String csvFields();\n\n\t/**\n\t * Milliseconds since 0000 UTC Jan 1st 1970 data was observation.\n\t * \n\t * @return observation time in milliseconds\n\t */\n\tpublic long getObservationTimeMilliseconds();\n\n}", "public interface Record {\r\n\r\n}", "interface RecordProxy<RECORD, ADDITIONAL>\n {\n long getKey();\n\n RECORD forChangingLinkage();\n\n RECORD forChangingData();\n\n RECORD forReadingLinkage();\n\n RECORD forReadingData();\n\n ADDITIONAL getAdditionalData();\n\n RECORD getBefore();\n\n boolean isChanged();\n\n boolean isCreated();\n }", "public interface Record {\n\n Boolean getBooleanByField(String fieldName);\n\n Integer getIntegerByField(String fieldName);\n\n Long getLongByFieldName(String fieldName);\n\n Float getFloatByFieldName(String fieldName);\n\n Double getDoubleByFieldName(String fieldName);\n\n ByteBuffer getBytesByFieldName(String fieldName);\n\n String getStringByField(String fieldName);\n\n Collection<String> getFieldNames();\n\n Iterable<Map.Entry<String, Object>> getFields();\n\n Object getField(String name);\n}", "public DataRecord() {\n super(DataTable.DATA);\n }", "public interface IRecord {\n /**\n * This method gets the date the main.record is valid for\n *\n * @return Date Returns the valid date of main.record\n */\n Date getRecordDate();\n\n /**\n * This method is used to return the employee associated with the main.record\n *\n * @return String Returns Employee name/Id\n */\n String getEmployee();\n\n /**\n * This method returns the units in the case of sales and vest records or multiplier in the case of performance records\n *\n * @return float Returns the units or multiplier associated with this action main.record\n */\n float getUnitsOrMultiplier();\n\n /**\n * This method will return the action type of the main.record\n *\n * @return RecordAction Returns the main.record action\n */\n RecordAction getAction();\n\n /**\n * This method is used to enforce our records ability to be visited by an implementatin of IRecordVisitor\n *\n * @param visitor The current tenant of our class\n */\n void accept(IRecordVisitor visitor);\n}", "public interface IModelicaRecord extends ModelicaObject,Map<String,ModelicaObject> {\n /** ctor_index is -2 for ModelicaRecord and should be set to\n * -1 for any regular record that is returned to OMC.\n * The DefinitionsCreator will create record classes that fulfill\n * this criteria.\n * For a record in a uniontype, the value is 0..n where the index\n * corresponds to the order in which the the records were declared\n * in the uniontype.\n */\n int get_ctor_index();\n}", "interface Record {\n\n /**\n * Determines if this record is implicit, i.e is not defined by a {@link RecordComponentPool}.\n *\n * @return {@code true} if this record is implicit.\n */\n boolean isImplicit();\n\n /**\n * Returns the record component that this record represents.\n *\n * @return The record component that this record represents.\n */\n RecordComponentDescription getRecordComponent();\n\n /**\n * Returns the record component attribute appender for a given record component.\n *\n * @return The record component appender to be applied on the given field.\n */\n RecordComponentAttributeAppender getRecordComponentAppender();\n\n /**\n * Writes this record to a given class visitor.\n *\n * @param classVisitor The class visitor to which this record is to be written to.\n * @param annotationValueFilterFactory The annotation value filter factory to apply when writing annotations.\n */\n void apply(ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory);\n\n /**\n * Applies this record to a record component visitor. This is not possible for implicit records.\n *\n * @param recordComponentVisitor The record component visitor onto which this record is to be applied.\n * @param annotationValueFilterFactory The annotation value filter factory to use for annotations.\n */\n void apply(RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory);\n\n /**\n * A record for a simple field without a default value where all of the record component's declared annotations are appended.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForImplicitRecordComponent implements Record {\n\n /**\n * The implemented record component.\n */\n private final RecordComponentDescription recordComponentDescription;\n\n /**\n * Creates a new record for a simple record component.\n *\n * @param recordComponentDescription The described record component.\n */\n public ForImplicitRecordComponent(RecordComponentDescription recordComponentDescription) {\n this.recordComponentDescription = recordComponentDescription;\n }\n\n /**\n * {@inheritDoc}\n */\n public boolean isImplicit() {\n return true;\n }\n\n /**\n * {@inheritDoc}\n */\n public RecordComponentDescription getRecordComponent() {\n return recordComponentDescription;\n }\n\n /**\n * {@inheritDoc}\n */\n public RecordComponentAttributeAppender getRecordComponentAppender() {\n throw new IllegalStateException(\"An implicit field record does not expose a field appender: \" + this);\n }\n\n /**\n * {@inheritDoc}\n */\n public void apply(ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory) {\n RecordComponentVisitor recordComponentVisitor = classVisitor.visitRecordComponent(recordComponentDescription.getActualName(),\n recordComponentDescription.getDescriptor(),\n recordComponentDescription.getGenericSignature());\n if (recordComponentVisitor != null) {\n RecordComponentAttributeAppender.ForInstrumentedRecordComponent.INSTANCE.apply(recordComponentVisitor,\n recordComponentDescription,\n annotationValueFilterFactory.on(recordComponentDescription));\n recordComponentVisitor.visitEnd();\n }\n }\n\n /**\n * {@inheritDoc}\n */\n public void apply(RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory) {\n throw new IllegalStateException(\"An implicit field record is not intended for partial application: \" + this);\n }\n }\n\n /**\n * A record for a rich record component with attributes.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForExplicitRecordComponent implements Record {\n\n /**\n * The attribute appender for the record component.\n */\n private final RecordComponentAttributeAppender attributeAppender;\n\n /**\n * The implemented record component.\n */\n private final RecordComponentDescription recordComponentDescription;\n\n /**\n * Creates a record for a rich record component.\n *\n * @param attributeAppender The attribute appender for the record component.\n * @param recordComponentDescription The implemented record component.\n */\n public ForExplicitRecordComponent(RecordComponentAttributeAppender attributeAppender, RecordComponentDescription recordComponentDescription) {\n this.attributeAppender = attributeAppender;\n this.recordComponentDescription = recordComponentDescription;\n }\n\n /**\n * {@inheritDoc}\n */\n public boolean isImplicit() {\n return false;\n }\n\n /**\n * {@inheritDoc}\n */\n public RecordComponentDescription getRecordComponent() {\n return recordComponentDescription;\n }\n\n /**\n * {@inheritDoc}\n */\n public RecordComponentAttributeAppender getRecordComponentAppender() {\n return attributeAppender;\n }\n\n /**\n * {@inheritDoc}\n */\n public void apply(ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory) {\n RecordComponentVisitor recordComponentVisitor = classVisitor.visitRecordComponent(recordComponentDescription.getActualName(),\n recordComponentDescription.getDescriptor(),\n recordComponentDescription.getGenericSignature());\n if (recordComponentVisitor != null) {\n attributeAppender.apply(recordComponentVisitor, recordComponentDescription, annotationValueFilterFactory.on(recordComponentDescription));\n recordComponentVisitor.visitEnd();\n }\n }\n\n /**\n * {@inheritDoc}\n */\n public void apply(RecordComponentVisitor recordComponentVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory) {\n attributeAppender.apply(recordComponentVisitor, recordComponentDescription, annotationValueFilterFactory.on(recordComponentDescription));\n }\n }\n }", "public interface IGenericMoniRecord\n extends IGenericRecord\n{\n\n /**\n * Hardware state event format id\n */\n short HARDWARE_STATE_EVENT = 200;\n\n /**\n * Supernova record format id\n */\n short SUPERNOVA_RECORD = 300;\n\n /**\n * Get the format id.\n *\n * @return format id of this record\n */\n short getFormatId();\n\n /**\n * Set the format id.\n *\n * @param formatId format id of this record\n */\n void setFormatId(short formatId);\n\n}", "public interface RecordAccess<RECORD,ADDITIONAL>\n{\n /**\n * Gets an already loaded record, or loads it as part of this call if it wasn't. The {@link RecordProxy}\n * returned has means of communicating when to get access to the actual record for reading or writing.\n * With that information any additional loading or storing can be inferred for the specific\n * use case (implementation).\n *\n * @param key the record key.\n * @param additionalData additional data to put in the record after loaded.\n * @return a {@link RecordProxy} for the record for {@code key}.\n */\n RecordProxy<RECORD, ADDITIONAL> getOrLoad( long key, ADDITIONAL additionalData );\n\n RecordProxy<RECORD, ADDITIONAL> getIfLoaded( long key );\n\n @Deprecated\n void setTo( long key, RECORD newRecord, ADDITIONAL additionalData );\n\n RecordProxy<RECORD,ADDITIONAL> setRecord( long key, RECORD record, ADDITIONAL additionalData );\n\n /**\n * Creates a new record with the given {@code key}. Any {@code additionalData} is set in the\n * record before returning.\n *\n * @param key the record key.\n * @param additionalData additional data to put in the record after loaded.\n * @return a {@link RecordProxy} for the record for {@code key}.\n */\n RecordProxy<RECORD, ADDITIONAL> create( long key, ADDITIONAL additionalData );\n\n /**\n * Closes the record access.\n */\n void close();\n\n int changeSize();\n\n Iterable <RecordProxy<RECORD,ADDITIONAL>> changes();\n\n /**\n * A proxy for a record that encapsulates load/store actions to take, knowing when the underlying record is\n * requested for reading or for writing.\n */\n interface RecordProxy<RECORD, ADDITIONAL>\n {\n long getKey();\n\n RECORD forChangingLinkage();\n\n RECORD forChangingData();\n\n RECORD forReadingLinkage();\n\n RECORD forReadingData();\n\n ADDITIONAL getAdditionalData();\n\n RECORD getBefore();\n\n boolean isChanged();\n\n boolean isCreated();\n }\n\n /**\n * Hook for loading and creating records.\n */\n interface Loader<RECORD,ADDITIONAL>\n {\n RECORD newUnused( long key, ADDITIONAL additionalData );\n\n RECORD load( long key, ADDITIONAL additionalData );\n\n void ensureHeavy( RECORD record );\n\n RECORD clone( RECORD record );\n }\n}", "public abstract T createRecord();", "java.lang.String getRecord();", "public interface CSVDataRow\n{\n String toLine();\n}", "public interface IRecordsetProvider\r\n{\r\n\r\n public Recordset getRecordset(Recordset inputParams) throws Throwable;\r\n \r\n}", "public FuncionarioRecord() {\n super(Funcionario.FUNCIONARIO);\n }", "public interface CollectionRecord {\n\n\t/**\n\t * Gets the id attribute of the CollectionRecord object\n\t *\n\t * @return The id value\n\t */\n\tpublic String getId();\n\n\n\t/**\n\t * Gets the setSpec attribute of the CollectionRecord object\n\t *\n\t * @return The setSpec value\n\t */\n\tpublic String getSetSpec();\n\n\n\t/**\n\t * Gets the metadataHandle attribute of the CollectionRecord object\n\t *\n\t * @param collectionSetSpec setSpec (e.g., \"dcc\")\n\t * @return The metadataHandle value\n\t * @exception Exception if there is a webservice error\n\t */\n\tpublic String getMetadataHandle(String collectionSetSpec) throws Exception;\n\n\n\t/**\n\t * Gets the handleServiceBaseUrl attribute of the CollectionRecord object\n\t *\n\t * @return The handleServiceBaseUrl value\n\t */\n\tpublic String getHandleServiceBaseUrl();\n\n\t/* \tpublic String getNativeFormat();\n\tpublic DcsDataRecord getDcsDataRecord();\n\tpublic MetaDataFramework getMetaDataFramework();\n\tpublic Document getLocalizedDocument(); */\n}", "public BitacoraCajaRecord() {\n super(BitacoraCaja.BITACORA_CAJA);\n }", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public interface AssignmentEventAuditDOI {\n\n ////////////////////////// data member UTCTime\n\n /**\n * Get UTCTime of the AssignmentEventAudits\n *\n * @return UTCTime of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getUTCTime () \n throws DataObjectException;\n \n\n /**\n * Set UTCTime of the AssignmentEventAudits\n *\n * @param UTCTime of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setUTCTime ( String UTCTime )\n throws DataObjectException;\n\n ////////////////////////// data member TheType\n\n /**\n * Get TheType of the AssignmentEventAudits\n *\n * @return TheType of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public org.enhydra.shark.eventaudit.data.EventTypeDO getTheType () \n throws DataObjectException;\n \n\n /**\n * Set TheType of the AssignmentEventAudits\n *\n * @param TheType of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setTheType ( org.enhydra.shark.eventaudit.data.EventTypeDO TheType )\n throws DataObjectException;\n\n ////////////////////////// data member ActivityId\n\n /**\n * Get ActivityId of the AssignmentEventAudits\n *\n * @return ActivityId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getActivityId () \n throws DataObjectException;\n \n\n /**\n * Set ActivityId of the AssignmentEventAudits\n *\n * @param ActivityId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setActivityId ( String ActivityId )\n throws DataObjectException;\n\n ////////////////////////// data member ActivityName\n\n /**\n * Get ActivityName of the AssignmentEventAudits\n *\n * @return ActivityName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getActivityName () \n throws DataObjectException;\n \n\n /**\n * Set ActivityName of the AssignmentEventAudits\n *\n * @param ActivityName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setActivityName ( String ActivityName )\n throws DataObjectException;\n\n ////////////////////////// data member ProcessId\n\n /**\n * Get ProcessId of the AssignmentEventAudits\n *\n * @return ProcessId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getProcessId () \n throws DataObjectException;\n \n\n /**\n * Set ProcessId of the AssignmentEventAudits\n *\n * @param ProcessId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setProcessId ( String ProcessId )\n throws DataObjectException;\n\n ////////////////////////// data member ProcessName\n\n /**\n * Get ProcessName of the AssignmentEventAudits\n *\n * @return ProcessName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getProcessName () \n throws DataObjectException;\n \n\n /**\n * Set ProcessName of the AssignmentEventAudits\n *\n * @param ProcessName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setProcessName ( String ProcessName )\n throws DataObjectException;\n\n ////////////////////////// data member ProcessDefinitionName\n\n /**\n * Get ProcessDefinitionName of the AssignmentEventAudits\n *\n * @return ProcessDefinitionName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getProcessDefinitionName () \n throws DataObjectException;\n \n\n /**\n * Set ProcessDefinitionName of the AssignmentEventAudits\n *\n * @param ProcessDefinitionName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setProcessDefinitionName ( String ProcessDefinitionName )\n throws DataObjectException;\n\n ////////////////////////// data member ProcessDefinitionVersion\n\n /**\n * Get ProcessDefinitionVersion of the AssignmentEventAudits\n *\n * @return ProcessDefinitionVersion of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getProcessDefinitionVersion () \n throws DataObjectException;\n \n\n /**\n * Set ProcessDefinitionVersion of the AssignmentEventAudits\n *\n * @param ProcessDefinitionVersion of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setProcessDefinitionVersion ( String ProcessDefinitionVersion )\n throws DataObjectException;\n\n ////////////////////////// data member ActivityDefinitionId\n\n /**\n * Get ActivityDefinitionId of the AssignmentEventAudits\n *\n * @return ActivityDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getActivityDefinitionId () \n throws DataObjectException;\n \n\n /**\n * Set ActivityDefinitionId of the AssignmentEventAudits\n *\n * @param ActivityDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setActivityDefinitionId ( String ActivityDefinitionId )\n throws DataObjectException;\n\n ////////////////////////// data member ActivitySetDefinitionId\n\n /**\n * Get ActivitySetDefinitionId of the AssignmentEventAudits\n *\n * @return ActivitySetDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getActivitySetDefinitionId () \n throws DataObjectException;\n \n\n /**\n * Set ActivitySetDefinitionId of the AssignmentEventAudits\n *\n * @param ActivitySetDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setActivitySetDefinitionId ( String ActivitySetDefinitionId )\n throws DataObjectException;\n\n ////////////////////////// data member ProcessDefinitionId\n\n /**\n * Get ProcessDefinitionId of the AssignmentEventAudits\n *\n * @return ProcessDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getProcessDefinitionId () \n throws DataObjectException;\n \n\n /**\n * Set ProcessDefinitionId of the AssignmentEventAudits\n *\n * @param ProcessDefinitionId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setProcessDefinitionId ( String ProcessDefinitionId )\n throws DataObjectException;\n\n ////////////////////////// data member PackageId\n\n /**\n * Get PackageId of the AssignmentEventAudits\n *\n * @return PackageId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getPackageId () \n throws DataObjectException;\n \n\n /**\n * Set PackageId of the AssignmentEventAudits\n *\n * @param PackageId of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setPackageId ( String PackageId )\n throws DataObjectException;\n\n ////////////////////////// data member OldResourceUsername\n\n /**\n * Get OldResourceUsername of the AssignmentEventAudits\n *\n * @return OldResourceUsername of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getOldResourceUsername () \n throws DataObjectException;\n \n\n /**\n * Set OldResourceUsername of the AssignmentEventAudits\n *\n * @param OldResourceUsername of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setOldResourceUsername ( String OldResourceUsername )\n throws DataObjectException;\n\n ////////////////////////// data member OldResourceName\n\n /**\n * Get OldResourceName of the AssignmentEventAudits\n *\n * @return OldResourceName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getOldResourceName () \n throws DataObjectException;\n \n\n /**\n * Set OldResourceName of the AssignmentEventAudits\n *\n * @param OldResourceName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setOldResourceName ( String OldResourceName )\n throws DataObjectException;\n\n ////////////////////////// data member NewResourceUsername\n\n /**\n * Get NewResourceUsername of the AssignmentEventAudits\n *\n * @return NewResourceUsername of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getNewResourceUsername () \n throws DataObjectException;\n \n\n /**\n * Set NewResourceUsername of the AssignmentEventAudits\n *\n * @param NewResourceUsername of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setNewResourceUsername ( String NewResourceUsername )\n throws DataObjectException;\n\n ////////////////////////// data member NewResourceName\n\n /**\n * Get NewResourceName of the AssignmentEventAudits\n *\n * @return NewResourceName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public String getNewResourceName () \n throws DataObjectException;\n \n\n /**\n * Set NewResourceName of the AssignmentEventAudits\n *\n * @param NewResourceName of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setNewResourceName ( String NewResourceName )\n throws DataObjectException;\n\n ////////////////////////// data member IsAccepted\n\n /**\n * Get IsAccepted of the AssignmentEventAudits\n *\n * @return IsAccepted of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public boolean getIsAccepted () \n throws DataObjectException;\n \n\n /**\n * Set IsAccepted of the AssignmentEventAudits\n *\n * @param IsAccepted of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setIsAccepted ( boolean IsAccepted )\n throws DataObjectException;\n\n ////////////////////////// data member CNT\n\n /**\n * Get CNT of the AssignmentEventAudits\n *\n * @return CNT of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public java.math.BigDecimal getCNT () \n throws DataObjectException;\n \n\n /**\n * Set CNT of the AssignmentEventAudits\n *\n * @param CNT of the AssignmentEventAudits\n *\n * @exception DataObjectException\n * If the object is not found in the database.\n */\n public void setCNT ( java.math.BigDecimal CNT )\n throws DataObjectException;\n\n /**\n * Inserts/Updates the DO into its table.\n *\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception DataObjectException\n * @exception RefAssertionException thrown by okTo method.\n * @exception DBRowUpdateException\n * @exception QueryException\n */\n public void save() \n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n \n /**\n * Inserts/Updates the DO into its table.\n * The transaction is likely provided by the save() method of another DO\n * which references this DO.\n * \n * @param dbt The transaction object to use for this operation.\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception com.lutris.appserver.server.sql.DBRowUpdateException if a version error occurs.\n * @exception RefAssertionException thrown by okTo method.\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception DataObjectException\n * @exception QueryException\n */\n public void save(DBTransaction dbt)\n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n \n /**\n * Inserts/Updates the DO into its table.\n *\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception RefAssertionException thrown by okTo method.\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception DataObjectException\n * @exception DBRowUpdateException \n * @exception QueryException \n * @deprecated Use save() instead.\n */\n public void commit() \n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n \n /**\n * Inserts/Updates the DO into its table.\n * The transaction is likely provided by the commit() method of another DO\n * which references this DO.\n * \n * @param dbt The transaction object to use for this operation.\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception com.lutris.appserver.server.sql.DBRowUpdateException if a version error occurs.\n * @exception RefAssertionException thrown by okTo method.\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception DataObjectException\n * @exception QueryException \n * @deprecated Use save() instead.\n */\n public void commit(DBTransaction dbt)\n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n \n /**\n * Deletes the DO from its table.\n *\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception RefAssertionException thrown by okTo method.\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception DataObjectException\n * @exception DBRowUpdateException \n * @exception QueryException \n */\n public void delete() \n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n \n /**\n * Deletes the DO from its table.\n * The transaction is likely provided by the delete() method of another DO\n * which references this DO.\n *\n * @param dbt The transaction object to use for this operation.\n * @exception com.lutris.appserver.server.sql.DatabaseManagerException if a Transaction can not be created.\n * @exception com.lutris.appserver.server.sql.DBRowUpdateException if a version error occurs.\n * @exception RefAssertionException thrown by okTo method.\n * @exception java.sql.SQLException if any SQL errors occur.\n * @exception DataObjectException \n * @exception QueryException\n */\n public void delete(DBTransaction dbt)\n throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException;\n\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Build an Id from an instance id.
public static Id.Builder id(final String instanceId) { return Id.newBuilder().setId(instanceId); }
[ "public TFSABuilder createId(int id);", "Builder id(OpenstackVtapId id);", "private static UUID form(long id) {\n\t\treturn UUID.fromString(Long.toString(id));\n\t}", "OpenstackVtapId id();", "protected String generateInstanceID() {\n \t\tString orgID = \"opennaas.org\";\n \t\t// String localID = this.getClass().getName() + \"/\" + getElementName();\n \t\tString localID = this.getClass().getName() + \"/\" + this.toString();\n \n \t\treturn orgID + \":\" + localID;\n \t}", "String createIdStringPart();", "Id createId();", "private ID generateNewId() {\n return new ID(this.id++);\n }", "public static int makeID(String id) {\r\n if (id.length() != 4) {\r\n throw new IllegalArgumentException(\"String must be exactly 4 characters long\");\r\n }\r\n\r\n byte[] bytes = id.getBytes();\r\n return (bytes[3] << 24) | (bytes[2] << 16) | (bytes[1] << 8) | bytes[0];\r\n }", "public ID(String id) {\n this.type = id.charAt(0);\n this.UID = id;\n }", "public String createId(Object cell) {\n String id = String.valueOf(nextId);\n nextId++;\n\n return id;\n }", "private static synchronized String createID() {\n\t\treturn Integer.toString(idInt++);\n\t}", "public static String buildId(String authService, String userId) {\n return authService + ID_SEPARATOR + userId;\n }", "Instance getInstance(String id);", "public static String generateInstanceId() {\n\t\t// TODO Use a complex hashing algorithm and generate 16-character\n\t\t// string;\n\n\t\treturn Calendar.getInstance().getTime().toString().replaceAll(\" \", \"\");\n\t}", "com.grpc.store.UUIDOrBuilder getIdOrBuilder();", "public gr.grnet.aquarium.message.avro.gen.ResourceInstanceChargingStateMsg.Builder setInstanceID(java.lang.String value) {\n validate(fields()[2], value);\n this.instanceID = value;\n fieldSetFlags()[2] = true;\n return this; \n }", "public abstract ID formatId(String id) throws ControllerException;", "private static String createUniqueID(final VariantContext vc) {\n return String.format(\"%d_%s_%s\", vc.getStart(), vc.getReference().getDisplayString(), vc.getAlternateAllele(0).getDisplayString());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Send the record collection to the sLS(es) services. The registration client dispatcher is used to determine per URN which sLS to be sent to. URNMask is used to mask certain URNS from being saved. This method wont try to delete the existing records before inserting new ones.
public void sendTosLSNoDelete(SLSRegistrationClientDispatcher registrationClientDispatcher, URNMask urnMask) throws LSClientException, ParserException, Exception { sendTosLS(registrationClientDispatcher, null, urnMask); }
[ "public void sendTosLS(SLSRegistrationClientDispatcher registrationClientDispatcher, SLSClientDispatcher clientDispatcher, URNMask urnMask) throws LSClientException, ParserException, Exception {\n logger.info(\"event=RecordsCollection.sendTosLS.start guid=\" + this.logGUID);\n // Will be handy to do the rollbacks\n Map<String, NetworkObject> registeredRecords = new HashMap<String, NetworkObject>();\n\n Collection<NetworkObject> records = new ArrayList<NetworkObject>();\n // Probably there is a better way than this\n for (NetworkObject record : getNodes().values()) {\n records.add(record);\n }\n for (NetworkObject record : getLinks().values()) {\n records.add(record);\n }\n for (NetworkObject record : getLinkGroups().values()) {\n records.add(record);\n }\n for (NetworkObject record : getPorts().values()) {\n records.add(record);\n }\n for (NetworkObject record : getPortGroups().values()) {\n records.add(record);\n }\n for (NetworkObject record : getBidirectionalPorts().values()) {\n records.add(record);\n }\n for (NetworkObject record : getBidirectionalLinks().values()) {\n records.add(record);\n }\n for (NetworkObject record : getTopologies().values()) {\n records.add(record);\n }\n for (NetworkObject record : getNSAs().values()) {\n records.add(record);\n }\n for (NetworkObject record : getNSIServices().values()) {\n records.add(record);\n }\n for (NetworkObject record : getSwitchingServices().values()) {\n records.add(record);\n }\n for (NetworkObject record : getAdaptationServices().values()) {\n records.add(record);\n }\n for (NetworkObject record : getDeadaptationServices().values()) {\n records.add(record);\n }\n\n for (NetworkObject record : records) {\n if (urnMask.sendToSLS(record.getId()) == false) {\n continue;\n }\n logger.info(\"event=RecordsCollection.sendTosLS.register.start id=\" + record.getId() + \" guid=\" + this.logGUID);\n boolean isReferenceRecord = false;\n\n if (clientDispatcher != null) {\n logger.trace(\"event=RecordsCollection.sendTosLS.register.checkExists.start id=\" + record.getId() + \" guid=\" + this.logGUID);\n SimpleLS client = clientDispatcher.getClient(record.getId());\n String encodedURN = record.getId();\n try {\n encodedURN = URLEncoder.encode(encodedURN, \"utf8\");\n } catch (UnsupportedEncodingException e) {\n }\n client.setRelativeUrl(\"lookup/records?ts-id=\" + encodedURN);\n client.connect();\n client.send();\n String resp = client.getResponse();\n List<Record> returnedRecords = TSRecordFactory.toRecords(resp, getLogGUID());\n\n\n for (Record record1 : returnedRecords) {\n logger.trace(\"event=RecordsCollection.sendTosLS.register.checkExists.delete.start relativeURL=\" + record1.getURI() + \" id=\" + record.getId() + \" guid=\" + this.logGUID);\n if (record1.getMap().keySet().size() > record.getMap().keySet().size()) {\n getLogger().info(\"don't delete old record\");\n isReferenceRecord = true;\n break;\n }\n SimpleLS deleteClient = clientDispatcher.getClient(record.getId());\n deleteClient.setConnectionType(\"DELETE\");\n deleteClient.setRelativeUrl(record1.getURI());\n deleteClient.send();\n logger.trace(\"event=RecordsCollection.sendTosLS.register.checkExists.delete.end status=0 relativeURL=\" + record1.getURI() + \" id=\" + record.getId() + \" guid=\" + this.logGUID);\n }\n\n logger.trace(\"event=RecordsCollection.sendTosLS.register.checkExists.end status=0 id=\" + record.getId() + \" guid=\" + this.logGUID);\n }\n\n if (isReferenceRecord == true) {\n continue;\n }\n RegistrationClient registrationClient;\n try {\n registrationClient = registrationClientDispatcher.getRegistrationClient(record.getId());\n } catch (Exception e) {\n throw new LSClientException(\"Couldn't load sls client config: \" + e.getMessage());\n }\n registrationClient.setRecord(record);\n registrationClient.register();\n registeredRecords.put(registrationClient.getRelativeUrl(), record);\n logger.info(\"event=RecordsCollection.sendTosLS.register.end id=\" + record.getId() + \" relativeURL=\" + registrationClient.getRelativeUrl() + \" status=0 guid=\" + this.logGUID);\n }\n\n logger.info(\"event=RecordsCollection.sendTosLS.end status=0 guid=\" + this.logGUID);\n }", "private void sendSDispenserTicketsToCRM(){\n\n\t\tList<GPDispenserKeyTicketModel> ticketModelList = gpTicketService.getDispenserTicketsByCaseReplicationStatus( GPNetsuiteOrderExportStatus.NOTEXPORTED);\n\n\t\tif(CollectionUtils.isNotEmpty(ticketModelList)) {\n\n\t\t\tLOG.info(\"Total number of records matched for ticket replication: \"+ticketModelList.size());\n\n\t\t\tticketModelList.forEach(gpDispenserKeyTicketModel -> {\n\n\t\t\t\ttry {\n\n\t\t\t\t\treplicateTicket(gpDispenserKeyTicketModel);\n\n\t\t\t\t}catch (Exception e){\n\n\t\t\t\t\tLOG.error(\"Could not replicate GPDispenserKeyTicket \"+gpDispenserKeyTicketModel.getTicketID(), e);\n\t\t\t\t}\n\t\t\t});\n\n\t\t} else {\n\n\t\t\tLOG.info(\"No tickets found for replication.\");\n\t\t}\n\t}", "public static void sendRecords(TemplateRecord tr, List<DataRecord> recordsList,\n long oid, IpAddress collector, int port) {\n\n MessageHeader mh = new MessageHeader();\n mh.setVersionNumber(IPFIX_VERSION);\n mh.setObservationDomainID(oid);\n seqNumber++;\n mh.setSequenceNumber(seqNumber);\n mh.setExportTime(new Date());\n\n // Set header for the template\n SetHeader shTemplate = new SetHeader();\n shTemplate.setSetID(TEMPLATE_SETID);\n\n // Add template record\n List<TemplateRecord> trTemp = shTemplate.getTemplateRecords();\n trTemp.add(tr);\n shTemplate.setTemplateRecords(trTemp);\n\n // Set header for the Data Records\n SetHeader shData = new SetHeader();\n shData.setSetID(tr.getTemplateID());\n\n // Add Data records from the recordsList\n List<DataRecord> drTemp = shData.getDataRecords();\n for (DataRecord tempRecord : recordsList) {\n drTemp.add(tempRecord);\n\n /* try{\n String tempStr = bytesToHex(tempRecord.getBytes());\n log.info(\"Send records : \"+tempStr);\n } catch(Exception e){}*/\n\n\n }\n shData.setDataRecords(drTemp);\n\n // Make Set Headers from Template and Data\n List<SetHeader> shTemp = mh.getSetHeaders();\n shTemp.add(shTemplate);\n shTemp.add(shData);\n mh.setSetHeaders(shTemp);\n\n\n // socket handling and IPFIX UDP packet sending\n InetAddress collectorAddress = null;\n try {\n collectorAddress = InetAddress.getByAddress(collector.toOctets());\n } catch (UnknownHostException e) {\n log.warn(\"IPFIX Collector IP address format problem: \" + e.getMessage());\n return;\n }\n DatagramSocket dSocket = null;\n DatagramPacket dPacket = null;\n try {\n log.info(\"Sending IPFIX to coordinator\");\n dSocket = new DatagramSocket();\n } catch (SocketException e) {\n log.warn(\"IPFIX datagram socket problem: \" + e.getMessage());\n return;\n }\n try {\n dPacket = new DatagramPacket(mh.getBytes(), mh.getBytes().length, collectorAddress, port);\n } catch (HeaderException e) {\n log.warn(\"IPFIX datagram packet problem: \" + e.getMessage());\n dSocket.close();\n return;\n }\n try {\n dSocket.send(dPacket);\n } catch (IOException e) {\n log.warn(\"IPFIX packet send IO exception: \" + e.getMessage());\n dSocket.close();\n return;\n }\n dSocket.close();\n }", "private void serialisePatientsToEDCollection(ArrayList<Patient> patients) throws StoreException{\n //fetch all patients on the system from the model\n \n getNewEntityDescriptor().getPatients().getData().clear();\n Iterator<Patient> patientsIterator = patients.iterator();\n while(patientsIterator.hasNext()){ \n getNewEntityDescriptor().setPatient(new EntityDescriptor().getPatient());\n Patient patient = patientsIterator.next();\n RenderedPatient p = renderPatient(patient);\n getNewEntityDescriptor().getPatient().setData(p);\n getNewEntityDescriptor().getPatients().getData().add(getNewEntityDescriptor().getPatient());\n }\n }", "public void addRecipient(){\n //mRATable.insert();\n }", "public abstract void registerRuleSet(String bindUri, String ruleSetName) throws RemoteException, RuleException;", "@Override\n\tprotected void save() throws Exception {\n\t\tString sql = StringUtil.join(DBUtil.UPDATE_CLAUSE, schema, \"wsla_ticket set originator_user_id=? where ticket_id=?\");\n\t\tlog.debug(sql);\n\n\t\ttry (PreparedStatement ps = dbConn.prepareStatement(sql)) {\n\t\t\tfor (SOXDDFileVO vo : data) {\n\t\t\t\tif (!isImportable(vo.getSoNumber())) continue;\n\t\t\t\tps.setString(1, userMap.getOrDefault(vo.getSwUserId(), SOHeader.LEGACY_USER_ID));\n\t\t\t\tps.setString(2, vo.getSoNumber());\n\t\t\t\tps.addBatch();\n\t\t\t}\n\t\t\tint[] cnt = ps.executeBatch();\n\t\t\tlog.info(String.format(\"updated %d ticket originators based on %d XDD entries\", cnt.length, data.size()));\n\n\t\t} catch (SQLException sqle) {\n\t\t\tlog.error(\"could not update ticket originators\", sqle);\n\t\t}\n\t}", "public List<TwilioSmsDto> saveAll(List<TwilioSmsDto> twilioSmsToSave);", "public void ajoutersmsentrant()\r\n\t\t{\r\n\t\t\tSMS se=new SMS();\r\n\t\t\tse.Saisir(this);\r\n\t\t\tse.setstatus(\"RECU\");\r\n\t\t\tthis.SMSE.add(se);\r\n\t\t}", "@Override\n public RegistryResponse documentRepositoryProvideAndRegisterDocumentSet(SubmitObjectsRequest body) {\n MessageContext messageContext = wsc.getMessageContext();\n Map<?, ?> dataHandlers = (Map<?, ?>) messageContext.get(MessageContext.INBOUND_MESSAGE_ATTACHMENTS);\n \n ProvideAndRegisterDocumentSetRequestType request = new ProvideAndRegisterDocumentSetRequestType();\n request.setSubmitObjectsRequest(body);\n for (Map.Entry<?, ?> entry : dataHandlers.entrySet()) {\n Document doc = new Document();\n doc.setId((String) entry.getKey());\n doc.setValue((DataHandler) entry.getValue());\n request.getDocument().add(doc);\n }\n \n Exchange result = process(request);\n Exception exception = Exchanges.extractException(result);\n if (exception != null) {\n log.debug(\"ITI-15 service failed\", exception);\n Response errorResponse = new Response(exception, ErrorCode.REPOSITORY_METADATA_ERROR, ErrorCode.REPOSITORY_ERROR, null);\n return EbXML21Converters.convert(errorResponse);\n }\n \n return Exchanges.resultMessage(result).getBody(RegistryResponse.class); \n }", "public String saveSiteRegistration() throws Exception {\n\t\tlogger.debug(\"Entering RecordValidationAction.saveSiteRegistration()\");\n\t\tvalidateSession();\n\t\t//Defect #225 : Check for buffer overflow validation\n\t\tif( checkForBufferOverFlow( actionForm ) ){\n\t\t\treturn \"except\";\n\t\t}\n\t\tgetRequest().getSession().removeAttribute(\"eqrFlag\");\n\t\tactionForm.setSaveSiteReg(true);\n\t\tlong c1 = Calendar.getInstance().getTimeInMillis();\n\t\tString cause = \"\";\n\t\tactionForm.setMessage(\"\");\n\t\tactionForm.setActveSRColumnOnly(true);\n\t\tactionForm.setBannerSrLabel(GRTConstants.TRUE);\n\t\t// User comes from Home screen->EQR only\n\t\tactionForm.setEqrFileDownloaded(false);\n\t\tactionForm.setEqrFileTemplateDownloaded(false);\n\t\tactionForm.getManuallyAddedMaterialEntryList().clear();\n\t\t\n\t\tlogger.debug(\"................ Starting for recordValidationProcess records fetching ................\");\n\t\tString soldToId = null;\n\t\ttry {\n\t\t\tList<TechnicalOrderDetail> technicalOrderDetailList = null;\n\t\t\tif (actionForm.getSoldToId() != null) {\n\t\t\t\tsoldToId = actionForm.getSoldToId();\n\t\t\t} else if (getRequest().getParameter(\"soldToId\") != null) {\n\t\t\t\tsoldToId = getRequest().getParameter(\"soldToId\");\n\t\t\t}\n\n\t\t\tif (soldToId != null) {\n\t\t\t\t// Fetching equipments from siebel and validating material codes existence against Material Exclusion table\n\t\t\t\ttry{\n\t\t\t\t\ttechnicalOrderDetailList = prepareTechnicalOrderMaterialExclusion(soldToId, true);\n\t\t\t\t}catch(DataAccessException dataExcep){\n\t\t\t\t\tcause = \"DataAccessException\";\n\t\t\t\t}\n\t\t\t\tlogger.debug(\"equipmentRemovalProcess MaterialList after MaterialExclusion: size: \" + technicalOrderDetailList.size());\n\t\t\t\tactionForm.setMaterialsAfterExclusionList(technicalOrderDetailList);\n\t\t\t\tlogger.debug(\"SaveSite Flag: \"+actionForm.getSaveSiteReg());\n\t\t\t\tif(actionForm.getSaveSiteReg()){\n\t\t\t\t\t// Club equipmennts based on MC + Summary EQN and maitain TRed/Serial Numbered records seperately\n\t\t\t\t\ttechnicalOrderDetailList = constructTechnicalOrderDetailList(technicalOrderDetailList, 0);\n\t\t\t\t\tlogger.debug(\"Club equipmennts based on MC + Summary EQN and maitain TRed/Serial Numbered records seperately:\"+technicalOrderDetailList.size());\n\t\t\t\t\t// Filter pipeline records\n\t\t\t\t\ttechnicalOrderDetailList = getInstallBaseService().filterTechnicalOrderOnPipeline(technicalOrderDetailList, soldToId, \"DISP\");\n\t\t\t\t\t\n\t\t\t\t\tlogger.debug(\"Filtered pipeline records:\"+technicalOrderDetailList.size());\n\t\t\t\t\t// Club equipmennts based on MC and maitain TRed/Serial Numbered records seperately\n\t\t\t\t\ttechnicalOrderDetailList = constructTechnicalOrderDetailList(technicalOrderDetailList, 1);\n\t\t\t\t\tlogger.debug(\"Club equipmennts based on MC and maitain TRed/Serial Numbered records seperately:\"+technicalOrderDetailList.size());\n\t\t\t\t\tactionForm.setBannerStatus(GRTConstants.STATUS_NOT_INITIATED);\n\t\t\t\t\tactionForm.setBannerSubStatus(\"\");\n\t\t\t\t\tactionForm.setBannerSrNumber(\"\");\n\t\t\t\t\tactionForm.setBannerActiveContractSrNumber(\"\");\n\t\t\t\t\tlogger.debug(\"Size 1.5 in IBRecordsCommonAction \"+technicalOrderDetailList.size());\n\t\t\t\t} else {\n\t\t\t\t\t// Fetching the saved EQR records from technical order\n\t\t\t\t\ttechnicalOrderDetailList = getInstallBaseService().getTechnicalOrderByType(actionForm.getRegistrationId(), GRTConstants.TECH_ORDER_TYPE_FV);\n\t\t\t\t\tRegistrationSummary summary = getInstallBaseService().getRegistrationSummary(actionForm.getRegistrationId());\n\t\t\t\t\tactionForm.setBannerStatus(summary.getFinalValidationStatus());\n\t\t\t\t\tactionForm.setBannerSubStatus(summary.getFinalValidationSubStatus());\n\t\t\t\t\tactionForm.setBannerSrNumber(summary.getFinalValidationSrNo());\n\t\t\t\t\tactionForm.setBannerActiveContractSrNumber(StringUtils.isNotEmpty(summary.getActiveSR())?summary.getActiveSR():GRTConstants.NA);\n\t\t\t\t\tactionForm.setCompany(summary.getRequestingCompany());\n\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT1);\n\t\t\t\t\tif(summary.getEqrSubmittedDate() != null){\n\t\t\t\t\t\tactionForm.setBannerSubmittedDate(sdf.format(summary.getEqrSubmittedDate()));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactionForm.setBannerSubmittedDate(\"\");\n\t\t\t\t\t}\n\t\t\t\t\tif(summary.getEqrCompletedDate() != null){\n\t\t\t\t\t\tactionForm.setBannerCompletedDate(sdf.format(summary.getEqrCompletedDate()));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tactionForm.setBannerCompletedDate(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Set all the Technical Order records as readonly based on form:readonly\n\t\t\t\tfor(TechnicalOrderDetail techDto : technicalOrderDetailList){\n\t\t\t\t\tif(actionForm.isReadOnly()){\n\t\t\t\t\t\ttechDto.setExclusionFlag(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Fetch pipeline IB and EQR records\n\t\t\t\tList<PipelineSapTransactions> pipelineList = getEqrService().getConsolidatedPipelineRecords(soldToId);\n\t\t\t\tif(pipelineList != null && pipelineList.size() > 0){\n\t\t\t\t\tlogger.debug(\"Consolidated pipeline List size:\"+pipelineList.size());\n\t\t\t\t\tfor(TechnicalOrderDetail techDto : technicalOrderDetailList){\n\t\t\t\t\t\tfor(PipelineSapTransactions pipelineDto : pipelineList){\n\t\t\t\t\t\t\tif(techDto.getMaterialCode().equalsIgnoreCase(pipelineDto.getMaterialCode())){\n\t\t\t\t\t\t\t\tif(pipelineDto.getAction().equalsIgnoreCase(GRTConstants.TECH_ORDER_TYPE_FV)){\n\t\t\t\t\t\t\t\t\ttechDto.setPipelineEQRQuantity(pipelineDto.getQuantity());\n\t\t\t\t\t\t\t\t} else if(pipelineDto.getAction().equalsIgnoreCase(GRTConstants.TECH_ORDER_TYPE_IB)){\n\t\t\t\t\t\t\t\t\ttechDto.setPipelineIBQuantity(pipelineDto.getQuantity());\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}\n\t\t\t\t} else {\n\t\t\t\t\tlogger.debug(\"Consolidated pipeline List size:0\");\n\t\t\t\t}\n\t\t\t\tCSSPortalUser cssPortalUser = getUserFromSession();\n\t\t\t\tString userType = cssPortalUser.getUserType();\n\t\t\t\tif(!StringUtils.isEmpty(userType)){\n\t\t\t\t\tif (!userType.equals(\"B\") && !userType.equals(\"C\")){\n\t\t\t\t\t\tgetRequest().getSession().setAttribute(GRTConstants.IS_AVAYA_ASSOCIATE, GRTConstants.TRUE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetRequest().getSession().setAttribute(GRTConstants.IS_AVAYA_ASSOCIATE, GRTConstants.FALSE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tRegistrationSummary summary = getInstallBaseService().getRegistrationSummary(actionForm.getRegistrationId());\n\t\t\t\tif (summary.getFinalValidationStatusId() !=null\n\t\t\t\t\t\t&& !summary.getFinalValidationStatusId().equalsIgnoreCase(GRTConstants.AWAITNG_INFORMATION)) {\n\t\t\t\t\tfor (TechnicalOrderDetail detail : technicalOrderDetailList) {\n\t\t\t\t\t\tif(StringUtils.isEmpty(detail.getExclusionSource())){\n\t\t\t\t\t\t\tdetail.setErrorDescription(\"\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tlogger.debug(\"recordValidationProcess MaterialList after exclusion: size: \" + technicalOrderDetailList.size());\n\t\t\t\t\tGenericSort gs = new GenericSort(\"productLine\", true);\n\t\t\t\t\tCollections.sort(technicalOrderDetailList, gs);\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\tlogger.error(\"Exception in View Install Base while sorting data : \"+e.getMessage());\n\n\t\t\t\t}\n\t\t\t\tfor(TechnicalOrderDetail tod : technicalOrderDetailList) {\n\t\t\t\t\tif(null == tod.getOriginalSerialNumber() && null != tod.getSerialNumber()) {\n\t\t\t\t\t\tString serialNumber = tod.getSerialNumber();\n\t\t\t\t\t\ttod.setOriginalSerialNumber(serialNumber);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Defect#406\n\t\t\t\tfor(TechnicalOrderDetail orderDetail : technicalOrderDetailList) {\n\t\t\t\t\tif(!StringUtils.isEmpty(orderDetail.getIsMaestro()) || !StringUtils.isEmpty(orderDetail.getIsNortel()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!getBaseRegistrationService().isIorBSoldToSAPMapping(soldToId))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(GRTConstants.YES.equalsIgnoreCase(orderDetail.getActiveContractExist())) {\n\t\t\t\t\t\t\t\torderDetail.setErrorDescription(grtConfig.getRvNortelMaestroWithContractErrMsg());\n\t\t\t\t\t\t\t\torderDetail.setExcludedMaestroOrNortel(true);\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\t\n\t\t\t\t\t//GRT 4.0 changes\n\t\t\t\t\t if(StringUtils.isEmpty(orderDetail.getProductLine()))\n\t\t {\n\t\t \tString productLine=getBaseRegistrationService().getProductLineByMaterialCode(orderDetail.getMaterialCode());\n\t\t \tlogger.debug(\" Product Line bank \"+orderDetail.getMaterialCode());\n\t\t \tif(!StringUtils.isEmpty(productLine))\n\t\t \t{\n\t\t \t\torderDetail.setProductLine(productLine);\n\t\t \t}\n\t\t }\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tactionForm.setMaterialEntryList(technicalOrderDetailList);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Processing the materialentrylist for displaying in Summarized View\n\t\t\tprocessMaterilaEntryListForSummarizedView(actionForm.getMaterialEntryList());\t\n\t\t\tgetRequest().setAttribute(\"materialList\", actionForm.getMaterialEntryList());\n\t\t\tlong c2 = Calendar.getInstance().getTimeInMillis();\n\t\t\tlogger.debug(\"................ Ending for recordValidationProcess records fetching ................\");\n\t\t\tlogger.debug(\"TIMER for Record Validation rendering for RegID:\"+actionForm.getRegistrationId()+\" time in milliseconds :\" + (c2-c1));\n\t\t\tif(\"DataAccessException\".equals(cause)){\n\t\t\t\tthis.setDataError(grtConfig.getSeibelTimeoutErrorMsg());\n\t\t\t}else{\n\t\t\t\tthis.setDataError(grtConfig.getNoRecordErrorMsg());\n\t\t\t}\n\t\t} catch(DataAccessException daexception){\n\t\t\tlogger.error(\"Exception in RecordValidationAction.saveSiteRegistration() : \", daexception);\n\t\t\tthrow new DataAccessException(RecordValidationAction.class, daexception\n\t\t\t\t\t.getMessage(), daexception);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"Exception in RecordValidationAction.saveSiteRegistration() : \", e);\n\t\t}\n\t\tlogger.debug(\"Exiting RecordValidationAction.saveSiteRegistration()\");\n\t\treturn Action.SUCCESS;\n\t}", "public PreRegistrationList save(PreRegistrationList preRegistration);", "@Override\n public RegistrationResult call() throws InterruptedException, ConnectionException, SocketException, UnknownHostException {\n System.out.print(\"\\n\\n: reId:\"+reId);\n AbstractMessage message = createRegistrationMessage(\n \"\",\n TopicConfig.getRegisterTopic(),\n TopicConfig.getRegisterResponseTopic(this.entity.getUUIdentifier().toString()),\n \"client\",\n \"server\",\n entity,\n entity.getName(),\n reId,\n securityKey,\n groupId,\n manufacturer,\n objectType);\n this.conn.send(message);\n synchronized (lock) {\n if (result == null) {\n lock.wait();\n }\n }\n return new RegistrationResult(result, reResponse);\n }", "private synchronized void registerToIDD() {\n\n\n\n\t\t//\t\tString underlyingDif = this.config.getProperty(\"rina.dif.supportingDIF\");\n\n\n\t\tIDD.iddEntry.Builder IDDEntry = IDD.iddEntry.newBuilder()\n\t\t//.addSupportingDIF(underlyingDif )\n\t\t//.addServiceURL(this.NMSName) \n\t\t.setDIFName(this.DIFName)\n\t\t.setNmsURL(this.IPCName);\n\n\n\t\tIDDEntry.build();\n\n\n\t\t//generate M_WRITE to IDD\n\n\t\tCDAP.objVal_t.Builder ObjValue = CDAP.objVal_t.newBuilder();\n\t\tByteString IDDentry = ByteString.copyFrom(IDDEntry.build().toByteArray());\n\t\tObjValue.setByteval(IDDentry);\n\t\tCDAP.objVal_t objvalue = ObjValue.buildPartial();\n\n\n\t\tCDAP.CDAPMessage M_WRITE_msg = message.CDAPMessage.generateM_WRITE\n\t\t( \"newNMSRegistration\",\n\t\t\t\tthis.IPCName,\t\t\n\t\t\t\tobjvalue, \n\t\t\t\t\"IDD\",//destAEInst\n\t\t\t\t\"IDD\",//destAEName\n\t\t\t\tthis.IDDName,//destApInst\n\t\t\t\tthis.IDDName,//destApName\n\t\t\t\t00001, //invokeID\n\t\t\t\t\"NMS\",//srcAEInst\n\t\t\t\t\"NMS\", //srcAEName\n\t\t\t\tthis.IPCName,//srcApInst\n\t\t\t\tthis.IPCName//srcApName\n\t\t);\n\n\n\t\ttry {\n\t\t\tif(this.tcpManager != null)\n\t\t\t{\n\t\t\t\tTCPFlow IDDFlow = this.tcpManager.allocateTCPFlow(this.IDDName);\n\t\t\t\tIDDFlow.sendCDAPMsg(M_WRITE_msg.toByteArray());\n\t\t\t}else\n\t\t\t{\n\t\t\t\tDTP.DTPMessage payload = DTPMessage.generatePayloadM_CDAP(M_WRITE_msg.toByteArray());\n\n\n\t\t\t\tSystem.out.println(\"IRM: IDDName is \" + this.IDDName);\n\t\t\t\tSystem.out.println(\"IRM: idd handle is \" + this.irm.getHandle(this.IDDName));\n\n\n\t\t\t\tthis.irm.send(this.irm.getHandle(this.IDDName), payload.toByteArray());\n\t\t\t}\n\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\n\t\tRIBdaemon.localRIB.RIBlog.infoLog(\"Enrollment Component: (\" +this.IPCName + \"): register(M_WRITE) to IDD sent\");\n\n\n\t}", "@Handler(id=\"publishToRegistry\",\n input={\n @HandlerInput(name=\"WebServiceKey\", type=Object.class, required=true),\n @HandlerInput(name=\"RegistriesSelected\", type=String[].class, required=true),\n @HandlerInput(name=\"LBHost\", type=String.class),\n @HandlerInput(name=\"LBPort\", type=String.class),\n @HandlerInput(name=\"LBSSLPort\", type=String.class),\n @HandlerInput(name=\"Categories\", type=String.class),\n @HandlerInput(name=\"Description\", type=String.class),\n @HandlerInput(name=\"Organization\", type=String.class)})\n public void publishToRegistry(HandlerContext handlerCtx) {\n Object webServiceKey = (Object)handlerCtx.getInputValue(\"WebServiceKey\");\n String[] registries = (String[])handlerCtx.getInputValue(\"RegistriesSelected\");\n if (registries != null && registries.length > 0) {\n HashMap map = new HashMap();\n map.put(WebServiceMgr.LB_HOST_KEY, (String)handlerCtx.getInputValue(\"LBHost\"));\n map.put(WebServiceMgr.LB_PORT_KEY, (String)handlerCtx.getInputValue(\"LBPort\"));\n map.put(WebServiceMgr.LB_SECURE_PORT, (String)handlerCtx.getInputValue(\"LBSSLPort\"));\n map.put(WebServiceMgr.CATEGORIES_KEY, (String)handlerCtx.getInputValue(\"Categories\"));\n map.put(WebServiceMgr.DESCRIPTION_KEY, (String)handlerCtx.getInputValue(\"Description\"));\n map.put(WebServiceMgr.ORGANIZATION_KEY, (String)handlerCtx.getInputValue(\"Organization\"));\n WebServiceMgr wsm = (WebServiceMgr)AMXUtil.getDomainRoot().getWebServiceMgr();\n try {\n wsm.publishToRegistry(registries, webServiceKey, map);\n } catch (Exception ex) {\n GuiUtil.handleException(handlerCtx, ex);\n }\n }\n }", "public void performCrsRegistration_xa(GrndsExchangeContext context) {\r\n // Turn on the performance tracing\r\n PerformanceTrace performanceTrace = new PerformanceTrace(TRACE_TAG, \".performCrsRegistration_xa()\");\r\n performanceTrace.enterScope();\r\n HttpServletRequest request = context.getRequest();\r\n try {\r\n preserveRequestData(context);\r\n savePageMode(context);\r\n getRaceEthnicity(context, true);\r\n performCrsRegistration(context);\r\n if (null != request.getAttribute(\"hdnCrsRegnSaveMsg\")) {\r\n // Call the savePersonIdDetail method to save the registered CRS ID\r\n savePersonIdDetail_xa(context);\r\n } else {\r\n String includingPageDisplayCommand = ContextHelper.getString(request, \"hdnIncludingPageDisplayCommand\");\r\n forward(includingPageDisplayCommand, request, context.getResponse());\r\n }\r\n\r\n GrndsTrace.exitScope();\r\n } catch (Exception e) {\r\n GrndsTrace.msg(TRACE_TAG, 7, \"Failure:\" + e.getMessage());\r\n processSevereException(context, e);\r\n }\r\n // Log the performance trace info\r\n performanceTrace.getTotalTime();\r\n performanceTrace.exitScope();\r\n }", "protected abstract void writeDevicesBackToResource(List<U2FDeviceRegistration> list) throws Exception;", "public void writeMultipleRegisters(int startingAddress, int quantity, int values ){\r\n \t\r\n \tArrayList<Integer> requiredList = new ArrayList<Integer>();\r\n \tint[] clientRequest = new int[quantity];\r\n \tfor (int i = 0; i< quantity; i++){\r\n \t\tclientRequest[i] = values;\r\n \t\trequiredList.add(clientRequest[i]);\r\n \t\r\n \t}\r\n \ttry {\r\n\t\t\tclient.WriteMultipleRegisters(startingAddress - 1, clientRequest);\r\n\t\t\tview.printRequiredInt(requiredList);\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(null, e.getMessage(), \"Exception from server\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\t}\r\n\t\t\r\n\t}", "public void markSendRejForRoamingRestrictCreate() throws JNCException {\n markLeafCreate(\"sendRejForRoamingRestrict\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rule__ProcessGeneration__ProcessAssignment_2" $ANTLR start "rule__StepGeneration__StepAssignment_2" InternalDsl.g:39486:1: rule__StepGeneration__StepAssignment_2 : ( ruleTemplate ) ;
public final void rule__StepGeneration__StepAssignment_2() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalDsl.g:39490:1: ( ( ruleTemplate ) ) // InternalDsl.g:39491:2: ( ruleTemplate ) { // InternalDsl.g:39491:2: ( ruleTemplate ) // InternalDsl.g:39492:3: ruleTemplate { if ( state.backtracking==0 ) { before(grammarAccess.getStepGenerationAccess().getStepTemplateParserRuleCall_2_0()); } pushFollow(FOLLOW_2); ruleTemplate(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getStepGenerationAccess().getStepTemplateParserRuleCall_2_0()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
[ "public final void rule__StepGeneration__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24399:1: ( ( ( rule__StepGeneration__StepAssignment_2 ) ) )\n // InternalDsl.g:24400:1: ( ( rule__StepGeneration__StepAssignment_2 ) )\n {\n // InternalDsl.g:24400:1: ( ( rule__StepGeneration__StepAssignment_2 ) )\n // InternalDsl.g:24401:2: ( rule__StepGeneration__StepAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStepGenerationAccess().getStepAssignment_2()); \n }\n // InternalDsl.g:24402:2: ( rule__StepGeneration__StepAssignment_2 )\n // InternalDsl.g:24402:3: rule__StepGeneration__StepAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__StepGeneration__StepAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStepGenerationAccess().getStepAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ProcessGeneration__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24291:1: ( ( ( rule__ProcessGeneration__ProcessAssignment_2 ) ) )\n // InternalDsl.g:24292:1: ( ( rule__ProcessGeneration__ProcessAssignment_2 ) )\n {\n // InternalDsl.g:24292:1: ( ( rule__ProcessGeneration__ProcessAssignment_2 ) )\n // InternalDsl.g:24293:2: ( rule__ProcessGeneration__ProcessAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProcessGenerationAccess().getProcessAssignment_2()); \n }\n // InternalDsl.g:24294:2: ( rule__ProcessGeneration__ProcessAssignment_2 )\n // InternalDsl.g:24294:3: rule__ProcessGeneration__ProcessAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__ProcessGeneration__ProcessAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProcessGenerationAccess().getProcessAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ProcessGeneration__ProcessAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:39475:1: ( ( ruleTemplate ) )\n // InternalDsl.g:39476:2: ( ruleTemplate )\n {\n // InternalDsl.g:39476:2: ( ruleTemplate )\n // InternalDsl.g:39477:3: ruleTemplate\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProcessGenerationAccess().getProcessTemplateParserRuleCall_2_0()); \n }\n pushFollow(FOLLOW_2);\n ruleTemplate();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProcessGenerationAccess().getProcessTemplateParserRuleCall_2_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__TgtStatement__StepAssignment_2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTest.g:1261:1: ( ( ruleTgtStep ) )\n // InternalTest.g:1262:2: ( ruleTgtStep )\n {\n // InternalTest.g:1262:2: ( ruleTgtStep )\n // InternalTest.g:1263:3: ruleTgtStep\n {\n before(grammarAccess.getTgtStatementAccess().getStepTgtStepParserRuleCall_2_0()); \n pushFollow(FOLLOW_2);\n ruleTgtStep();\n\n state._fsp--;\n\n after(grammarAccess.getTgtStatementAccess().getStepTgtStepParserRuleCall_2_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Generate__StepgenerationAssignment_4_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:39130:1: ( ( ruleStepGeneration ) )\n // InternalDsl.g:39131:2: ( ruleStepGeneration )\n {\n // InternalDsl.g:39131:2: ( ruleStepGeneration )\n // InternalDsl.g:39132:3: ruleStepGeneration\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGenerateAccess().getStepgenerationStepGenerationParserRuleCall_4_0_0()); \n }\n pushFollow(FOLLOW_2);\n ruleStepGeneration();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGenerateAccess().getStepgenerationStepGenerationParserRuleCall_4_0_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Move__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:4592:1: ( ( ( rule__Move__DestinationAssignment_2 ) ) )\r\n // InternalDroneScript.g:4593:1: ( ( rule__Move__DestinationAssignment_2 ) )\r\n {\r\n // InternalDroneScript.g:4593:1: ( ( rule__Move__DestinationAssignment_2 ) )\r\n // InternalDroneScript.g:4594:2: ( rule__Move__DestinationAssignment_2 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMoveAccess().getDestinationAssignment_2()); \r\n }\r\n // InternalDroneScript.g:4595:2: ( rule__Move__DestinationAssignment_2 )\r\n // InternalDroneScript.g:4595:3: rule__Move__DestinationAssignment_2\r\n {\r\n pushFollow(FOLLOW_2);\r\n rule__Move__DestinationAssignment_2();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMoveAccess().getDestinationAssignment_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ProcessPropertyDef__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:14814:1: ( ( ( rule__ProcessPropertyDef__TypeAssignment_2 ) ) )\n // InternalDsl.g:14815:1: ( ( rule__ProcessPropertyDef__TypeAssignment_2 ) )\n {\n // InternalDsl.g:14815:1: ( ( rule__ProcessPropertyDef__TypeAssignment_2 ) )\n // InternalDsl.g:14816:2: ( rule__ProcessPropertyDef__TypeAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getProcessPropertyDefAccess().getTypeAssignment_2()); \n }\n // InternalDsl.g:14817:2: ( rule__ProcessPropertyDef__TypeAssignment_2 )\n // InternalDsl.g:14817:3: rule__ProcessPropertyDef__TypeAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__ProcessPropertyDef__TypeAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getProcessPropertyDefAccess().getTypeAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__StepShell__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalTest.g:753:1: ( ( ( rule__StepShell__StatementsAssignment_2 )* ) )\n // InternalTest.g:754:1: ( ( rule__StepShell__StatementsAssignment_2 )* )\n {\n // InternalTest.g:754:1: ( ( rule__StepShell__StatementsAssignment_2 )* )\n // InternalTest.g:755:2: ( rule__StepShell__StatementsAssignment_2 )*\n {\n before(grammarAccess.getStepShellAccess().getStatementsAssignment_2()); \n // InternalTest.g:756:2: ( rule__StepShell__StatementsAssignment_2 )*\n loop5:\n do {\n int alt5=2;\n int LA5_0 = input.LA(1);\n\n if ( ((LA5_0>=RULE_ACTION_CALL && LA5_0<=RULE_TGT_COMMENT)||LA5_0==25) ) {\n alt5=1;\n }\n\n\n switch (alt5) {\n \tcase 1 :\n \t // InternalTest.g:756:3: rule__StepShell__StatementsAssignment_2\n \t {\n \t pushFollow(FOLLOW_14);\n \t rule__StepShell__StatementsAssignment_2();\n\n \t state._fsp--;\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop5;\n }\n } while (true);\n\n after(grammarAccess.getStepShellAccess().getStatementsAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Move__DestinationAssignment_2() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalDroneScript.g:17222:1: ( ( rulePosition ) )\r\n // InternalDroneScript.g:17223:2: ( rulePosition )\r\n {\r\n // InternalDroneScript.g:17223:2: ( rulePosition )\r\n // InternalDroneScript.g:17224:3: rulePosition\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getMoveAccess().getDestinationPositionParserRuleCall_2_0()); \r\n }\r\n pushFollow(FOLLOW_2);\r\n rulePosition();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getMoveAccess().getDestinationPositionParserRuleCall_2_0()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void ruleStepGeneration() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:3167:2: ( ( ( rule__StepGeneration__Group__0 ) ) )\n // InternalDsl.g:3168:2: ( ( rule__StepGeneration__Group__0 ) )\n {\n // InternalDsl.g:3168:2: ( ( rule__StepGeneration__Group__0 ) )\n // InternalDsl.g:3169:3: ( rule__StepGeneration__Group__0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getStepGenerationAccess().getGroup()); \n }\n // InternalDsl.g:3170:3: ( rule__StepGeneration__Group__0 )\n // InternalDsl.g:3170:4: rule__StepGeneration__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__StepGeneration__Group__0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getStepGenerationAccess().getGroup()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__StepGeneration__Group__2() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:24387:1: ( rule__StepGeneration__Group__2__Impl rule__StepGeneration__Group__3 )\n // InternalDsl.g:24388:2: rule__StepGeneration__Group__2__Impl rule__StepGeneration__Group__3\n {\n pushFollow(FOLLOW_36);\n rule__StepGeneration__Group__2__Impl();\n\n state._fsp--;\n if (state.failed) return ;\n pushFollow(FOLLOW_2);\n rule__StepGeneration__Group__3();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Process__Group_2_1__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9344:1: ( ( ( rule__Process__ProcessObjectiveAssignment_2_1_1 ) ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9345:1: ( ( rule__Process__ProcessObjectiveAssignment_2_1_1 ) )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9345:1: ( ( rule__Process__ProcessObjectiveAssignment_2_1_1 ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9346:1: ( rule__Process__ProcessObjectiveAssignment_2_1_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getProcessAccess().getProcessObjectiveAssignment_2_1_1()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9347:1: ( rule__Process__ProcessObjectiveAssignment_2_1_1 )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9347:2: rule__Process__ProcessObjectiveAssignment_2_1_1\r\n {\r\n pushFollow(FOLLOW_rule__Process__ProcessObjectiveAssignment_2_1_1_in_rule__Process__Group_2_1__1__Impl19453);\r\n rule__Process__ProcessObjectiveAssignment_2_1_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getProcessAccess().getProcessObjectiveAssignment_2_1_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__ComparationDef__Process2Assignment_6() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:38271:1: ( ( ruleProcess ) )\n // InternalDsl.g:38272:2: ( ruleProcess )\n {\n // InternalDsl.g:38272:2: ( ruleProcess )\n // InternalDsl.g:38273:3: ruleProcess\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getComparationDefAccess().getProcess2ProcessParserRuleCall_6_0()); \n }\n pushFollow(FOLLOW_2);\n ruleProcess();\n\n state._fsp--;\n if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getComparationDefAccess().getProcess2ProcessParserRuleCall_6_0()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__ActionProcess__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8887:1: ( ( ( rule__ActionProcess__RefAssignment_2 ) ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8888:1: ( ( rule__ActionProcess__RefAssignment_2 ) )\n {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8888:1: ( ( rule__ActionProcess__RefAssignment_2 ) )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8889:1: ( rule__ActionProcess__RefAssignment_2 )\n {\n before(grammarAccess.getActionProcessAccess().getRefAssignment_2()); \n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8890:1: ( rule__ActionProcess__RefAssignment_2 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8890:2: rule__ActionProcess__RefAssignment_2\n {\n pushFollow(FOLLOW_rule__ActionProcess__RefAssignment_2_in_rule__ActionProcess__Group__2__Impl17418);\n rule__ActionProcess__RefAssignment_2();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getActionProcessAccess().getRefAssignment_2()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Generate__Alternatives_4() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:5718:1: ( ( ( rule__Generate__StepgenerationAssignment_4_0 ) ) | ( ( rule__Generate__ProcessgenerationAssignment_4_1 ) ) )\n int alt28=2;\n int LA28_0 = input.LA(1);\n\n if ( (LA28_0==74) ) {\n alt28=1;\n }\n else if ( (LA28_0==37) ) {\n alt28=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 28, 0, input);\n\n throw nvae;\n }\n switch (alt28) {\n case 1 :\n // InternalDsl.g:5719:2: ( ( rule__Generate__StepgenerationAssignment_4_0 ) )\n {\n // InternalDsl.g:5719:2: ( ( rule__Generate__StepgenerationAssignment_4_0 ) )\n // InternalDsl.g:5720:3: ( rule__Generate__StepgenerationAssignment_4_0 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGenerateAccess().getStepgenerationAssignment_4_0()); \n }\n // InternalDsl.g:5721:3: ( rule__Generate__StepgenerationAssignment_4_0 )\n // InternalDsl.g:5721:4: rule__Generate__StepgenerationAssignment_4_0\n {\n pushFollow(FOLLOW_2);\n rule__Generate__StepgenerationAssignment_4_0();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGenerateAccess().getStepgenerationAssignment_4_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // InternalDsl.g:5725:2: ( ( rule__Generate__ProcessgenerationAssignment_4_1 ) )\n {\n // InternalDsl.g:5725:2: ( ( rule__Generate__ProcessgenerationAssignment_4_1 ) )\n // InternalDsl.g:5726:3: ( rule__Generate__ProcessgenerationAssignment_4_1 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGenerateAccess().getProcessgenerationAssignment_4_1()); \n }\n // InternalDsl.g:5727:3: ( rule__Generate__ProcessgenerationAssignment_4_1 )\n // InternalDsl.g:5727:4: rule__Generate__ProcessgenerationAssignment_4_1\n {\n pushFollow(FOLLOW_2);\n rule__Generate__ProcessgenerationAssignment_4_1();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGenerateAccess().getProcessgenerationAssignment_4_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__GUARD__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:11141:1: ( ( ( rule__GUARD__SequenceAssignment_2 ) ) )\n // InternalDsl.g:11142:1: ( ( rule__GUARD__SequenceAssignment_2 ) )\n {\n // InternalDsl.g:11142:1: ( ( rule__GUARD__SequenceAssignment_2 ) )\n // InternalDsl.g:11143:2: ( rule__GUARD__SequenceAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getGUARDAccess().getSequenceAssignment_2()); \n }\n // InternalDsl.g:11144:2: ( rule__GUARD__SequenceAssignment_2 )\n // InternalDsl.g:11144:3: rule__GUARD__SequenceAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__GUARD__SequenceAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getGUARDAccess().getSequenceAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Process__Group_2__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9247:1: ( ( ( rule__Process__LanesAssignment_2_2 )* ) )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9248:1: ( ( rule__Process__LanesAssignment_2_2 )* )\r\n {\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9248:1: ( ( rule__Process__LanesAssignment_2_2 )* )\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9249:1: ( rule__Process__LanesAssignment_2_2 )*\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getProcessAccess().getLanesAssignment_2_2()); \r\n }\r\n // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9250:1: ( rule__Process__LanesAssignment_2_2 )*\r\n loop79:\r\n do {\r\n int alt79=2;\r\n int LA79_0 = input.LA(1);\r\n\r\n if ( (LA79_0==86) ) {\r\n alt79=1;\r\n }\r\n\r\n\r\n switch (alt79) {\r\n \tcase 1 :\r\n \t // ../org.xtext.example.rmodp.ui/src-gen/org/xtext/example/rmodp/ui/contentassist/antlr/internal/InternalRmOdp.g:9250:2: rule__Process__LanesAssignment_2_2\r\n \t {\r\n \t pushFollow(FOLLOW_rule__Process__LanesAssignment_2_2_in_rule__Process__Group_2__2__Impl19266);\r\n \t rule__Process__LanesAssignment_2_2();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return ;\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop79;\r\n }\r\n } while (true);\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getProcessAccess().getLanesAssignment_2_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "public final void rule__RTCTL__Group_2__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:17729:1: ( ( ( rule__RTCTL__F2Assignment_2_2 ) ) )\n // InternalDsl.g:17730:1: ( ( rule__RTCTL__F2Assignment_2_2 ) )\n {\n // InternalDsl.g:17730:1: ( ( rule__RTCTL__F2Assignment_2_2 ) )\n // InternalDsl.g:17731:2: ( rule__RTCTL__F2Assignment_2_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getRTCTLAccess().getF2Assignment_2_2()); \n }\n // InternalDsl.g:17732:2: ( rule__RTCTL__F2Assignment_2_2 )\n // InternalDsl.g:17732:3: rule__RTCTL__F2Assignment_2_2\n {\n pushFollow(FOLLOW_2);\n rule__RTCTL__F2Assignment_2_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getRTCTLAccess().getF2Assignment_2_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public final void rule__Opt__Group__2__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalDsl.g:25857:1: ( ( ( rule__Opt__EventstmAssignment_2 ) ) )\n // InternalDsl.g:25858:1: ( ( rule__Opt__EventstmAssignment_2 ) )\n {\n // InternalDsl.g:25858:1: ( ( rule__Opt__EventstmAssignment_2 ) )\n // InternalDsl.g:25859:2: ( rule__Opt__EventstmAssignment_2 )\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOptAccess().getEventstmAssignment_2()); \n }\n // InternalDsl.g:25860:2: ( rule__Opt__EventstmAssignment_2 )\n // InternalDsl.g:25860:3: rule__Opt__EventstmAssignment_2\n {\n pushFollow(FOLLOW_2);\n rule__Opt__EventstmAssignment_2();\n\n state._fsp--;\n if (state.failed) return ;\n\n }\n\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOptAccess().getEventstmAssignment_2()); \n }\n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get number of eggs from chicken Calculates the number of eggs from selected chicken (x2 if happy) and makes chicken sad
public int getEggsFromChicken() { if (this.hearts <= 0) { System.out.println("You can't get eggs from a dead chicken!"); } else { // check if chicken is happy or sad if (this.happyOrSad) { double eggMath = this.seed / 0.25; this.eggs = (int)eggMath; // reduce amount of seed in chicken this.seed -= this.eggs * 0.25; // double number of eggs because chicken is happy this.eggs *= 2; // make chicken sad from laying eggs this.happyOrSad = false; } else { // get number of eggs from chicken double eggMath = this.seed / 0.25; this.eggs = (int)eggMath; // reduce amount of seed in chicken this.seed -= this.eggs * 0.25; // make chicken sad from laying eggs this.happyOrSad = false; } } return this.eggs; }
[ "public static int animalLegs(int chickens, int cows, int pigs){\n return 4*(cows + pigs + chickens/2);\n }", "public int goose()\n {\n ducks=\"\";\n int numberOfDucks=g.random();\n for(int i =0; i<numberOfDucks;++i){ ducks+= \"Duck, \"; }//puts a random # of Ducks, in ducks\n \n return numberOfDucks;//so the number of ducks will allign with the person picked\n }", "public int getNumberOfCheese() {\n return this.cheese;\n }", "public void countKiwi() \n {\n //check if there are any kiwis here\n for (Occupant occupant : island.getOccupants(player.getPosition())) {\n if (occupant instanceof Kiwi) {\n Kiwi kiwi = (Kiwi) occupant;\n if (!kiwi.counted()) {\n kiwi.count();\n kiwiCount++;\n }\n }\n }\n updateGameState();\n }", "public static int getNumFoods() { return numFoods; }", "private int getEggNum() {\n\t\treturn num_egg;\n\t}", "public void setNumberOfCheese(int cheese) {\n this.cheese = cheese;\n }", "int countShelfs();", "int getWeikeCount();", "int g_happiness(){ \n g_happiness = (int)(maint_cost - tot_gift_amount );\n return g_happiness;\n }", "int getWeikeCountCount();", "public void hitChicken() {\n if (this.hearts <= 0) {\n System.out.println(\"You can't hit a dead chicken!\");\n } else {\n // reduce hearts of chicken by 1\n this.hearts -= 1;\n // update if chicken is happy or sad\n this.happyOrSad = false;\n\n // check if number of hearts is 0 or less\n if (this.hearts <= 0) {\n this.aliveOrDead = false;\n this.hearts = 0;\n }\n }\n }", "private static int animals(boolean yesWellHeresTheThing) {\n\t//Start off with one of these\n int aInt = yesWellHeresTheThing ? 34 : 21;\n\tfloat sparklesfairy = .5f;\n\tfor (int brown = 0; brown < aInt; brown++) { \n sparklesfairy *= aInt;\n\t} \n return (int) sparklesfairy * aInt;\n }", "int getNumber_of_lakes();", "public int foodCount() {\r\n\t\treturn this.food;\r\n\t}", "@Override\n public int getCalories() {\n if (size == Beverage.SMALL) {\n int getCalorie = 0;\n int totalCalories = 0;\n for (int i = 0; i < addOns.size(); i++) {\n if (addOns.size() == 1) {\n // check if there is one add on (either soymilk or sugarsyrup)\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + 5;\n return totalCalories;\n } else if (addOns.size() == 2) {\n // check if there is two thing to add on to the coffee\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + addOns.get(1).getCalories() + 5;\n return totalCalories;\n }\n }\n return 5;\n } else if (size == Beverage.MEDIUM) {\n int getCalorie = 0;\n int totalCalories = 0;\n for (int i = 0; i < addOns.size(); i++) {\n if (addOns.size() == 1) {\n // check if there is one add on (either soymilk or sugarsyrup)\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + 10;\n return totalCalories;\n } else if (addOns.size() == 2) {\n // check if there is two thing to add on to the coffee\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + addOns.get(1).getCalories() + 10;\n return totalCalories;\n }\n }\n return 10;\n } else if (size == Beverage.LARGE) {\n int getCalorie = 0;\n int totalCalories = 0;\n for (int i = 0; i < addOns.size(); i++) {\n if (addOns.size() == 1) {\n // check if there is one add on (either soymilk or sugarsyrup)\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + 15;\n return totalCalories;\n } else if (addOns.size() == 2) {\n // check if there is two thing to add on to the coffee\n getCalorie = addOns.get(0).getCalories();\n totalCalories = getCalorie + addOns.get(1).getCalories() + 15;\n return totalCalories;\n }\n }\n return 15;\n } else\n return 0;\n }", "public int animalEggCharge() {\n\t\treturn Settings.animal;\n\t}", "int getHerwinCount();", "public int getGears();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initializes a new DataSource instance.
public DataSource() { }
[ "public DataSource() {\r\n\t}", "public DataSource()\n\t{\n\t\tthis(null);\n\t}", "public DataSource() {\n\t\tthis(\"basic_DS\");\n\t}", "public DataSourceFactory() {}", "protected void initializeDataSource()\n {\n if (bds == null)\n {\n bds = new Jdbc3SimpleDataSource();\n bds.setServerName(TestUtil.getServer());\n bds.setPortNumber(TestUtil.getPort());\n bds.setDatabaseName(TestUtil.getDatabase());\n bds.setUser(TestUtil.getUser());\n bds.setPassword(TestUtil.getPassword());\n }\n }", "@Override\n\tprotected void initDataSource() {\n\t}", "public Datasource()\n\t{\n\t}", "DataSourceTracker() {}", "DataSource createDataSource(Map params) throws IOException;", "public DataSource(Type type)\n {\n super();\n _type = type;\n }", "public void init() {\n DataServer s1 = new DataServer(\"master\", \"root\", \"\", \"172.16.90.12\", 13001);\n DataServer s2 = new DataServer(\"slave1\", \"root\", \"\", \"172.16.90.12\", 13002);\n DataServer s3 = new DataServer(\"slave2\", \"root\", \"\", \"172.14.90.12\", 13003);\n dataServerMap.put(s1.getName(), s1);\n dataServerMap.put(s2.getName(), s2);\n dataServerMap.put(s3.getName(), s3);\n DataSource ds1 = new ServerDataSource(\"rep_master\", s1);\n DataSource ds2 = new ServerDataSource(\"rep_read_slave1\", s2);\n DataSource ds3 = new ServerDataSource(\"rep_read_slave2\", s3);\n ArrayList<DataSource> sources = new ArrayList<DataSource>();\n sources.add(ds2);\n sources.add(ds3);\n DataSource ds4 = new LoadBalanceDataSource(\"rep_read\", sources);\n DataSource ds5 = new ReplicationDataSource(\"rep\", ds4, ds1);\n dataSourceMap.put(ds1.getName(), ds1);\n dataSourceMap.put(ds2.getName(), ds2);\n dataSourceMap.put(ds3.getName(), ds3);\n dataSourceMap.put(ds4.getName(), ds4);\n dataSourceMap.put(ds5.getName(), ds5);\n catalog = new Catalog(ds5);\n ds5.initConnPool();\n }", "public JdbcLookupDataSource() {\r\n\t\tDataSourceLocator dsLocator = DataSourceLocator.getInstance();\r\n\t\tthis.ds = dsLocator.lookup(\"lookup\");\r\n\t}", "public DataSource(MediaLocator locator)\n\t{\n\t\tsuper(locator);\n\t}", "private DataSource defaultDataSource() {\n DataSourceBuilder<?> dataSourceBuilder =\n DataSourceBuilder.create(this.getClass().getClassLoader())\n .driverClassName(properties.getDriverClassName())\n .url(properties.getUrl())\n .username(properties.getUsername())\n .password(properties.getPassword());\n\n if (properties.getType() != null) {\n dataSourceBuilder.type(properties.getType());\n }\n\n return dataSourceBuilder.build();\n }", "private static DataSource setupDataSource(String connectUri, String uname, String passwd) {\n // First, we'll create a ConnectionFactory that the\n // pool will use to create Connections.\n // We'll use the DriverManagerConnectionFactory,\n // using the connect string passed in the command line\n // arguments.\n //\n ConnectionFactory connectionFactory =\n new DriverManagerConnectionFactory(connectUri, uname, passwd);\n\n //\n // Next we'll create the PoolableConnectionFactory, which wraps\n // the \"real\" Connections created by the ConnectionFactory with\n // the classes that implement the pooling functionality.\n //\n PoolableConnectionFactory poolableConnectionFactory =\n new PoolableConnectionFactory(connectionFactory, null);\n\n //\n // Now we'll need a ObjectPool that serves as the\n // actual pool of connections.\n //\n // We'll use a GenericObjectPool instance, although\n // any ObjectPool implementation will suffice.\n //\n ObjectPool<PoolableConnection> connectionPool =\n new GenericObjectPool<>(poolableConnectionFactory);\n\n // Set the factory's pool property to the owning pool\n poolableConnectionFactory.setPool(connectionPool);\n\n //\n // Finally, we create the PoolingDriver itself,\n // passing in the object pool we created.\n //\n PoolingDataSource<PoolableConnection> dataSource =\n new PoolingDataSource<>(connectionPool);\n\n return dataSource;\n }", "static public void setDataSource(DataSource source) {\n ds = source;\n }", "public void setDataSource(DataSource dataSource);", "DataSource createDataSource(DbEnvironment env, Credential credential, String schema, int numThreads);", "public OpenTelemetryDataSource(DataSource delegate) {\n this.delegate = delegate;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test method for availableAnimalsDayRange
@Test public void testAvailableAnimalsDayRange() { testRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, new Date(11, 1, 2019), breed)); testRescue.addAnimal(new Dog("Buster", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, new Date(10, 14, 2019), breed)); testRescue.addAnimal(new Cat("Tygo", birthday, size, houseTrained, goodWithKids, notes, new Date(11, 8, 2019))); testRescue.addAnimal(new Cat("Tigger", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue)); assertEquals(4, testRescue.animalsAvailable().size()); assertEquals(3, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 4, 31).size()); assertEquals(1, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 5, 30).size()); assertEquals(2, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 5, 31).size()); assertEquals(2, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 4, 29).size()); assertEquals(4, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 1, 365).size()); assertEquals(0, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 1, 2).size()); assertEquals(0, testRescue.availableAnimalsDayRange(new Date(11, 13, 2019), 365, 366).size()); }
[ "@Test\r\n\tpublic void testAvailableAnimalsAge() {\r\n\t\ttestRescue.addAnimal(new Dog(name, new Date(9, 13, 2019), size, houseTrained, goodWithKids, notes, new Date(11, 1, 2019), breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(9, 13, 2017), size, houseTrained, goodWithKids, notes, new Date(10, 14, 2019), breed));\r\n\t\ttestRescue.addAnimal(new Cat(name, birthday, size, houseTrained, goodWithKids, notes, new Date(11, 8, 2019)));\r\n\t\ttestRescue.addAnimal(new Cat(\"Buster\", new Date(11, 13, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue));\r\n\t\t\r\n\t\tassertEquals(4, testRescue.animalsAvailable().size());\r\n\t\tassertEquals(2, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 1, 8).size());\r\n\t\tassertEquals(3, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 0, 8).size());\r\n\t\tassertEquals(4, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 0, 10).size());\r\n\t\tassertEquals(3, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 0, 2).size());\r\n\t\tassertEquals(2, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 0, 1).size());\r\n\t\tassertEquals(2, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 1, 2).size());\r\n\t\tassertEquals(2, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 0, 1).size());\r\n\t\tassertEquals(1, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 9, 10).size());\r\n\t\tassertEquals(0, testRescue.availableAnimalsAge(new Date(11, 13, 2019), 3, 8).size());\r\n\t\t\r\n\t\t\r\n\t}", "@org.junit.Test\n public void testDateRange() {\n System.out.println(\"dateRange\");\n\n Calendar now = Calendar.getInstance();\n\n int nowDay = now.get(Calendar.DAY_OF_MONTH);\n String nowMonth = MONTH_NAMES.get(now.get(Calendar.MONTH));\n int nowYear = now.get(Calendar.YEAR);\n\n assertTrue(helpers.dateRange(nowDay));\n assertFalse(helpers.dateRange(nowDay + 1));\n assertTrue(helpers.dateRange(nowMonth));\n assertTrue(helpers.dateRange(nowYear));\n assertFalse(helpers.dateRange(nowYear + 1));\n assertTrue(helpers.dateRange(nowDay, nowMonth, nowDay, nowMonth));\n assertTrue(helpers.dateRange(nowMonth, nowYear, nowMonth, nowYear));\n assertFalse(helpers.dateRange(nowMonth, nowYear + 1, nowMonth, nowYear + 1));\n }", "@org.junit.Test\n public void testWeekdayRange() {\n assertTrue(helpers.weekdayRange(\"MON\", \"SUN\", \"GMT\"));\n assertTrue(helpers.weekdayRange(\"MON\", \"SUN\", null));\n\n Calendar now = Calendar.getInstance();\n int weekdayNo = now.get(Calendar.DAY_OF_WEEK); // 1-7 (1=Sunday, 7=Monday)\n int weekdayNoBefore = weekdayNo - 1;\n if (weekdayNoBefore == 0) {\n weekdayNoBefore = 7;\n }\n int weekdayNoAfter = weekdayNo + 1;\n if (weekdayNoAfter == 8) {\n weekdayNoAfter = 1;\n }\n String weekdayNow = WEEKDAY_NAMES.get(weekdayNo - 1);\n String weekdayBefore = WEEKDAY_NAMES.get(weekdayNoBefore - 1);\n String weekdayAfter = WEEKDAY_NAMES.get(weekdayNoAfter - 1);\n assertTrue(helpers.weekdayRange(weekdayNow, null, null));\n assertTrue(helpers.weekdayRange(weekdayBefore, weekdayAfter, null));\n }", "@Test\n public void execute_validSpecialDates_success() {\n Person firstPerson = model.getFilteredPersonList().get(INDEX_FIRST_PERSON.getZeroBased());\n LocalDate birthDate = firstPerson.getBirthday().getDate();\n\n // Acceptable range of values is from date of birthday to today\n testValidSpecialDate(new SpecialDateBuilder().withDate(birthDate).build());\n testValidSpecialDate(new SpecialDateBuilder().withDate(birthDate.plusDays(1)).build());\n }", "@Test\n public void testWorkableDays() {\n }", "@Test\r\n\tpublic void testAnimalsAvailable() {\r\n\t\ttestRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\t\r\n\t\tassertEquals(2, testRescue.animalsAvailable().size());\r\n\t\t\t// adopt animal \r\n\t\ttestRescue.setAdoptionInfo(testRescue.getAnimal(0), adopted, dateAdopted, owner);\r\n\t\t\r\n\t\tassertEquals(1, testRescue.animalsAvailable().size());\r\n\t}", "public DateRangeTest()\n {\n }", "@Test\r\n public void testDay() throws Exception {\n for (int i = 9; i <= 18; i++) {\r\n timesOfDay = TimesOfDay.getDayTime(i);\r\n assertEquals(TimesOfDay.DAY, timesOfDay);\r\n }\r\n }", "@Test\n public void getUsageByDayTest() {\n Long startDate = null;\n Long endDate = null;\n Boolean combineEndpoints = null;\n String method = null;\n String url = null;\n Integer size = null;\n Integer page = null;\n // PageResourceUsageInfo response = api.getUsageByDay(startDate, endDate, combineEndpoints, method, url, size, page);\n\n // TODO: test validations\n }", "@Test\n public void testOutOfBoundariesValidation() {\n System.out.println(\"outOfBoundariesValidation\");\n int date = 10;\n String caso = \"month\";\n int month = 10;\n AgeDate instance = new AgeDate();\n int expResult = 0;\n int result = instance.outOfBoundariesValidation(date, caso, month);\n assertEquals(expResult, result);\n }", "@Test\n public void testGetHotels() throws DatatypeConfigurationException {\n DatatypeFactory df = DatatypeFactory.newInstance();\n XMLGregorianCalendar departureDate = df.newXMLGregorianCalendar(\"2012-11-23\");\n XMLGregorianCalendar arrivalDate = df.newXMLGregorianCalendar(\"2012-12-25\");\n\n testGetHotels(\"Barcelona\", departureDate, arrivalDate, new String[]{\"Superb Hotel\"});\n testGetHotels(\"Vienna\", departureDate, arrivalDate, new String[]{\"Nice Hotel\", \"Passable Hotel\"});\n testGetHotels(\"Zgierz\", departureDate, arrivalDate, new String[]{\"Shitty Hotel\"});\n\n }", "@Test\r\n\tpublic void testAvailableDogs() {\r\n\t\ttestRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\ttestRescue.addAnimal(new Cat(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue));\r\n\t\ttestRescue.addAnimal(new Cat(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue));\r\n\t\t\r\n\t\tassertEquals(2, testRescue.availableDogs().size());\r\n\t\t\r\n\t\ttestRescue.setAdoptionInfo(testRescue.getAnimal(0), adopted, dateAdopted, owner);\r\n\t\tassertEquals(1, testRescue.availableDogs().size());\r\n\t\ttestRescue.setAdoptionInfo(testRescue.getAnimal(1), adopted, dateAdopted, owner);\r\n\t\tassertEquals(0, testRescue.availableDogs().size());\r\n\t}", "@Test\n public void saturdayTest() {\n // TODO: test saturday\n }", "@Test\r\n\tpublic void testNumAnimalsAvailable() {\r\n\t\ttestRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue, breed));\r\n\t\t\r\n\t\tassertEquals(2, testRescue.numAnimalsAvailable());\r\n\t\t\r\n\t\t// adopt first animal\r\n\t\ttestRescue.setAdoptionInfo(testRescue.getAnimal(0), adopted, dateAdopted, owner);\r\n\t\t\r\n\t\tassertEquals(1, testRescue.numAnimalsAvailable());\r\n\t\t\r\n\t\t// adopt second animal\r\n\t\ttestRescue.setAdoptionInfo(testRescue.getAnimal(1), adopted, dateAdopted, owner);\r\n\t\t\r\n\t\tassertEquals(0, testRescue.numAnimalsAvailable());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "@Test\n public void testCheckDateOverlapping() \n throws Item.BadDatesException, Date.BadDateException\n {\n System.out.println(\"checkDateOverlapping\");\n Item instance = new Item(new Date(14, 30, Day.Monday), \n new Date(16, 00, Day.Monday), null, null, null, null);\n \n Item anotherItem = new Item(new Date(16, 00, Day.Monday), \n new Date(17, 30, Day.Monday), null, null, null, null);\n boolean expResult = false;\n boolean result = instance.checkDateOverlapping(anotherItem);\n assertEquals(expResult, result);\n \n anotherItem = new Item(new Date(12, 00, Day.Monday), \n new Date(14, 00, Day.Monday), null, null, null, null);\n expResult = false;\n result = instance.checkDateOverlapping(anotherItem);\n assertEquals(expResult, result);\n \n anotherItem = new Item(new Date(14, 00, Day.Monday), \n new Date(15, 30, Day.Monday), null, null, null, null);\n expResult = true;\n result = instance.checkDateOverlapping(anotherItem);\n assertEquals(expResult, result);\n \n anotherItem = new Item(new Date(15, 00, Day.Monday), \n new Date(16, 30, Day.Monday), null, null, null, null);\n expResult = true;\n result = instance.checkDateOverlapping(anotherItem);\n assertEquals(expResult, result);\n \n anotherItem = new Item(new Date(13, 00, Day.Monday), \n new Date(10, 30, Day.Thursday), null, null, null, null);\n expResult = true;\n result = instance.checkDateOverlapping(anotherItem);\n assertEquals(expResult, result);\n }", "@Test\n public void SalientCalendarContainerUtil_GenerateDayMap_ExpectedMapping(){\n assertEquals(dayMap.get(Calendar.SUNDAY),\"Sunday\");\n assertEquals(dayMap.get(Calendar.SATURDAY),\"Saturday\");\n }", "@Test\n public void daysOfWeekTest() {\n // TODO: test daysOfWeek\n }", "@Test\r\n\tpublic void testGetAnimalStringDate() {\r\n\t\ttestRescue.addAnimal(new Dog(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue, adopted, dateAdopted,\r\n\t\t\t\towner, breed));\r\n\t\ttestRescue.addAnimal(new Dog(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue, adopted, dateAdopted,\r\n\t\t\t\towner, breed));\r\n\t\t\r\n\t\tassertEquals(testRescue.getAnimal(name, birthday), new Dog(name, birthday, size, houseTrained, goodWithKids, notes, dateEnterRescue, adopted, dateAdopted,\r\n\t\t\t\towner, breed));\r\n\t\t\r\n\t\tassertEquals(testRescue.getAnimal(\"Buster\", new Date(12, 11, 2018)), new Dog(\"Buster\", new Date(12, 11, 2018), size, houseTrained, goodWithKids, notes, dateEnterRescue, adopted, dateAdopted,\r\n\t\t\t\towner, breed));\r\n\t\t\r\n\t}", "@Test\n public void testResponseGivenARangeOfDates() throws HTTPException, HttpClientErrorException, HttpServerErrorException,ParseException {\n int rangeOfDays = 9;\n LocalDate startDate = LocalDate.now().minusDays(10);\n String endDateValue = startDate.plusDays(rangeOfDays).toString();\n String dateParamExtension = \"&start_date=\" + startDate + \"&end_date=\" + endDateValue;\n try {\n response = restTemplate.getForObject(templateUrl + apiKey + dateParamExtension, String.class);\n JSONParser parser = new JSONParser();\n JSONArray object = (JSONArray) parser.parse(response);\n Assert.assertEquals(\"Response should return \" + rangeOfDays + 1 + \"images information\", rangeOfDays + 1, object.size());\n } catch(HTTPException ex){\n Assert.fail(\"HTTP Exception is not expected \"+ex.getMessage());\n } catch(HttpServerErrorException ex){\n Assert.fail(\"HTTPServerError Exception is not expected \"+ex.getMessage());\n } catch(HttpClientErrorException ex){\n Assert.fail(\"HTTPClientError Exception is not expected \"+ex.getMessage());\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get StopsDisabledPages List By FlowId
@Select("SELECT page_id FROM flow_stops WHERE enable_flag=1 and is_disabled=1 and fk_flow_id=#{flowId}") public List<String> getStopsDisabledPagesListByFlowId(@Param(value = "flowId") String flowId);
[ "public List<StopsVo> getStopsByFlowIdAndPageIds(String flowId, String[] pageIds);", "@SelectProvider(type = StopsMapperProvider.class, method = \"getStopsListByFlowId\")\n @Results({@Result(id = true, column = \"id\", property = \"id\"),\n @Result(column = \"is_checkpoint\", property = \"isCheckpoint\"),\n @Result(column = \"is_data_source\",property = \"isDataSource\"),\n @Result(property = \"dataSource\", column = \"fk_data_source_id\", many = @Many(select = \"cn.cnic.component.dataSource.mapper.DataSourceMapper.adminGetDataSourceById\", fetchType = FetchType.LAZY)),\n @Result(column = \"id\", property = \"properties\", many = @Many(select = \"cn.cnic.component.flow.mapper.PropertyMapper.getPropertyListByStopsId\", fetchType = FetchType.LAZY)),\n @Result(column = \"id\", property = \"customizedPropertyList\", many = @Many(select = \"cn.cnic.component.flow.mapper.CustomizedPropertyMapper.getCustomizedPropertyListByStopsId\", fetchType = FetchType.LAZY))\n\n })\n public List<Stops> getStopsListByFlowId(String flowId);", "List<WeblinkVO> getAllWeblinksByDataflowId(Long dataflowId) throws EEAException;", "public List<TicketSite> getTicketSitesOfATeam(String teamId);", "@SelectProvider(type = StopsMapperProvider.class, method = \"getCannotPublishedStopsNameByIds\")\n public List<String> getCannotPublishedStopsNameByIds(@Param(value = \"Ids\") List<String> Ids);", "public String getDataSourceStopList();", "public List<TargetPage> filterTargetPages(Task p_task, String p_segState);", "@Select(\"SELECT * FROM flow_stops WHERE enable_flag=1 and fk_data_source_id=#{datasourceId}\")\n @Results({@Result(id = true, column = \"id\", property = \"id\"),\n @Result(column = \"id\", property = \"properties\", many = @Many(select = \"cn.cnic.component.flow.mapper.PropertyMapper.getPropertyListByStopsId\", fetchType = FetchType.LAZY)),\n @Result(column = \"is_data_source\",property = \"isDataSource\")\n })\n public List<Stops> getStopsListByDatasourceId(@Param(value = \"datasourceId\") String datasourceId);", "List<ShipmentPlanItemDS> findAllEnabled(String trackingId);", "List<Stop> getStops();", "@Override\n @Transactional\n public List<WeblinkVO> getAllWeblinksByDataflowId(Long dataflowId) throws EEAException {\n List<WeblinkVO> weblinks = new ArrayList<>();\n if (null == dataflowId) {\n throw new EEAException(EEAErrorMessage.DATAFLOW_NOTFOUND);\n } else {\n Dataflow dataflow = dataflowRepository.findById(dataflowId).orElse(null);\n if (dataflow != null && dataflow.getWeblinks() != null) {\n dataflow.getWeblinks().stream().forEach(weblink -> {\n weblinks.add(dataflowWebLinkMapper.entityToClass(weblink));\n });\n }\n }\n return weblinks;\n }", "java.util.List<com.yhglobal.gongxiao.payment.microservice.PaymentCommonGrpc.FrontPageFlow> \n getFlowListList();", "List<String> getScannedPages();", "@JDIAction(\"Get all '{name}' disabled options\")\n public List<String> listDisabled() {\n return ifSelect(dataList(), HtmlElement::isDisabled, HtmlElement::getText);\n }", "@SelectProvider(type = StopsMapperProvider.class, method = \"getStopsById\")\n @Results({@Result(id = true, column = \"id\", property = \"id\"),\n @Result(column = \"is_data_source\",property = \"isDataSource\"),\n @Result(column = \"id\", property = \"properties\", many = @Many(select = \"cn.cnic.component.flow.mapper.PropertyMapper.getPropertyListByStopsId\", fetchType = FetchType.LAZY)),\n @Result(column = \"fk_flow_id\", property = \"flow\", many = @Many(select = \"cn.cnic.component.flow.mapper.FlowMapper.getFlowById\", fetchType = FetchType.LAZY))\n\n })\n public Stops getStopsById(String Id);", "@GetMapping(value = \"/private/{dataflowId}\")\n List<DocumentVO> getAllDocumentsByDataflowId(@PathVariable(\"dataflowId\") Long dataflowId);", "com.yhglobal.gongxiao.payment.microservice.PaymentCommonGrpc.FrontPageFlow getFlowList(int index);", "default List<DMList> findByListId(Integer id) {\n List<DMList> tempResults = new ArrayList<>();\n\n for (DMList list : this.findAll()) {\n if (list.getListId() == (id)) {\n tempResults.add(list);\n }\n }\n\n return tempResults;\n }", "public abstract Collection<String> getPollerOnlyUrls();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create concurrency group instance at runtime.
ConcurrencyGroup createConcurrencyGroup(String name, int maxConcurrency, List<RayFunc> funcs);
[ "public TaskGroup createTaskGroup() {\n TaskGroup result = null;\n synchronized (this) {\n this.currentTaskGroup++;\n result = new TaskGroup(this.currentTaskGroup);\n\n }\n return result;\n }", "Workgroup createWorkgroup();", "public CreateGroup() {\n initComponents();\n start();\n }", "ConsumerGroup createConsumerGroup(String name) throws RegistrationException;", "@Test\n @DisplayName(\"Tests creation of concurrency groups.\")\n void testConcurrencyGroupCreation() {\n // First group:\n Action firstAction = mock(Action.class);\n when(firstAction.isActive()).thenReturn(true);\n\n // Ignored because inactive:\n Action secondAction = mock(Action.class);\n when(secondAction.enforceSingleThread()).thenReturn(true);\n\n Action thirdAction = mock(Action.class);\n when(thirdAction.isActive()).thenReturn(true);\n\n // Second group:\n Action fourthAction = mock(Action.class);\n when(fourthAction.enforceSingleThread()).thenReturn(true);\n when(fourthAction.isActive()).thenReturn(true);\n\n List<Action> actions = List.of(firstAction, secondAction, thirdAction, fourthAction);\n JobExecution jobExecution = JobExecution.builder().jobId(\"job-id\").build();\n\n DefaultJobStarter defaultJobStarter = new DefaultJobStarter(null, actions, jobExecution, 3);\n\n assertEquals(2, defaultJobStarter.getConcurrencyGroups().size());\n }", "LoadGroup createLoadGroup();", "GroupR createGroupR();", "public Group() {}", "public static TaskGroup create( Map<String,String> attrs ) {\n String groupName = attrs.get( ATTR_GROUP_NAME ); \n String bundleName = attrs.get( ATTR_BUNDLE_NAME ); \n String displayNameKey = attrs.get( ATTR_DISPLAY_NAME_KEY ); \n String descriptionKey = attrs.get( ATTR_DESCRIPTION_KEY ); \n String iconKey = attrs.get( ATTR_ICON_KEY ); \n return create( groupName, bundleName, displayNameKey, descriptionKey, iconKey );\n }", "GroupType createGroupType();", "WithLinuxAppFramework withNewResourceGroup(Creatable<ResourceGroup> groupDefinition);", "public void createMemberWithMultithread(String className, Class<?>[] genericParameters,\n Object[][] params, Node[] nodeList) {\n // Initializes the Group to the correct size\n for (int i = 0; i < params.length; i++) {\n this.memberList.add(null);\n }\n CountDownLatch doneSignal = new CountDownLatch(params.length);\n Queue<AbstractProcessForGroup> tasksToDispatch = new LinkedList<AbstractProcessForGroup>();\n for (int i = 0; i < params.length; i++) {\n tasksToDispatch.add(new ProcessForGroupCreation(this, className, genericParameters, params[i],\n nodeList[i % nodeList.length], i, doneSignal));\n }\n dispatcher.dispatchTasks(tasksToDispatch, doneSignal, null);\n try {\n doneSignal.await();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "java.util.concurrent.Future<CreateProfilingGroupResult> createProfilingGroupAsync(CreateProfilingGroupRequest createProfilingGroupRequest);", "CsticGroupModel createInstanceOfCsticGroupModel();", "public abstract EventLoopGroup createEventLoopGroup ();", "PEGroup createPEGroup();", "public Group()\r\n {\r\n endpoints = new ArrayList<>();\r\n name = \"NewGroup\";\r\n }", "public ResourceGroup createResourceGroup();", "public static Group getNewGroup(){\n\t\treturn new Group(nextId++);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The method allows the user to pass a word to the Iterator so that is can be found and definition with the page numbers it apperars on
public void searchWord() { Iterator<WordEntry> valueIterator = wordIndex.values().iterator(); Scanner s = new Scanner(System.in); while (valueIterator.hasNext()) { System.out.println("Enter word you wish to search: "); System.out.println("Do you wish to return to menu: Enter [Y]"); WordEntry value = valueIterator.next(); String word; word = s.nextLine().toLowerCase(); if (word.equalsIgnoreCase("Y")) { // to return to the SearchMenu if required by typing Y ignoring // the case SearchMenu m = new SearchMenu(); // if the word doesent exist in the book return the error } else if (!wordIndex.containsKey(word)) { System.err.println("-----------------------------------"); System.err.println("WORD NOT THE IN TEXT!!"); System.err.println("-----------------------------------"); } else { // else print the word with its defiinition and page number value = wordIndex.get(word); System.out.println("Word: " + word + "\n" + "Definition: " + value.getDefinition().toString() + "\n" + "Page: " + value.getIndices() + "\n"); } } }
[ "public Iterator<IPosition> positions(String word) throws WordException;", "public Iterator<String> words();", "public MySet<PageEntry> getPagesWhichContainWord (String str) {\n\t\tMySet<PageEntry> set = new MySet<>();\n\t\t\tMyLinkedList<WordEntry> Words = (MyLinkedList<WordEntry>)(ipData.getipList()[ipData.getHashIndex(str)]);\n\t\t\tWordEntry requiredWordEntry =new WordEntry();\n\t\t\tint i = 0;\n\t\t\tfor ( i = 0 ; i<Words.size() ; i++ ) {\n\t\t\t\tif (Words.getChildat(i).getWord().equals(str)) {\n\t\t\t\t\trequiredWordEntry = Words.getChildat(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (i<Words.size()) {\n\t\t\t\tPageEntry p = new PageEntry();\n\t\t\t\tint sizeOPositions = requiredWordEntry.getListOfPositions().size();\n\t\t\t\tfor (int j = 0; j < sizeOPositions; j++) {\n\t\t\t\t\tp = requiredWordEntry.getListOfPositions().getChildat(j).getPageEntry();\n\t\t\t\t\tset.InsertAtFront(p);\n\t\t\t\t}\n\t\t\t}\n\t\treturn set;\n\t}", "static private void retrivingFunction(int wordNo, String forWord, int myNo) throws IOException {\n int docNo = 0;\n// initialIndexPath = StaticVariables.initialFileIndexPath;\n// initialIndexReader = DirectoryReader.open(FSDirectory.open(new File(initialIndexPath)));\n int maxDoc = initialIndexReader.maxDoc();\n\n// List<Integer> positionsOfRelatedWords = new ArrayList<>();\n\n for (int i = 0; i < maxDoc; i++) {\n// List<String> listIF = new ArrayList<String>();\n Document doc = initialIndexReader.document(i);\n IndexableField content = doc.getField(\"content\");\n TokenStream strm = content.tokenStream(initFileAnalyzer);\n CharTermAttribute term = strm.addAttribute(CharTermAttribute.class);\n strm.reset();\n while ((strm.incrementToken())) {\n if (docNo == wordNo) {\n relevantWords.add(term.toString());\n\n for (int w = 0; w < wordsList.size(); w++) {\n if (forWord.equalsIgnoreCase(wordsList.get(w))) {\n myNo = w;\n break;\n }\n }\n\n String similarString = similarWords.get(myNo);\n\n //similar string check\n String[] queryArray = similarString.replaceAll(\"[\\\\W&&[^\\\\s]]\", \"\").split(\"\\\\W+\");\n boolean flag = false;\n for (String s : queryArray) {\n if (s.equalsIgnoreCase(term.toString()) || wordsList.contains(term.toString())) {\n flag = true;\n break;\n }\n }\n if (flag == false) {\n similarString = similarString + \" \" + term.toString();\n similarWords.set(myNo, similarString);\n }\n //end of similar String check\n System.out.println(\"----------------------------------------\" + term.toString() + \" --- \" + docNo);\n strm.end();\n strm.close();\n return;\n }\n docNo++;\n }\n strm.end();\n strm.close();\n }\n\n }", "public List<WordDO> searchAllWord(String wordType, Integer startRow, Integer pageSize) throws DataAccessException;", "public void showPageWord(int page) {\n ArrayList<Word> fullDictionary = dictionaryManagement.getDictionary().getWords();\n System.out.println(\"No\\t|English\\t|Type\\t|Vietnamese\");\n \n for (int i = (page - 1) * 20; i < (page - 1) * 20 + 20; i ++) {\n if (i < fullDictionary.size()) {\n String aWord = String.valueOf(i + 1) + \"\\t|\" + fullDictionary.get(i).getWordTarget()\n + \"\\t|\" + fullDictionary.get(i).getWordExplain();\n System.out.println(aWord);\n }\n }\n }", "public static void Lookup(String wordToFind) throws IOException\n\t{\n\t\t//Make certain the word is not empty\n\t\tif(wordToFind.equals(\"\")){\n\t\t\tSystem.out.println(\"Invalid word.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Reset the list holding our results.\n\t\tmyList.clear();\n\t\t\n\t\t//This block takes the word and changes it so that it matches the format of the processed file\n\t\tunstemmed = wordToFind; //save an unstemmed version of the word for printing\n\t\twordToFind = wordToFind.replaceAll(\"\\\\p{Punct}\", \"\"); //parse out punctuation\n\t\twordToFind = ps.stem(wordToFind); //stem the word we are looking for to match collection format\n ps.reset(); //reset the stemmer so it is ready for the next word.\n\t\t\n //Print statement so we can take a look at the word once we got done stemming and fixing it up.\n\t\tSystem.out.println(\"Looking up postings for the stemmed term \" + wordToFind);\n\t\t\n\t\t\n\t\tkey.set(wordToFind);\n\t\treader.get(key, value);\n\t\tnumberOfDocsWordOccursIn = value.size();\n\t\t\n\t\t//Check to make certain there is an entry to work with. If there isn't, displays message and leaves method.\n\t\tWritable w = reader.get(key, value);\n\t\tif (w == null){\n\t\t\tSystem.out.println(\"The term did not exist in this collection.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Now to step through all the documents that contain the given word.\n\t\tfor (PairOfInts pair : value) {\n\t\t\t\n\t\t\t//Open the collection and buffered reader so we can look at the document that contains the word\n\t\t\tcollection = fs.open(new Path(collectionPath));\n\t\t\td = new BufferedReader(new InputStreamReader(collection)); \n\t\t\t\n\t\t\t//This line seeks out the location of the document in the file with the given offset\n\t\t\tcollection.seek(pair.getLeftElement());\n\t\t\tString s = d.readLine();\n\t\t\tString[] terms = s.split(\"\\\\s+\");\n\t\t\t\n\t\t\t\t\t\t\n\t\t\t//Acquires the number of times a word appears in the current document\n\t\t\tint timesTheWordOccuredInThisDoc = pair.getRightElement();\n\n\n\t\t\t//closes the reader so that the bufferedreader will return to the beginning of\n\t\t\t//the file for the next seek it does.\n\t\t\td.close();\n\t\t\tcollection.close();\n\t\t\t\n\t\t\t//Calculates the noramalized value of the TF.\n\t\t\tdouble normalizedTF = pair.getnormTF();\n\t\t\t\n\t\t\t//Store filename and number of times the word occured in that document and docs tf\n\t\t\tdouble d = dValues.get(terms[1]);\n\t\t\tdouble idf = Math.log(numDocs/value.size())/Math.log(2);\n\t\t\tdouble tfidf = normalizedTF * idf;\n\t\t\t\n\t\t\tListing temp = new Listing();\n\t\t\ttemp.docName = terms[1];\n\t\t\ttemp.count = timesTheWordOccuredInThisDoc;\n\t\t\ttemp.tf = normalizedTF;\n\t\t\ttemp.d = d;\n\t\t\ttemp.idf = idf;\n\t\t\ttemp.tfidf = tfidf;\n\t\t\tmyList.add(temp);\n\t\t\t\n\t\t}//End for loop\n\t\t\n\t\t\n\t\tprintLookup();\n\t\t\n\t}", "public abstract int getWordIx(CharSequence word);", "private void doIndexingWords(StringBuffer content) {\n\t\t}", "private void scanWord(MyStreamTokenizer st)\n throws IOException, CycApiException {\n if (verbosity > 5)\n System.out.println(st.sval);\n Object w = null;\n char firstChar = st.sval.charAt(0);\n if (st.sval.startsWith(\"#$\"))\n w = cycAccess.getKnownConstantByName(st.sval);\n else if (firstChar == '?')\n w = CycObjectFactory.makeCycVariable(st.sval);\n else if (st.sval.equals(\"#\")) {\n int nextTok = st.nextToken();\n if (nextTok == 39) {\n scanFunctionQuote();\n return;\n } else {\n st.pushBack();\n w = CycObjectFactory.makeCycSymbol(st.sval);\n }\n } else if (((firstChar == '-') && (!st.sval.equals(\"-\"))) ||\n Character.isDigit(firstChar)) {\n scanNumber(st.sval);\n return;\n } else\n w = CycObjectFactory.makeCycSymbol(st.sval);\n \n if ((parenLevel > 0) && (readStack.sp != parenLevel))\n // Within a list.\n readStack.push(consMarkerSymbol );\n \n readStack.push(w);\n checkQuotes();\n }", "public void findNext(){\r\n \r\n System.out.println(\"Find Next Triggered\");\r\n \r\n //Gets the index of the next word found\r\n index = this.getText().toLowerCase().indexOf(searchTerm, index);\r\n \r\n //If no next word found\r\n if(index == -1){\r\n \r\n // Sets the index back to the first word found\r\n index = this.getText().toLowerCase().indexOf(searchTerm, index);\r\n //Sets the caret to start of found word\r\n this.positionCaret(index);\r\n //Selects to the end of the found word\r\n this.selectEndOfNextWord();\r\n //Advances the index to the next character so it can move pass the current word\r\n index = index + 1;\r\n } else {\r\n //Sets the caret to start of found word\r\n this.positionCaret(index);\r\n //Selects to the end of the found word\r\n this.selectEndOfNextWord();\r\n //Advances the index to the next character so it can move pass the current word\r\n index = index + 1;\r\n }//end if\r\n \r\n }", "public List<Word> getWordsStartingAt(int start);", "private int ReadWordIndex(WordIterator iterator) {\n\t\tif (!iterator.hasNext()) return -1;\n\t\treturn SearchVocab(iterator.next());\n\t}", "private void wordSearch(String word, HashMap<String, SearchResult> resultMap, ArrayList<SearchResult> words) {\n\t\tfor (String path : index.get(word).keySet()) {\n\t\t\tint frequency = index.get(word).get(path).size();\n\t\t\tint initialPosition = index.get(word).get(path).first();\n\t\t\t\n\t\t\tif (!resultMap.containsKey(path)) {\n\t\t\t\tresultMap.put(path, new SearchResult(frequency, initialPosition, path));\n\t\t\t\twords.add(resultMap.get(path));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSearchResult searchResult = resultMap.get(path);\n\t\t\t\tsearchResult.addToFrequency(frequency);\n\t\t\t\tsearchResult.updateInitialPosition(initialPosition);\n\t\t\t}\n\t\t}\n\t}", "WordBean getWord(String word);", "String getWordEntryAtPosition(int position);", "void findAllWords() {\n\t\tScanner in = new Scanner(textEditor.getText());\n\t\tint head = 0;\n\t\twhile (in.hasNext()) {\n\t\t\tString value = in.next();\n\t\t\tif (value.equals(findWord)) {\n\t\t\t\tint tail = value.length();\n\t\t\t\tfinder.add(new WordPosition(head, tail + head +1));\n\t\t\t}\n\t\t\thead += (value.length()+1);\n\t\t}\n\t\tin.close();\n\t}", "@Override\r\n\tpublic void add(String word, int lineNum) {\r\n\t\tConcordanceDataElement cde = new ConcordanceDataElement(word);\r\n\t\tLinkedList<ConcordanceDataElement> newList = new LinkedList<>();\r\n\t\tint index = Math.abs(cde.hashCode()) % hashTable.length;\r\n\t\tif(hashTable[index] == null) {\r\n\t\t\tcde.addPage(lineNum);\r\n\t\t\tnewList.add(cde);\r\n\t\t\thashTable[index] = newList;\r\n\t\t}else {\r\n\t\t\titer = hashTable[index].listIterator();\r\n\t\t\tboolean addNewWord = true;\r\n\t\t\tboolean addNewPage = true;\r\n\t\t\twhile(iter.hasNext()) {\r\n\t\t\t\tConcordanceDataElement data = iter.next();\r\n\t\t\t\tif(data.compareTo(cde) == 0) {\r\n\t\t\t\t\tLinkedList<Integer> pageList = data.getList();\r\n\t\t\t\t\tListIterator<Integer> pageIter = pageList.listIterator();\r\n\t\t\t\t\twhile(pageIter.hasNext()) {\r\n\t\t\t\t\t\tint pageNum = pageIter.next();\r\n\t\t\t\t\t\tif(pageNum == lineNum) {\r\n\t\t\t\t\t\t\taddNewPage = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(addNewPage == true) {\r\n\t\t\t\t\t\tdata.addPage(lineNum);\r\n\t\t\t\t\t}\r\n\t\t\t\t\taddNewWord = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcde.addPage(lineNum);\r\n\t\t\tif(addNewWord == true) {\r\n\t\t\t\thashTable[index].add(cde);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "java.lang.String getWord();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set selected status to false.
@Override public void deselect() { selected = false; }
[ "public void setUnselected()\n {\n isSelected = false;\n }", "public void deselect() {\n selected = false;\n }", "public void toggle(){\n\t\tsetSelected(!selected);\n\t}", "public void toggleSelected() {\n\t\tselected = !selected;\n\t}", "public void toggleSelected() { selected = !selected; }", "public void uncheckAktorka() {\r\n cbAktorka.setSelected(false);\r\n }", "public void uncheck() {\n if (isSelected()) {\n click();\n }\n }", "public void deselect() {\n \t\tif (isChecked())\n \t\t\ttoggle();\n \t}", "private void deSelectCheckedState(){\n int noOfItems = navigationView.getMenu().size();\n for (int i=0; i<noOfItems;i++){\n navigationView.getMenu().getItem(i).setChecked(false);\n }\n }", "public void resetSelected(){\n\t\tfor(int i = 0 ; i < especesOpen.size() ; i++){\n\t\t\tespecesOpen.get(i).setSelected(false);\n\t\t}\n\t\tfor(int i = 0 ; i < especesClosed.size() ; i++){\n\t\t\tespecesClosed.get(i).setSelected(false);\n\t\t}\n\t}", "public void deselected();", "public void unselect() {\n\t\tthis.setBackground(null);\n\t}", "public void setDeselectAllowed(boolean deselectAllowed);", "public void changeSelection() {\n\t\t_selected = !_selected;\n\t}", "private void uncheckSelection() {\n rg.clearCheck();\n }", "public void deselect() {\n isSelected = false;\n assertSelectionWidget();\n remove( selection );\n }", "public void setNextUnselected()\n {\n if(next!=null){\n next.setNextUnselected();\n }\n isSelected=false;\n }", "public void setSelected()\n\t{\n\t\tset(\"selected\", true);\n\t}", "public void unselectAndStopPlaying() {\r\n if (selected) {\r\n selected = false;\r\n stopPlaying();\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Initializes Traffic Demand for each link
public void initializeTrafficDemand() { //int studentID1[] = {2, 0, 2, 1, 3, 0}; int studentID1[] = {2, 0, 2, 1, 3, 0, 6, 7, 0, 9, 2, 0, 2, 1, 3, 0, 6, 7, 0, 9}; b = new int[numberOfNodes][numberOfNodes]; System.out.println("Input Traffic demand matrix bij"); for(int i = 0; i < b.length; i++) { for(int j = 0; j < b.length; j++){ b[i][j] = Math.abs(studentID1[i] - studentID1[j]); //System.out.println("Traffic demand of " + " ("+(i) + " , " + (j) + ") :" + b[i][j]); System.out.print(b[i][j] + " "); } System.out.println(); } }
[ "public TrafficInfo(int sources, int dataAmount, int delta, int deadline, int weight, int type){\n this.sources = sources;\n this.dataAmount = dataAmount;\n this.delta = delta;\n this.deadline = deadline;\n this.weight = weight;\n if(type == 1){\n this.type = 1;\n }else if(type == 2){\n this.type = 2;\n }\n }", "public static void init_traffic_table() throws SQLException{\n\t\treal_traffic_updater.create_traffic_table(Date_Suffix);\n\t\t\n\t}", "public TrafficGenerator(Element xml, Element xml2, double forcedLoad) {\n int rate, cos, weight;\n double holdingTime;\n Element xml_links = (Element)xml.getOwnerDocument().getElementsByTagName(\"links\").item(0);\n globalCount = -1;\n calls = Integer.parseInt(xml.getAttribute(\"calls\"));\n load = forcedLoad;\n if (load == 0) {\n load = Double.parseDouble(xml.getAttribute(\"load\"));\n }\n if(xml.hasAttribute(\"max-rate\")){\n maxRate = Integer.parseInt(xml.getAttribute(\"max-rate\"));\n } else if(xml_links.hasAttribute(\"slot-size\")){\n maxRate = Integer.parseInt(xml_links.getAttribute(\"slot-size\"));\n }else{\n maxRate = 0;\n }\n\n if (Simulator.verbose) {\n System.out.println(xml.getAttribute(\"calls\") + \" calls, \" + xml.getAttribute(\"load\") + \" erlangs.\");\n }\n\n // Process calls\n NodeList callslist = xml.getElementsByTagName(\"calls\");\n numberCallsTypes = callslist.getLength();\n if (Simulator.verbose) {\n System.out.println(Integer.toString(numberCallsTypes) + \" type(s) of calls:\");\n }\n\n callsTypesInfo = new TrafficInfo[numberCallsTypes];\n \n TotalWeight = 0;\n meanRate = 0;\n meanHoldingTime = 0;\n\n for (int i = 0; i < numberCallsTypes; i++) {\n TotalWeight += Integer.parseInt(((Element) callslist.item(i)).getAttribute(\"weight\"));\n }\n\n for (int i = 0; i < numberCallsTypes; i++) {\n holdingTime = Double.parseDouble(((Element) callslist.item(i)).getAttribute(\"holding-time\"));\n rate = Integer.parseInt(((Element) callslist.item(i)).getAttribute(\"rate\"));\n cos = Integer.parseInt(((Element) callslist.item(i)).getAttribute(\"cos\"));\n weight = Integer.parseInt(((Element) callslist.item(i)).getAttribute(\"weight\"));\n meanRate += (double) rate * ((double) weight / (double) TotalWeight);\n meanHoldingTime += holdingTime * ((double) weight / (double) TotalWeight);\n callsTypesInfo[i] = new TrafficInfo(holdingTime, rate, cos, weight);\n if (Simulator.verbose) {\n System.out.println(\"#################################\");\n System.out.println(\"Weight: \" + Integer.toString(weight) + \".\");\n System.out.println(\"COS: \" + Integer.toString(cos) + \".\");\n System.out.println(\"Rate: \" + Integer.toString(rate) + \"Mbps.\");\n System.out.println(\"Mean holding time: \" + Double.toString(holdingTime) + \" seconds.\");\n } \n } \n \n // Process Services\n NodeList servicesList = xml2.getElementsByTagName(\"service\");\n numberServicesTypes = servicesList.getLength();\n if (Simulator.verbose) {\n System.out.println(Integer.toString(numberServicesTypes) + \" type(s) of services:\");\n }\n\n servicesTypesInfo = new ServiceInfo[numberServicesTypes];\n \n servicesTotalWeight = 0; \n\n for (int i = 0; i < numberServicesTypes; i++) {\n servicesTotalWeight += Integer.parseInt(((Element) servicesList.item(i)).getAttribute(\"weight\"));\n } \n \n for (int i = 0; i < numberServicesTypes; i++) {\n int serviceClass = Integer.parseInt(((Element) servicesList.item(i)).getAttribute(\"class\"));\n float degrTolMin = Float.parseFloat(((Element) servicesList.item(i)).getAttribute(\"degradation-tolerance-min\"));\n float degrTolMax = Float.parseFloat(((Element) servicesList.item(i)).getAttribute(\"degradation-tolerance-max\"));\n float delayTolMin = Float.parseFloat(((Element) servicesList.item(i)).getAttribute(\"delay-tolerance-min\"));\n float delayTolMax = Float.parseFloat(((Element) servicesList.item(i)).getAttribute(\"delay-tolerance-max\"));\n weight = Integer.parseInt(((Element) servicesList.item(i)).getAttribute(\"weight\")); \n float degrTol = 0;\n if(degrTolMax!=0)\n degrTol = (float) ThreadLocalRandom.current().nextDouble(degrTolMin, degrTolMax);\n float delayTol = 0;\n if(delayTolMax!=0)\n delayTol = (float) ThreadLocalRandom.current().nextDouble(delayTolMin, delayTolMax);\n servicesTypesInfo[i] = new ServiceInfo(serviceClass,degrTol,delayTol,weight);\n if (false) {\n System.out.println(\"#################################\");\n System.out.println(\"Class: \" + Integer.toString(serviceClass) + \".\");\n System.out.println(\"Degradation: \" + Float.toString(degrTol) + \".\");\n System.out.println(\"Delay: \" + Float.toString(delayTol));\n System.out.println(\"Weight\" + Integer.toString(weight));\n }\n }\n \n \n }", "public static void init(String firstLink){\n\t \n\t String nextLink = \"\";\n\t String query = \"SELECT url FROM links \";\n\n\t \n\t if(firstLink.toString().trim().length()>0){// if no start link is supplied it will check for the list of valid links(Only happens when the Paused button is pressed)\n\t \n\t\t crawl(firstLink);\n\t nextLink = sql.select(query);\n\n\t }else{\n\t\t nextLink = sql.select(query);\n\t }\n\t \n\t \n\t //Variables used to check the number of requests made every secon\n\t int request = 1;\n\t long StartTime = new Date().getTime(); \n\t \n\t \n\t while(!nextLink.trim().equals(\"\") && Action.equals(\"start\")){\n\ttry{\n\t\t\n\t\tif(!visitedLinks.contains(nextLink))//check link against list of visited links\n\t {\n\t\t crawl(nextLink); }\n\t\t\n\t\t \n\t\t nextLink = sql.select(query);\n\t\t request++;\n\t\t \n\t\t long EndTime = new Date().getTime();\n\t\t long dif = EndTime-StartTime;\n\t\t \n\t\t if(request > maxrequest){ request =1;StartTime = new Date().getTime();// restart values \n\t\t\t\t if(dif<1000){ \n\t\t\t \n\t\t\t try {\n\t\t\t\t Thread.sleep(1000-dif);\n\t\t\t } catch (InterruptedException e) {\n\t\t\t\t e.printStackTrace();\n\t\t \t}\n\t\t\t }\n\t\t }\n\t }\n\t catch(Exception ex){System.err.println(ex);}\n\n }\n }", "private void setupLinks() {\n //\n // now acquire links.\n //\n final int rawlinksnum = this.links.size();\n int[] rawlinks = new int[rawlinksnum * Link.LINK_SIZE];\n int idx = 0;\n //\n for (int i = 0; i < rawlinksnum; i++) {\n final int[] link = this.links.get(i);\n //\n final int src = link[0];\n final int dst = link[1];\n final int widx = link[2];\n //\n rawlinks[idx] = src; idx++;\n rawlinks[idx] = dst; idx++;\n rawlinks[idx] = widx; idx++;\n }\n //\n // sort raw links and eliminate redundant links.\n //\n Link.sortDstMaj(rawlinks, Link.ORDER_ASC);\n int[] links = Link.eliminateRedundantLinks(rawlinks);\n //\n if (links.length % Link.LINK_SIZE != 0) {\n throw new LinkArrayCorrupt();\n }\n //\n this.structure.links = links;\n final int linksnum = links.length / Link.LINK_SIZE;\n this.structure.linksnum = linksnum;\n //\n // count weights and assign weight indices. the\n // first weights is always 1.0.\n //\n int woff = 1;\n idx = 0;\n for (int i = 0; i < linksnum; i++) {\n final int src = links[idx + Link.IDX_SRC];\n final int dst = links[idx + Link.IDX_DST];\n final int widx = links[idx + Link.IDX_WEIGHT];\n //\n this.indeg[dst]++;\n this.outdeg[src]++;\n //\n // recurrence check.\n //\n final int lsrc = this.layermap[src];\n final int ldst = this.layermap[dst];\n if (lsrc >= ldst) {\n this.structure.recurrent = true;\n }\n //\n if (widx == WEIGHT_NEEDED) {\n links[idx + Link.IDX_WEIGHT] = woff; woff++; \n } else if (widx == Link.NOWEIGHT) {\n links[idx + Link.IDX_WEIGHT] = 0;\n }\n //\n idx += Link.LINK_SIZE;\n }\n //\n // dont count the first weight, which is constant 1.\n //\n this.structure.weightsnum = (woff - 1);\n //\n // create reverted links. the weight indices are\n // now in linksrev too. the reverted are sorted in\n // source major order.\n //\n int[] linksrev = links.clone();\n Link.sortSrcMaj(linksrev, Link.ORDER_ASC);\n //\n // swap src and dst in linksrev.\n //\n idx = 0;\n for (int i = 0; i < linksnum; i++) {\n final int src = linksrev[idx + Link.IDX_SRC];\n final int dst = linksrev[idx + Link.IDX_DST];\n //\n linksrev[idx + Link.IDX_DST] = src;\n linksrev[idx + Link.IDX_SRC] = dst;\n //\n idx += Link.LINK_SIZE;\n }\n this.structure.linksrev = linksrev;\n }", "private SpeedGraph(int numDevices){\n this.numDevices = numDevices;\n adj = (ArrayList<Link>[]) new ArrayList[numDevices];\n for (int i = 0; i < numDevices; i++){\n adj[i] = new ArrayList<Link>();\n }\n }", "public void init() throws LinkCapacityExceededException {\n for (Lsp lsp : domain.getAllLsps()) {\n addLsp(lsp);\n }\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public TrafficInfo(int dataAmount, int deadline, int weight, int type) {\n this.dataAmount = dataAmount;\n this.deadline = deadline;\n this.weight = weight;\n //type = 1;\n this.type = type;\n }", "public ExpressRoutePortsLocationBandwidths() {\n }", "public void initCampaignData() {\n tozAdCampaignAccount = \"init\";\n tozAdCampaignID = \"init\";\n baseViewIndex = 0;\n finalViewIndex = 0;\n repeatCycle = 0;\n }", "public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }", "public void setTrafficFromEachSuperAS(double traffic) {\n this.trafficFromSuperAS = traffic;\n }", "public DSALinkedList()\n {\n head = null;\n tail = null;\n count = 0;\n }", "private void setupAnts() {\n IntStream.range(0, numberOfAnts)\n .forEach(i -> {\n ants.forEach(ant -> {\n ant.clear();\n ant.visitCity(-1, random.nextInt(numberOfCities));\n });\n });\n currentIndex = 0;\n }", "private void initWaypoints() {\r\n switch (type) {\r\n case SEASHIP:\r\n seashipWaypoints();\r\n break;\r\n\r\n case INLANDSHIP:\r\n inlandshipWaypoints();\r\n break;\r\n }\r\n }", "public void initStrategy() {\n\t\tfTable.clear();\n\t\tIterator<Router> it = control.getRouters();\n\t\twhile (it.hasNext()) {\n\t\t\tRouter router = it.next();\n\t\t\tif (this == router) continue;\n\t\t\tcostFrom.put(router, INFINITY);\n\t\t\tcostTo.put(router, INFINITY);\n\t\t\tfTable.put(router, randomNeighbor());\n\t\t}\n\t}", "void createGlobalTrafficCounter() {\n TrafficCounter tc;\n if (timer != null) {\n tc = new TrafficCounter(this, timer, \"GlobalTC\",\n checkInterval);\n setTrafficCounter(tc);\n tc.start();\n }\n }", "@Override\n\tpublic void init() {\n\t\tint i = 0;\n\t\tfor (Link l : this.node.getInLinks().values()) {\n\t\t\tQNetwork network = netsimEngine.getNetsimNetwork() ;\n\t\t\tthis.inLinksArrayCache[i] = network.getNetsimLinks().get(l.getId());\n\t\t\ti++;\n\t\t}\n\t\t/* As the order of links has an influence on the simulation results,\n\t\t * the nodes are sorted to avoid indeterministic simulations. dg[april08]\n\t\t */\n\t\tArrays.sort(this.inLinksArrayCache, new Comparator<NetsimLink>() {\n\t\t\t@Override\n\t\t\tpublic int compare(NetsimLink o1, NetsimLink o2) {\n\t\t\t\treturn o1.getLink().getId().compareTo(o2.getLink().getId());\n\t\t\t}\n\t\t});\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the update operation on a nonexistent attribute.
@Test public void testUpdateNonExistingAttribute() { restaurantHourService.add(restaurant.getId(), restaurantHours.getDay(), 1000, 3000); int id = restaurantHourService.all().get(0).getId(); assertEquals(ATTRIBUTE_NOT_FOUND, restaurantHourService.update(id, "a", "a")); }
[ "public void testUpdateAttribute_NullNewElement() throws Exception {\n try {\n extractor.updateAttribute(null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Test(description = \"update interface with one attribute for non existing interface\")\n public void updateOneAttribute4NonExisting()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final AttributeStringData attr = data.getAttributeString(\"Attribute\");\n data.create();\n\n final InterfaceData inter = data.getInterface(\"TestInterface\").addAttribute(attr);\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select attribute dump\"),\n attr.getName(),\n \"check that only one attribute is defined\");\n }", "public void testUpdateAttribute() throws Exception {\n GraphElement newElement = getAttributeNodeForUpdate();\n\n extractor.updateAttribute(newElement);\n\n assertSame(\"The attribute compartment should be updated.\", newElement, extractor.extractAttribute());\n }", "@Test\n public void testUpdateNonExisting() {\n restaurantHourService.add(restaurant.getId(), restaurantHours.getDay(), 1000, 3000);\n restaurantHourService.add(restaurant2.getId(), restaurantHours2.getDay(), 2000, 4000);\n assertEquals(ID_NOT_FOUND, restaurantHourService.update(1234, \"attr\", \"val\"));\n }", "@Test\n public void testUpdateNonExisting() throws Exception {\n try {\n testOneAddGet(true, \"a\", null, \"z\", \"1\", \"a\", \"c\", null, null);\n Assert.fail(\"expected an OperationException for updating non-existent.\");\n } catch (OperationException e) {\n Assert.assertEquals(StatusCode.ENTRY_NOT_FOUND, e.getStatus());\n }\n }", "@Test\n public void noUpdateWhenNotValidParams() {\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_update_userNull() throws Exception {\n instance.update(null);\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testUpdateOnNull() {\r\n service.update(null);\r\n }", "@Test\n public void testUpdateNegativeItemIsNull() throws Exception{\n Item item = null;\n itemDao.update(item);\n }", "@Test\r\n public void deleteUserAttributeNonexistingAttribute() throws Exception {\r\n try {\r\n deleteAttribute(USER_TEST, \"nonexisting\");\r\n EscidocRestSoapTestBase.failMissingException(UserAttributeNotFoundException.class);\r\n }\r\n catch (final Exception e) {\r\n EscidocRestSoapTestBase.assertExceptionType(UserAttributeNotFoundException.class, e);\r\n }\r\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testUpdateOnNullName() {\r\n service.update(new User(1, null, \"\", \"\", null, null));\r\n }", "@Test\r\n public void updateUserAttributeWrongLastModificationDate() throws Exception {\r\n String key = \"KeyForTestCreate\";\r\n String value = \"ValueForTestCreate\" + System.currentTimeMillis();\r\n String attributeXml =\r\n createAttribute(USER_TEST, \"<attribute xmlns=\\\"http://www.escidoc.de/schemas/attributes/0.1\\\"\" + \" name=\\\"\"\r\n + key + \"\\\">\" + value + \"</attribute>\");\r\n String id = getObjidValue(attributeXml);\r\n\r\n updateAttribute(USER_TEST, id, attributeXml);\r\n try {\r\n updateAttribute(USER_TEST, id, attributeXml);\r\n EscidocRestSoapTestBase.failMissingException(OptimisticLockingException.class);\r\n }\r\n catch (final Exception e) {\r\n EscidocRestSoapTestBase.assertExceptionType(OptimisticLockingException.class, e);\r\n }\r\n }", "public void testUpdateAttribute_CompartmentNotFoundException() throws Exception {\n node.clearContaineds();\n\n try {\n extractor.updateAttribute(getAttributeNodeForUpdate());\n fail(\"CompartmentNotFoundException expected.\");\n } catch (CompartmentNotFoundException e) {\n //good\n }\n }", "@Test(expected = EntityNotFoundException.class)\n public void test_update_NotFound1() throws Exception {\n User user1 = createUser(1, false);\n\n clearDB();\n\n user1.setUsername(\"new\");\n instance.update(user1);\n }", "@Test(expected = IllegalArgumentException.class)\r\n public void testUpdateOnUnExistingId() {\r\n when(repository.get(userId)).thenReturn(null);\r\n service.update(user);\r\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void updateTest2() {\n\t\tms.update(doesnotExistMovie);\n\t}", "@Test(expectedExceptions = DataAccessException.class)\r\n public void testUpdateWrongDistance() {\r\n ActivityRecord record = setActivityRecord();\r\n recordDao.create(record);\r\n assertNotNull(recordDao.findActivityRecord(record.getId()));\r\n\r\n record.setDistance(-5);\r\n recordDao.update(record);\r\n }", "@Test(expected = EntityNotFoundException.class)\n public void test_update_NotFound2() throws Exception {\n User user1 = createUser(1, true);\n\n user1.setUsername(\"new\");\n instance.update(user1);\n }", "public void testUpdateOperation_NullNewElement() throws Exception {\n try {\n extractor.updateOperation(null);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Query to select all questions for a given lesson
public ArrayList<ArrayList<ArrayList<String>>> getAllQuestions(int lesson_id) { open(); ArrayList<ArrayList<ArrayList<String>>> allQs = new ArrayList<>(); // Gets each difficulty individually so problems of the same difficulty are grouped together for (int i = 1; i < 4; i++) { ArrayList<ArrayList<String>> someQs = new ArrayList<>(); Cursor c = myDatabase.rawQuery("SELECT question_text, numbers, answer_1, answer_2, answer_3" + ", answer_4, correct_answer FROM Answers JOIN question_template ON " + "Answers.question_id=question_template.question_id WHERE question_template.lesson_id=" + lesson_id + " AND difficulty=" + i + " ORDER BY RANDOM()", null); while (c.moveToNext()) { ArrayList<String> oneQ = new ArrayList<>(); for (int j = 0; j < 7; j++) { oneQ.add(c.getString(j)); } someQs.add(oneQ); } c.close(); allQs.add(someQs); } close(); return allQs; }
[ "List<Question> getQuestions(String surveyId);", "public ArrayList<String> selectQuestionText(int lesson_id, int difficulty){\n open();\n\n Cursor c = myDatabase.rawQuery(\"SELECT question_text, numbers, answer_1, answer_2, answer_3\" +\n \", answer_4, correct_answer FROM Answers JOIN question_template ON \" +\n \"Answers.question_id=question_template.question_id WHERE question_template.lesson_id=\" +\n lesson_id + \" AND difficulty=\" + difficulty + \" ORDER BY RANDOM() LIMIT 1\", null);\n\n ArrayList<String> questionText = new ArrayList<>();\n\n c.moveToNext();\n for (int i=0; i<7; i++) {\n questionText.add(c.getString(i));\n }\n\n c.close();\n close();\n\n return questionText;\n }", "List<Question> findAllQuestionsAndSubjects();", "List<Question27> selectByExample(Question27Example example);", "List<Question> getAllQuestions();", "@GetMapping(\"/api/exam/{examId}/question\")\n\tpublic List<Question> findAllQuestionsForExam(\n\t\t\t\t@PathVariable(\"examId\") int examId) {\n\t\tOptional<Exam> optionalExam = examRepository.findById(examId);\n\t\tif(optionalExam.isPresent()) {\n\t\t\tExam exam = optionalExam.get();\n\t\t\tList<Question> questions = exam.getQuestions();\n//\t\t\tint count = questions.size();\n\t\t\treturn questions;\n\t\t}\n\t\treturn null;\n\t}", "public List<Quiz> findQuizzesByLessonPlanId(Long lessonPlanId);", "public List<Questions> getAllQuestionsHard() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 1 AND 10\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public List<Questions> getAllQuestionsMedium() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 11 AND 20\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public List<Question> getQuestionbySid(int sid);", "public List<TemplateExamQuestion> getQuestions(Group group);", "List<Q11flatanswers> selectByExample(Q11flatanswersExample example);", "List<AssessmentExplain> selectAll();", "app.onepass.apis.Question getQuestions(int index);", "public List<Questions> getAllQuestionsEasy() {\n List<Questions> questionList = new ArrayList<>();\n db = getReadableDatabase();\n Cursor c = db.rawQuery(\"SELECT * FROM \" + QuestionsTable.Table_name + \" WHERE _id BETWEEN 21 AND 30\", null);\n\n if (c.moveToFirst()){\n do {\n Questions question = new Questions();\n question.setQuestion(c.getString(c.getColumnIndex(QuestionsTable.Column_Question)));\n question.setOption1(c.getString(c.getColumnIndex(QuestionsTable.Column_Option1)));\n question.setOption2(c.getString(c.getColumnIndex(QuestionsTable.Column_Option2)));\n question.setOption3(c.getString(c.getColumnIndex(QuestionsTable.Column_Option3)));\n question.setOption4(c.getString(c.getColumnIndex(QuestionsTable.Column_Option4)));\n question.setAnswerNr(c.getInt(c.getColumnIndex(QuestionsTable.Column_Answer_Nr)));\n questionList.add(question);\n } while (c.moveToNext());\n }\n c.close();\n return questionList;\n }", "public Collection<Question> getQuestions();", "List<Question> getListQuestions( int nIdTask );", "Collection<Lesson> getLessons() throws DataAccessException;", "List<QuestionGroup> selectByExample(QuestionGroupExample example);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove the physical link, link layer, and transport layer that were created in setup, verify they are gone.
@After public void tearDown() throws IOException, InterruptedException { try { //------Remove transport layer-------- RemoteTransportLayerUtils.removeTransportLayer(transportUuid, socket); //------Remove link layer-------- RemoteLinkLayerUtils.removeLink(linkUuid, socket); //------Remove physical link-------- RemotePhysicalLinkUtils.tryRemovePhysicalLink(pLinkUuid, socket); // verify physical link, link layer, and transport layer are gone List<SharedMessages.UUID> uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.PhysicalLink); assertThat(uuidList.contains(pLinkUuid), is(false)); uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.Linklayer); assertThat(uuidList.contains(linkUuid), is(false)); uuidList = CustomCommsNamespaceUtils.getLayerUuidsByType(socket, CommType.TransportLayer); assertThat(uuidList.contains(transportUuid), is(false)); } finally { socket.close(); } }
[ "@Test\n public void removeValidConnectedPhysicalMachine(){\n //represents a physical machine which should both added to and later removed from the list of connected physical machines\n PhysicalMachine pm1 = new PMBuilder().build();\n //represents a physical machine which should be just added to the list of connected physical machines\n PhysicalMachine pm2 = new PMBuilder().addressIP(\"140.150.10.10\").username(\"\").userPassword(\"\").build();\n //physical machine pm is added to the list \"physicalMachines\" for after test cleanup\n //and keeping the consistent environment for testing\n physicalMachines.add(pm1);\n //physical machine pm is added to the list \"physicalMachines\" for after test cleanup\n //and keeping the consistent environment for testing\n physicalMachines.add(pm2);\n \n assertFalse(\"Physical machine \" + pm1.toString() + \" should not be connected \"\n + \"(it has not been added to the list of connected physical machines yet)\", sut.isConnected(pm1));\n assertFalse(\"Physical machine \" + pm2.toString() + \" should not be connected \"\n + \"(it has not been added to the list of connected physical machines yet)\", sut.isConnected(pm2));\n \n sut.add(pm1);\n sut.add(pm2);\n \n assertTrue(\"Physical machine \" + pm1.toString() + \" should be connected \"\n + \"(it has already been added to the list of connected physical machines)\",sut.isConnected(pm1));\n assertTrue(\"Physical machine \" + pm2.toString() + \" should be connected \"\n + \"(it has already been added to the list of connected physical machines)\",sut.isConnected(pm2));\n \n assertTrue(\"Physical machine \" + pm1.toString() + \" should be successfully removed, \"\n + \"but it is not\",sut.remove(pm1));\n \n assertFalse(\"Physical machine \" + pm1.toString() + \" should not be connected, \"\n + \"because it has been removed from the list of connected physical machines\", sut.isConnected(pm1));\n assertTrue(\"Physical machine \" + pm2.toString() + \" should be connected\",sut.isConnected(pm2));\n }", "@Test\n public void removeValidNotConnectedPhysicalMachine(){\n //represents a physical machine which is not connected and should be removed from\n //the list of connected physical machines (disconnected)\n PhysicalMachine pm1 = new PMBuilder().build();\n //represents a physical machine which is connected and is used to show\n //that unsuccessful remove operation cannot affect another connected physical machines\n PhysicalMachine pm2 = new PMBuilder().addressIP(\"140.150.10.10\").username(\"\").userPassword(\"\").build();\n //physical machine pm is added to the list \"physicalMachines\" for after test cleanup\n //and keeping the consistent environment for testing\n physicalMachines.add(pm2);\n \n sut.add(pm2);\n \n assertFalse(\"Physical machine \" + pm1.toString() + \" should not be possible to remove, \"\n + \"because it should not be connected\",sut.remove(pm1));\n \n assertFalse(\"Physical machine \" + pm1.toString() + \" should not be connected\", sut.isConnected(pm1));\n assertTrue(\"Physical machine \" + pm2.toString() + \" should be connected\",sut.isConnected(pm2));\n }", "@Test\n public void testClearVtapNetworks() {\n store.clearVtapNetworks();\n assertEquals(ERR_SIZE, 0, store.getVtapNetworkCount());\n }", "public void cleanUpConnections()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < this.electricityNetworks.size(); i++)\r\n\t\t\t{\r\n\t\t\t\tthis.electricityNetworks.get(i).cleanUpArray();\r\n\r\n\t\t\t\tif (this.electricityNetworks.get(i).conductors.size() == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tthis.electricityNetworks.remove(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tFMLLog.severe(\"Failed to clean up wire connections!\");\r\n\t\t}\r\n\t}", "@Test\n public void testRemovePhysicalLink() throws IOException, CCommException\n {\n DeleteRequestData request = DeleteRequestData.newBuilder()\n .setPhysicalLinkUuid(SharedMessageUtils.convertUUIDToProtoUUID(testUuid))\n .build();\n \n PhysicalLinkNamespace ccommMessage = PhysicalLinkNamespace.newBuilder()\n .setType(PhysicalLinkMessageType.DeleteRequest)\n .setData(request.toByteString())\n .build();\n \n TerraHarvestPayload payload = createPayload(ccommMessage);\n TerraHarvestMessage message = createPhysicalLinkMessage(ccommMessage);\n \n // mock the channel the message came from\n RemoteChannel channel = mock(RemoteChannel.class);\n \n when(m_CustomCommsService.getPhysicalLinkName(testUuid)).thenReturn(\"Finn\");\n \n m_SUT.handleMessage(message, payload, channel);\n \n // verify remove physical link was called\n verify(m_CustomCommsService).deletePhysicalLink(\"Finn\");\n \n Message testMessage = null;\n \n verify(m_MessageFactory).createPhysicalLinkResponseMessage(eq(message), \n eq(PhysicalLinkMessageType.DeleteResponse), eq(testMessage));\n verify(m_ResponseWrapper).queue(channel);\n }", "@BeforeEach\n void clean() throws IOException {\n client.deleteMXRec(fqdn);\n client.deleteMXRec(newFqdn);\n }", "@Test\n public void removeNullPhysicalMachine(){\n //represents a physical machine which is connected and is used to show\n //that unsuccessful remove operation cannot affect another connected physical machines\n PhysicalMachine pm = new PhysicalMachine(\"140.150.12.0\",\"10000\",\"Hornd\",\"140nb48\");\n //physical machine pm is added to the list \"physicalMachines\" for after test cleanup\n //and keeping the consistent environment for testing\n physicalMachines.add(pm);\n \n sut.add(pm);\n \n exception.expect(IllegalArgumentException.class);\n sut.remove(null);\n \n exception = ExpectedException.none();\n assertTrue(\"Physical machine \" + pm.toString() + \" should be connected\",sut.isConnected(pm));\n }", "@Test\n public void getConnectedPhysicalMachinesWithNonemptyPMsListAfterPMDeletion(){\n //represents a physical machine which is added to the list of connected physical machines,\n //but later is removed\n PhysicalMachine pm1 = new PMBuilder().build();\n //represents a connected physical machine\n PhysicalMachine pm2 = new PMBuilder().addressIP(\"10.0.0.10\").webserverPort(\"1154\")\n .username(\"\").userPassword(\"\").build();\n \n //physical machine pm is added to the list \"physicalMachines\" for after test cleanup\n //and keeping the consistent environment for testing\n physicalMachines.add(pm2);\n \n sut.add(pm1);\n sut.add(pm2);\n \n sut.remove(pm1);\n \n List<PhysicalMachine> expectedList = Arrays.asList(pm2);\n List<PhysicalMachine> actualList = sut.getConnectedPhysicalMachines();\n \n assertListsEquals(expectedList,actualList);\n }", "@Test\n public void testRemovePeerDetailsSuccess() {\n participantsConfig.removePeer(IpAddress.valueOf(PEER_IP));\n expectLastCall().once();\n replay(participantsConfig);\n\n peerManager.activate();\n\n peerManager.removePeerDetails(IpAddress.valueOf(PEER_IP));\n verify(participantsConfig);\n }", "void tunnelCleanServers();", "@Test(dependsOnMethods = {\"testAddConnection\"})\n public void testRemoveConnection() {\n System.out.println(\"removeConnection\");\n instance.removeConnection(testConnection);\n assertEquals(0, instance.getStoredConnections().size());\n }", "public final synchronized void clearRegisteredNetLayers()\n\t{\n\t\tnetLayerRepository.clear();\n\t}", "public void cleanup() {\n mLegacyAdvertisers.clear();\n mCallbackWrappers.clear();\n mAdvertisingSets.clear();\n }", "private void resetLinkProperties() {\n mLinkObserver.clearLinkProperties();\n mConfiguration = null;\n mDhcpResults = null;\n mTcpBufferSizes = \"\";\n mHttpProxy = null;\n\n mLinkProperties = new LinkProperties();\n mLinkProperties.setInterfaceName(mInterfaceName);\n }", "@Before\n public void clean() {\n this.flyway.clean();\n this.flyway.migrate();\n }", "public void clearUpLanes () {\r\n\t\tupLanes = null;\r\n\t}", "private void cleanUp() {\n RigLog.d(\"__RigFirmwareUpdateManager.cleanUp__\");\n \tRigLeConnectionManager.getInstance().setObserver(mOldConnectionObserver);\n\n \tif(mUpdateDevice != null) {\n \t\tif(RigCoreBluetooth.getInstance().getDeviceConnectionState(mUpdateDevice.getBluetoothDevice()) ==\n BluetoothProfile.STATE_CONNECTED) {\n \t\t\tRigLeConnectionManager.getInstance().disconnectDevice(mUpdateDevice);\n \t\t}\n \t}\n\n \tinitStateVariables();\n }", "@Test\n public void testIsValidonNotConnectedMap() {\n mapModel.removeLink(\"TerritoryD\", \"TerritoryC\");\n\n boolean expResult = false;\n boolean result = mapModel.isValid();\n assertEquals(expResult, result);\n }", "@After\n\tpublic void tearDown() {\n\n\t\tbatchSchemaService.setLocalFolderLocation(localFolderLocation);\n\t\tbatchSchemaService.setBaseFolderLocation(baseFolderLocation);\n\t\tFileUtils.deleteDirectoryAndContents(localBaseFolder + File.separator + batchInstanceIdSuccess + DOCUSHARE_BATCH_FOLDER);\n\t\tFileUtils.deleteDirectoryAndContents(localBaseFolder + File.separator + DOCUSHARE_FOLDER);\n\t\tFile file = new File(actualOutputFolder + File.separator + batchInstanceIdSuccess + File.separator + batchInstanceIdSuccess\n\t\t\t\t+ DOCUSHARE_XML);\n\t\tfile.delete();\n\t\tFileUtils.deleteDirectoryAndContents(localBaseFolder + File.separator + batchInstanceIdFailure + DOCUSHARE_BATCH_FOLDER);\n\t\tFile file2 = new File(actualOutputFolder + File.separator + batchInstanceIdFailure + File.separator + batchInstanceIdFailure\n\t\t\t\t+ DOCUSHARE_XML);\n\t\tfile2.delete();\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the processor build from the processor update chain(UpdateParams.UPDATE_CHAIN)
private UpdateRequestProcessor getProcessor(SolrQueryRequest req, SolrQueryResponse rsp) { UpdateRequestProcessorChain processorChain = req.getCore().getUpdateProcessingChain(req.getParams().get(UpdateParams.UPDATE_CHAIN)); return processorChain.createProcessor(req, rsp); }
[ "public EntryProcessor getProcessor()\n {\n return m_processor;\n }", "private ProcessChain getProcessChain()\n\t{\n\t\tProcessChain currentProcessChain=null;\n\t\t\n\t\ttry{\n\t\t\tProcessChainDao processChainProvider=ProcessChainDaoFactory.create();\n\t\t\tProcessChain[] escProcessChain=\n\t\t\t\tprocessChainProvider.findByDynamicWhere(\"ID=(SELECT PROCESSCHAIN_ID FROM EMP_SER_REQ_MAP WHERE ID=?)\",\n\t\t\t\t\t\tnew Object[]{getEsrMapId()});\n\t\t\tif(escProcessChain.length>0)\n\t\t\t{\n\t\t\t\tcurrentProcessChain=escProcessChain[0];\n\t\t\t}\n\t\t}\n\t\tcatch(ProcessChainDaoException ex){\n\t\t\tlogger.error(\"Unable to obtain process chain information for current EMP_SER_REQ_MAP ID: \" + getEsrMapId());\n\t\t}\n\t\t\n\t\treturn(currentProcessChain);\n\t}", "public Processor getProcessor() {\n return processor;\n }", "public IGenericProcessor getProcessor(String key) {\n return this.line.getProcessor(key);\n }", "public abstract Parts getProcessor();", "@Override\n\t\tpublic ProcessRequest getRequestProcessor() {\n\n\t\t\tif(processor==null){\n\t\t \tprocessor = new ProcessRequest(\n\t getTRDData(), // TestRecordHelper\n\t getLogUtilities()); // no custom test step support\n\n\t Processor linked = processor.getDriverCommandProcessor();\n\t\t\t\tlinked.setLogUtilities(getLogUtilities());\n\t\t\t\tlinked.setTestRecordData(getTRDData());\n\n\t Processor dc = new DCDriverCommand();\n\t dc.setChainedProcessor(linked);\n\t processor.setDriverCommandProcessor(dc);\n\t\t\t}\n\t\t\treturn processor;\n\t\t}", "public ProcessingChain getProcessingChain(Channel channel)\n {\n return mProcessingChains.get(channel.getChannelID());\n }", "public int getProcessor(){\r\n\t\treturn _processor;\r\n\t}", "private PSComponentProcessorProxy getComponentProcessor(IPSRequestContext req)\n throws PSCmsException\n {\n if (m_componentProcessor == null)\n {\n m_componentProcessor = new PSComponentProcessorProxy(\n PSComponentProcessorProxy.PROCTYPE_SERVERLOCAL, req);\n }\n else\n {\n m_componentProcessor.setProcessorContext(req);\n }\n\n return m_componentProcessor;\n }", "public ProcessorImplementationElements getProcessorImplementationAccess() {\n\t\treturn pProcessorImplementation;\n\t}", "public String getProcessor() {\n\t\treturn id[0];\n\t}", "@CheckForNull\n private AbstractBuild getBuildForDeprecatedMethods() {\n Executor e = Executor.currentExecutor();\n if (e != null) {\n Executable exe = e.getCurrentExecutable();\n if (exe instanceof AbstractBuild) {\n AbstractBuild b = (AbstractBuild) exe;\n if (b.getProject() == this)\n return b;\n }\n }\n return getLastBuild();\n }", "@Override\n \tpublic ImageProcessor getProcessor(int n) {\n \t\tif (n < 1 || n > layers.size()) return null;\n \t\t// Create a flat image on the fly with everything on it, and return its processor.\n \t\tfinal Layer layer = layers.get(n-1);\n \t\tfinal Loader loader = layer.getProject().getLoader();\n \t\tLong cid;\n \t\tsynchronized (id_cache) {\n \t\t\tcid = id_cache.get(layer.getId());\n \t\t\tif (null == cid) {\n \t\t\t\tcid = loader.getNextTempId();\n \t\t\t\tid_cache.put(layer.getId(), cid);\n \t\t\t}\n \t\t}\n \t\tImageProcessor ip;\n \t\tsynchronized (cid) { \n \t\t\tImagePlus imp = loader.getCachedImagePlus(cid);\n \t\t\tif (null == imp || null == imp.getProcessor() || null == imp.getProcessor().getPixels()) {\n \t\t\t\tip = loader.getFlatImage(layer, this.roi, this.scale, this.c_alphas, this.type, this.clazz, null).getProcessor();\n \t\t\t\tif (invert) ip.invert();\n \t\t\t\tloader.cacheImagePlus(cid, new ImagePlus(\"\", ip));\n \t\t\t} else ip = imp.getProcessor();\n \t\t}\n \t\treturn ip;\n \t}", "public Process getProcess() {\n\t\tOperator parent = getParent();\n\t\tif (parent == null) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn parent.getProcess();\n\t\t}\n\t}", "public List<Processor> getProcessors() {\n return processors;\n }", "public RepProcessor getRepProcessor() {\r\n\t\treturn repProc;\r\n\t}", "long getBuild();", "public PCB retrieveFirstProcess() {\r\n return readyQueue.peek();\r\n }", "public ImageProcessor getImageProcessor(String name) {\n\t\t\n\t\tImageProcessor ip = (ImageProcessor)imageCache.get(name);\n\t\t\n\t\tif (ip==null) {\n\t\t\t// need to create ImagePlus object\n\t\t\taddImageProcessor(name);\n\t\t\tip = (ImageProcessor)imageCache.get(name);\n\t\t}\n\t\t\n\t\treturn ip;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method will check whether the default box types were created in the file
public ArrayList<Object> validateDefaultBoxTypes(){ ArrayList<Object> btList = new ArrayList<Object>(); if(getList(PRODUCT_PATH)==null){ btList.addAll(defaultBoxTypes()); return btList; } for(int i=0; i< defaultBoxTypes().size(); i++){ if(defaultBoxTypes().get(i).equals(getList(PRODUCT_PATH).iterator())){ }else{ btList.add(defaultBoxTypes().get(i)); } } if(btList.size()<0){ return null; }else{ return btList; } }
[ "public boolean readFileTypeBox()throws IOException, EOFException {\r\n int length;\r\n long longLength=0;\r\n int pos;\r\n int nComp;\r\n boolean foundComp=false;\r\n\r\n // Get current position in file\r\n pos = in.getPos();\r\n \r\n // Read box length (LBox)\r\n length = in.readInt();\r\n if(length==0) { // This can not be last box\r\n throw new Error(\"Zero-length of Profile Box\");\r\n\t}\r\n\r\n // Check that this is a File Type box (TBox)\r\n if(in.readInt() != FILE_TYPE_BOX) {\r\n return false;\r\n\t}\r\n\r\n // Check for XLBox\r\n if(length==1) { // Box has 8 byte length;\r\n longLength = in.readLong();\r\n throw new IOException(\"File too long.\");\r\n }\r\n\r\n // Read Brand field\r\n in.readInt();\r\n\r\n // Read MinV field\r\n in.readInt();\r\n\r\n // Check that there is at least one FT_BR entry in in\r\n // compatibility list\r\n nComp = (length - 16)/4; // Number of compatibilities.\r\n for(int i=nComp; i>0; i--){\r\n if(in.readInt() == FT_BR)\r\n foundComp = true;\r\n }\r\n if(!foundComp) {\r\n return false;\r\n\t}\r\n\r\n return true;\r\n }", "private void checkAndInsertDefaultEntries() {\n\t\tinsertDefaultMediaFormats();\n\t}", "boolean isSetBox();", "public void verifyThemes() {\n\t//check all images, javascript and json objects\n }", "private void validateDefaultBlock() {\r\n getDefaultBlock();\r\n if (!OtherF.isMaterial(defaultBlock)) {\r\n setDefaultBlock(\"STONE\");\r\n }\r\n }", "boolean hasBoxCodeSize();", "boolean isSetBagtype();", "boolean isSetKeyBox();", "@Test\n public void loadFileSuccessfulWithNoTypesInfoTest() {\n loadFileSuccessfulTest(false);\n }", "public void checkDefaults() {\n Iterator types = getIteratorListOfSecondChild( \"defaults\" );\n while( types.hasNext() ) {\n Element type = ( Element )types.next();\n String id = type.getAttributeValue( \"id\" );\n String value = type.getAttributeValue( \"value\" );\n\n if ( baseProcess.getConfiguration( id ) == null ) {\n baseProcess.setConfiguration( id, value );\n }\n\n }\n }", "boolean isImageType();", "@Test\n public void testBasicDatatypesNoDefaults() throws IOException {\n assertEqual(createFile(\"basicDatatypesNoDefaults\"),\n \"testBasicDatatypesNoDefaults\", \"0\");\n }", "private boolean hasEmptyEditor() {\n return getEmptyEditors().size() > 0;\n }", "Type checkFileContent(File content) {\n if (checkCWL(content)) {\n return Type.CWL;\n } else if (checkWDL(content)) {\n return Type.WDL;\n }\n return Type.NONE;\n }", "@Test\n public void testBasicDatatypesDefaults() throws IOException {\n assertEqual(createFile(\"basicDatatypesDefaults\"),\n \"testBasicDatatypesDefaults\", \"0\");\n }", "boolean hasEspecialTxtType();", "private Box createFileTypeGroup() {\r\n\t\t\r\n\t\tPanel panel = new Panel();\r\n\t\tBox box = new Box(panel, \"Type\");\r\n\t\tCheckboxGroup group = new CheckboxGroup();\r\n\r\n\t\tpanel.setLayout(new GridLayout(2, 0));\r\n\t\t\r\n\t\tCheckbox cb1 = new Checkbox(\"AU File\", group, true);\r\n\t\tcb1.addItemListener(new ItemListener () {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED)\r\n\t\t\t\t\tfileType = AUTYPE;\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel.add(cb1);\r\n\r\n\t\tCheckbox cb2 = new Checkbox(\"Wave File\", group, false);\r\n\t\tcb2.addItemListener(new ItemListener () {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED)\r\n\t\t\t\t\tfileType = WAVETYPE;\r\n\t\t\t}\r\n\t\t});\r\n\t\tpanel.add(cb2);\r\n\t\treturn box;\r\n\t}", "private boolean checkIfOpenFileEditorSupportedForObject(IAbapGitFile file) {\n\t\tIAbapGitObject abapObject = (IAbapGitObject) file.eContainer();\n\t\tif (abapObject.getType() == null) { //non code meta files\n\t\t\tif (!file.getName().endsWith(\"xml\")) { //$NON-NLS-1$\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public static void checkBoxes()\n\t{\n\t\tif (boxes == false)\n\t\t{\n\t\t\tSystem.out.print(\"\\nYou look through the boxes and find something shiny that catches your eye.\\n\\nYou can TAKE bedroom key, MOVE boxes, or LOOK elsewhere.\\n--> \");\n\t\t\tString choice = input.nextLine().toUpperCase();\n\t\t\t\n\t\t\tif (choice.contains(\"TA\") || choice.contains(\"BED\") || choice.contains(\"KEY\"))\n\t\t\t{\n\t\t\t\tScenarios.Introduction();\n\t\t\t\tcloset = false;\n\t\t\t\tboxes = true;\n\t\t\t\tbedroomKey = true;\n\t\t\t\tSystem.out.println(\"\\nInventory: \");\n\t\t\t\taddItem(bedroom_Key);\n\t\t\t}\n\t\t\telse if (choice.contains(\"LO\") || choice.contains(\"EL\"))\n\t\t\t{\n\t\t\t\tScenarios.Introduction();\n\t\t\t\tcloset = false;\n\t\t\t\tboxes = true;\n\t\t\t}\n\t\t\telse if (choice.contains(\"MO\") || choice.contains(\"BO\"))\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nYou have moved the boxes out of the way where you can access the cage.\\nMaybe you should take a closer look.\\n\\nYou can LOOK elsewhere or LOOK closer.\\n--> \");\n\t\t\t\tString choice1 = input.nextLine().toUpperCase();\n\t\t\t\tif (choice1.contains(\"EL\"))\n\t\t\t\t{\n\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t\tboxesMoved = true;\n\t\t\t\t}\n\t\t\t\telse if (choice1.contains(\"CL\"))\n\t\t\t\t{\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t\tboxesMoved = true;\n\t\t\t\t\tcheckCage();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (bedroomKey == false && boxesMoved == false)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nYou make your way back to the boxes and see a key laying among some boxes.\\n\\nYou can TAKE bedroom key, MOVE boxes, or LOOK elsewhere.\\n--> \");\n\t\t\t\tString choice = input.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (choice.contains(\"TA\") || choice.contains(\"BED\") || choice.contains(\"KEY\"))\n\t\t\t\t{\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t\tbedroomKey = true;\n\t\t\t\t\tSystem.out.println(\"\\nInventory: \");\n\t\t\t\t\taddItem(bedroom_Key);\n\t\t\t\t}\n\t\t\t\telse if (choice.contains(\"MO\") || choice.contains(\"BO\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nYou have moved the boxes out of the way where you can access the cage.\\nMaybe you should take a closer look.\\n\\nYou can LOOK elsewhere or LOOK closer.\\n--> \");\n\t\t\t\t\tString choice1 = input.nextLine().toUpperCase();\n\t\t\t\t\tif (choice1.contains(\"EL\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\t\tcloset = false;\n\t\t\t\t\t\tboxes = true;\n\t\t\t\t\t\tboxesMoved = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (choice1.contains(\"CL\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcloset = false;\n\t\t\t\t\t\tboxes = true;\n\t\t\t\t\t\tboxesMoved = true;\n\t\t\t\t\t\tcheckCage();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (choice.contains(\"LO\") || choice.contains(\"EL\"))\n\t\t\t\t{\n\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (bedroomKey == true && boxesMoved == false)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nYou make your way to the unmoved boxes, making it impossible to get to the cage.\\n\\nYou can MOVE boxes or LOOK elsewhere.\\n--> \");\n\t\t\t\tString choice = input.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (choice.contains(\"MO\") || choice.contains(\"BO\"))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"\\nYou have moved the boxes out of the way where you can access the cage.\\nMaybe you should take a closer look.\\n\\nYou can LOOK elsewhere or LOOK closer.\\n--> \");\n\t\t\t\t\tString choice1 = input.nextLine().toUpperCase();\n\t\t\t\t\tif (choice1.contains(\"EL\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tcloset = false;\n\t\t\t\t\t\tboxes = true;\n\t\t\t\t\t\tboxesMoved = true;\n\t\t\t\t\t}\n\t\t\t\t\telse if (choice1.contains(\"CL\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\t\tcloset = false;\n\t\t\t\t\t\tboxes = true;\n\t\t\t\t\t\tboxesMoved = true;\n\t\t\t\t\t\tcheckCage();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (choice.contains(\"LO\") || choice.contains(\"EL\"))\n\t\t\t\t{\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (bedroomKey == false && boxesMoved == true)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nYou make your way back to the moved boxes and see a key lying on the floor.\\n\\nYou can TAKE bedroom key or LOOK elsewhere.\\n--> \");\n\t\t\t\tString choice = input.nextLine().toUpperCase();\n\t\t\t\tif (choice.contains(\"TA\") || choice.contains(\"BED\") || choice.contains(\"KEY\"))\n\t\t\t\t{\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t\tbedroomKey = true;\n\t\t\t\t\tSystem.out.println(\"\\nInventory: \");\n\t\t\t\t\taddItem(bedroom_Key);\n\t\t\t\t}\n\t\t\t\telse if (choice.contains(\"LO\") || choice.contains(\"EL\"))\n\t\t\t\t{\n\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (bedroomKey == true && boxesMoved == true)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\nThe boxes have been moved out of the way and there is nothing among them,\\nbut you can access the cage.\\n\\nYou can LOOK elsewhere or CHECK cage.\\n--> \");\n\t\t\t\tString choice = input.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tif (choice.contains(\"LO\") || choice.contains(\"EL\"))\n\t\t\t\t{\n\t\t\t\t\tScenarios.Introduction();\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t}\n\t\t\t\telse if (choice.contains(\"CH\") || choice.contains(\"CA\"))\n\t\t\t\t{\n\t\t\t\t\tcloset = false;\n\t\t\t\t\tboxes = true;\n\t\t\t\t\tcheckCage();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Debemos recordar que el sprite contiene una imagen en la clase Animacion que es la que se muestra, por ello utilizamos la clase animacion para obtener la imagen y luego su ancho. Lo mismo sucede en el caso de querer obtener la altura. Sirve para obtener el ancho del sprite
public double getAncho() throws Exception{ //Se obtiene la informacion del frame actual FrameInfo i = animaciones.get(indiceAnimacion).getFrame().getFrameInfo(); //Se obtiene la matriz escalar de 2x2 Matriz escalar = Matriz.getMatrizEscalar(escalaX, escalaY); //Se crea una matriz con las dimensiones del frame actual que corresponde al ancho y alto del sprite Matriz dimensiones = new Matriz(1,2); dimensiones.setPosicion((double) i.ancho, 0, 0); dimensiones.setPosicion((double)i.alto, 0, 1); /* * Se multiplica la matriz de dimensiones por la matriz escalar y se guarda el resultado * de la multiplicacion en la matriz de dimensiones, que ahora contiene las dimensiones escaladas. */ dimensiones = Matriz.Multiplicar(dimensiones, escalar); //Se devuelve el ancho return dimensiones.getPosicion(0, 0); }
[ "private BufferedImage getFrameAnimacionActual() {\n return mov.get(movimientoHacia).getFrameActual();\n }", "Hero(Bitmap a_res, int a_x, int a_y, int a_hero_type){\n m_x = a_x;\n m_y = a_y;\n m_newxLocation = a_x;\n m_newyLocation = a_y;\n m_width = 128;\n m_height = 128;\n m_type = a_hero_type;\n\n // hero starts out standing still so not moving\n m_moving = false;\n\n // giongto cycle through 2 images\n Bitmap image[] = new Bitmap[2];\n m_spritesheet = a_res;\n\n // image starts out facing forwards\n image[0] = Bitmap.createBitmap(m_spritesheet, 0, 9*m_height, m_width, m_height);\n image[1] = Bitmap.createBitmap(m_spritesheet, 0, 9*m_height, m_width, m_height);\n\n //for(int i = 0; i < image.length; i++){\n // image[i] = Bitmap.createBitmap(spritesheet, 0, i*height, width, height);\n //}\n\n m_animation.setFrames(image);\n m_animation.setDelay(360);\n\n switch (a_hero_type){\n // knight\n case 1:\n //(1 + .5) * 130\n m_range = 195;\n m_damage = 10;\n // miliseconds\n m_attack_speed = 500;\n m_move_speed = 30;\n m_lvl = 1;\n m_neededExp = 10 + (5 * (m_lvl - 1));\n m_exp = 0;\n m_animation.setDelay(390 - m_move_speed);\n break;\n // archer\n case 2:\n //(4.5 + .5)* 130\n m_range = 650;\n m_damage = 4;\n m_attack_speed = 1250;\n m_move_speed = 17;\n m_lvl = 1;\n m_neededExp = 10 + (5 * (m_lvl - 1));\n m_exp = 0;\n m_animation.setDelay(390 - m_move_speed);\n break;\n // wizard\n case 3:\n //(4 + .5) * 130\n m_range = 585;\n m_damage = 6;\n // miliseconds\n m_attack_speed = 1250;\n m_move_speed = 17;\n m_lvl = 1;\n m_neededExp = 10 + (5 * (m_lvl - 1));\n m_exp = 0;\n m_animation.setDelay(390 - m_move_speed);\n break;\n }\n\n }", "private BufferedImage getAnimatiaPtFrameCurent()\n {\n if(exista_miscare()==false) //daca nu apas vreo tasta personajul este pozitionat cu fata\n {\n return rick_default.getImgCurenta();\n }\n else if(xMove<0)\n return rick_din_stanga.getImgCurenta();\n else if(xMove>0)\n return rick_din_dreapta.getImgCurenta();\n else if(yMove<0)\n return rick_din_spate.getImgCurenta();\n else\n return rick_din_fata.getImgCurenta();\n }", "private BufferedImage getAnimazioneCorrente(){\r\n\t\tif(!attivo)\r\n\t\t\treturn Risorse.teletrasporto_inattivo;\r\n\t\telse\r\n\t\t\treturn teletrasporto_attivo.getFrameCorrente();\r\n\t}", "public PImage getCurrentTexture()\n\t{\n\t\tPImage ret;\n\t\tint time = processing.millis();\n\t\n\t\t\n\t\tif (pushAnimation.isRunning()) {\n\t\t\tret = pushAnimation.getCurrentImage(time);\n\t\t}else if (jumpAnimation.isRunning() || jumpAnimationGun.isRunning())\n\t\t{\n\t\t\tret = unarmed?jumpAnimation.getCurrentImage(time):jumpAnimationGun.getCurrentImage(time);\n\t\t}\n\t\telse if (walkAnimation.isRunning() || walkAnimationGun.isRunning())\n\t\t{\n\t\t\tret = unarmed?walkAnimation.getCurrentImage(time):walkAnimationGun.getCurrentImage(time);\n\t\t}\n\t\telse if (idleAnimation.isRunning() || idleAnimationGun.isRunning())\n\t\t{\n\t\t\tret = unarmed?idleAnimation.getCurrentImage(time):idleAnimationGun.getCurrentImage(time);\n\t\t}\n\t\telse if (winAnimation.isRunning()) {\n\t\t\tret = winAnimation.getCurrentImage(time);\n\t\t}\n\t\telse if (loseAnimation.isRunning()) {\n\t\t\tret = loseAnimation.getCurrentImage(time);\n\t\t}\n\t\telse if (stuckToTheGroundAnimation.isRunning()) {\n\t\t\tret = stuckToTheGroundAnimation.getCurrentImage(time);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tidleAnimation.start();\n\t\t\tret = unarmed?idleAnimation.getCurrentImage(time):idleAnimationGun.getCurrentImage(time);\n\t\t}\n\t\t\n\t\tif (ret == null) System.out.println(\"no anim? serious trouble!\"+time);\n\t\t\n\t\tif (facing == Facing.LEFT)\n\t\t{\n\t\t\tret = BImage.mirrorAroundY(processing, ret);\n\t\t}\n\t\t\n\t\treturn ret;\n\t}", "public Image getAltSprite(){\n return alternatingSprites[alternateCount/30-animatedSprites.length];\n }", "public BufferedImage getCurrentSprite() {\n\treturn this.sprites[currentAnimatedspriteID].get();\n }", "public MyAnimation getSprite();", "public Image getSprite( int spriteId );", "private void switchdirection(int a_direction){\n\n Bitmap[] image = new Bitmap[2];\n switch(a_direction){\n case m_left:\n // change the bitmap images\n image[0] = Bitmap.createBitmap(m_spritesheet, 0, 3*m_height, m_width, m_height);\n image[1] = Bitmap.createBitmap(m_spritesheet, 0, 4*m_height, m_width, m_height);\n m_animation.setFrames(image);\n // make sure hero doesnt over run anything\n if(m_x - m_move_speed < m_newxLocation){\n m_x -= (m_x - m_newxLocation);\n m_direction = 0;\n }\n else{\n m_x -= m_move_speed;\n }\n\n break;\n case m_right:\n\n // change the bitmap images\n image[0] = Bitmap.createBitmap(m_spritesheet, 0, 0*m_height, m_width, m_height);\n image[1] = Bitmap.createBitmap(m_spritesheet, 0, 1*m_height, m_width, m_height);\n m_animation.setFrames(image);\n\n if(m_x + m_move_speed > m_newxLocation){\n m_x += (m_newxLocation - m_x);\n m_direction = 0;\n }\n else{\n m_x += m_move_speed;\n }\n break;\n case m_up:\n\n // change the bitmap images\n image[0] = Bitmap.createBitmap(m_spritesheet, 0, 6*m_height, m_width, m_height);\n image[1] = Bitmap.createBitmap(m_spritesheet, 0, 7*m_height, m_width, m_height);\n m_animation.setFrames(image);\n\n if(m_y - m_move_speed < m_newyLocation){\n m_y -= (m_y - m_newyLocation);\n m_direction = 0;\n }\n else{\n m_y -= m_move_speed;\n }\n break;\n case m_down:\n\n // image starts out facing forwards\n image[0] = Bitmap.createBitmap(m_spritesheet, 0, 9*m_height, m_width, m_height);\n image[1] = Bitmap.createBitmap(m_spritesheet, 0, 10*m_height, m_width, m_height);\n m_animation.setFrames(image);\n\n if(m_y + m_move_speed > m_newyLocation){\n m_y += (m_newyLocation - m_y);\n m_direction = 0;\n }\n else{\n m_y += m_move_speed;\n }\n break;\n case m_still:\n m_moving = false;\n break;\n\n\n }\n\n }", "protected BufferedImage getEntityTexture(){\n\t\treturn this.animation.getDefaultAnimation()[0];\n\t}", "public MyAnimation getRearSprite();", "public Sprite getSprite() {\r\n\t\tif (this.currentAnimation != null && (this.currentAnimation.isPlayed() || this.getSprite() == null)) {\r\n\t\t\treturn this.currentAnimation.getSprite();\r\n\t\t} else {\r\n\t\t\treturn this.tile.getSprite();\r\n\t\t}\r\n\t}", "public Image meurt() {\n\t\t\tString str;//va contenir le nom de l'image\n\t\t\tImageIcon ico;//nom de la nouvelle instance de la methode ImageIcon\n\t\t\tImage img;//va etre egale a ico, et va retourner l'image voulu\n\t\t\t\n\t\t\tstr = \"/images/bouleDeFeu.png\";\n\t\t\tthis.compteurMort++;//on incremente un compteur\n\t\t\tif(this.compteurMort > 100) {//si le compteur arrive jusqu'a 100, mario meurt, \n\t\t\t\tstr = \"/images/mortDEMario.png\";//donc on change d'image\n\t\t\t\tthis.setY(this.getY() - 1);//fait monter l'image de la mort de mario vers le ciel\n\t\t\t}\n\t\t\tico = new ImageIcon(getClass().getResource(str));\n\t\t\timg = ico.getImage();\n\t\t\treturn img;\n\t\t}", "public BufferedImage getSprite() {\n return loader.GetPokeman(this.getName());\n }", "private BufferedImage get_images(){\r\n if(_movingDirection == '-' || _movingDirection == 'R'){\r\n return _images[3];\r\n }\r\n if(_movingDirection == 'L'){\r\n return _images[2];\r\n }\r\n if(_movingDirection == 'U'){\r\n return _images[0];\r\n }\r\n if(_movingDirection == 'D'){\r\n return _images[1];\r\n }\r\n return null;\r\n }", "public Animation get_anim(String anim_name) {\n\n\t\tArrayList<Integer> dur_list;\n\t\tArrayList<Image> image_list;\n\t\tswitch (anim_name) {\n\t\tcase \"fly\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"f1\"));\n\t\t\timage_list.add(get_image(\"f2\"));\n\t\t\timage_list.add(get_image(\"f3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tdur_list.add(50);\n\t\t\tbreak;\n\t\tcase \"grub_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gr1\"));\n\t\t\timage_list.add(get_image(\"gr2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"grub_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"gl1\"));\n\t\t\timage_list.add(get_image(\"gl2\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(100);\n\t\t\tdur_list.add(100);\n\t\t\tbreak;\n\t\tcase \"mario_run_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"ml1\"));\n\t\t\timage_list.add(get_image(\"ml2\"));\n\t\t\timage_list.add(get_image(\"ml3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_run_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mr1\"));\n\t\t\timage_list.add(get_image(\"mr2\"));\n\t\t\timage_list.add(get_image(\"mr3\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_left\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mls\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tcase \"mario_still_right\":\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(\"mrs\"));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(200);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\timage_list = new ArrayList<Image>();\n\t\t\timage_list.add(get_image(anim_name));\n\t\t\tdur_list = new ArrayList<>();\n\t\t\tdur_list.add(50);\n\t\t}\n\t\treturn new Animation(image_list, dur_list);\n\t}", "public int getTextureState() {\n return MathHelper.clamp(MAX_TEXTURE_STATE * aggro / MAX_AGGRO, 0, MAX_TEXTURE_STATE);\n }", "private AnimatedImage armorSprite() throws FileNotFoundException {\n\n\t\tString[] imageArray = new String[4];\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\timageArray[i] = \"sprites/BluePotion\" + i + \".png\";\n\t\t}\n\n\t\tAnimatedImage armor = new AnimatedImage(imageArray, 0.125, 70, 70);\n\n\t\treturn armor;\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Test to check that all the key value (currency rates) pairs in tableMap are from apiMap and there are no additional outside key value pair
@Test public void checkNoElementInTableOutsideAPI() throws ParseException { // Table Data Map<String, Object> tableMap = dashboardPage.addRowDataToMap(); // API Data responsePage = new APIResponsePageObject(driver); Map<String, Object> apiMap = responsePage.getRateDataFromAPI(); // Map that has key - values missing in tableMap that are in apiMap Map notInAPIMap = new HashMap<>(tableMap); notInAPIMap.keySet().removeAll(apiMap.keySet()); notInAPIMap.values().removeAll(apiMap.values()); if(notInAPIMap.size() > 1) { errorMessage = "Html table is having " + notInAPIMap.toString() + " that are not from API"; Assert.fail(errorMessage); } else { Assert.assertTrue(notInAPIMap.size() == 0); } }
[ "@Test\n\tpublic void checkAllAPICrncyInTable() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// Map that has key - values missing in tableMap that are in apiMap\n\t\tMap missingCurrenciesInTableMap = new HashMap<>(apiMap);\n\t\tmissingCurrenciesInTableMap.keySet().removeAll(tableMap.keySet());\n\t\tmissingCurrenciesInTableMap.values().removeAll(tableMap.values());\n\t\t\n\t\tif(missingCurrenciesInTableMap.size() > 1)\n\t\t{\n\t\t\terrorMessage = \"Html table is missing \" + missingCurrenciesInTableMap.toString() + \" from API\";\n\t\t\tAssert.fail(errorMessage);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tassertSame(tableMap, apiMap);\n\t\t}\n\t}", "@Test\n\tpublic void assertCurrencyInTableMatchesAPI() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// outer loop iterating through table \n\t\tfor (Map.Entry<String,Object> entry : tableMap.entrySet()) \n\t\t{\n\t\t\t// inner loop iterating through api data\n for (Map.Entry<String,Object> apientry : apiMap.entrySet()) \n {\n \t\t// condition to verify currency in table matches with api\n \t\tif (entry.getValue().equals(apientry.getValue()))\n \t\t{\n \t\t\tSystem.out.println(\"TableKey: \" + entry.getKey() + \" APIKey: \" + apientry.getKey());\n \t\t\terrorMessage = \"The currency in the table for \" + entry.getValue() + \" is \" + entry.getKey() + \" but in api is \" + apientry.getKey();\n \t\t\t// Assertion to check the currency is same in table and api for rates\n \t\t\tAssert.assertEquals(entry.getKey().toString(), apientry.getKey().toString(), errorMessage);\n \t\t}\n }\n\t\t}\n\t}", "@Test\n\tpublic void assertRateInTableMatchesAPI() throws ParseException\n\t{\n\t\t// Table Data\n\t\tMap<String, Object> tableMap = dashboardPage.addRowDataToMap();\n\t\t// API Data\n\t\tresponsePage = new APIResponsePageObject(driver);\n\t\tMap<String, Object> apiMap = responsePage.getRateDataFromAPI();\n\t\t\n\t\t// outer loop iterating through table \n\t\tfor (Map.Entry<String,Object> entry : tableMap.entrySet()) \n\t\t{\n\t\t\t// inner loop iterating through api data\n for (Map.Entry<String,Object> apientry : apiMap.entrySet()) \n {\n \t\t// condition to verify currency in table matches with api\n \t\tif (entry.getKey().equals(apientry.getKey()))\n \t\t{\n \t\t\tSystem.out.println(\"TableValue: \" + entry.getValue() + \" APIValue: \" + apientry.getValue());\n \t\t\terrorMessage = \"The currency rate in the table for \" + entry.getKey() + \" is \" + entry.getValue() + \" but the api value is \" + apientry.getValue();\n \t\t\t// Assertion to check the rates for currency is same in table and api\n \t\t\tAssert.assertEquals(entry.getValue().toString(), apientry.getValue().toString(), errorMessage);\n \t\t}\n }\n\t\t}\n\t}", "@Test\n public void testCurrencyName() throws JSONException {\n\n for (i=0;i<respArray.length();i++){\n //Assert.assertTrue(respArray.getJSONObject(i).getString(\"currencies\").contains(\"INR\"),\"Currency name does not match\");\n int num_curr = respArray.getJSONObject(i).getJSONArray(\"currencies\").length();//Get number of currencies. Some nations have multiple currencies\n for(int j=0;j<num_curr;j++){\n try{\n //Compare each currency to look for INR\n Assert.assertTrue(respArray.getJSONObject(i).getJSONArray(\"currencies\").getJSONObject(j).getString(\"code\").contains(\"INR\"));\n //if found, break the loop\n break;\n }catch (AssertionError e){//Handle the exception if curecny is not equal to INR\n if(j == num_curr-1){//If at the end of search INR is not found throw assertion error\n throw e;\n }\n }\n }\n }\n }", "@Test\r\n\tpublic void testGetRevenueAccountMap() throws Exception {\r\n\t\t\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.set(Calendar.YEAR, 2018);\r\n\t\t\r\n\t\tfy = client.getFinancialYear(cal.getTime());\r\n\r\n\t\tMap<String, Integer> accountMap = client.getRevenueAccountMap(fy.getId());\r\n\t\t\r\n\t\tif (accountMap!=null) {\r\n\t\t\tSet<String> keys = accountMap.keySet();\r\n\t\t\t\r\n\t\t\tfor (String k : keys) {\r\n\t\t\t\tSystem.out.println(k + \" => \" + accountMap.get(k));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "private static Map<String, Double> createCurrencyPairRates() {\n\t\t\n\t\tMap<String, Double> currencyRates = new HashMap<>();\n\t\tcurrencyRates.put(\"AUDUSD\", 0.8371);\n\t\tcurrencyRates.put(\"CADUSD\", 0.8711);\n\t\tcurrencyRates.put(\"CNYUSD\", 6.1715);\n\t\tcurrencyRates.put(\"EURUSD\", 1.2315);\n\t\tcurrencyRates.put(\"GBPUSD\", 1.5683);\n\t\tcurrencyRates.put(\"NZDUSD\", 0.7750);\n\t\tcurrencyRates.put(\"USDJPY\", 119.95);\n\t\tcurrencyRates.put(\"EURCZK\", 27.6028);\n\t\tcurrencyRates.put(\"EURDKK\", 7.4405);\n\t\tcurrencyRates.put(\"EURNOK\", 8.6651);\n\t\t\n\t\treturn currencyRates;\n\t\t\n\t}", "@Test\n public void testOPER_17973_MISSINGTRK_NOTFULL_MANDITORY() throws Exception {\n\n // String lRandom = String.valueOf( getRandom() );\n String lRandom = \"MISSINGTRK\";\n\n // create inventory map\n Map<String, String> lMapInventory = new LinkedHashMap<String, String>();\n lMapInventory.put( \"SERIAL_NO_OEM\", \"'ACFT-\" + lRandom + \"'\" );\n lMapInventory.put( \"PART_NO_OEM\", \"'ACFT_ASSY_PN1'\" );\n lMapInventory.put( \"INV_CLASS_CD\", \"'ACFT'\" );\n lMapInventory.put( \"MANUFACT_CD\", \"'10001'\" );\n lMapInventory.put( \"LOC_CD\", \"'OPS'\" );\n lMapInventory.put( \"INV_COND_CD\", \"'REPREQ'\" );\n lMapInventory.put( \"AC_REG_CD\", \"'\" + lRandom + \"'\" );\n lMapInventory.put( \"INV_OPER_CD\", \"'NORM'\" );\n lMapInventory.put( \"ISSUE_ACCOUNT_CD\", \"'5'\" );\n lMapInventory.put( \"MANUFACT_DT\", \"to_date('01/01/2015','mm/dd/yyyy')\" );\n\n // insert map\n runInsert( TableUtil.getInsertForTableByMap( TableUtil.C_RI_INVENTORY, lMapInventory ) );\n\n // create inventory map\n Map<String, String> lMapInventoryAssy = new LinkedHashMap<String, String>();\n lMapInventoryAssy.put( \"SERIAL_NO_OEM\", \"'ASSY-\" + lRandom + \"'\" );\n lMapInventoryAssy.put( \"PART_NO_OEM\", \"'ENG_ASSY_PN1'\" );\n lMapInventoryAssy.put( \"INV_CLASS_CD\", \"'ASSY'\" );\n // This value has been changed to validate the upper case and trim change for OPER=21977\n lMapInventoryAssy.put( \"MANUFACT_CD\", \"' ABC11 '\" );\n lMapInventoryAssy.put( \"LOC_CD\", \"'OPS'\" );\n lMapInventoryAssy.put( \"INV_COND_CD\", \"'INSRV'\" );\n lMapInventoryAssy.put( \"MANUFACT_DT\", \"to_date('01/01/2015','mm/dd/yyyy')\" );\n\n // insert map\n runInsert( TableUtil.getInsertForTableByMap( TableUtil.C_RI_INVENTORY, lMapInventoryAssy ) );\n\n // create inventory attach map\n Map<String, String> lMapInventoryAttach = new LinkedHashMap<String, String>();\n lMapInventoryAttach.put( \"PARENT_SERIAL_NO_OEM\", \"'ACFT-\" + lRandom + \"'\" );\n lMapInventoryAttach.put( \"PARENT_PART_NO_OEM\", \"'ACFT_ASSY_PN1'\" );\n lMapInventoryAttach.put( \"PARENT_MANUFACT_CD\", \"'10001'\" );\n lMapInventoryAttach.put( \"ATTACH_SERIAL_NO_OEM\", \"'ASSY-\" + lRandom + \"'\" );\n lMapInventoryAttach.put( \"ATTACH_PART_NO_OEM\", \"'ENG_ASSY_PN1'\" );\n lMapInventoryAttach.put( \"ATTACH_MANUFACT_CD\", \"'ABC11'\" );\n lMapInventoryAttach.put( \"BOM_PART_CD\", \"'ENG-ASSY'\" );\n lMapInventoryAttach.put( \"EQP_POS_CD\", \"'1'\" );\n lMapInventoryAttach.put( \"INSTALL_DT\", \"to_date('01/01/2015','mm/dd/yyyy')\" );\n\n // insert map\n runInsert( TableUtil.getInsertForTableByMap( TableUtil.C_RI_ATTACH, lMapInventoryAttach ) );\n\n // Add c_ri_sub table for trk of ACFT\n Map<String, String> lChild = new LinkedHashMap<String, String>();\n lChild.put( \"PARENT_SERIAL_NO_OEM\", \"'ACFT-\" + lRandom + \"'\" );\n lChild.put( \"PARENT_PART_NO_OEM\", \"'ACFT_ASSY_PN1'\" );\n lChild.put( \"PARENT_MANUFACT_CD\", \"'10001'\" );\n lChild.put( \"BOM_PART_CD\", \"'ACFT-SYS-1-1-TRK-BATCH-PARENT'\" );\n lChild.put( \"EQP_POS_CD\", \"'1'\" );\n lChild.put( \"SERIAL_NO_OEM\", \"'TRK-ACFT-00001'\" );\n lChild.put( \"PART_NO_OEM\", \"'A0000010'\" );\n lChild.put( \"MANUFACT_CD\", \"'11111'\" );\n lChild.put( \"INV_CLASS_CD\", \"'TRK'\" );\n lChild.put( \"MANUFACT_DT\", \"to_date('01/01/2015','mm/dd/yyyy')\" );\n lChild.put( \"INSTALL_DT\", \"to_date('01/01/2016','mm/dd/yyyy')\" );\n\n // insert map\n runInsert( TableUtil.getInsertForTableByMap( TableUtil.C_RI_INVENTORY_SUB, lChild ) );\n\n // add c_ri_sub for trk of eng\n lChild.put( \"PARENT_SERIAL_NO_OEM\", \"'ASSY-\" + lRandom + \"'\" );\n lChild.put( \"PARENT_PART_NO_OEM\", \"'ENG_ASSY_PN1'\" );\n lChild.put( \"PARENT_MANUFACT_CD\", \"'ABC11'\" );\n lChild.put( \"BOM_PART_CD\", \"'ENG-SYS-1-1-TRK-BATCH-PARENT'\" );\n lChild.put( \"EQP_POS_CD\", \"'1'\" );\n lChild.put( \"SERIAL_NO_OEM\", \"'TRK-ENG-00001'\" );\n lChild.put( \"PART_NO_OEM\", \"'E0000010'\" );\n lChild.put( \"MANUFACT_CD\", \"'11111'\" );\n lChild.put( \"INV_CLASS_CD\", \"'TRK'\" );\n lChild.put( \"MANUFACT_DT\", \"to_date('01/01/2015','mm/dd/yyyy')\" );\n lChild.put( \"INSTALL_DT\", \"to_date('01/01/2016','mm/dd/yyyy')\" );\n\n // insert map\n runInsert( TableUtil.getInsertForTableByMap( TableUtil.C_RI_INVENTORY_SUB, lChild ) );\n\n // call inventory validation\n Assert.assertTrue( StoreProcedureRunner.Inventory.runInventoryValidationAndImport(\n getConnection(), true, true, \"NOT\", TestConstants.PARALLELISM_DEGREE_DEFAULT,\n TestConstants.CHUNKSIZE_DEFAULT, TestConstants.GATHER_STATS_DEFAULT ) == 1 );\n\n checkInventoryNoWarnings( \"PASS\" );\n\n // Check trk of ACFT is not in missing inventory table\n // String lQuery = \"select 1 from \" + TableUtil.AL_MISSING_INVENTORY;\n // Assert.assertFalse( \"Check AL_MISSING_INVENTORY table to verify the record not exists\",\n // RecordsExist( lQuery ) );\n\n // Check trk of ACFT is not in missing inventory table\n String lQuery = \"select 1 from \" + TableUtil.AL_MISSING_INVENTORY\n + \" where part_no_oem = 'A0000010' OR config_slot = 'ACFT-SYS-1-1-TRK-BATCH-PARENT' \";\n Assert.assertFalse( \"Check AL_MISSING_INVENTORY table to verify the record not exists\",\n RecordsExist( lQuery ) );\n\n // Check trk of ENG is not in missing inventory table\n lQuery = \"select 1 from \" + TableUtil.AL_MISSING_INVENTORY\n + \" where part_no_oem = 'E0000010' OR config_slot = 'ENG-SYS-1-1-TRK-BATCH-PARENT'\";\n Assert.assertFalse( \"Check AL_MISSING_INVENTORY table to verify the record not exists\",\n RecordsExist( lQuery ) );\n\n // Check other trk(s) are in the missing inventory table\n lQuery = \"select 1 from \" + TableUtil.AL_MISSING_INVENTORY\n + \" WHERE part_no_oem = 'A0000001' OR config_slot = 'ACFT-SYS-1-1-TRK-P1'\";\n Assert.assertTrue( \"Check AL_MISSING_INVENTORY table to verify the record not exists\",\n RecordsExist( lQuery ) );\n\n lQuery = \"select 1 from \" + TableUtil.AL_MISSING_INVENTORY\n + \" WHERE part_no_oem = 'E0000001' OR config_slot = 'ENG-SYS-1-1-TRK-P1'\";\n Assert.assertTrue( \"Check AL_MISSING_INVENTORY table to verify the record not exists\",\n RecordsExist( lQuery ) );\n\n // check ACFT-SYS-1-1-TRK-BATCH-PARENT auto creation is 0\n lQuery =\n \"SELECT AUTO_CREATE FROM AL_TEMP_INVENTORY_SUB WHERE (assmbl_db_id, assmbl_cd, assmbl_bom_id) IN \"\n + \"(SELECT assmbl_db_id, assmbl_cd, assmbl_bom_id FROM eqp_assmbl_bom WHERE assmbl_cd='ACFT_CD1' AND assmbl_bom_cd='ACFT-SYS-1-1-TRK-BATCH-PARENT')\";\n Assert.assertTrue( \"Check auto creation is 0.\",\n getIntValueFromQuery( lQuery, \"AUTO_CREATE\" ) == 0 );\n\n // check ENG-SYS-1-1-TRK-BATCH-PARENT auto creation is 0\n lQuery =\n \"SELECT AUTO_CREATE FROM AL_TEMP_INVENTORY_SUB WHERE (assmbl_db_id, assmbl_cd, assmbl_bom_id) IN \"\n + \"(SELECT assmbl_db_id, assmbl_cd, assmbl_bom_id FROM eqp_assmbl_bom WHERE assmbl_cd='ENG_CD1' AND assmbl_bom_cd='ENG-SYS-1-1-TRK-BATCH-PARENT')\";\n Assert.assertTrue( \"Check auto creation is 0.\",\n getIntValueFromQuery( lQuery, \"AUTO_CREATE\" ) == 0 );\n\n // check ACFT-SYS-1-1-TRK-P1 auto creation is 1\n lQuery =\n \"SELECT AUTO_CREATE FROM AL_TEMP_INVENTORY_SUB WHERE (assmbl_db_id, assmbl_cd, assmbl_bom_id) IN \"\n + \"(SELECT assmbl_db_id, assmbl_cd, assmbl_bom_id FROM eqp_assmbl_bom WHERE assmbl_cd='ACFT_CD1' AND assmbl_bom_cd='ACFT-SYS-1-1-TRK-P1')\";\n Assert.assertTrue( \"Check auto creation is -1.\",\n getIntValueFromQuery( lQuery, \"AUTO_CREATE\" ) == 1 );\n\n // check ENG-SYS-1-1-TRK-P1 auto creation is 1\n lQuery =\n \"SELECT AUTO_CREATE FROM AL_TEMP_INVENTORY_SUB WHERE (assmbl_db_id, assmbl_cd, assmbl_bom_id) IN \"\n + \"(SELECT assmbl_db_id, assmbl_cd, assmbl_bom_id FROM eqp_assmbl_bom WHERE assmbl_cd='ENG_CD1' AND assmbl_bom_cd='ENG-SYS-1-1-TRK-P1')\";\n Assert.assertTrue( \"Check auto creation is 1.\",\n getIntValueFromQuery( lQuery, \"AUTO_CREATE\" ) == 1 );\n\n }", "@Test\n public void shantouPriceMapTest() {\n // TODO: test shantouPriceMap\n }", "@Test\n public void testMultipleCoinMapReturn() throws Exception\n {\n PayStationImpl instance = new PayStationImpl();\n int quarter = 25;\n int dime = 10;\n int nickle = 5;\n instance.addPayment(dime);\n instance.addPayment(dime);\n instance.addPayment(quarter);\n instance.addPayment(nickle);\n Map answer = new HashMap();\n answer.put(1, 1);\n answer.put(2, 2);\n answer.put(3, 1);\n Map result = instance.cancel();\n assertEquals(answer, result);\n }", "@Test\n public void testNoCoinMapReturn() throws Exception\n {\n PayStationImpl instance = new PayStationImpl();\n int quarter = 25;\n int dime = 10;\n int nickle = 5;\n //instance.addPayment(quarter);\n instance.addPayment(dime);\n instance.addPayment(dime);\n instance.addPayment(nickle);\n Map answer = new HashMap();\n //answer.put(1, 1);\n answer.put(2, 2);\n answer.put(1, 1);\n Map result = instance.cancel();\n assertEquals(answer, result);\n }", "@Test\n public void testValuesOnNonEmptyMap() {\n Map originalMap = createEmptyMap();\n addGlobalsToMap(originalMap);\n \n Collection values = originalMap.values();\n \n assertEquals(3, values.size());\n \n assertTrue(values.contains(globalOneValue));\n assertTrue(values.contains(globalTwoValue));\n assertTrue(values.contains(globalThreeValue));\n }", "@DirtiesDatabase\n\t@Test\n\tpublic void testFindByPriceListAndBundleAsMap() {\n\t\t\n\t\tcreateNestedBundles();\n\t\t\n\t\tPriceAdjustment paA1 = createPA(\"A\", \"PAA1\", \"PLGUID\", \"A1GUID\");\n\t\tPriceAdjustment paB = createPA(\"A\", \"PAB\", \"PLGUID\", \"BGUID\");\n\t\tPriceAdjustment paB1 = createPA(\"B\", \"PAB1\", \"PLGUID\", \"B1GUID\");\n\t\tPriceAdjustment paB2 = createPA(\"B\", \"PAB2\", \"PLGUID\", \"B2GUID\");\n\t\t\n\t\tassertEquals(\"Should return an empty map when searching an invalid price list.\",\n\t\t\t\tCollections.emptyMap(),\n\t\t\t\tpriceAdjustmentService.findByPriceListAndBundleAsMap(\"INVALID_PL_GUID\", (ProductBundle) productService.findByGuid(\"B\")));\n\t\t\n\t\t\n\t\tMap<String, PriceAdjustment> expectedPriceAdjustments = new HashMap<String, PriceAdjustment>();\n\t\texpectedPriceAdjustments.put(\"B1GUID\", paB1);\n\t\texpectedPriceAdjustments.put(\"B2GUID\", paB2);\n\t\t\n\t\tassertEquals(\"Should return a map with two price adjustments for bundle B.\",\n\t\t\t\texpectedPriceAdjustments, priceAdjustmentService.findByPriceListAndBundleAsMap(\"PLGUID\",\n\t\t\t\t(ProductBundle) productService.findByGuid(\"B\")));\n\t\t\n\t\texpectedPriceAdjustments.put(\"A1GUID\", paA1);\n\t\texpectedPriceAdjustments.put(\"BGUID\", paB);\n\t\t\n\t\tassertEquals(\"Should return a map with four price adjustments for bundle A: adjustments of bundle B and its constituents must be included.\",\n\t\t\t\texpectedPriceAdjustments, priceAdjustmentService.findByPriceListAndBundleAsMap(\"PLGUID\",\n\t\t\t\t(ProductBundle) productService.findByGuid(\"A\")));\n\t}", "public static DefaultHashMap<String, Asset> getMap() {\n // Here we instantiate a DefaultHashMap specifying the bitUSD as the default value.\n DefaultHashMap<String, Asset> map = new DefaultHashMap<>(new Asset(\"1.3.121\"));\n\n // Chinese Yuan\n map.put(\"CN\", new Asset(\"1.3.113\"));\n\n // Euro\n map.put(\"AT\", new Asset(\"1.3.120\"));\n map.put(\"BE\", new Asset(\"1.3.120\"));\n map.put(\"CY\", new Asset(\"1.3.120\"));\n map.put(\"DE\", new Asset(\"1.3.120\"));\n map.put(\"EE\", new Asset(\"1.3.120\"));\n map.put(\"ES\", new Asset(\"1.3.120\"));\n map.put(\"FI\", new Asset(\"1.3.120\"));\n map.put(\"FR\", new Asset(\"1.3.120\"));\n map.put(\"GR\", new Asset(\"1.3.120\"));\n map.put(\"IE\", new Asset(\"1.3.120\"));\n map.put(\"IT\", new Asset(\"1.3.120\"));\n map.put(\"LT\", new Asset(\"1.3.120\"));\n map.put(\"LU\", new Asset(\"1.3.120\"));\n map.put(\"LV\", new Asset(\"1.3.120\"));\n map.put(\"MT\", new Asset(\"1.3.120\"));\n map.put(\"NL\", new Asset(\"1.3.120\"));\n map.put(\"PT\", new Asset(\"1.3.120\"));\n map.put(\"SI\", new Asset(\"1.3.120\"));\n map.put(\"SK\", new Asset(\"1.3.120\"));\n map.put(\"ME\", new Asset(\"1.3.120\"));\n\n // Argentinian pesos\n map.put(\"AR\", new Asset(\"1.3.1017\"));\n\n // Canadadian dollar\n map.put(\"CA\", new Asset(\"1.3.115\"));\n\n // UK Pound sterling\n map.put(\"GB\", new Asset(\"1.3.118\"));\n map.put(\"IE\", new Asset(\"1.3.118\"));\n\n // Swiss Franc\n map.put(\"CH\", new Asset(\"1.3.116\"));\n\n // South Korea Won\n map.put(\"KR\", new Asset(\"1.3.102\"));\n\n // Japanese yen\n map.put(\"JP\", new Asset(\"1.3.119\"));\n\n // Hong Kong dollar\n map.put(\"HK\", new Asset(\"1.3.109\"));\n\n // Singapore dollar\n map.put(\"SG\", new Asset(\"1.3.108\"));\n\n // Russian ruble\n map.put(\"RU\", new Asset(\"1.3.110\"));\n\n // Australian dollar\n map.put(\"AU\", new Asset(\"1.3.117\"));\n\n // Swedish krona\n map.put(\"SE\", new Asset(\"1.3.111\"));\n\n return map;\n }", "@Test\n public void TestGetAvailableCurrencies() {\n Set<Currency> avail1 = Currency.getAvailableCurrencies();\n\n // returned set must be modifiable - add one more currency\n avail1.add(Currency.getInstance(\"ZZZ\")); // ZZZ is not defined by ISO 4217\n\n Set<Currency> avail2 = Currency.getAvailableCurrencies();\n assertTrue(\"avail1 does not contain all currencies in avail2\", avail1.containsAll(avail2));\n assertTrue(\"avail1 must have one more currency\", (avail1.size() - avail2.size() == 1));\n }", "public void testGetInternalRateForInterval()\r\n throws Exception {\r\n\r\n List<Double> result;\r\n Set<OpHourlyRatesPeriod> periodsSet = new HashSet<OpHourlyRatesPeriod>();\r\n OpProjectCalendar calendar = OpProjectCalendar.getDefaultProjectCalendar();\r\n\r\n OpResource resource = new OpResource();\r\n resource.setHourlyRatesPeriods(periodsSet);\r\n resource.updateInternalHourlyRate(0d);\r\n List<List> ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 20).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 23).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(0), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(1), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(2), 0d);\r\n\r\n OpHourlyRatesPeriod hourlyRatesPeriod = new OpHourlyRatesPeriod();\r\n periodsSet.add(hourlyRatesPeriod);\r\n hourlyRatesPeriod.setInternalRate(3d);\r\n hourlyRatesPeriod.setExternalRate(4d);\r\n\r\n hourlyRatesPeriod.setStart(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()));\r\n hourlyRatesPeriod.setFinish(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 25).getTimeInMillis()));\r\n ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 24).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 26).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 3d, result.get(0), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 3d, result.get(1), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(2), 0d);\r\n\r\n hourlyRatesPeriod.setFinish(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 24).getTimeInMillis()));\r\n ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 24).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 26).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 3d, result.get(0), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(1), 0d);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(2), 0d);\r\n\r\n ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 3d, result.get(0), 0d);\r\n\r\n hourlyRatesPeriod.setStart(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 21).getTimeInMillis()));\r\n ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0d, result.get(0), 0d);\r\n\r\n ratesList = resource.getRatesForInterval(new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 19).getTimeInMillis()),\r\n new Date(OpBaseOpenTestCase.getCalendarWithExactDaySet(2007, 4, 16).getTimeInMillis()));\r\n result = ratesList.get(OpResource.INTERNAL_RATE_LIST_INDEX);\r\n assertEquals(\"OpResource.getInternalRateForInterval failed\", 0, result.size());\r\n }", "@Test\n public void testValidGetOnuStats() throws Exception {\n String reply;\n String target;\n\n for (int i = ZERO; i < VALID_GET_STATS_TCS.length; i++) {\n target = VALID_GET_STATS_TCS[i];\n currentKey = i;\n reply = voltConfig.getOnuStatistics(target);\n assertNotNull(\"Incorrect response for VALID_GET_STATS_TCS\", reply);\n }\n }", "@Test\n public void testMapCodeExamples() throws Exception {\n logger.info(\"Beginning testMapCodeExamples()...\");\n\n // Create an empty map\n Map<URL, Double> stocks = new Map<>();\n logger.info(\"Start with an empty map of stock prices: {}\", stocks);\n\n // Add some closing stock prices to it\n URL apple = new URL(\"http://apple.com\");\n stocks.setValue(apple, 112.40);\n URL google = new URL(\"http://google.com\");\n stocks.setValue(google, 526.98);\n URL amazon = new URL(\"http://amazon.com\");\n stocks.setValue(amazon, 306.64);\n logger.info(\"Add some closing stock prices: {}\", stocks);\n\n // Retrieve the closing price for Google\n double price = stocks.getValue(google);\n logger.info(\"Google's closing stock price is {}\", price);\n\n // Sort the stock prices by company URL\n stocks.sortElements();\n logger.info(\"The stock prices sorted by company web site: {}\", stocks);\n\n logger.info(\"Completed testMapCodeExamples().\\n\");\n }", "private void addExpectedCurrencies(List<String> currencies, Map<String, Object> data) {\n\t\tString source = (String) data.get(\"source\");\n\t\tList<String> expected = currencies.stream().collect(Collectors.toList());\n\t\texpected.remove(source);\n\t\tdata.put(\"expected\", StringUtils.collectionToCommaDelimitedString(expected));\n\t}", "private Map<String, Country> getMock() throws ParseException {\r\n\t\tSimpleDateFormat sd = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\r\n\t\t// ---- Luxembourg\r\n\t\tRates testRatesLU0 = new Rates();\r\n\t\ttestRatesLU0.setSuper_reduced(3.0);\r\n\t\ttestRatesLU0.setReduced1(8.0);\r\n\t\ttestRatesLU0.setStandard(17.0);\r\n\t\ttestRatesLU0.setParking(13.0);\r\n\r\n\t\tRates testRatesLU1 = new Rates();\r\n\t\ttestRatesLU1.setSuper_reduced(3.0);\r\n\t\ttestRatesLU1.setReduced1(8.0);\r\n\t\ttestRatesLU1.setReduced2(14.0);\r\n\t\ttestRatesLU1.setStandard(17.0);\r\n\t\ttestRatesLU1.setParking(12.0);\r\n\r\n\t\tRates testRatesLU2 = new Rates();\r\n\t\ttestRatesLU2.setSuper_reduced(3.0);\r\n\t\ttestRatesLU2.setReduced1(6.0);\r\n\t\ttestRatesLU2.setReduced2(12.0);\r\n\t\ttestRatesLU2.setStandard(15.0);\r\n\t\ttestRatesLU2.setParking(12.0);\r\n\r\n\t\tDate testDateLU0 = sd.parse(\"2016-01-01\");\r\n\t\tDate testDateLU1 = sd.parse(\"2015-01-01\");\r\n\t\tDate testDateLU2 = sd.parse(\"0000-01-01\");\r\n\r\n\t\tPeriod testPeriodLU0 = new Period(testDateLU0, testRatesLU0);\r\n\t\tPeriod testPeriodLU1 = new Period(testDateLU1, testRatesLU1);\r\n\t\tPeriod testPeriodLU2 = new Period(testDateLU2, testRatesLU2);\r\n\r\n\t\tList<Period> testListOfPeriodsLU = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsLU.add(testPeriodLU0);\r\n\t\ttestListOfPeriodsLU.add(testPeriodLU1);\r\n\t\ttestListOfPeriodsLU.add(testPeriodLU2);\r\n\r\n\t\tCountry testLuxembourg = new Country(\"Luxembourg\", \"LU\", \"LU\", testListOfPeriodsLU);\r\n\r\n\t\t// ==== Malta ====\r\n\t\tRates testRatesMT0 = new Rates();\r\n\t\ttestRatesMT0.setReduced1(5.0);\r\n\t\ttestRatesMT0.setReduced2(7.0);\r\n\t\ttestRatesMT0.setStandard(18.0);\r\n\r\n\t\tDate testDateMT0 = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriodMT0 = new Period(testDateMT0, testRatesMT0);\r\n\r\n\t\tList<Period> testListOfPeriodsMT = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsMT.add(testPeriodMT0);\r\n\r\n\t\tCountry testMalta = new Country(\"Malta\", \"MT\", \"MT\", testListOfPeriodsMT);\r\n\r\n\t\t// ==== Cyprus ====\r\n\t\tRates testRatesCY0 = new Rates();\r\n\t\ttestRatesCY0.setReduced1(5.0);\r\n\t\ttestRatesCY0.setReduced2(9.0);\r\n\t\ttestRatesCY0.setStandard(19.0);\r\n\r\n\t\tDate testDateCY0 = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriodCY0 = new Period(testDateCY0, testRatesCY0);\r\n\r\n\t\tList<Period> testListOfPeriodsCY = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsCY.add(testPeriodCY0);\r\n\r\n\t\tCountry testCyprus = new Country(\"Cyprus\", \"CY\", \"CY\", testListOfPeriodsCY);\r\n\r\n\t\t// ==== Hungary ====\r\n\t\tRates testRatesHU0 = new Rates();\r\n\t\ttestRatesHU0.setReduced1(5.0);\r\n\t\ttestRatesHU0.setReduced2(18.0);\r\n\t\ttestRatesHU0.setStandard(27.0);\r\n\r\n\t\tDate testDate = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriod = new Period(testDate, testRatesHU0);\r\n\r\n\t\tList<Period> testListOfPeriodsHU = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsHU.add(testPeriod);\r\n\r\n\t\tCountry testHungary = new Country(\"Hungary\", \"HU\", \"HU\", testListOfPeriodsHU);\r\n\r\n\t\t// ==== Sweden ====\r\n\t\tRates testRatesSE0 = new Rates();\r\n\t\ttestRatesSE0.setReduced1(6.0);\r\n\t\ttestRatesSE0.setReduced2(12.0);\r\n\t\ttestRatesSE0.setStandard(25.0);\r\n\r\n\t\tDate testDateSE0 = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriodSE0 = new Period(testDateSE0, testRatesSE0);\r\n\r\n\t\tList<Period> testListOfPeriodsSE = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsSE.add(testPeriodSE0);\r\n\r\n\t\tCountry testSweden = new Country(\"Sweden\", \"SE\", \"SE\", testListOfPeriodsSE);\r\n\r\n\t\t// ==== Croatia ====\r\n\t\tRates testRatesHR0 = new Rates();\r\n\t\ttestRatesHR0.setReduced1(5.0);\r\n\t\ttestRatesHR0.setReduced2(13.0);\r\n\t\ttestRatesHR0.setStandard(25.0);\r\n\r\n\t\tDate testDateHR0 = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriodHR0 = new Period(testDateHR0, testRatesHR0);\r\n\r\n\t\tList<Period> testListOfPeriodsHR = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsHR.add(testPeriodHR0);\r\n\r\n\t\tCountry testCroatia = new Country(\"Croatia\", \"HR\", \"HR\", testListOfPeriodsHR);\r\n\r\n\t\t// ==== Denmark ====\r\n\t\tRates testRatesDK0 = new Rates();\r\n\t\ttestRatesDK0.setStandard(25.0);\r\n\r\n\t\tDate testDateDK0 = sd.parse(\"0000-01-01\");\r\n\t\tPeriod testPeriodDK0 = new Period(testDateDK0, testRatesDK0);\r\n\r\n\t\tList<Period> testListOfPeriodsDK = new ArrayList<Period>();\r\n\t\ttestListOfPeriodsDK.add(testPeriodDK0);\r\n\r\n\t\tCountry testDenmark = new Country(\"Denmark\", \"DK\", \"DK\", testListOfPeriodsDK);\r\n\r\n\t\t// ==== Create Map of test data ====\r\n\r\n\t\tMap<String, Country> testMapOfCountries = new HashMap<String, Country>();\r\n\t\ttestMapOfCountries.put(\"Luxembourg\", testLuxembourg);\r\n\t\ttestMapOfCountries.put(\"Malta\", testMalta);\r\n\t\ttestMapOfCountries.put(\"Cyprus\", testCyprus);\r\n\t\ttestMapOfCountries.put(\"Hungary\", testHungary);\r\n\t\ttestMapOfCountries.put(\"Sweden\", testSweden);\r\n\t\ttestMapOfCountries.put(\"Croatia\", testCroatia);\r\n\t\ttestMapOfCountries.put(\"Denmark\", testDenmark);\r\n\r\n\t\treturn testMapOfCountries;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
define bean for Coach AND inject dependency
@Bean public Coach LifeCoach() { return new LifeCoach(randomFortuneService()); }
[ "@Bean\r\n\tpublic ICoach swimCoach()\r\n\t{\r\n\t\treturn new SwimCoach(sadFortuneService());\t\t//CONSTRUCTOR DEPENDENCY \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//(call the sadFortuneService Class who implements the IFortuneService)\r\n\t}", "@Bean\n public Coach swimCoach(){\n return new SwimCoach(sadFortuneService());\n }", "@Bean\r\n\tpublic Coach swimCoach(){\r\n\t\treturn new SwimCoach(sadFortuneService());\r\n\t}", "@Bean\n public Coach swimCoach(){\n return new swimCoach(sadForturnService1());\n }", "@Bean\r\n\tpublic Coach wrestlingCoach() {\r\n\t\tWrestlingCoach wresCoach = new WrestlingCoach(happyFortuneService());\r\n\t\treturn wresCoach;\r\n\t}", "@Bean\n\tpublic Coach swimCoach(){\n\t\t\n\t\treturn new SwimCoach(sadFortuneService());\n\t}", "@Bean\n public Coach gymCoach(FortuneService championFortuneService){\n return new GymCoach(championFortuneService);\n }", "@Bean\n\tpublic ICoach swimCoach() {\n\t\treturn new SwimCoach(sadFortuneService());\n\t}", "@Bean\n\tpublic CoachJavaConfig swimCoach() {\n\t\treturn new SwimCoachJavaConfig(sadFortunerService());\n\t}", "@Bean\n public Coach kayakCoach(FortuneService sadFortuneService){\n return new KayakCoach(sadFortuneService);\n }", "@Singleton\n @Component(modules = { DripCoffeeModule.class })\n public interface Coffee {\n CoffeeMaker maker();\n }", "@Bean\n public FortuneService championFortuneService(){\n return new ChampionFortuneService();\n }", "public interface CoachService {\n\n /**\n * Creates coach.\n *\n * @param coach coach to be created\n */\n void createCoach(Coach coach);\n\n /**\n * Updates coach.\n *\n * @param coach coach to be updated\n */\n void updateCoach(Coach coach);\n\n /**\n * Deletes coach.\n *\n * @param coach to be deleted\n */\n void deleteCoach(Coach coach);\n\n /**\n * Finds team manager by id.\n *\n * @param id coach's ID\n * @return coach with given id\n */\n Coach findById(long id);\n\n\n /**\n * Get all coaches.\n *\n * @return list of coaches\n */\n List<Coach> getAll();\n\n /**\n * Get coach by his email.\n *\n * @param email coach's email\n * @return coach with given email\n */\n Coach findByEmail(String email);\n}", "@Bean\n public TennisCoach tennisCoach() {\n return new TennisCoach(tennisFortuneService());\n }", "@Autowired\n @Qualifier(\"setterInjectedGreetingService\") // necessary to wire bean to a specific controller\n public void setGreetingService(GreetingService greetingService) {\n this.greetingService = greetingService;\n }", "public ProxyBean() {\n }", "public BeanProvider(T bean){\n this.bean = bean;\n createMappings();\n }", "@Autowired\r\npublic HelloWorld(Dependency1 dep) {\r\n\tdep.method2();\r\n}", "public ISeeYouBean() {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The constructor is used if your are instantiating an empty GraphicsLayer (see the class description for an example of this usage)
public void Initialize() { setObject(new GraphicsLayer()); }
[ "public GraphicLayer() {\r\n super();\r\n }", "public Layer() {\r\n }", "public PaintContainer() {\n\t\tsuper();\n\t\tinit();\n\t}", "private GraphicsManager() {\r\n }", "public MultiShapeLayer() {}", "public GraphicsException()\n {\n super();\n }", "protected GraphicsContext() {\n\t}", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public EditLayer() {\r\n }", "public void Initialize1(GraphicsLayer.RenderingMode mode)\n\t{\n\t\tsetObject(new GraphicsLayer(mode));\n\t}", "protected GraphicsExtensionElement() {\n }", "public ImagePainter() {\n }", "Layer createLayer();", "private void init() {\n this.myPaint = new Paint();\n this.myPaint.setStrokeWidth(1f);\n this.myPaint.setAntiAlias(true);\n this.myPaint.setColor(Color.RED);\n\n //Instantiation of paintingContainer\n this.paintingContainer = new Rect();\n this.paintingContainer.set(0, 0, this.getWidth(), this.getHeight());\n }", "public Shape(){\n\t\tthis(new Point(0,0), 0);\n\t}", "public GraphicsGems() {\r\n\t}", "public ImageLayer (Tile tile) {\n setTile(tile);\n }", "public JMyPaintPanel() {\t\t\t\t\t\t\t\t\t\r\n\t\tsuper();\r\n\t\tfiguren = new ArrayList<ZeichenObjekt>();\t\t\t\t// erzeugen des ArrayList-objekts in jedem konstruktor\r\n\t}", "public Layer(PApplet parent, String renderer) {\n this.parent = parent;\n clipX = clipY = 0;\n clipWidth = parent.width;\n clipHeight = parent.height;\n g = parent.createGraphics(parent.width, parent.height, renderer);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the caller's caller's stack frame.
public static StackFrame getCallerCallerStackFrame() { return getStackFrame(3); }
[ "public static StackFrame getCallerStackFrame() {\n return getStackFrame(2);\n }", "public StackFrame getStackFrame();", "public static StackTraceElement getCallerStackFrame(int PopFrame) {\n\t\treturn getCallerStackTrace(PopFrame + 1)[0];\n\t}", "public static StackFrame getCurrentStackFrame() {\n return getStackFrame(1);\n }", "public static String getCurrentStack() {\n\t\treturn Arrays.toString(Thread.currentThread().getStackTrace());\n\t}", "public static StackTraceElement getCaller() {\n // We could use Thread.getStackTrace(), but it's new in Java 5.\n // Index 0 is this location; index 1 is the caller; index 2 is the caller's caller\n try { return new Throwable().getStackTrace()[2]; }\n catch (ArrayIndexOutOfBoundsException e) {\n throw new IllegalStateException(\"Stack trace information for caller is not available\");\n }\n }", "public static StackFrame getCallerCallerStackFrame(final String realClassName) {\n return getStackFrame(3, realClassName);\n }", "public int getCallStack() {\n\t\treturn this.callStack;\n\t}", "public EmonicStackFrame getStackFrame() {\n\t\treturn frame;\n\t}", "public static StackFrame getCallerStackFrame(final String realClassName) {\n return getStackFrame(2, realClassName);\n }", "public List<StackFrameInformation> getStack();", "String getStackTrace();", "static String getCaller() {\n\t\tif(DEBUGGING==false)\n\t\t\treturn \"Unknown\";\n\t\tStackTraceElement[] trace = (new RuntimeException(\"Dump Stack\")).getStackTrace();\n\t\tint ctr = 0;\n\t\tfor(int a = 0; a<trace.length; a++) {\n\t\t\tif( trace[a].getClassName().indexOf(\"com.bric.graphics.GraphicsWriter\")==0 ||\n\t\t\t\t\ttrace[a].getClassName().indexOf(\"java.lang.Thread\")==0) {\n\t\t\t\tctr++;\n\t\t\t\ttrace[a] = null;\n\t\t\t}\n\t\t}\n\n\t\tStringBuffer sb = new StringBuffer();\n\t\tctr = 0;\n\t\tfor(int a = 0; a<trace.length; a++) {\n\t\t\tif(trace[a]!=null) {\n\t\t\t\tsb.append( trace[a].toString() +\"\\n\");\n\t\t\t\tctr++;\n\t\t\t\tif(ctr==SOURCE_LINE_LIMIT)\n\t\t\t\t\treturn sb.toString().trim();\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}", "public String getStack() {\r\n\t\tif (stackTrace == null) {\r\n\t\t\tif (stack == null) {\r\n\t\t\t\tStringWriter sw = new StringWriter(512);\r\n\t\t\t\tPrintWriter pw = new PrintWriter(sw, true);\r\n\t\t\t\tThrowable cause = getCause();\r\n\t\t\t\tif (cause == null) {\r\n\t\t\t\t\tsuper.printStackTrace(pw);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcause.printStackTrace(pw);\r\n\t\t\t\t}\r\n\t\t\t\tstackTrace = sw.toString().trim();\r\n\t\t\t} else {\r\n\t\t\t\tstackTrace = stack.trim();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn stackTrace;\r\n\t}", "public HeapStackFrame getCurrentHeapStackFrame() {\n\t\treturn this.currentFrame;\n\t}", "private String getCallerInfo() {\n Optional<StackWalker.StackFrame> frame = new CallerFinder().get();\n if (frame.isPresent()) {\n return frame.get().getClassName() + \" \" + frame.get().getMethodName();\n } else {\n return name;\n }\n }", "public static String getStackTrace() {\n Exception e = new Exception();\n return getStackTrace(e);\n }", "public StrategoStackFrame currentFrame()\n\t{\n\t\treturn stack.peek();\n\t}", "private static FrameInfo getLoggingFrame() {\n StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n StackTraceElement loggingFrame = null;\n /*\n * We need to dig through all the frames until we get to a frame that contains this class, then dig through all\n * frames for this class, to finally come to a point where we have the frame for the calling method.\n */\n // Skip stackTrace[0], which is getStackTrace() on Win32 JDK 1.6.\n for (int ix = 1; ix < stackTrace.length; ix++) {\n loggingFrame = stackTrace[ix];\n if (loggingFrame.getClassName().contains(CLASS_NAME)) {\n for (int iy = ix; iy < stackTrace.length; iy++) {\n loggingFrame = stackTrace[iy];\n if (!loggingFrame.getClassName().contains(CLASS_NAME)) {\n break;\n }\n }\n break;\n }\n }\n return new FrameInfo(loggingFrame.getClassName(), loggingFrame.getMethodName());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Writes a message to the brick's screen on a particular line if valid
public static void writeToScreen(String message, int line){ if ((line >= 0)&&(line <=7)){ LCD.drawString(" ", 0, line); LCD.drawString(message, 0, line); LCD.refresh(); } }
[ "public void message ( String msg )\n {\n\tinsertLine( msg , _messageStyle ,true ) ;\n }", "public void displayMessageLine( String message ) \n {\n System.out.println( message ); \n }", "protected abstract boolean definitelyNotLastLine(String message);", "public void writeStatusLineError(String text) {\n \t\tSystem.out.println(\"PDFEditor::writeStatusLineError()\\n\");\n \t\tfinal IStatusLineManager statusLineM = getEditorSite().getActionBars().getStatusLineManager();\n \t\tstatusLineM.setErrorMessage(text);\n \t\t//FIXME: Should not be executed if there was another message in between the five secs.\n \t\tDisplay.getDefault().timerExec(5000, new Runnable() {\n \n \t\t\t@Override\n \t\t\tpublic void run() {\n \t\t\t\tstatusLineM.setErrorMessage(\"\");\t\t\t\t //$NON-NLS-1$\n \t\t\t}\n \t\t});\n \t}", "private void writeLine(final CharSequence text) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n messages.append(text);\n messages.append(\"\\n\");\n }\n });\n }", "private boolean handleQTell(String line){\n if (!line.startsWith(\":\"))\n return false;\n \n Matcher matcher = QTELL_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String message = matcher.group(1);\n\n if (!processQTell(message))\n processLine(line);\n\n return true;\n }", "public void displayMessageLine( String message )\n\t{\n\t\tSystem.out.println( message );\n\t}", "@Override\n public void onMessage(String line) {\n }", "public static void assert_line(boolean conditionIn)\r\n\t{\r\n\t\tSystem.err.printf(\"\\r\\n%s\\r\\n%s%s:%d\\r\\n\",\r\n\t\t\t\tASSERT_TEXT,\r\n\t\t\t\tPREAMBLE_LOCATION,\r\n\t\t\t\tThread.currentThread().getStackTrace()[2].getFileName(),\r\n\t\t\t\tThread.currentThread().getStackTrace()[2].getLineNumber());\r\n\t\tSystem.err.flush();\r\n\t\tSystem.exit(EXIT_CODE);\r\n\t}", "protected void addNewMessageLine()\r\n\t{\r\n\r\n\t\t// violation?\r\n\t\tif(!MessageLogBottomPanel.isNewMessage()) {\r\n\r\n\t\t\t// notify reason\r\n\t\t\tUtils.showWarning(m_aWp.getBundleText(\"MessageTaskOperationError.header\"),\r\n\t\t\t\t\tm_aWp.getBundleText(\"MessageTaskOperationError.details\"));\r\n\r\n\t\t\t// finished\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\tif(unitHasCompletedAssignment()) {\r\n\r\n\t\t\t// notify reason\r\n\t\t\tUtils.showWarning(\"Du kan ikke registrere mer enn ett utført oppdrag per melding\");\r\n\r\n\t\t\t// finished\r\n\t\t\treturn;\r\n\r\n\t\t}\r\n\r\n\t\t// get unit if exists\r\n\t\tIMessageIf message = MessageLogBottomPanel.getCurrentMessage(false);\r\n\t\tIUnitIf unit = getAvailableUnit(message);\r\n\r\n\t\tif(unitHasAllocatedAssignment(unit) || unitHasStartedAssignment(unit)) {\r\n\r\n\t\t\t// get assignment status\r\n\t\t\tIAssignmentIf Allocated = unit.getAllocatedAssignment();\r\n\t\t\tIAssignmentIf executing = unit.getExecutingAssigment();\r\n\r\n\t\t\t// try not committed assignments?\r\n\t\t\tif(Allocated==null) {\r\n\t\t\t\tIMessageLineIf line = getAddedLine(MessageLineType.ALLOCATED);\r\n\t\t\t\tAllocated = (line!=null) ? line.getLineAssignment() : null;\r\n\r\n\t\t\t}\r\n\t\t\tif(executing==null) {\r\n\t\t\t\tIMessageLineIf line = getAddedLine(MessageLineType.STARTED);\r\n\t\t\t\texecuting = (line!=null) ? line.getLineAssignment() : null;\r\n\t\t\t}\r\n\r\n\t\t\t// get assignment\r\n\t\t\tIAssignmentIf assignment = executing == null ? Allocated : executing;\r\n\r\n\t\t\t// prompt user\r\n\t\t\tObject[] options = {m_aWp.getBundleText(\"yes.text\"), m_aWp.getBundleText(\"no.text\")};\r\n\t\t\tint n = JOptionPane.showOptionDialog(m_aWp.getApplication().getFrame(),\r\n\t\t\t\t\tString.format(m_aWp.getBundleText(\"UnitCompletedAssignment.text\"),\r\n\t\t\t\t\t\t\tMsoUtils.getMsoObjectName(unit,0), MsoUtils.getMsoObjectName(assignment,1)),\r\n\t\t\t\t\tm_aWp.getBundleText(\"UnitCompletedAssignment.header\"),\r\n\t\t\t\t\tJOptionPane.YES_NO_OPTION,\r\n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE,\r\n\t\t\t\t\tnull,\r\n\t\t\t\t\toptions,\r\n\t\t\t\t\toptions[0]);\r\n\r\n\t\t\t//\r\n\t\t\tif(n == JOptionPane.YES_OPTION)\r\n\t\t\t{\r\n\t\t\t\tif(executing == null)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Adding both started and completed lines\r\n\t\t\t\t\tAssignmentUtilities.createAssignmentChangeMessageLines(message,\r\n\t\t\t\t\t\t\tMessageLineType.STARTED, MessageLineType.COMPLETED, Calendar.getInstance(), unit, assignment);\r\n\t\t\t\t\tm_addedLines.add(message.findMessageLine(MessageLineType.ALLOCATED, assignment, false));\r\n\t\t\t\t\tm_addedLines.add(message.findMessageLine(MessageLineType.STARTED, assignment, false));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tAssignmentUtilities.createAssignmentChangeMessageLines(message,\r\n\t\t\t\t\t\t\tMessageLineType.COMPLETED, MessageLineType.COMPLETED, Calendar.getInstance(), unit, assignment);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tm_addedLines.add(message.findMessageLine(MessageLineType.COMPLETED, assignment, false));\r\n\r\n\t\t\t\tMessageLogBottomPanel.showCompletePanel();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\telse if(unitEnqueuedAssignment(unit))\r\n\t\t{\r\n\t\t\t// Else unit may have completed allocated assignment\r\n\t\t\tshowNextAssignment();\r\n\t\t}\r\n\t\telse if(unit!=null)\r\n\t\t{\r\n\t\t\t// Unit may have completed assignment in assignment pool\r\n\t\t\tshowAssignmentPool();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tUtils.showWarning(\"Du må først oppgi avsender. Avsender er den som har utført oppdraget og kan derfor ikke være et KO\");\r\n\t\t\tMessageLogBottomPanel.showFromPanel();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// success\r\n\t\tm_owningUnit = unit;\r\n\t}", "public void print(String msg) {\n System.out.println(SEPARATING_LINE);\n System.out.println(\"\\t\" + msg);\n System.out.println(SEPARATING_LINE);\n }", "synchronized void showInputNotValid() {\n AnsiConsole.out.print(ansi().fg(RED).a(\"Valore inserito non valido. Riprova: \"));\n }", "private void printMessageLine(String msg) {\n String group = null;\n String newmsg = msg.replace(\" \", \"\");\n if (newmsg.equals(\"\")) {\n _output.println();\n } else {\n int min = 0;\n for (int i = 0; i < newmsg.length(); i += 5) {\n min = Math.min(i + 5, newmsg.length());\n if (group == null) {\n group = newmsg.substring(i, min);\n } else {\n group += \" \" + newmsg.substring(i, min);\n }\n }\n _output.println(group);\n }\n }", "public void printInvalidMessg() {\n System.out.println(ANSI_RED+\"Invalid user command!! \\n Please try again\"+ANSI_RESET);\n }", "private void printMessageLine(String msg) {\n while (msg.length() >= 5) {\n String sub = msg.substring(0, 5);\n _output.print(sub + \" \");\n msg = msg.substring(5);\n }\n _output.println(msg);\n }", "static void printMessageLine(String msg) {\n for (int i = 0; i < msg.length(); i += 5) {\n if (i + 5 < msg.length()) {\n message += msg.substring(i, i + 5) + \" \";\n continue;\n }\n message += msg.substring(i, msg.length());\n }\n _output.append(message);\n _output.println();\n message = \"\";\n }", "private void displayLine()\n {\n System.out.println(\"#################################################\");\n }", "static void line() {\n int x1, x2, y1, y2;\n String m = \"\";\n \n System.out.print(\"Enter point 1: \");\n y1 = scan.nextInt(); x1 = scan.nextInt(); scan.nextLine();\n\n System.out.print(\"Enter point 2: \");\n y2 = scan.nextInt(); x2 = scan.nextInt(); scan.nextLine();\n\n if ( ! lineBetween(x1, y1, x2, y2) ) m = \" not\";\n\n System.out.printf(\"Point 2 is%s visible from point 1.\\n\", m);\n }", "public void warning ( String msg )\n {\n insertLine( msg , _warningStyle , true ) ;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the name of the DataSource
public String getDataSourceName() { ResourceBundle bundle = ResourceBundle.getBundle("ApplicationResources") ; String dataSourceName = bundle.getString("app.datasource.name") ; return (dataSourceName == null || dataSourceName.equals("") ? "???" : dataSourceName) ; }
[ "public String getDataSourceName() {\n return this.dataSourceName;\n }", "public String getDataSourceName()\n {\n return dataSourceName;\n }", "String getDataSourceName() {\n\t\treturn dataSourceName_;\n\t}", "public String getDataSourceName() {\n\treturn strDSName;\n }", "public String getDatasource() {\r\n return this.jdbcSG.getSGFactory().getGenerator().getProperty(\"jdbc.datasource\", datasource);\r\n }", "public String getDatasource()\r\n\t{\r\n\t\treturn _dataSource;\r\n\t}", "public Optional<String> findHintDataSourceName() {\n return dataSourceName.isEmpty() ? Optional.empty() : Optional.of(dataSourceName);\n }", "DataSource getNamedDataSource( String datasourceName, DatasourceType type ) throws DataSourceNamingException;", "protected String getDataSourceId() {\n return getDataSourceId(sourceComboBox);\n }", "public String getDataSourceId() {\n return this.dataSourceId;\n }", "DataSource getNamedDataSource( String datasourceName ) throws DataSourceNamingException;", "public String getDataSourceType () {\n return dataSourceType;\n }", "private final native String getDatasourceName(JavaScriptObject jsDatasourceInfo) /*-{ return jsDatasourceInfo.name; }-*/;", "String getServerDataSource() {\n\t\treturn serverDataSource_;\n\t}", "public static String getUnidDataSource() {\n return ConfigurationHolder.getString(\"ocsp.uniddatsource\");\n }", "String getConnectionName();", "public String getDatasourceType() {\r\n return this.datasourceType;\r\n }", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "public DataSourceType getDataSourceType() {\n return dataSourceType;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Given multiple possible view candidates, find the one whose sourceUrl pattern best matches the current request url.
protected String findMatchingTargetUrl(ValidationFailureView[] failViews, String[] controllerPaths, HttpServletRequest request) { Map<String, String> sourceTargetMap = new HashMap<String, String>(); for (ValidationFailureView failView : failViews) { if (failView.sourceUrl().isEmpty()) { throw new IllegalArgumentException("sourceUrl is required when specifying multiple success or failure views."); } if (sourceTargetMap.containsKey(failView.sourceUrl())) { throw new IllegalArgumentException("duplicate sourceUrl when specifying multiple success or failure views: " + failView.sourceUrl()); } sourceTargetMap.put(failView.sourceUrl(), failView.value()); } String matchingSourceUrl = RequestUtils.findFirstMatchingRestPath( sourceTargetMap.keySet().toArray(new String[sourceTargetMap.size()]), controllerPaths, request); return matchingSourceUrl == null ? null : sourceTargetMap.get(matchingSourceUrl); }
[ "UrlMappingInfo match(String uri);", "private BeaconPatternMatch selectPlaceFromCurrentlySetNextLocation(\n Collection<BeaconPatternMatch> candidates)\n {\n String nextLocation = null;\n try\n {\n nextLocation = lDB.getNextLocation( user.getId() );\n }\n catch (SQLException e)\n {\n logger.error( logPrefix + \"SELECT (NEXT): Failed to get next place\" );\n }\n\n // if no next place there is nothing we can do here\n if (nextLocation == null || nextLocation.length() == 0)\n {\n logger.debug( logPrefix + \"SELECT (NEXT): No next place set\" );\n return null;\n }\n\n // look for exact matches\n for (BeaconPatternMatch m : candidates)\n {\n String placeName = m.getPlace().getName();\n if (placeName != null && placeName.equals( nextLocation ))\n {\n\n // boost match by 30% to make it lock on a bit more easily\n // m.setPatternMatch( (int) Math.min( m.getPatternMatch() * 1.3, 100 ) );\n\n logger.debug( logPrefix + \"SELECT (NEXT): Place (\" + placeName\n + \") selected from next place (\" + nextLocation + \")\" );\n return m;\n }\n }\n\n // look for equal ignoring case\n for (BeaconPatternMatch m : candidates)\n {\n String placeName = m.getPlace().getName();\n if (placeName != null\n && placeName.toLowerCase().equals( nextLocation.toLowerCase() ))\n {\n\n logger.debug( logPrefix + \"SELECT (NEXT): Place (\" + placeName\n + \") selected from next place (\" + nextLocation + \")\" );\n return m;\n }\n }\n\n // look for similar\n for (BeaconPatternMatch m : candidates)\n {\n String placeName = m.getPlace().getName();\n if (placeName != null\n && placeName.toLowerCase().contains( nextLocation.toLowerCase().trim() ))\n {\n\n logger.debug( logPrefix + \"SELECT (NEXT): Place (\" + placeName\n + \") selected from next place (\" + nextLocation + \")\" );\n return m;\n }\n if (placeName != null\n && nextLocation.toLowerCase().contains( placeName.toLowerCase().trim() ))\n {\n\n logger.debug( logPrefix + \"SELECT (NEXT): Place (\" + placeName\n + \") selected from next place (\" + nextLocation + \")\" );\n return m;\n }\n }\n\n logger.debug( logPrefix + \"SELECT (NEXT): No places similar to next place '\"\n + nextLocation + \"'\" );\n\n // none found, return null\n return null;\n }", "private ImageView findCorrespondingView(View input) {\r\n\t\tImageView view = null;\r\n\t\tswitch (input.getId()) {\r\n\t\t\tcase R.id.frontViewOne:\r\n\t\t\t\tview = backViewOne;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewOne:\r\n\t\t\t\tview = frontViewOne;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewTwo:\r\n\t\t\t\tview = backViewTwo;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewTwo:\r\n\t\t\t\tview = frontViewTwo;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewThree:\r\n\t\t\t\tview = backViewThree;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewThree:\r\n\t\t\t\tview = frontViewThree;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewFour:\r\n\t\t\t\tview = backViewFour;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewFour:\r\n\t\t\t\tview = frontViewFour;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewFive:\r\n\t\t\t\tview = backViewFive;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewFive:\r\n\t\t\t\tview = frontViewFive;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewSix:\r\n\t\t\t\tview = backViewSix;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewSix:\r\n\t\t\t\tview = frontViewSix;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewSeven:\r\n\t\t\t\tview = backViewSeven;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewSeven:\r\n\t\t\t\tview = frontViewSeven;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewEight:\r\n\t\t\t\tview = backViewEight;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewEight:\r\n\t\t\t\tview = frontViewEight;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewNine:\r\n\t\t\t\tview = backViewNine;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewNine:\r\n\t\t\t\tview = frontViewNine;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewTen:\r\n\t\t\t\tview = backViewTen;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewTen:\r\n\t\t\t\tview = frontViewTen;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewEleven:\r\n\t\t\t\tview = backViewEleven;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewEleven:\r\n\t\t\t\tview = frontViewEleven;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.frontViewTwelve:\r\n\t\t\t\tview = backViewTwelve;\r\n\t\t\t\tbreak;\r\n\t\t\tcase R.id.backViewTwelve:\r\n\t\t\t\tview = frontViewTwelve;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn view;\r\n\t}", "IRequestTarget resolveRequestTarget(String requestedUrl);", "private void selectSubscribedPlace(Collection<BeaconPatternMatch> candidates,\n PlaceSource source)\n {\n // BeaconPatternMatch bestMatch = null;\n // int secondBestMatch = 0;\n bestPlaceMatch = null;\n secondBestPlaceMatch = null;\n for (BeaconPatternMatch candidate : candidates)\n {\n try\n {\n if (lDB.isPlaceSubscriber( user.getId(), candidate.getPlace().getId() ))\n {\n // check that place is in same region as user (helps to root out false hits\n // from non-unique wifi macs)\n CountryCode cc1 = location.getCountryCode();\n String ci1 = location.getCity();\n String re1 = location.getRegion();\n CountryCode cc2 = candidate.getPlace().getCountryCode();\n String re2 = candidate.getPlace().getRegion();\n String ci2 = candidate.getPlace().getCity();\n\n if (cc1 != null && cc2 != null && !cc1.equals( cc2 ))\n {\n logger.debug( logPrefix + \"SELECT: Country of place candidate '\"\n + candidate.getPlace().getName() + \"' (\" + cc2\n + \") does not match that of users curr loc (\" + cc1\n + \"). \" );\n }\n else\n {\n if (bestPlaceMatch == null)\n {\n bestPlaceMatch = candidate;\n }\n else if (candidate.getPatternMatch() > bestPlaceMatch.getPatternMatch())\n {\n secondBestPlaceMatch = bestPlaceMatch;\n bestPlaceMatch = candidate;\n }\n else if (secondBestPlaceMatch != null\n && candidate.getPatternMatch() > secondBestPlaceMatch\n .getPatternMatch())\n {\n secondBestPlaceMatch = candidate;\n }\n if (ci1 != null && ci2 != null && !ci1.equals( ci2 ))\n {\n logger.warn( logPrefix + \"SELECT: City of place candidate '\"\n + candidate.getPlace().getName() + \"' (\" + ci2\n + \") does not match that of users curr loc (\" + ci1\n + \"). Potential false fix...\" );\n }\n else if (re1 != null && re2 != null && !re1.equals( re2 ))\n {\n logger.warn( logPrefix + \"SELECT: Region of place candidate '\"\n + candidate.getPlace().getName() + \"' (\" + re2\n + \") does not match that of users curr loc (\" + re1\n + \"). Potential false fix...\" );\n }\n }\n }\n }\n catch (SQLException e)\n {\n logger.error( logPrefix + source\n + \" :SELECT (SUBS): Failed to check place subscription\", e );\n }\n }\n\n if (bestPlaceMatch == null)\n {\n logger.debug( logPrefix + source + \" SELECT (SUBS): No subscribed places found\" );\n }\n else\n {\n logger.debug( logPrefix + source\n + \" SELECT (SUBS): Place selected from subscription: '\"\n + bestPlaceMatch.getPlace().getName() + \"' (ID: \"\n + bestPlaceMatch.getPlace().getId() + \"), Pattern match: \"\n + bestPlaceMatch.getPatternMatch() );\n\n // int margin = bestPlaceMatch.getPatternMatch() - secondBestMatch;\n // if (margin < 10)\n // {\n // logger.warn( logPrefix + source + \" SELECT (SUBS): Best match is only \"\n // + margin + \" points better than the 2nd best. False fix (\"\n // + bestMatch.getPlace().getName() + \") probable!\" );\n // }\n //\n // return bestMatch;\n\n }\n }", "public TransportView chosenTransportView(JobView job, ArrayList<TransportView> requests){\n\t\tfor(TransportView request: requests){\n\t\t\tif(request.getId().equals(job.getJobIdentifier()))\n\t\t\t\t\treturn request;\n\t\t}\n\t\treturn null;\n\t}", "public <T extends View> T getFirstViewMatching(Class<T> type)\n {\n @SuppressWarnings(\"unchecked\")\n T result = (T) getFirstViewMatching(where.typeIs(type));\n return result;\n }", "public static String findSource(String url) {\r\n\t\tif (url.equals(\"web\")) {\r\n\t\t\treturn url;\r\n\t\t}else{\r\n\t\t\tPattern p = Pattern.compile(\"<.*>(.*)<.*>\");\r\n\r\n\t\t\tMatcher m = p.matcher(url);\r\n\t\t\treturn (m.matches()) ? m.group(1) : url;\r\n\t\t}\r\n\t}", "private CellLayout findMatchingPageForDragOver(\n DragView dragView, float originX, float originY, boolean exact) {\n // We loop through all the screens (ie CellLayouts) and see which ones overlap\n // with the item being dragged and then choose the one that's closest to the touch point\n final int screenCount = getChildCount();\n CellLayout bestMatchingScreen = null;\n float smallestDistSoFar = Float.MAX_VALUE;\n\n for (int i = 0; i < screenCount; i++) {\n CellLayout cl = (CellLayout) getChildAt(i);\n\n final float[] touchXy = {originX, originY};\n // Transform the touch coordinates to the CellLayout's local coordinates\n // If the touch point is within the bounds of the cell layout, we can return immediately\n cl.getMatrix().invert(mTempInverseMatrix);\n mapPointFromSelfToChild(cl, touchXy, mTempInverseMatrix);\n\n if (touchXy[0] >= 0 && touchXy[0] <= cl.getWidth() &&\n touchXy[1] >= 0 && touchXy[1] <= cl.getHeight()) {\n return cl;\n }\n\n if (!exact) {\n // Get the center of the cell layout in screen coordinates\n final float[] cellLayoutCenter = mTempCellLayoutCenterCoordinates;\n cellLayoutCenter[0] = cl.getWidth()/2;\n cellLayoutCenter[1] = cl.getHeight()/2;\n mapPointFromChildToSelf(cl, cellLayoutCenter);\n\n touchXy[0] = originX;\n touchXy[1] = originY;\n\n // Calculate the distance between the center of the CellLayout\n // and the touch point\n float dist = squaredDistance(touchXy, cellLayoutCenter);\n\n if (dist < smallestDistSoFar) {\n smallestDistSoFar = dist;\n bestMatchingScreen = cl;\n }\n }\n }\n return bestMatchingScreen;\n }", "private void determineSourceUri(HttpServletRequest request, RequestContext context, \n PublicationRequest publicationRequest) throws SQLException, ServletException {\n String uuid = this.determineUuid(request, context, false);\n if ((uuid != null) && (uuid.length() > 0)) {\n publicationRequest.getPublicationRecord().setSourceFileName(uuid+\".xml\");\n //sourceUri = uuid;\n } else {\n String pathInfo = Val.chkStr(request.getPathInfo());\n String queryString = Val.chkStr(request.getQueryString());\n if (pathInfo.startsWith(\"/\")) pathInfo = pathInfo.substring(1);\n if (queryString.length() > 0) {\n pathInfo = pathInfo+\"?\"+queryString;\n }\n if (pathInfo.length() > 0) {\n //sourceUri = \"userid:\"+pubRequest.getPublisher().getLocalID()+\"/\"+pathInfo;\n }\n }\n }", "protected HttpConsumer resolve(HttpServletRequest request) {\n String path = request.getPathInfo();\n if (path == null) {\n return null;\n }\n HttpConsumer answer = consumers.get(path);\n\n if (answer == null) {\n for (String key : consumers.keySet()) {\n if (consumers.get(key).getEndpoint().isMatchOnUriPrefix() && path.startsWith(key)) {\n answer = consumers.get(key);\n break;\n }\n }\n }\n return answer;\n }", "public String findBestMatch()\n\t{\t\t\n\t\tif (robot.containsUserAgent(\"cis455crawler\"))\n\t\t{\n\t\t\tbest_match = \"cis455crawler\";\n\t\t}\n\t\telse if (robot.containsUserAgent(\"*\"))\n\t\t{\n\t\t\tbest_match = \"*\";\n\t\t}\n\t\treturn best_match;\n\t}", "private FunctionDescProto findNearestMatchedFunction(List<FunctionDescProto> candidates) {\n Collections.sort(candidates, new NearestParamsComparator());\n return candidates.get(0);\n }", "private Pattern loadAcceptPattern(ExternalContext context)\n {\n assert context != null;\n\n String mappings = context.getInitParameter(ViewHandler.FACELETS_VIEW_MAPPINGS_PARAM_NAME);\n if (mappings == null)\n {\n return null;\n }\n\n // Make sure the mappings contain something\n mappings = mappings.trim();\n if (mappings.length() == 0)\n {\n return null;\n }\n\n return Pattern.compile(toRegex(mappings));\n }", "public boolean matchUrl( HttpServletRequest request, String strUrlPatern )\r\n {\r\n boolean bMatch = false;\r\n\r\n if ( strUrlPatern != null )\r\n {\r\n UrlItem url = new UrlItem( getResquestedUrl( request ) );\r\n\r\n if ( strUrlPatern.contains( URL_INTERROGATIVE ) )\r\n {\r\n for ( String strParamPatternValue : strUrlPatern.substring( strUrlPatern.indexOf( URL_INTERROGATIVE ) +\r\n 1 ).split( URL_AMPERSAND ) )\r\n {\r\n String[] arrayPatternParamValue = strParamPatternValue.split( URL_EQUAL );\r\n\r\n if ( ( arrayPatternParamValue != null ) &&\r\n ( request.getParameter( arrayPatternParamValue[0] ) != null ) )\r\n {\r\n url.addParameter( arrayPatternParamValue[0], request.getParameter( arrayPatternParamValue[0] ) );\r\n }\r\n }\r\n }\r\n\r\n if ( strUrlPatern.contains( URL_STAR ) )\r\n {\r\n String strUrlPaternLeftEnd = strUrlPatern.substring( 0, strUrlPatern.indexOf( URL_STAR ) );\r\n String strAbsoluteUrlPattern = getAbsoluteUrl( request, strUrlPaternLeftEnd );\r\n bMatch = url.getUrl( ).startsWith( strAbsoluteUrlPattern );\r\n }\r\n else\r\n {\r\n String strAbsoluteUrlPattern = getAbsoluteUrl( request, strUrlPatern );\r\n bMatch = url.getUrl( ).equals( strAbsoluteUrlPattern );\r\n }\r\n }\r\n\r\n return bMatch;\r\n }", "protected HttpRequestHandler findWildcardMatch(String uri) {\n \tfor(Map.Entry<String, HttpRequestHandler> wc : uriWildcardRoutes.entrySet()) {\n \t\tif(uri.startsWith(wc.getKey())) {\n \t\t\treturn wc.getValue();\n \t\t}\n \t}\n \treturn null;\n }", "@Override\n public MockRequest findRequest(final String method,\n final String url,\n final Map<String, String> headers,\n final List<MockRequest> requests) {\n\n if (requests == null || requests.isEmpty())\n return null;\n\n // Find a template that matches the given request parts.\n for (MockRequest template : requests) {\n if (!method.equalsIgnoreCase(template.method()))\n continue;\n\n if (!matchesUrlPattern(url, template.url()))\n continue;\n\n if (!hasRequiredHeaders(headers, template.headerManager().getAllAsMap()))\n continue;\n\n return template;\n }\n\n // There is no match. Try not to cry. Cry a lot.\n return null;\n }", "private OembedProvider findProvider(final String url) {\n\t\tOembedProvider rv = null;\n\t\tproviderLoop:\n\t\t\tfor(OembedProvider provider : this.provider.values()) {\n\t\t\t\tfor(String urlScheme : provider.getUrlSchemes()) {\n\t\t\t\t\tif(url.matches(urlScheme)) {\n\t\t\t\t\t\trv = provider;\n\t\t\t\t\t\tbreak providerLoop;\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\t\t\n\t\treturn rv;\n\t}", "public abstract boolean matches(UrlPattern aUrlPattern, Seed aSeed);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
$ANTLR end "rulePostgreSQL" $ANTLR start "entryRuleAmazonWebServices" InternalMyDsl.g:5988:1: entryRuleAmazonWebServices returns [EObject current=null] : iv_ruleAmazonWebServices= ruleAmazonWebServices EOF ;
public final EObject entryRuleAmazonWebServices() throws RecognitionException { EObject current = null; EObject iv_ruleAmazonWebServices = null; try { // InternalMyDsl.g:5988:58: (iv_ruleAmazonWebServices= ruleAmazonWebServices EOF ) // InternalMyDsl.g:5989:2: iv_ruleAmazonWebServices= ruleAmazonWebServices EOF { newCompositeNode(grammarAccess.getAmazonWebServicesRule()); pushFollow(FOLLOW_1); iv_ruleAmazonWebServices=ruleAmazonWebServices(); state._fsp--; current =iv_ruleAmazonWebServices; match(input,EOF,FOLLOW_2); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
[ "public final EObject ruleAmazonWebServices() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:6001:2: ( (otherlv_0= 'AmazonWebServices' ( (lv_name_1_0= RULE_ID ) ) ) )\n // InternalMyDsl.g:6002:2: (otherlv_0= 'AmazonWebServices' ( (lv_name_1_0= RULE_ID ) ) )\n {\n // InternalMyDsl.g:6002:2: (otherlv_0= 'AmazonWebServices' ( (lv_name_1_0= RULE_ID ) ) )\n // InternalMyDsl.g:6003:3: otherlv_0= 'AmazonWebServices' ( (lv_name_1_0= RULE_ID ) )\n {\n otherlv_0=(Token)match(input,134,FOLLOW_9); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getAmazonWebServicesAccess().getAmazonWebServicesKeyword_0());\n \t\t\n // InternalMyDsl.g:6007:3: ( (lv_name_1_0= RULE_ID ) )\n // InternalMyDsl.g:6008:4: (lv_name_1_0= RULE_ID )\n {\n // InternalMyDsl.g:6008:4: (lv_name_1_0= RULE_ID )\n // InternalMyDsl.g:6009:5: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getAmazonWebServicesAccess().getNameIDTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getAmazonWebServicesRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject entryRulePostgreSQL() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulePostgreSQL = null;\n\n\n try {\n // InternalMyDsl.g:5947:51: (iv_rulePostgreSQL= rulePostgreSQL EOF )\n // InternalMyDsl.g:5948:2: iv_rulePostgreSQL= rulePostgreSQL EOF\n {\n newCompositeNode(grammarAccess.getPostgreSQLRule()); \n pushFollow(FOLLOW_1);\n iv_rulePostgreSQL=rulePostgreSQL();\n\n state._fsp--;\n\n current =iv_rulePostgreSQL; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void service1() throws RecognitionException {\n try {\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:9: ( SERVICEDEF NAME CODE GT ( RET )* ( WS )* )\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:11: SERVICEDEF NAME CODE GT ( RET )* ( WS )*\n {\n match(input,SERVICEDEF,FOLLOW_SERVICEDEF_in_service1503); \n match(input,NAME,FOLLOW_NAME_in_service1505); \n match(input,CODE,FOLLOW_CODE_in_service1507); \n match(input,GT,FOLLOW_GT_in_service1509); \n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:35: ( RET )*\n loop20:\n do {\n int alt20=2;\n int LA20_0 = input.LA(1);\n\n if ( (LA20_0==RET) ) {\n alt20=1;\n }\n\n\n switch (alt20) {\n \tcase 1 :\n \t // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:35: RET\n \t {\n \t match(input,RET,FOLLOW_RET_in_service1511); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop20;\n }\n } while (true);\n\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:40: ( WS )*\n loop21:\n do {\n int alt21=2;\n int LA21_0 = input.LA(1);\n\n if ( (LA21_0==WS) ) {\n alt21=1;\n }\n\n\n switch (alt21) {\n \tcase 1 :\n \t // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:93:40: WS\n \t {\n \t match(input,WS,FOLLOW_WS_in_service1514); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop21;\n }\n } while (true);\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final EObject entryRuleServiceAspect() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleServiceAspect = null;\n\n\n try {\n // InternalMappingDsl.g:5104:54: (iv_ruleServiceAspect= ruleServiceAspect EOF )\n // InternalMappingDsl.g:5105:2: iv_ruleServiceAspect= ruleServiceAspect EOF\n {\n newCompositeNode(grammarAccess.getServiceAspectRule()); \n pushFollow(FOLLOW_1);\n iv_ruleServiceAspect=ruleServiceAspect();\n\n state._fsp--;\n\n current =iv_ruleServiceAspect; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject rulePostgreSQL() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token lv_name_1_0=null;\n\n\n \tenterRule();\n\n try {\n // InternalMyDsl.g:5960:2: ( (otherlv_0= 'PostgreSQL' ( (lv_name_1_0= RULE_ID ) ) ) )\n // InternalMyDsl.g:5961:2: (otherlv_0= 'PostgreSQL' ( (lv_name_1_0= RULE_ID ) ) )\n {\n // InternalMyDsl.g:5961:2: (otherlv_0= 'PostgreSQL' ( (lv_name_1_0= RULE_ID ) ) )\n // InternalMyDsl.g:5962:3: otherlv_0= 'PostgreSQL' ( (lv_name_1_0= RULE_ID ) )\n {\n otherlv_0=(Token)match(input,133,FOLLOW_9); \n\n \t\t\tnewLeafNode(otherlv_0, grammarAccess.getPostgreSQLAccess().getPostgreSQLKeyword_0());\n \t\t\n // InternalMyDsl.g:5966:3: ( (lv_name_1_0= RULE_ID ) )\n // InternalMyDsl.g:5967:4: (lv_name_1_0= RULE_ID )\n {\n // InternalMyDsl.g:5967:4: (lv_name_1_0= RULE_ID )\n // InternalMyDsl.g:5968:5: lv_name_1_0= RULE_ID\n {\n lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2); \n\n \t\t\t\t\tnewLeafNode(lv_name_1_0, grammarAccess.getPostgreSQLAccess().getNameIDTerminalRuleCall_1_0());\n \t\t\t\t\n\n \t\t\t\t\tif (current==null) {\n \t\t\t\t\t\tcurrent = createModelElement(grammarAccess.getPostgreSQLRule());\n \t\t\t\t\t}\n \t\t\t\t\tsetWithLastConsumed(\n \t\t\t\t\t\tcurrent,\n \t\t\t\t\t\t\"name\",\n \t\t\t\t\t\tlv_name_1_0,\n \t\t\t\t\t\t\"org.eclipse.xtext.common.Terminals.ID\");\n \t\t\t\t\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n\n \tleaveRule();\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String entryRuleserviceType() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleserviceType = null;\n\n\n try {\n // InternalMASL.g:1205:51: (iv_ruleserviceType= ruleserviceType EOF )\n // InternalMASL.g:1206:2: iv_ruleserviceType= ruleserviceType EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getServiceTypeRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleserviceType=ruleserviceType();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleserviceType.getText(); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final EObject entryRuleServiceAspectPointcutSelector() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleServiceAspectPointcutSelector = null;\n\n\n try {\n // InternalMappingDsl.g:5025:70: (iv_ruleServiceAspectPointcutSelector= ruleServiceAspectPointcutSelector EOF )\n // InternalMappingDsl.g:5026:2: iv_ruleServiceAspectPointcutSelector= ruleServiceAspectPointcutSelector EOF\n {\n newCompositeNode(grammarAccess.getServiceAspectPointcutSelectorRule()); \n pushFollow(FOLLOW_1);\n iv_ruleServiceAspectPointcutSelector=ruleServiceAspectPointcutSelector();\n\n state._fsp--;\n\n current =iv_ruleServiceAspectPointcutSelector; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String entryRuleserviceName() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleserviceName = null;\n\n\n try {\n // InternalMASL.g:1658:51: (iv_ruleserviceName= ruleserviceName EOF )\n // InternalMASL.g:1659:2: iv_ruleserviceName= ruleserviceName EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getServiceNameRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleserviceName=ruleserviceName();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleserviceName.getText(); \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final void service2() throws RecognitionException {\n Token CODE10=null;\n\n try {\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:9: ( INTERFACEIMPL INTERFACEDEF CODE ENDTAG ( RET )* ( WS )* ENDSERVICE )\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:11: INTERFACEIMPL INTERFACEDEF CODE ENDTAG ( RET )* ( WS )* ENDSERVICE\n {\n match(input,INTERFACEIMPL,FOLLOW_INTERFACEIMPL_in_service2522); \n match(input,INTERFACEDEF,FOLLOW_INTERFACEDEF_in_service2524); \n CODE10=(Token)match(input,CODE,FOLLOW_CODE_in_service2526); \n handler.addImplementation(CODE10);\n match(input,ENDTAG,FOLLOW_ENDTAG_in_service2530); \n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:86: ( RET )*\n loop22:\n do {\n int alt22=2;\n int LA22_0 = input.LA(1);\n\n if ( (LA22_0==RET) ) {\n alt22=1;\n }\n\n\n switch (alt22) {\n \tcase 1 :\n \t // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:86: RET\n \t {\n \t match(input,RET,FOLLOW_RET_in_service2532); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop22;\n }\n } while (true);\n\n // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:91: ( WS )*\n loop23:\n do {\n int alt23=2;\n int LA23_0 = input.LA(1);\n\n if ( (LA23_0==WS) ) {\n alt23=1;\n }\n\n\n switch (alt23) {\n \tcase 1 :\n \t // C:\\\\Users\\\\Yamuna\\\\UNI\\\\L&C\\\\Linguaggi&Compilatori\\\\src\\\\myScanner.g:94:91: WS\n \t {\n \t match(input,WS,FOLLOW_WS_in_service2535); \n\n \t }\n \t break;\n\n \tdefault :\n \t break loop23;\n }\n } while (true);\n\n match(input,ENDSERVICE,FOLLOW_ENDSERVICE_in_service2538); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final EObject entryRuleWebview() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleWebview = null;\n\n\n try {\n // InternalSitemap.g:2850:48: (iv_ruleWebview= ruleWebview EOF )\n // InternalSitemap.g:2851:2: iv_ruleWebview= ruleWebview EOF\n {\n newCompositeNode(grammarAccess.getWebviewRule()); \n pushFollow(FOLLOW_1);\n iv_ruleWebview=ruleWebview();\n\n state._fsp--;\n\n current =iv_ruleWebview; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public interface CreateGameService {\r\n\t@LambdaFunction(functionName=\"create_game_function\")\r\n\tOutput createGame(CreateGameInput input);\r\n}", "public final ANTLRv3Parser.rule_return rule() throws RecognitionException {\r\n rule_stack.push(new rule_scope());\r\n ANTLRv3Parser.rule_return retval = new ANTLRv3Parser.rule_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token modifier=null;\r\n Token arg=null;\r\n Token rt=null;\r\n Token DOC_COMMENT39=null;\r\n Token string_literal40=null;\r\n Token string_literal41=null;\r\n Token string_literal42=null;\r\n Token string_literal43=null;\r\n Token char_literal45=null;\r\n Token string_literal46=null;\r\n Token char_literal51=null;\r\n Token char_literal53=null;\r\n ANTLRv3Parser.id_return id44 =null;\r\n\r\n ANTLRv3Parser.throwsSpec_return throwsSpec47 =null;\r\n\r\n ANTLRv3Parser.optionsSpec_return optionsSpec48 =null;\r\n\r\n ANTLRv3Parser.ruleScopeSpec_return ruleScopeSpec49 =null;\r\n\r\n ANTLRv3Parser.ruleAction_return ruleAction50 =null;\r\n\r\n ANTLRv3Parser.altList_return altList52 =null;\r\n\r\n ANTLRv3Parser.exceptionGroup_return exceptionGroup54 =null;\r\n\r\n\r\n CommonTree modifier_tree=null;\r\n CommonTree arg_tree=null;\r\n CommonTree rt_tree=null;\r\n CommonTree DOC_COMMENT39_tree=null;\r\n CommonTree string_literal40_tree=null;\r\n CommonTree string_literal41_tree=null;\r\n CommonTree string_literal42_tree=null;\r\n CommonTree string_literal43_tree=null;\r\n CommonTree char_literal45_tree=null;\r\n CommonTree string_literal46_tree=null;\r\n CommonTree char_literal51_tree=null;\r\n CommonTree char_literal53_tree=null;\r\n RewriteRuleTokenStream stream_DOC_COMMENT=new RewriteRuleTokenStream(adaptor,\"token DOC_COMMENT\");\r\n RewriteRuleTokenStream stream_RET=new RewriteRuleTokenStream(adaptor,\"token RET\");\r\n RewriteRuleTokenStream stream_BANG=new RewriteRuleTokenStream(adaptor,\"token BANG\");\r\n RewriteRuleTokenStream stream_FRAGMENT=new RewriteRuleTokenStream(adaptor,\"token FRAGMENT\");\r\n RewriteRuleTokenStream stream_86=new RewriteRuleTokenStream(adaptor,\"token 86\");\r\n RewriteRuleTokenStream stream_87=new RewriteRuleTokenStream(adaptor,\"token 87\");\r\n RewriteRuleTokenStream stream_74=new RewriteRuleTokenStream(adaptor,\"token 74\");\r\n RewriteRuleTokenStream stream_88=new RewriteRuleTokenStream(adaptor,\"token 88\");\r\n RewriteRuleTokenStream stream_ARG_ACTION=new RewriteRuleTokenStream(adaptor,\"token ARG_ACTION\");\r\n RewriteRuleTokenStream stream_76=new RewriteRuleTokenStream(adaptor,\"token 76\");\r\n RewriteRuleSubtreeStream stream_id=new RewriteRuleSubtreeStream(adaptor,\"rule id\");\r\n RewriteRuleSubtreeStream stream_exceptionGroup=new RewriteRuleSubtreeStream(adaptor,\"rule exceptionGroup\");\r\n RewriteRuleSubtreeStream stream_throwsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule throwsSpec\");\r\n RewriteRuleSubtreeStream stream_ruleScopeSpec=new RewriteRuleSubtreeStream(adaptor,\"rule ruleScopeSpec\");\r\n RewriteRuleSubtreeStream stream_optionsSpec=new RewriteRuleSubtreeStream(adaptor,\"rule optionsSpec\");\r\n RewriteRuleSubtreeStream stream_altList=new RewriteRuleSubtreeStream(adaptor,\"rule altList\");\r\n RewriteRuleSubtreeStream stream_ruleAction=new RewriteRuleSubtreeStream(adaptor,\"rule ruleAction\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:2: ( ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )? -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )? (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )? id ( '!' )? (arg= ARG_ACTION )? ( 'returns' rt= ARG_ACTION )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* ':' altList ';' ( exceptionGroup )?\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: ( DOC_COMMENT )?\r\n int alt15=2;\r\n int LA15_0 = input.LA(1);\r\n\r\n if ( (LA15_0==DOC_COMMENT) ) {\r\n alt15=1;\r\n }\r\n switch (alt15) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:157:4: DOC_COMMENT\r\n {\r\n DOC_COMMENT39=(Token)match(input,DOC_COMMENT,FOLLOW_DOC_COMMENT_in_rule870); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_DOC_COMMENT.add(DOC_COMMENT39);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:3: (modifier= ( 'protected' | 'public' | 'private' | 'fragment' ) )?\r\n int alt17=2;\r\n int LA17_0 = input.LA(1);\r\n\r\n if ( (LA17_0==FRAGMENT||(LA17_0 >= 86 && LA17_0 <= 88)) ) {\r\n alt17=1;\r\n }\r\n switch (alt17) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:5: modifier= ( 'protected' | 'public' | 'private' | 'fragment' )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:14: ( 'protected' | 'public' | 'private' | 'fragment' )\r\n int alt16=4;\r\n switch ( input.LA(1) ) {\r\n case 87:\r\n {\r\n alt16=1;\r\n }\r\n break;\r\n case 88:\r\n {\r\n alt16=2;\r\n }\r\n break;\r\n case 86:\r\n {\r\n alt16=3;\r\n }\r\n break;\r\n case FRAGMENT:\r\n {\r\n alt16=4;\r\n }\r\n break;\r\n default:\r\n if (state.backtracking>0) {state.failed=true; return retval;}\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 16, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n\r\n switch (alt16) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:15: 'protected'\r\n {\r\n string_literal40=(Token)match(input,87,FOLLOW_87_in_rule880); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_87.add(string_literal40);\r\n\r\n\r\n }\r\n break;\r\n case 2 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:27: 'public'\r\n {\r\n string_literal41=(Token)match(input,88,FOLLOW_88_in_rule882); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_88.add(string_literal41);\r\n\r\n\r\n }\r\n break;\r\n case 3 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:36: 'private'\r\n {\r\n string_literal42=(Token)match(input,86,FOLLOW_86_in_rule884); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_86.add(string_literal42);\r\n\r\n\r\n }\r\n break;\r\n case 4 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:158:46: 'fragment'\r\n {\r\n string_literal43=(Token)match(input,FRAGMENT,FOLLOW_FRAGMENT_in_rule886); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_FRAGMENT.add(string_literal43);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_id_in_rule894);\r\n id44=id();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_id.add(id44.getTree());\r\n\r\n if ( state.backtracking==0 ) {((rule_scope)rule_stack.peek()).name = (id44!=null?input.toString(id44.start,id44.stop):null);}\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: ( '!' )?\r\n int alt18=2;\r\n int LA18_0 = input.LA(1);\r\n\r\n if ( (LA18_0==BANG) ) {\r\n alt18=1;\r\n }\r\n switch (alt18) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:160:3: '!'\r\n {\r\n char_literal45=(Token)match(input,BANG,FOLLOW_BANG_in_rule900); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_BANG.add(char_literal45);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:3: (arg= ARG_ACTION )?\r\n int alt19=2;\r\n int LA19_0 = input.LA(1);\r\n\r\n if ( (LA19_0==ARG_ACTION) ) {\r\n alt19=1;\r\n }\r\n switch (alt19) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:161:5: arg= ARG_ACTION\r\n {\r\n arg=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule909); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(arg);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:3: ( 'returns' rt= ARG_ACTION )?\r\n int alt20=2;\r\n int LA20_0 = input.LA(1);\r\n\r\n if ( (LA20_0==RET) ) {\r\n alt20=1;\r\n }\r\n switch (alt20) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:162:5: 'returns' rt= ARG_ACTION\r\n {\r\n string_literal46=(Token)match(input,RET,FOLLOW_RET_in_rule918); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RET.add(string_literal46);\r\n\r\n\r\n rt=(Token)match(input,ARG_ACTION,FOLLOW_ARG_ACTION_in_rule922); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_ARG_ACTION.add(rt);\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: ( throwsSpec )?\r\n int alt21=2;\r\n int LA21_0 = input.LA(1);\r\n\r\n if ( (LA21_0==89) ) {\r\n alt21=1;\r\n }\r\n switch (alt21) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:3: throwsSpec\r\n {\r\n pushFollow(FOLLOW_throwsSpec_in_rule930);\r\n throwsSpec47=throwsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_throwsSpec.add(throwsSpec47.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: ( optionsSpec )?\r\n int alt22=2;\r\n int LA22_0 = input.LA(1);\r\n\r\n if ( (LA22_0==OPTIONS) ) {\r\n alt22=1;\r\n }\r\n switch (alt22) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:15: optionsSpec\r\n {\r\n pushFollow(FOLLOW_optionsSpec_in_rule933);\r\n optionsSpec48=optionsSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_optionsSpec.add(optionsSpec48.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ( ruleScopeSpec )?\r\n int alt23=2;\r\n int LA23_0 = input.LA(1);\r\n\r\n if ( (LA23_0==SCOPE) ) {\r\n alt23=1;\r\n }\r\n switch (alt23) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:28: ruleScopeSpec\r\n {\r\n pushFollow(FOLLOW_ruleScopeSpec_in_rule936);\r\n ruleScopeSpec49=ruleScopeSpec();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_ruleScopeSpec.add(ruleScopeSpec49.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ( ruleAction )*\r\n loop24:\r\n do {\r\n int alt24=2;\r\n int LA24_0 = input.LA(1);\r\n\r\n if ( (LA24_0==AT) ) {\r\n alt24=1;\r\n }\r\n\r\n\r\n switch (alt24) {\r\n \tcase 1 :\r\n \t // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:163:43: ruleAction\r\n \t {\r\n \t pushFollow(FOLLOW_ruleAction_in_rule939);\r\n \t ruleAction50=ruleAction();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return retval;\r\n \t if ( state.backtracking==0 ) stream_ruleAction.add(ruleAction50.getTree());\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop24;\r\n }\r\n } while (true);\r\n\r\n\r\n char_literal51=(Token)match(input,74,FOLLOW_74_in_rule944); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_74.add(char_literal51);\r\n\r\n\r\n pushFollow(FOLLOW_altList_in_rule946);\r\n altList52=altList();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_altList.add(altList52.getTree());\r\n\r\n char_literal53=(Token)match(input,76,FOLLOW_76_in_rule948); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_76.add(char_literal53);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: ( exceptionGroup )?\r\n int alt25=2;\r\n int LA25_0 = input.LA(1);\r\n\r\n if ( ((LA25_0 >= 81 && LA25_0 <= 82)) ) {\r\n alt25=1;\r\n }\r\n switch (alt25) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:165:3: exceptionGroup\r\n {\r\n pushFollow(FOLLOW_exceptionGroup_in_rule952);\r\n exceptionGroup54=exceptionGroup();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_exceptionGroup.add(exceptionGroup54.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: arg, RET, id, ruleScopeSpec, throwsSpec, ruleAction, altList, optionsSpec, exceptionGroup, rt\r\n // token labels: arg, rt\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_arg=new RewriteRuleTokenStream(adaptor,\"token arg\",arg);\r\n RewriteRuleTokenStream stream_rt=new RewriteRuleTokenStream(adaptor,\"token rt\",rt);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 166:6: -> ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:9: ^( RULE id ( ^( ARG[$arg] $arg) )? ( ^( 'returns' $rt) )? ( throwsSpec )? ( optionsSpec )? ( ruleScopeSpec )? ( ruleAction )* altList ( exceptionGroup )? EOR[\\\"EOR\\\"] )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(RULE, \"RULE\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_id.nextTree());\r\n\r\n adaptor.addChild(root_1, modifier!=null?adaptor.create(modifier):null);\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ( ^( ARG[$arg] $arg) )?\r\n if ( stream_arg.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:67: ^( ARG[$arg] $arg)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(ARG, arg)\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_arg.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_arg.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ( ^( 'returns' $rt) )?\r\n if ( stream_RET.hasNext()||stream_rt.hasNext() ) {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:166:86: ^( 'returns' $rt)\r\n {\r\n CommonTree root_2 = (CommonTree)adaptor.nil();\r\n root_2 = (CommonTree)adaptor.becomeRoot(\r\n stream_RET.nextNode()\r\n , root_2);\r\n\r\n adaptor.addChild(root_2, stream_rt.nextNode());\r\n\r\n adaptor.addChild(root_1, root_2);\r\n }\r\n\r\n }\r\n stream_RET.reset();\r\n stream_rt.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:9: ( throwsSpec )?\r\n if ( stream_throwsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_throwsSpec.nextTree());\r\n\r\n }\r\n stream_throwsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:21: ( optionsSpec )?\r\n if ( stream_optionsSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_optionsSpec.nextTree());\r\n\r\n }\r\n stream_optionsSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:34: ( ruleScopeSpec )?\r\n if ( stream_ruleScopeSpec.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleScopeSpec.nextTree());\r\n\r\n }\r\n stream_ruleScopeSpec.reset();\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:167:49: ( ruleAction )*\r\n while ( stream_ruleAction.hasNext() ) {\r\n adaptor.addChild(root_1, stream_ruleAction.nextTree());\r\n\r\n }\r\n stream_ruleAction.reset();\r\n\r\n adaptor.addChild(root_1, stream_altList.nextTree());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:169:9: ( exceptionGroup )?\r\n if ( stream_exceptionGroup.hasNext() ) {\r\n adaptor.addChild(root_1, stream_exceptionGroup.nextTree());\r\n\r\n }\r\n stream_exceptionGroup.reset();\r\n\r\n adaptor.addChild(root_1, \r\n (CommonTree)adaptor.create(EOR, \"EOR\")\r\n );\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n rule_stack.pop();\r\n }\r\n return retval;\r\n }", "boolean hasIsAmazon();", "boolean add(RuleMap ruleMap) throws RemoteException;", "public final EObject entryRuleService() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleService = null;\n\n\n try {\n // ../com.mguidi.soa/src-gen/com/mguidi/soa/parser/antlr/internal/InternalSOA.g:1103:2: (iv_ruleService= ruleService EOF )\n // ../com.mguidi.soa/src-gen/com/mguidi/soa/parser/antlr/internal/InternalSOA.g:1104:2: iv_ruleService= ruleService EOF\n {\n newCompositeNode(grammarAccess.getServiceRule()); \n pushFollow(FOLLOW_ruleService_in_entryRuleService2482);\n iv_ruleService=ruleService();\n\n state._fsp--;\n\n current =iv_ruleService; \n match(input,EOF,FOLLOW_EOF_in_entryRuleService2492); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public final EObject entryRuleServiceAspectPointcut() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleServiceAspectPointcut = null;\n\n\n try {\n // InternalMappingDsl.g:4859:62: (iv_ruleServiceAspectPointcut= ruleServiceAspectPointcut EOF )\n // InternalMappingDsl.g:4860:2: iv_ruleServiceAspectPointcut= ruleServiceAspectPointcut EOF\n {\n newCompositeNode(grammarAccess.getServiceAspectPointcutRule()); \n pushFollow(FOLLOW_1);\n iv_ruleServiceAspectPointcut=ruleServiceAspectPointcut();\n\n state._fsp--;\n\n current =iv_ruleServiceAspectPointcut; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final String entryRuleInBindingKeywords() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleInBindingKeywords = null;\n\n\n try {\n // InternalAgreeParser.g:10004:1: (iv_ruleInBindingKeywords= ruleInBindingKeywords EOF )\n // InternalAgreeParser.g:10005:2: iv_ruleInBindingKeywords= ruleInBindingKeywords EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getInBindingKeywordsRule()); \n }\n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleInBindingKeywords=ruleInBindingKeywords();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleInBindingKeywords.getText(); \n }\n match(input,EOF,FollowSets000.FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n \n \tcatch (RecognitionException re) { \n \t recover(input,re); \n \t appendSkippedTokens();\n \t}\n finally {\n }\n return current;\n }", "public final EObject entryRuleMatch() throws RecognitionException {\r\n EObject current = null;\r\n\r\n EObject iv_ruleMatch = null;\r\n\r\n\r\n try {\r\n // InternalEsportDsl.g:1626:46: (iv_ruleMatch= ruleMatch EOF )\r\n // InternalEsportDsl.g:1627:2: iv_ruleMatch= ruleMatch EOF\r\n {\r\n newCompositeNode(grammarAccess.getMatchRule()); \r\n pushFollow(FOLLOW_1);\r\n iv_ruleMatch=ruleMatch();\r\n\r\n state._fsp--;\r\n\r\n current =iv_ruleMatch; \r\n match(input,EOF,FOLLOW_2); \r\n\r\n }\r\n\r\n }\r\n\r\n catch (RecognitionException re) {\r\n recover(input,re);\r\n appendSkippedTokens();\r\n }\r\n finally {\r\n }\r\n return current;\r\n }", "public final String entryRuleAppliesToKeywords() throws RecognitionException {\n String current = null;\n\n AntlrDatatypeRuleToken iv_ruleAppliesToKeywords = null;\n\n\n try {\n // InternalJsonParser.g:2262:57: (iv_ruleAppliesToKeywords= ruleAppliesToKeywords EOF )\n // InternalJsonParser.g:2263:2: iv_ruleAppliesToKeywords= ruleAppliesToKeywords EOF\n {\n newCompositeNode(grammarAccess.getAppliesToKeywordsRule()); \n pushFollow(FollowSets000.FOLLOW_1);\n iv_ruleAppliesToKeywords=ruleAppliesToKeywords();\n\n state._fsp--;\n\n current =iv_ruleAppliesToKeywords.getText(); \n match(input,EOF,FollowSets000.FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Inflate the layout for this fragment Bundle bundle = this.getArguments(); username = bundle.getString("USER_NAME"); useremail = bundle.getString("USER_EMAIL"); userphone = bundle.getString("USER_PHONE"); usergender = bundle.getString("USER_GENDER");
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { SharedPreferences prefs =getContext().getSharedPreferences(MY_PREFS_NAME, MODE_PRIVATE); username= prefs.getString("USER_MOBILE", null); useremail= prefs.getString("USER_NAME", null); userphone= prefs.getString("USER_EMAIL", null); usergender= prefs.getString("USER_GENDER", null); return inflater.inflate(R.layout.fragment_profile, container, false); }
[ "public void initInfo(Bundle savedInstanceState) {\n if (savedInstanceState == null) {\n Bundle extras = getIntent().getExtras();\n if (extras == null) {\n username = null;\n animeList = null;\n questionNb = 0;\n score = 0;\n } else {\n score = extras.getInt(\"score\");\n username = extras.getString(\"username\");\n animeList = (List<Anime>) extras.getSerializable(\"animeList\");\n questionNb = extras.getInt(\"questionNb\");\n genreID = extras.getInt(\"genreID\");\n }\n } else {\n username = (String) savedInstanceState.getSerializable(\"username\");\n animeList = (List<Anime>) savedInstanceState.getSerializable(\"animeList\");\n }\n }", "public void populateMemberDetailsScreen(String _name, String _birthday, String _gender,\n String _twitterId, String _numCommittees, String _numRoles) {\n\n TextView tv = (TextView) findViewById(R.id.text_name);\n tv.setText(\" \"+_name.toString());\n\n tv = (TextView) findViewById(R.id.text_birthday);\n tv.setText(\" \"+_birthday.toString());\n\n tv = (TextView) findViewById(R.id.text_gender);\n tv.setText(\" \"+_gender.toString());\n\n tv = (TextView) findViewById(R.id.text_twitter_id);\n tv.setText(\" \"+_twitterId.toString());\n\n tv = (TextView) findViewById(R.id.text_num_committees);\n tv.setText(\" \"+_numCommittees.toString());\n\n tv = (TextView) findViewById(R.id.text_num_roles);\n tv.setText(\" \"+_numRoles.toString());\n }", "private void getUserDetails() {\n mUserEmailId = edtEmail.getText().toString();\n mUserPassword = edtPassword.getText().toString();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_friend, container, false);\n initView(view);\n initData();\n initThread();\n\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n //Default creation\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_passphrase);\n // Set up the login form.\n passphraseV = (EditText) findViewById(R.id.pp_plaintext);\n passphrase_reV = (EditText) findViewById(R.id.ppre_plaintext);\n\n //Get the data that i receive from the intent call\n if(getIntent().getExtras() != null) {\n bundle = getIntent().getExtras();\n new_user = (User) getIntent().getSerializableExtra(\"userdata\");\n }\n\n //setup the onclick button action\n Button send_button = (Button) findViewById(R.id.senddata_button);\n send_button.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n sendData();\n }\n });\n\n ViewPP = findViewById(R.id.passphrase_form);\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment__record_selection, container,\n\t\t\t\tfalse);\n\n\t\tfragment_userdata = new FragmentUserInput();\n\t\trec = null;\n\t\trecordlist = mCallback.getRecordlist();\n\t\tBundle args = getArguments();\n\t\tname = args.getString(\"NAME\");\n\t\tphone = args.getString(\"PHONE\");\n\t\temail = args.getString(\"EMAIL\");\n\t\tid = args.getInt(\"ID\");\n\n\t\trecordListView = (ListView) view.findViewById(R.id.RSlistView);\n\n\t\t// add each row (item) to list\n\t\tlistadapter = new RecordAdapter(getActivity(), recordlist);\n\t\trecordListView.setAdapter(listadapter);\n\n\t\t// set what happens when an item in the list is clicked. A variable\n\t\t// \"record\" is given the text (name)\n\t\t// of the plant (listItem)\n\t\trecordListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\trec = recordlist.get((int) id);\n\t\t\t\tselectRecord(rec);\n\t\t\t}\n\t\t});\n\n\t\treturn view;\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.activity_new_user);\r\n\t\t\r\n\r\n\t presenter = new NewUserPresenter(LocalModel.getModel(),this);\r\n adminCreation = getIntent().getBooleanExtra(\"isAdmin\",false);\r\n\r\n nameField.addTextChangedListener(new EmptyTextWatcher(nameField));\r\n passwordField.addTextChangedListener(new EmptyTextWatcher(passwordField));\r\n confirmField.addTextChangedListener(new EmptyTextWatcher(confirmField));\r\n emailField.addTextChangedListener(new EmailTextWatcher(emailField));\r\n getActionBar().setTitle(\"New User\");\r\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_profile);\n\n // Get username and email\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n username = settings.getString(User.USERNAME, \"no_username\");\n email = settings.getString(User.EMAIL, \"no_email\");\n\n // Set username and email fields\n usernameText = (TextView) findViewById(R.id.profileUsername);\n usernameText.setText(username);\n emailText = (TextView) findViewById(R.id.profileEmail);\n emailText.setText(email);\n\n // Set up list of droplets\n ArrayList<String> dropletStrings = new ArrayList<>();\n adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, dropletStrings);\n dropList = (ListView) findViewById(R.id.profileDropListView);\n dropList.setAdapter(adapter);\n\n // Populate list with droplet data\n AsyncDropletQuery queryTask = new AsyncDropletQuery(this, this);\n queryTask.execute();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n\n View view = inflater.inflate(R.layout.fragment_main, container, false);\n\n tvID = view.findViewById(R.id.tvID);\n tvPoints = view.findViewById(R.id.tvPoints);\n tvEvents = view.findViewById(R.id.tvEvents);\n\n tvID.setText(\"Deine ID lautet: \\n\\n\" + StartActivity.data + \"\\n\");\n tvPoints.setText(\"Deine punkte: \\n\\n\" + s.getPoints() + \"\\n\");\n\n return view;\n }", "private void getUserEnterInformations() {\r\n email = etUserLoginEmail.getText().toString();\r\n password = etUserLoginPassword.getText().toString();\r\n }", "private void setViewsAndAttributes() {\n tvTitle = (TextView) findViewById(R.id.login_tv_title);\n String roleName = userRole.toString();\n tvTitle.setText(roleName.substring(0, 1) + roleName.substring(1).toLowerCase() + \" Login\");\n etId = (EditText) findViewById(R.id.login_et_id);\n etPassword = (EditText) findViewById(R.id.login_et_password);\n }", "public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\t\tgetActivity().invalidateOptionsMenu();\n View rootView = inflater.inflate(R.layout.profile, container, false);\n setupUI(rootView);\n getData();\n remoteData = new RemoteDataTask();\n\t\tremoteData.execute();\n settings = this.getActivity().getSharedPreferences(PREFS_NAME, 0);\n if (settings.getBoolean(\"firstSwipe\", true)) { \n \tfirstSwipe = true;\n Log.d(TAG, \"not swiped yet\");\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_teacher_roll_call, container, false);\n try {\n initUI(rootView);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return rootView;\n }", "@Nullable\n @Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_rider_profile, container, false);\n return view;\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n setContentView(R.layout.activity_profile);\n titleTextView = (TextView) findViewById(R.id.profile_title);\n emailTextView = (TextView) findViewById(R.id.profile_email);\n nameTextView = (TextView) findViewById(R.id.profile_name);\n loginOrLogoutButton = (Button) findViewById(R.id.login_or_logout_button);\n titleTextView.setText(R.string.profile_title_logged_in);\n\n /**\n * anonymous inner class to listen for click on login or logout\n */\n loginOrLogoutButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (currentUser != null) {\n // User clicked to log out.\n ParseUser.logOut();\n currentUser = null;\n showProfileLoggedOut();\n } else {\n // User clicked to log in.\n ParseLoginBuilder loginBuilder = new ParseLoginBuilder(\n ProfileActivity.this);\n startActivityForResult(loginBuilder.build(), LOGIN_REQUEST);\n }\n }\n });\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Retrieving headerText value from bundle\n if (getArguments() != null) {\n headerText = getArguments().getString(HEADER_TEXT_CODE);\n } else {\n headerText = DEFAULT_HEADER_TEXT;\n }\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_login);\n\t\t\n\t\tsetTextViews();\n\t\t\n\t\t\n\t\tJSONstringTemp = getIntent().getExtras().getString(\"qString\");\n\t\t//Log.i(\"loaoslsaf\", a);\n\n\t\tpatientDoB = (DatePicker) findViewById(R.id.datepicker);\n\t\tpatientSurname = (EditText) findViewById(R.id.login_surname_ET);\n\t\tpatientfirstNameET = (EditText) findViewById(R.id.login_first_name_ET);\n\t\t\n\t\tfindViewById(R.id.login_button).setOnClickListener( \n\t\t\t\tnew OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tpatientDoBYearInt = patientDoB.getYear(); // retrieves the year,\n\t\t\t\t\t\tpatientDoBMonthInt = patientDoB.getMonth() + 1; // the month (It adds 1 because the months are recorded in an array)\n\t\t\t\t\t\tpatientDoBDayInt = patientDoB.getDayOfMonth(); // and the day on the datePicker widget.\n\t\t\t\t\t\t\n\t\t\t\t\t\tpatientDoBYearStr = Integer.toString(patientDoBYearInt); // parses all the integers to string\n\t\t\t\t\t\tpatientDoBMonthStr = Integer.toString(patientDoBMonthInt); // ready to be added together to make \n\t\t\t\t\t\tpatientDoBDayStr = Integer.toString(patientDoBDayInt); // the date of birth\n\t\t\t\t\t\tpatientDoBStr = patientDoBYearStr +\"-\"+ patientDoBMonthStr +\"-\"+ patientDoBDayStr; // builds the string with the full date\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tpatientID = patientDoBStr + \".\" + patientSurname.getText(); // adds the string with the surname to the string with the date\n\t\t\t\t\t\tSystem.out.println(patientID);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpatientFirstName = patientfirstNameET.getText().toString();\n\t\t\t\t\t\tpatientLastName = patientSurname.getText().toString();\n\t\t\t\t\t\t\n\t\t\t\t\t\tsetupAlertDialogs();\n\t\t\t\t\t\talert.show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public void getUserInfo() {\r\n\t\tString username;\r\n\t\tString password;\r\n\r\n\t\tSharedPreferences pref = getSharedPreferences(PREFS_NAME, 0);\r\n\r\n\t\tusername = pref.getString(\"id\", \"\");\r\n\t\tpassword = pref.getString(\"pwd\", \"\");\r\n\r\n\t\tif (username != \"\" && password != \"\") {\r\n\t\t\tuserName.setText(username);\r\n\t\t\tpassWord.setText(password);\r\n\t\t}\r\n\t}", "private void initEditTextUserDataInPopupDialog()\n {\n List<String> userDataList = getExistUserDataInListView(userDataListView);\n\n if(userDataList.size() == 3)\n {\n String userName = userDataList.get(0);\n\n String password = userDataList.get(1);\n\n String email = userDataList.get(2);\n\n if(userNameEditText != null)\n {\n userNameEditText.setText(userName);\n }\n\n if(passwordEditText != null)\n {\n passwordEditText.setText(password);\n }\n\n if(emailEditText != null)\n {\n emailEditText.setText(email);\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the trigger goal.
@NonNull public ScreenTriggerBuilder setGoal(double goal) { this.goal = goal; return this; }
[ "@NonNull\n public RegionTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }", "@NonNull\n public LifeCycleTriggerBuilder setGoal(double goal) {\n this.goal = goal;\n return this;\n }", "public void setTrigger(java.lang.String trigger);", "public final void setGoal(final int goal)\n {\n this.goal = goal;\n }", "public void setGoal(GateGoal goal) {\n this.goal = goal;\n }", "public void setGoal(Point point) {\n mGoal = point;\n }", "public void setGoal(CentrelizedLRTAState goal) {\n this.goal = goal;\n }", "public void setTrigger(boolean b)\n\t{\n\t\tcanTrigger = b;\n\t}", "public void setTriggerer(final Triggerer triggerer);", "public void setTrigger(ArrayList trigger) {\n\t\talTrigger = trigger;\n\t}", "public synchronized void trigger() {\n singleStepExecutionAllowed = true;\n }", "public void setPublishGoal(int goal){\n setIntegerData(StatTypeData.PUBLISH_GOAL, goal);\n }", "void setTriggered(boolean triggered);", "public final ResiduatedGoal setGoal (Goal goal)\n {\n _goal = goal;\n _goal.setTimeStamp(this);\n _goal.setIsTrailable(false);\n return this;\n }", "public void setTriggerable(boolean triggerable) {\n this.triggerable = triggerable;\n }", "public Event setTrigger(String trigger)\n {\n this.trigger = trigger;\n return this;\n }", "public final synchronized void setTriggered()\n {\n triggered = true ;\n notifyAll() ;\n }", "public void setTriggers() {\n\t\tthis.driveTrigger.whileActive(new DirectDriveCommand());\n\t\tthis.goFastTrigger.whileActive(new GottaGoFastCommand());\n\n\t\tthis.directionRightTrigger.whenActive(new ToggleFrontRelayCommand());\n\t\t//this.directionDownTrigger.whenActive(new ResetGyroCommand());\n\t\tthis.directionLeftTrigger.whenActive(new ToggleBackRelayCommand());\n\n\t\tthis.armTrigger.whileActive(new DirectArmCommand());\n\t\tthis.grabberTrigger.whileActive(new DirectGrabberCommand());\n\t\tthis.hatchPopperTrigger.whileActive(new PopHatchCommand());\n\n\t\tthis.changeSourceTrigger.whenActive(new ChangeSourceCommand());\n\t\tthis.reverseDriveTrigger.whenActive(new ReverseDriveCommand());\n\n\t\tthis.alignTrigger.whileActive(new TurnToCenterTargetsCommand());\n\t}", "public Triggerer triggerer();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Actualiza la asistencia justificada
void actualizarAsistencia(Asistencia asistencia);
[ "public void atualizaPlacar() {\n\t\tplacar.atualiza();\n\t}", "void actualizar(Prestamo prestamo);", "public void atualizarData(){\r\n\t\tSystem.out.println(\"Go to hell!\");\r\n\t\tif(presencas != null){\r\n\t\t\tfor (Presenca p : presencas) {\r\n\t\t\t\tp.setData(presenca.getData());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void atualizar() {\n modeloTabela.fireTableDataChanged();\n }", "ParqueaderoEntidad actualizar(ParqueaderoEntidad parqueadero);", "private void actualizarFondo() {\n actualizaEstadoMapa();\n if (modificacionFondoBase == true && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE){\n moverFondo();\n } else if (modificacionFondoBase == false && estadoJuego != EstadoJuego.PAUSADO && estadoJuego != EstadoJuego.PIERDE ){\n texturaFondoBase= texturaFondo1_1;\n texturaFondoApoyo= texturaFondo1_2;\n moverFondo();\n }\n }", "private void atualizarProduto() {\n modelProduto.setCodBarras(this.tfCodBarras.getText());\n modelProduto.setDescricao(this.tfDescricao.getText());\n modelProduto.setValor(formatador.converteVirgulaParaPonto(this.tfValor.getText()));\n\n if (controllerProduto.atualizarProdutoController(modelProduto)) {\n\n JOptionPane.showMessageDialog(this, \"Produto atualizado com sucesso!\", \"ATENÇÃO\", JOptionPane.WARNING_MESSAGE);\n this.preencheTabelaProduto();\n limparCampos();\n habilitaDesabilitaCampos(false);\n\n } else {\n JOptionPane.showMessageDialog(this, \"Erro ao atualizar o produto!\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n\tprotected void actualizaSemaforos(){\n\t\tif(this.indiceSemaforoVerde==-1){\n\t\t\tthis.indiceSemaforoVerde=0;\n\t\t\tCarreteraEntranteConIntervalo carretera=this.carreterasEntrantes.get(indiceSemaforoVerde);\n\t\t\tcarretera.ponSemaforo(true);\n\t\t\tcarretera.setUnidadesDeTiempoUsadas(0);\n\t\t\tcarretera.setContadorVehiculos(0);\n\t\t\tcarretera.setUsadaPorUnVehiculo(false);\n\t\t\tcarretera.setUsoCompleto(false);\n\t\t}else if(this.indiceSemaforoVerde!=-1){\n\t\t\tCarreteraEntranteConIntervalo ri=this.carreterasEntrantes.get(indiceSemaforoVerde);\n\t\t\tif(ri.tiempoConsumido()){\n\t\t\t\tri.ponSemaforo(false);\n\t\t\t\tif(ri.usoCompleto()){\n\t\t\t\t\tri.setIntervaloDeTiempo(Math.min(ri.getIntervaloTiempo()+1, maxValorIntervalo));\n\t\t\t\t}else if(!ri.usada()){\n\t\t\t\t\tri.setIntervaloDeTiempo(Math.max(ri.getIntervaloTiempo()-1, minValorIntervalo));\n\t\t\t\t}\n\t\t\t\tri.setUnidadesDeTiempoUsadas(0);\n\t\t\t\tri.setContadorVehiculos(0);\n\t\t\t\tri.setUsadaPorUnVehiculo(false);\n\t\t\t\tri.setUsoCompleto(false);\n\t\t\t\tthis.indiceSemaforoVerde++;\n\t\t\t\tthis.indiceSemaforoVerde=indiceSemaforoVerde%this.carreterasEntrantes.size();\n\t\t\t\tCarreteraEntranteConIntervalo rj=this.carreterasEntrantes.get(indiceSemaforoVerde);\n\t\t\t\trj.ponSemaforo(true);\n\t\t\t}\n\t\t}\n\t}", "public void actualizarAltura();", "public void actualizarDatos() {\n Operacion operacion = new Operacion();\n String sql = \"update producto set producto= '\" + this.producto + \"' where id_producto= '\" + this.id_producto + \"'\";\n operacion.ejecutar(sql);\n }", "public void actualizarPodio() {\r\n\t\tordenarXPuntaje();\r\n\t\tint tam = datos.size();\r\n\t\traizPodio = datos.get(tam-1);\r\n\t\traizPodio.setIzq(datos.get(tam-2));\r\n\t\traizPodio.setDer(datos.get(tam-3));\r\n\t}", "public void secuenciar(){\n\t\t\n\t\t/* \n\t\t * Por el momento, cada acciun estu asociada a una tarea, por lo que de cada acciun \n\t\t * se saca una tarea, y a usta se le asigna un RAP concreto. Luego se auade esta \n\t\t * informaciun a la secuencia. Esto puede modificarse cuando se implemente la \n\t\t * capa superior de la arquitectura.\n\t\t */\n\t\t\n\t\t/* Se busca un plan igual en el historial de planes */\n\t\tboolean otro_igual = false;\n\t\tint i = 0;\n\t\tPlan otro = null;\n\t\twhile(i<this.historial.getPlanes().size() && !otro_igual){\n\t\t\totro = this.historial.getPlanes().get(i);\n\t\t\tif(this.plan.esIgual(otro))\n\t\t\t\totro_igual = true;\n\t\t}\n\t\tif(otro_igual){ /* Si hay un plan igual al actual, se utiliza esa soluciun */\n\t\t\tthis.secuencia = this.historial.getSecuencia(otro);\n\t\t\tthis.solucion = this.historial.getSolucion(otro);\n\t\t} else{\n\t\t\t/* Si no, se elabora la secuencia */\n\t\t\tLinkedList<Accion> acciones = this.plan.getAcciones();\n\t\t\tint j = 0;\n\t\t\twhile(j<acciones.size()){\n\t\t\t\tAccion siguiente = acciones.get(j);\n\t\t\t\tTarea tarea = asignarTarea(siguiente);\n\t\t\t\tthis.secuencia.add(tarea);\n\t\t\t\tasignarRAP(tarea);\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void atualizar (Unidade unidade);", "public void updateAsignacion (Asignacion asignacion) throws DaoException ;", "void actualizar(Espacio espacio);", "private void actualizaSuper() {\n\t\tString[] valores = {this.nombreCurso, this.nombreGrupo};\n\t\tactualizaValores(valores);\n\t}", "public void atualizarStatus(Reabastecimento reabastecimento) {\r\n\t\treabastecimentoDAO.atualizarStatus(reabastecimento);\r\n\t}", "private void actualizarAbono() throws AvException {\r\n\t\tParametro p = new Parametro();\r\n\t\tp.setAccion(CatalogoAcciones.ACTUALIZAR_ABONO);\r\n\t\tp.setValor(Tipo.INPUT, getAbono());\r\n\t\tAdministradorSesion.getInstance().getSesionActiva().ejecutar(p);\r\n\t\tlimpiarTextos();\r\n\t\tcargarAbonos();\r\n\t}", "private void preparacionParaActualizar(){\n botonActualizar.setEnabled(true);\n botonEliminar.setEnabled(false);\n botonBuscar.setEnabled(false);\n botonAgregar.setEnabled(false);\n botonProcesar.setEnabled(true);\n Alias.setForeground(new Color(0, 255, 102));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Use AddSchoolGuardReqMsg.newBuilder() to construct.
private AddSchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { super(builder); }
[ "private AddSchoolGuardRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetSchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ModifySchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetSchoolGuardRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DelSchoolGuardReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private ModifySchoolGuardRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private NotifySchoolGuardChangedReqMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SearchSchoolRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private DelSchoolGuardRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private StudentEnterSchoolClassRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetSchoolInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SendSchoolInformRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetMyStudySchoolInfoRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protocol.Message.SchoolGuardOrBuilder getGuardOrBuilder();", "private NotifySchoolGuardChangedRspMsg(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private TeacherEnterSchoolRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetSchoolInformRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SchoolGuard(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private StudentLeaveSchoolClassRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
An item use effect. For example, if my item was a potion which permanently boosted my strength and vitality by two points, it would have two ItemUses attached to it, one to boost strength, and one to boost vitality.
public interface ItemUse { /** The player uses this item. */ public void use(Player pl); /** Get the name of the effect, for the menu */ public String getEffectName(); }
[ "public void useItem(String itemName) \n\t{\n\t\tItemConsumable item = (ItemConsumable)inventory.get(itemName); //holding in hand...\n\t\tfor(int i=0;i<item.getEffect().length;i++)\n\t\t{\n\t\t\tswitch(item.getEffect()[i])\n\t\t\t{\n\t\t\t\tcase \"Heal\": healPlayer(item.getEffectValue()[i]); break;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testUseItemItemHasBeenUsed() {\n\n // Create an item\n ItemType item = TestUtils.createUsableItemType();\n\n // Add the item in the player inventory\n this.world.model.player.inventory.addItem(item, 1);\n\n // verify if the item is in the player's inventory\n assertNotNull(this.world.model.player.inventory.findItem(item.id));\n\n // use the item\n this.itemcontroller.useItem(item);\n\n assertEquals(this.world.model.statistics.getNumberOfTimesItemHasBeenUsed(item.id), 1);\n }", "public void use(Pokemon pokemon) {\n //if 1 item is available\n if(amount == 1) {\n pokemon.setHit_points(effect + pokemon.getHit_points()); //apply the effect to pokemon health\n amount--; //use the item\n }\n else {\n //warn the user that he used all of his items\n System.out.println(\"All the items have been used!\");\n }\n }", "public void useItem(Item item) {\n\t\twillRun = pokemonRun();\n\t\t\n\t\tif (item.getClass() == items.SafariBall.class){\n\t\t\tcalcCatchProbability();\n\t\t\tisEating = false;\n\t\t\tisAngry = false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!isEating && !isAngry) {\n\t\t\tif (item.getClass() == items.Rock.class){\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isEating && !isAngry){\n\t\t\tif (item.getClass() == items.Rock.class){\n\t\t\t\tisEating = false;\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisEating = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!isEating && isAngry){\n\t\t\tif (item.getClass() == items.Bait.class){\n\t\t\t\tisEating = true;\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t\telse if (item.getClass() == items.Rock.class){\n\t\t\t\tisEating = false;\n\t\t\t\tisAngry = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tisAngry = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsetCatchRate(item.getCatchModifier());\n\t\tsetHP(item.hpModifier());\n\t\tcalcCatchProbability();\n\t}", "@Test\n public void testUseItemUsableItem() {\n\n // Create an item\n ItemType item = TestUtils.createUsableItemType();\n\n // Add the item in the player inventory\n this.world.model.player.inventory.addItem(item, 1);\n\n // verify if the item is in the player's inventory\n assertNotNull(this.world.model.player.inventory.findItem(item.id));\n\n // use the item\n this.itemcontroller.useItem(item);\n\n // verify that the item was removed from the player's inventory\n assertNull(this.world.model.player.inventory.findItem(item.id));\n }", "public int GetItemEffect() { return this.mItemEffect; }", "void useEquippedItemOn(IUnit targetUnit);", "public void itemEffects ()\n {\n\tif (item.findCurrentItem () == 10)\n\t{\n\t // Increases player score\n\t increaseItemSound.play ();\n\t playerScore += 75;\n\t}\n\n\n\tif (item.findCurrentItem () == 11)\n\t{\n\t // Clears all blocks on a field\n\t removeAllItemSound.play ();\n\t clearAllBlocks ();\n\t}\n\n\n\tif (item.findCurrentItem () == 12)\n\t{\n\t // decreases the player score\n\t // only if the player score is greater than\n\t // 149, this prevents negative scores\n\n\t decreaseItemSound.play ();\n\n\t if (playerScore > 100)\n\t {\n\t\tplayerScore -= 100;\n\t }\n\t}\n\n\n\tif (item.findCurrentItem () == 13)\n\t{\n\t // increase the shape dropping speed\n\n\t decreaseItemSound.play ();\n\t shapeSpeed += 50;\n\t}\n\n\n\tif (item.findCurrentItem () == 14)\n\t{\n\t // removes the current shape and replaces it\n\t // with the next shape\n\t changeShapeItemSound.play ();\n\t currentShape = nextShape;\n\t currentShape.changePosition (1, 6);\n\t nextShape = new Shape (nextShapePosRow, nextShapePosCol);\n\t blocksUsed++;\n\n\t playerScore += 5;\n\t}\n\n\n\tif (item.findCurrentItem () == 15)\n\t{\n\t // Decreases the shape dropping speed\n\t increaseItemSound.play ();\n\n\t shapeSpeed -= 50;\n\t}\n }", "@Override\n protected void setUsesModifier()\n {\n usesModifier = p.getSpellCount(player, spellType);\n\n if (Ollivanders2API.getPlayers().playerEffects.hasEffect(player.getUniqueId(), O2EffectType.HIGHER_SKILL))\n usesModifier *= 2;\n }", "public void attackWith(RpgItem item) {\r\n\t\tif(item.type == RpgItemType.Single_Use_Weapon) {\r\n\t\t\tinv.removeItem(item);\r\n\t\t\tequippedItem = null;\r\n\t\t} else if(item.type == RpgItemType.Spell) {\r\n\t\t\tmana -= item.manaConsumption;\r\n\t\t\tif(mana < 0) {\r\n\t\t\t\tmana = 0;\r\n\t\t\t\tSystem.out.print(\"Mana was consumed past 0...?\\n\");\r\n\t\t\t}\r\n\t\t\tif(item.effect != null) {\r\n\t\t\t\teffect = item.effect;\r\n\t\t\t\teffectTurns = item.effectTurns;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "float getBonusItemDrop();", "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}", "public void useItem() {\n\t\t// Try to use the primary item if there is one.\n\t\tif(primaryItemSlot != null) {\n\t\t\t// Was the item slot freed\n\t\t\tboolean itemSlotFreed = false;\n\t\t\t// There is an item! use it.\n\t\t\tif(primaryItemSlot.isQuantifiable()) {\n\t\t\t\t// Does the item have an infinite quantity?\n\t\t\t\tif(primaryItemSlot.getQuantity() == -1) {\n\t\t\t\t\t// Use the item! (can fail)\n\t\t\t\t\tequipmentUsage.onItemUse(this.player, primaryItemSlot);\n\t\t\t\t} else {\n\t\t\t\t\t// Use the item (can fail, if so don't decrement item quantity)\n\t\t\t\t\tif(equipmentUsage.onItemUse(this.player, primaryItemSlot)) {\n\t\t\t\t\t\t// Decrement the item quantity.\n\t\t\t\t\t\tprimaryItemSlot.setQuantity(primaryItemSlot.getQuantity() - 1);\n\t\t\t\t\t\t// If the new quantity is 0 then remove it from slot/inventory.\n\t\t\t\t\t\tif(primaryItemSlot.getQuantity() == 0) {\n\t\t\t\t\t\t\t// We have used the last unit of this item.\n\t\t\t\t\t\t\titemSlotFreed = true;\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\t// Attempt to use our single unit of this item.\n\t\t\t\titemSlotFreed = equipmentUsage.onItemUse(this.player, primaryItemSlot);\n\t\t\t}\n\t\t\t// Was the item slot freed up?\n\t\t\tif(itemSlotFreed) {\n\t\t\t\t// We have used our item!\n\t\t\t\tprimaryItemSlot = null;\n\t\t\t\t// TODO May have to remove item from inventory.\n\t\t\t\t// If the secondary slot is not empty, then swap them.\n\t\t\t\tthis.swapItems();\n\t\t\t}\n\t\t} else {\n\t\t\t// Play sound effect to show this action failed.\n\t\t\tAudio.getSoundEffect(Audio.SoundEffect.BLIP_LOW).play();\n\t\t}\n\t}", "double weigh(ITEM item, CONTEXT context, Options options);", "public void use() {\n if (!isValidItem()) {\n return;\n }\n\n World.getNet().sendCommand(new UseInventoryCmd(getSlotId()));\n }", "public void addUse()\n\t{\n\t\tuseCount++;\n\t}", "private void ApplyStatBonus(String item)\n {\n StatType t = StatType.valueOf(item);\n \n switch (t)\n {\n case stat1:\n this.combatBonus = 1;\n AddBonusDescription(\"plus 1 Combat Rating\");\n break;\n case stat2:\n AddMissionBonus(Mission.MissionType.Assassination, 1);\n AddBonusDescription(\"plus 1 Assassination Bonus Draw\");\n break;\n case stat3:\n AddMissionBonus(Mission.MissionType.Assassination, 3);\n AddBonusDescription(\"plus 3 Assassination Bonus Draw\");\n break;\n case stat4:\n this.combatBonus = 3;\n AddBonusDescription(\"plus 3 Combat Rating\");\n break;\n case stat5:\n // TODO: once used, item is removed from game\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = true;\n this.rollAfterUse = false;\n AddBonusDescription(\"Single Use\");\n break;\n case stat6:\n // TODO: adds +2 to user selected attribute for one game turn\n AddBonusDescription(\"plus 2 to any stat (not implemented)\");\n break;\n case stat7:\n // TODO: once used, item is removed from game\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = true;\n this.rollAfterUse = false;\n AddBonusDescription(\"Single Use\");\n break;\n case stat8:\n // TODO: PDB level -1 during detection\n AddBonusDescription(\"PDB level minus 1 during detection\");\n break;\n case stat9:\n this.hidingBonus = 2;\n AddBonusDescription(\"plus 2 to Hiding\");\n // TODO: does not apply during character search\n break;\n case stat10:\n this.hidingBonus = 4;\n AddBonusDescription(\"plus 4 to Hiding\");\n break;\n case stat11:\n // TODO: Irate locals combat strength cut in half\n AddBonusDescription(\"Reduce Irate locals combat strength in half (not implemented)\");\n break;\n case stat12:\n // TODO: Set PDB on planet to down\n AddBonusDescription(\"Set PDB to down\");\n break;\n case stat13:\n // TODO: after each use, Roll dice, if >= 3, item becomes inoperable\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = false;\n this.rollAfterUse = true;\n this.inoperativeRoll = 3;\n AddBonusDescription(\"Chance to become inoperative\");\n break;\n case stat14:\n // TODO: heal all wounds - can not be used between combat rounds\n AddBonusDescription(\"Heal all wounds\");\n break;\n case stat15:\n // TODO: after each use, Roll dice, if roll = 6, item becomes inoperable\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = false;\n this.rollAfterUse = true;\n this.inoperativeRoll = 6;\n AddBonusDescription(\"Chance to become inoperative\");\n break;\n case stat16:\n // TODO: damage -1\n AddBonusDescription(\"Reduce damage by 1\");\n break;\n case stat17:\n // TODO: may purchase ship in deck, except S-XIII\n AddBonusDescription(\"Can be used to purchase a ship\");\n break;\n case stat18:\n // TODO: negates enemy gather information mission\n AddBonusDescription(\"Negates enemy gather info mission\");\n break;\n case stat19:\n AddMissionBonus(Mission.MissionType.Assassination, 2);\n AddMissionBonus(Mission.MissionType.Coup, 2);\n AddMissionBonus(Mission.MissionType.Diplomacy, 2);\n AddMissionBonus(Mission.MissionType.Sovereign, 2);\n AddMissionBonus(Mission.MissionType.Sabotage, 2);\n AddMissionBonus(Mission.MissionType.FreePrisoners, 2);\n AddMissionBonus(Mission.MissionType.GatherInfo, 2);\n AddBonusDescription(\"plus 2 Assassination Bonus draw\");\n AddBonusDescription(\"plus 2 Coup Bonus draw\");\n AddBonusDescription(\"plus 2 Diplomacy Bonus draw\");\n AddBonusDescription(\"plus 2 Sovereign Bonus draw\");\n AddBonusDescription(\"plus 2 Sabotage Bonus draw\");\n AddBonusDescription(\"plus 2 Free Prisoners Bonus draw\");\n AddBonusDescription(\"plus 2 Gather Info Bonus draw\");\n break;\n case stat20:\n this.intelligenceBonus = 1;\n AddBonusDescription(\"plus 1 Intelligence\");\n break; \n case stat21:\n // TODO: Disable enemy character for 1 game phase\n AddBonusDescription(\"Can disable an enemy character\");\n break;\n case stat22:\n // TODO: after each use, Roll dice, if roll = 5 or 6, item becomes inoperable\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = false;\n this.rollAfterUse = true;\n this.inoperativeRoll = 5;\n AddBonusDescription(\"Chance to become inoperative\");\n break;\n case stat23:\n this.defenseBonus = 2;\n AddBonusDescription(\"plus 2 to combat when defending\");\n break;\n case stat24:\n // TODO: Ignore first creature attack on mission\n AddBonusDescription(\"Ignore first creature attack\");\n break;\n case stat25:\n // TODO: May take a wound, but is removed from play afterward\n AddBonusDescription(\"Can absorb 1 wound, but is removed from game\");\n break;\n case stat26:\n // TODO: after each use, Roll dice, if roll = 6, item becomes inoperable\n this.itemHasSpecial = true;\n this.specialHasBeenUsed = false;\n this.removeItemOnceUsed = false;\n this.rollAfterUse = true;\n this.inoperativeRoll = 6;\n AddBonusDescription(\"Chance to become inoperative\");\n break;\n case stat27:\n this.diplomacyBonus = 1;\n AddBonusDescription(\"plus 1 Diplomacy\");\n break;\n case stat28:\n // TODO: No suprise bonus for creatures during attack\n AddBonusDescription(\"Cannot be suprised during creature attack\");\n break;\n case stat29:\n // TODO: Ignore creature that attack with int\n AddBonusDescription(\"Ignore creatures that attack with intelligence\");\n break;\n case stat30:\n this.diplomacyBonus = 1;\n this.intelligenceBonus = 1;\n AddBonusDescription(\"plus 1 Diplomacy\");\n AddBonusDescription(\"plus 1 Intelligence\");\n break;\n case stat31:\n // TODO: Ignore first abort mission action\n AddBonusDescription(\"Ignore first abort mission action\");\n break;\n case stat32:\n // TODO: During Galactic game, reveal Planet secret\n AddBonusDescription(\"Can reveal Planetary Secret\");\n break;\n }\n \n }", "public static void use()\n\t{\n\t\tItemObject arrow;\n\t\tItemObject target;\n\t\tint first;\n\t\tint second;\n\n\t\tsays();\n\n\t\tfirst = itemLookup();\n\n\t\tif (first >= 0 && getState(first) < 5)\n\t\t{\n\t\t\tarrow = new ItemObject(first, player);\n\n\t\t\tif (god.getWord(2).equals(\"on\"))\n\t\t\t{\n\t\t\t\tgod.wordShift(2);\n\t\t\t}\n\n\t\t\tgod.wordShift(1);\n\n\t\t\t//Changes the target to 'me' if nothing was specified.\n\n\t\t\tif (god.getWord(1).equals(\"\"))\n\t\t\t{\n\t\t\t\tgod.setWord(1, \"me\");\n\t\t\t\tsecond = 0;\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsecond = itemLookup();\n\t\t\t}\n\n\t\t\t// says(\"DEBUG: Second: \" + second);\n\n\t\t\tif (second >= 0)\n\t\t\t{\n\t\t\t\ttarget = new ItemObject(second, player);\n\t\t\t\tString[] useEvents = arrow.getUseEvents();\n\t\t\t\tint state = getState(arrow);\n\n\t\t\t\tif (state == 3)\n\t\t\t\t{\n\t\t\t\t\tsays(\"Although you may be able to divine it's original purpose,\" +\n\t\t\t\t\t\t\t\" using it in its current state would be impossible.\");\n\t\t\t\t}else if (state == 4)\n\t\t\t\t{\n\t\t\t\t\tsays(\"It's locked. You need a key (or a \\\"KEY\\\").\");\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\tif (state == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tsays(\"You would, but, you already flipped the shit out of it. You'll have to flip it back over first.\\n\\nYes, it's silly, but so was flipping it over in the first place.\");\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\tfor(int i = 0; i < useEvents.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tItemEvents.itemEvent(useEvents[i], target.getNumber());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}else\n\t\t\t{\n\t\t\t\tsays(\"I don't understand what \" + god.getWord(2) + \" is.\");\n\t\t\t}\n\n\n\n\n\t\t}else if (getState(first) == 3)\n\t\t{\n\t\t\tsays(\"You can't use that, it's broken. And probably by you no less!\");\n\t\t}else\n\t\t{\n\t\t\tsays(\"I don't understand what \" + god.getWord(1) + \" is.\");\n\t\t\tif (debug)\n\t\t\t{\n\t\t\t\tsays(god.getWord(1) + \" is in state: Inaccessable.\");\n\t\t\t}\n\t\t}\n\t}", "public void usePotion() {\n Potion potion = this.getInventory().getFirstPotion();\n if (potion != null){\n this.setLife(this.getLife() + potion.getGainLife());\n this.getInventory().removeItems(potion);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the "companyBaseData" element
ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData();
[ "public ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getCompanyBaseData()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData)get_store().find_element_user(COMPANYBASEDATA$2, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData getAuditingCompany();", "void setCompanyBaseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData companyBaseData);", "public ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData addNewCompanyBaseData()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData target = null;\n target = (ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData)get_store().add_element_user(COMPANYBASEDATA$2);\n return target;\n }\n }", "public java.lang.String getCompany()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMPANY$8, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getCompanyBank() {\r\n return companyBank;\r\n }", "public String getCompanyAccount() {\n return companyAccount;\n }", "public static final String getCompany() { return company; }", "public void setCompanyBaseData(ch.crif_online.www.webservices.crifsoapservice.v1_00.CompanyBaseData companyBaseData)\n {\n generatedSetterHelperImpl(companyBaseData, COMPANYBASEDATA$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public java.lang.String getCompany() {\n return company;\n }", "public String getCompany() {\n\t\treturn company;\n\t}", "public String getCompanyInfo() {\r\n\t\treturn companyInfo;\r\n\t}", "public String getCompanyId() {\n return (String) getAttributeInternal(COMPANYID);\n }", "public java.lang.String getCompanyId() {\n return companyId;\n }", "@Override\n\tpublic long getCompanyId() {\n\t\treturn _dictData.getCompanyId();\n\t}", "public org.apache.xmlbeans.XmlString xgetCompany()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMPANY$8, 0);\n return target;\n }\n }", "public void unsetCompanyBaseData()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(COMPANYBASEDATA$2, 0);\n }\n }", "public String getcompanyURL() {\n return companyURL;\n }", "private Company loadCompany() {\n if (dataFile.isFile()) try {\n return UjoManagerXML.getInstance().parseXML(dataFile, Company.class, \"Load company\");\n } catch (RuntimeException | OutOfMemoryError e) {\n e.printStackTrace();\n }\n return new Company();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a skill by its unlocalized name, or null if not found
public static final SkillBase getSkillByName(String name) { for (SkillBase skill : SkillBase.getSkills()) { if (name.equals(skill.getUnlocalizedName())) { return skill; } } return null; }
[ "Skill getSkill(String name);", "@ApiOperation(value = \"get skill\", nickname = \"get skill\")\n @RequestMapping(path = \"/skills/{skill}\", method = RequestMethod.GET)\n public ResponseEntity getSkill(@PathVariable(value = \"skill\") String name) {\n var skill = skillService.getSkillByName(name);\n if (skill == null) {\n logger.debug(\"Failed to get skill {}: not found\", name);\n return ResponseEntity.notFound().build();\n }\n\n logger.debug(\"Successfully got skill {}\", name);\n return new ResponseEntity<>(skill, HttpStatus.OK);\n }", "public Skill getSkill(String name) {\n for (Skill s : skillList) {\n if (s.getName().equals(name)) {\n return s;\n }\n }\n return null;\n }", "java.lang.String getSkill();", "public Optional<Skill> findByNameIgnoreCase(String name);", "Skill getSkill();", "Skill getSkill(Long skillId) throws DbException;", "java.lang.String getSuitSkillName();", "public String getSkillName()\n {\n return skillName;\n }", "@GetMapping(\"/{skillId}\")\n public Skill getSkillBySkillId(@PathVariable(\"skillId\") Integer skillId, HttpServletResponse response)\n throws IOException {\n Optional<Skill> optionalSkill = skillsService.getSkillBySkillId(skillId);\n if(optionalSkill.isPresent()) {\n return optionalSkill.get();\n }\n log.error(\"skill not found\");\n response.sendError(404);\n return null;\n }", "public static SkillName matchSkillName(String skillName) {\n String convertedSkillName = UtilityMethods.camelCaseToSpacedString(skillName).replace(\" \",\"_\").toUpperCase();\n try {\n return SkillName.valueOf(convertedSkillName);\n } catch (NullPointerException exception) {\n return null; //We don't want an exception if user input is messed up, and if we really did we can just throw one.\n }\n }", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "public String getSkill() {\r\n return skill;\r\n }", "public int getIntrinsicSkill(String skillname);", "public String getSkill_name() {\n\t\treturn skill_name;\n\t}", "public Skills getChosenSkill();", "public String getSkillName ()\n\t{\n\t\treturn this.SkillName;\n\t}", "game.msg.Define.DLootMapSkill getSkill();", "private static Skill getSkill() {\n try (var context = new AnnotationConfigApplicationContext(SkillConfig.class)) {\n return context.getBean(Skill.class);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
merge() merge a node with its sibling. Use a value to pick node. The value does not need to be in the node; it just identifies which node it would be in if it were in a node.
public void merge( int value ) { BiNode loc = _root.findLeaf( value ); ////////////////////////////////////////////////////////// // Add code here to complete the merge // // The findLeaf( value ) method of BiNode will return the // leaf of the tree that has the range that includes value. // Invoke that method using the _root instance variable of // // Need to get to parent of that node, and get the sibling // of the one returned from findLeaf. // // Then use the 'getValues()' method to get the data points // for the found node and for its sibling. All of the data // points for both nodes must be added to the parent, AFTER // setting the parent's left and right links to null! // // Note that the sibling of a leaf node might not itself be // a leaf, so you'll be deleting a subtree. However, it's // straightforwad since the "getValues()" method when called // on an internal node will return all the values in all its // descendents. // //////////////////////////////////////////////////////////// BiNode parent = loc.parent; BiNode sibling = null; if( loc == parent._left ) { sibling = parent._right; } else { sibling = parent._left; } parent._left = null; parent._right = null; for( int i = 0; i < loc.getValues( ).size( ); i++ ) { parent.add( loc.getValues( ).get( i ) ); } for( int j = 0; j < sibling.getValues( ).size( ); j++ ) { parent.add( sibling.getValues( ).get( j ) ); } }
[ "private void mergeNode(Node n) {\n if (n.topLeft.isLeaf\n && n.topRight.isLeaf\n && n.bottomLeft.isLeaf\n && n.bottomRight.isLeaf\n && n.topRight.val == n.topLeft.val\n && n.bottomLeft.val == n.topLeft.val\n && n.bottomRight.val == n.topLeft.val) {\n // merge the node, and make it a leaf node\n n.val = n.topLeft.val;\n n.isLeaf = true;\n n.topLeft = null;\n n.topRight = null;\n n.bottomLeft = null;\n n.bottomRight = null;\n }\n }", "private List.Node merge (List.Node a, List.Node b) {\r\n List.Node result;\r\n //base cases\r\n if (a == null){\r\n return b;\r\n }\r\n if (b == null){\r\n return a;\r\n }\r\n\r\n\r\n if ((int) a.getItem() <= (int) b.getItem()){ //compare values of A &B nodes\r\n result = a; //input lower value\r\n result.next = merge(a.next,b); //recursive call to test next value\r\n } else { //input lower value\r\n result = b;\r\n result.next = merge(a,b.next); //recursive call to test next value\r\n }\r\n return result; //return result node\r\n\r\n }", "static Node merge(Node first, Node second) { \n\t\t// If first list is empty \n\t\tif (first == null) return second; \n\n\t\t// If second list is empty \n\t\tif (second == null) return first; \n\t\t// Pick the smaller value and adjust the links \n\t\tif (first.data < second.data) { \n\t\t\tfirst.next = merge(first.next, second); \n\t\t\tfirst.next.prev = first; \n\t\t\tfirst.prev = null; \n\t\t\treturn first; \n\t\t} else { \n\t\t\tsecond.next = merge(first, second.next); \n\t\t\tsecond.next.prev = second; \n\t\t\tsecond.prev = null; \n\t\t\treturn second; \n\t\t} \n\t}", "public void merge(Tree other)\n {\n\n }", "public DocumentMutation merge(String path, Document value);", "public Node appendNode(Node node);", "BinaryTreeNode<Byte> merge(BinaryTreeNode<Byte> left, BinaryTreeNode<Byte> right){\n BinaryTreeNode<Byte> merged = new BinaryTreeNode<Byte>(null,left,right); //item in node is null, left and right children are set\n return merged;\n }", "protected void merge(BTreeNode sibling, int sep) {\n // asserts valid merge scenario\n assert(minSize == size && sibling.size < minSize || size < minSize && sibling.size == minSize);\n\n vals[size] = sep;\n size++;\n\n var sibVals = sibling.vals;\n var sibKeys = sibling.keys;\n int sibSize = sibling.size;\n\n for (int i = 0; i < sibSize; i++) {\n var key = sibKeys[i];\n\n vals[size] = sibVals[i];\n keys[size] = key;\n if (key != null) {\n key.setParent(this);\n key.parentIndex = size;\n }\n size++;\n }\n\n var key = sibKeys[sibSize];\n keys[size] = key;\n\n if (key != null) {\n key.setParent(this);\n key.parentIndex = size;\n }\n }", "public void merge(Node other) throws LtsllcException {\n logger.debug(\"entering merge\");\n\n if ((null == uuid) && (null != other.uuid)) {\n uuid = other.uuid;\n }\n\n if ((timeOfLastActivity != null && other.timeOfLastActivity != null) && (timeOfLastActivity < other.timeOfLastActivity)) {\n timeOfLastActivity = other.timeOfLastActivity;\n } else if ((timeOfLastActivity == null) && (other.timeOfLastActivity != null)) {\n timeOfLastActivity = other.timeOfLastActivity;\n }\n //\n // many other cases that boil down to just using the node's value\n //\n\n if ((channel == null) && (other.channel != null)) {\n throw new LtsllcException(\"node1 has a null ioSession while node2 does not\");\n }\n\n other.closeChannel();\n\n logger.debug(\"leaving merge\");\n }", "public void addToParentValue(Node node, int value){\n\t\tsetParentValue(node, value + getParentValue(node));\t\t\n\t}", "private static Node iterativeMerge(Node root1,Node root2){\n if(root1 == null) return root2;\n if(root2 == null) return root1;\n \n Stack<Node> stack = new Stack<Node>();\n Node r1 = root1;\n Node r2 = root2;\n while(r1 != null && r2 != null){\n if(r1.key<r2.key){\n stack.push(r1);\n r1 = r1.right;\n }else{\n stack.push(r2);\n r2 = r2.right;\n } \n }\n //at this point, exactly one of r1 and r2 is null\n //Again we don't need to swap the left and right children of r\n Node r = (r1 != null)?r1:r2;\n \n //merge\n while(!stack.isEmpty()){\n Node node = stack.pop(); \n node.right = node.left;\n node.left = r;\n r = node;\n }\n return r;\n }", "private Node merge(Node left, Node right) {\r\n Node temp = new Node(0);\r\n Node curNode = temp;\r\n while (left != null && right != null) {//First it will check for the lowest among 2 nodes.\r\n if (left.val < right.val) {\r\n if (left.val % 2 == 0 && right.val % 2 != 0) {//if the highest value is odd then it will get pushed towards left or else at right\r\n curNode.next = right;\r\n right = right.next;\r\n } else {\r\n curNode.next = left;\r\n left = left.next;\r\n }\r\n\r\n } else {\r\n if (right.val % 2 == 0 && left.val % 2 != 0) {//if the highest value is odd then it will get pushed towards left or else at right\r\n curNode.next = left;\r\n left = left.next;\r\n } else {\r\n curNode.next = right;\r\n right = right.next;\r\n }\r\n\r\n }\r\n curNode = curNode.next;\r\n }\r\n //Left over value to be added to the end of the result node. Any one of the below IF cond will get passed.\r\n if (left != null) {\r\n curNode.next = left;\r\n left = left.next;\r\n }\r\n if (right != null) {\r\n curNode.next = right;\r\n right = right.next;\r\n }\r\n return temp.next;\r\n }", "protected Node copyInto(Node node) {\n node.setValueNumber(valueNumber);\n return node;\n }", "Node commonAncestor(Node one, Node two);", "@Override\n public Sentence merge(Sentence other) {\n return new WordNode(this.head, this.rest.merge(other));\n }", "public Node insertAfter(Node node);", "private void merge() {\n\t\t// Purge the merging pairs from low cost until we see a pair that\n\t\t// should not be purged, which should be the pair to merge\n\t\tlazyCleanup();\n\t\tMergePair mergePair = _mergePairTreeMap.firstEntry().getValue().get(0);\n\t\t\n\t\t// Merging the pair to form a new sub-tree\n\t\tTreeNode subTreeRoot = new TreeNode(getNewId(), mergePair.getX(), \n\t\t\t\tmergePair.getY(), mergePair.getTotalCap(), mergePair.getLeft(), mergePair.getRight());\n\t\t\n\t\t// Remove merged nodes and create a new node\n\t\t_subTreeNodes.remove(mergePair.getLeft().getId());\n\t\t_subTreeNodes.remove(mergePair.getRight().getId());\n\t\t_subTreeNodes.put(subTreeRoot.getId(), subTreeRoot);\n\t\t\n\t\t// Update tree with new possible pairs\n\t\tupdateCostMap(subTreeRoot);\n\t\t\n\t}", "public TreeNode mergeTrees(TreeNode t1, TreeNode t2) {\n if (t1 == null && t2 == null) {\n return null;\n } else if (t1 == null) {\n return t2;\n } else if (t2 == null) {\n return t1;\n }\n TreeNode newNode = new TreeNode(t1.val + t2.val);\n newNode.left = mergeTrees(t1.left, t2.left);\n newNode.right = mergeTrees(t1.right, t2.right);\n return newNode;\n }", "private Node insert(Node node, int key, Object value)\n\t{\n\t\tif(node == null)\n\t\t{\n\t\t\tNode n = new Node(key, value);\n\t\t\treturn n;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint compare = Integer.compare(key, node.key);\n\t\t\t\n\t\t\tif(compare > 0)\n\t\t\t{\n\t\t\t\tnode.rightChild = insert(node.rightChild, key, value);\n\t\t\t}\n\t\t\telse if(compare < 0)\n\t\t\t{\n\t\t\t\tnode.leftChild = insert(node.leftChild, key, value);\n\t\t\t}\n\t\t\telse if(compare == 0)\n\t\t\t{\n\t\t\t\tnode.middleChild = insert(node.middleChild, key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn node;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the URL of the external DIG reasoner
public void setURL(String url);
[ "public static void setUrl() {\n\t\t// expetedUrl=\"https://delaware.craigslist.org\";\n\t\t// expetedUrl=\"https://mercari.com\";\n\t\texpetedUrl = \"https://spicejet.com\";\n\t}", "void setURL(java.lang.String url);", "public void setConfigURL(String U) {\n properties.setProperty(\"URL\", U);\r\n }", "public void setURL(java.lang.String uRL) {\n this.uRL = uRL;\n }", "EasyRequest setUrl(String url);", "public abstract void setURL(String var_url);", "public abstract void setURL(String url);", "private void setURL(String url) {\n try {\n URL setURL = new URL(url);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "public void setUrl( String value ) {\n Logger logger = LoggerFactory.getLogger( getClass() );\n this.url = value;\n if ( value != null ) {\n ModelObject mo = getAttachee();\n\n logger.info( \"Attaching URL to {}\", mo );\n // URL url;\n try {\n new URL( value );\n Attachment attachment = new AttachmentImpl( value, getSelectedType(), getName() );\n doCommand( new AttachDocument( getUser().getUsername(), mo, attachablePath, attachment ) );\n postProcess( attachment );\n this.url = null;\n this.name = \"\";\n } catch ( MalformedURLException e ) {\n logger.warn( \"Invalid URL: \" + value );\n if ( value.indexOf( \"://\" ) < 0 ) {\n setUrl( \"http://\" + value );\n }\n }\n }\n }", "void setFullUrl(String url);", "Drivers setUrl(String url);", "public void setHTTP_URL(String url) {\r\n\t\ttry {\r\n\t\t\tURL u = new URL(url);\r\n\t\t\tu.toURI();\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t} catch (URISyntaxException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\tthis.settings.setProperty(\"HTTP_URL\", url);\r\n\t\tthis.saveChanges();\r\n\t}", "public void fillURL(String url)\n {\n fillField(URL_FIELD, url);\n }", "private void URL()\n {\n String txt = txtfldURL.getText();\n String string = txt.replace(\"https://www.imdb.com/title/\", \"\");\n String[] split = string.split(\"/\");\n imdbid = split[0];\n }", "public void setURL(java.lang.String URL)\n {\n this._URL = URL;\n }", "public void setBasicUrl() {\n\t\tSharedContext.BASICURL = this.initialUrl.toString().substring(0, 25);\n\t}", "Builder addUrl(String value);", "public ProxyUri() {\n this.number = 35;\n this.formatter = StringFormatter.getInstance();\n this.minSize = 1;\n this.maxSize = 1034;\n }", "public static void setUrl(String url) {\n\t\tif (atomikosRestPortUrl == null && url != null) { //cf case 181280\n\t\t\tatomikosRestPortUrl = url;\n\t\t\tif (!atomikosRestPortUrl.endsWith(\"/\")) \n\t\t\t\tatomikosRestPortUrl = atomikosRestPortUrl + \"/\";\n\t\t} \n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional .com.mesosphere.dcos.cassandra.common.Volume volume = 9;
com.mesosphere.dcos.cassandra.common.CassandraProtos.VolumeOrBuilder getVolumeOrBuilder();
[ "com.mesosphere.dcos.cassandra.common.CassandraProtos.Volume getVolume();", "public com.mesosphere.dcos.cassandra.common.CassandraProtos.VolumeOrBuilder getVolumeOrBuilder() {\n return volume_;\n }", "public com.mesosphere.dcos.cassandra.common.CassandraProtos.Volume getVolume() {\n return volume_;\n }", "public int getVolume(){\n return volume;\n }", "long getVolume();", "void setVolume(double volume);", "public float getVolume(){return (float) getDouble(\"volume\");}", "public long getPropertyVolume();", "int getVolume();", "float getVolume();", "java.lang.String getVolume();", "Volume create(Volume volume);", "public long getPropertyVolumeUnity();", "@Override\n public double getVolume() {\n return l.getVolume();\n }", "public BigDecimal getVolume() {\r\n return bank.getVolume();\r\n }", "long getTotalVolume();", "public MediaStorageVolume getVolume();", "public int getVolumeInt() {\r\n return this.volume;\r\n }", "public Long getVolumeCount() { return this.volumeCount; }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to retrieve the information from the server when a powerup needs to be respawned after it has been picked up previously.
public void powerUpRespawn(String receivedPacket) { String[] message = receivedPacket.split(":"); PowerupType type = (message[1].equals("0") ? PowerupType.SHIELD : PowerupType.SPEED); if(gameStateReceiver != null) gameStateReceiver.powerUpRespawn(type, Integer.parseInt(message[2])); }
[ "public String getCurrentPowerup() {\n return currentPowerup;\n }", "public int getPowerupTime(){\n return POWERUP_TIME;\n }", "public object_type getPowerUp() {\n return powerUp;\n }", "public double getRespawnTime() {\n return respawnTime;\n }", "private void updatePowerUps() {\n\n\t}", "public boolean isHasPowerUp() {\n\t\treturn hasPowerUp;\n\t}", "Map<String, Long> getWorkerHeartbeats();", "public String waitServerStarting(Process p) throws Exception {\n return scadmin.waitServerStarting(p);\n }", "public void serverRestarting() {\n notifyServerRestart();\n }", "org.mountainsensing.pb.Power.PowerInfo getPower();", "public Powerup getPowerups() {\n return powerups;\n }", "private void getSleepData() {\n\n }", "int getShutdownWaitTimeMs();", "private void collectPowerUp(PowerUp powerUp) {\n\t\t\n\t\tif (powerUp.detectDownwardCollision(player.getX(), player.getY()) ||\n\t\t\tpowerUp.detectSideCollision(player.getX(), player.getY(), true)) {\n\t\t\t\n\t\t\tpowerUp.setVisibility(false);\n\t\t\t\n\t\t\tif (powerUp.equals(explosive)) {\n\t\t\t\tshot.setAmmo(Ammo.EXPLOSIVE);\n\t\t\t} else {\n\t\t\t\tshot.setAmmo(Ammo.ARMORPIERCING);\n\t\t\t}\n\t\t\t\n\t\t\tshot.reload();\n\t\t}\n\t}", "public int getPowerUpTime() {\n\t\treturn obstacleTime;\n\t}", "public void notifyRespawn()\n {\n playerObserver.onRespawn();\n }", "void powerUp()\n {\n FileUtility.writeFile(f, identifier + \": Powering up.\");\n }", "public PppoeServerInfo getServer() {\n return serverInfo;\n }", "public ServerStatus getServerData()\n {\n try {\n //we will call getServerStatus method of WeatherServer via RMI connection. It will return ServerStatus object\n //with details of Server.\n return serverConnection.getServerStatus();\n } catch (RemoteException ex) {\n \n //Catch if any exception while communicating and return null value.\n System.out.println(ex.toString());\n return null;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
save list DeliveryType in database
List<DeliveryType> save(List<DeliveryType> deliveryTypes);
[ "DeliveryType save(DeliveryType deliveryType);", "public void setDeliveryType(String deliveryType) {\n this.deliveryType = deliveryType;\n }", "DeliveryType update(DeliveryType deliveryType);", "@PostMapping(\"/delivery-delivery-types\")\n public ResponseEntity<DeliveryDeliveryType> createDeliveryDeliveryType(@RequestBody DeliveryDeliveryType deliveryDeliveryType) throws URISyntaxException {\n log.debug(\"REST request to save DeliveryDeliveryType : {}\", deliveryDeliveryType);\n if (deliveryDeliveryType.getId() != null) {\n throw new BadRequestAlertException(\"A new deliveryDeliveryType cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n DeliveryDeliveryType result = deliveryDeliveryTypeRepository.save(deliveryDeliveryType);\n deliveryDeliveryTypeSearchRepository.save(result);\n return ResponseEntity.created(new URI(\"/api/delivery-delivery-types/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public String getDeliverytype() {\n return deliverytype;\n }", "List<DeliveryType> findAll();", "public String getDeliveryType() {\n return deliveryType;\n }", "public void databaseSave(String type) {\n try {\n for (int i = 0; i < lists.size(); i++) {\n Databaser.storeToDatabase(type, lists.get(i));\n for (int j = 0; j < lists.get(i).size(); j++) {\n List<ShoppingLinkedList> tempList = Databaser.getLists(type);\n Item temp = (Item) lists.get(i).get(j);\n temp.setListId(tempList.get(i).getId());\n Databaser.storeToDatabase(type, temp);\n }\n }\n Databaser.showDatabase(type);\n } catch (org.hibernate.service.spi.ServiceException e) {\n Alert alert = new Alert(Alert.AlertType.WARNING);\n alert.getDialogPane().getStylesheets().add(\"main/styles\");\n alert.setTitle(\"Incorrect credentials!\");\n alert.setHeaderText(\"Warning!\");\n alert.setContentText(\"Wrong username or password.\");\n alert.showAndWait();\n }\n }", "public void setTypeOfDelivery (java.lang.String typeOfDelivery) {\n\t\tthis.typeOfDelivery = typeOfDelivery;\n\t}", "public void saveAppointmentFundings(List<PendingBudgetConstructionAppointmentFunding> appointmentFundings);", "void insertDeliveryID(int i, java.lang.String deliveryID);", "@GetMapping(\"/delivery-delivery-types\")\n public List<DeliveryDeliveryType> getAllDeliveryDeliveryTypes() {\n log.debug(\"REST request to get all DeliveryDeliveryTypes\");\n return deliveryDeliveryTypeRepository.findAll();\n }", "public Type save(Type type);", "DeliveryType findById(Long id);", "public void addRelation(ExtraDelivery extraDeliveries) {\n try{\n try{\n\n //Save to database..\n extraDeliveries.save__db();\n }catch (NoSuchMethodError e) {\n // ignore\n }\n that.getExtraDeliveries().add(extraDeliveries);\n }catch(Exception e){\n DataList< ExtraDelivery> extraDeliveries1 = new DataList();\n //Now add this item to list..\n extraDeliveries1.add(extraDeliveries);\n //Now set data....\n that.setExtraDeliveries(extraDeliveries1);\n }\n }", "public void setDeliverytype(String deliverytype) {\n this.deliverytype = deliverytype == null ? null : deliverytype.trim();\n }", "Type persistir(Type type);", "void saveOrder(Order order);", "public String getOcDeliveryType() {\n return ocDeliveryType;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/String supplyUrl = ServerAddressUtil.getInstance().getDishSaleUpdateUrl(); TransferReq transferReq = new TransferReq(supplyUrl, req); String url = ServerAddressUtil.getInstance().supplyTransfer(); OpsRequest.Executor executor = OpsRequest.Executor.create(url); executor.requestValue(transferReq) .responseClass(DishSaleUpdateContract.DishSaleUpdateResp.class) .responseProcessor(new UpdateDishSaleCountProcessor(req)) .execute(listener, supplyUrl);
@Override public void updateDishSaleCount(DishSaleUpdateContract.DishSaleUpdateReq req, ResponseListener<DishSaleUpdateContract.DishSaleUpdateResp> listener) { }
[ "void sale(SaleRequest request);", "@Test\n public void testStoreSaleAdjSale2() {\n String responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"0\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"1\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"ocurrence\", \"2\").request().get(String.class);\n responseMsg = target.path(\"service/message\").queryParam(\"messageType\", \"2\").queryParam(\"productType\", \"ELMA\").queryParam(\"value\", \"2.0\").queryParam(\"operator\", \"2\").request().get(String.class);\n assertEquals(\"SUCCESS\", responseMsg);\n }", "@Test\r\n\tpublic void testFetchMoneyTransferAction()\r\n\t{\r\n\t\tCallRecord callRecord = prepareForTest(THREE);\r\n\r\n\t\tIvrRequest ivrRequest = createIvrRequest();\r\n\r\n\t\tivrRequest.setDigits(\"6\");\r\n\t\tivrRequest.setIvrController(READ_PRIOR_TRANSACTION);\r\n\r\n\t\tInternalResultsResponse<String> response =\r\n\t\t\t\t(getOptionsList().get(READ_PRIOR_TRANSACTION).get(\"6\")).resolveAction(ivrRequest, callRecord);\r\n\r\n\t\tassertFetch(response, \"Response/Say\", TEN);\r\n\r\n\t\tresponse =\r\n\t\t\t\t(getOptionsList().get(READ_PRIOR_TRANSACTION).get(\"6\")).resolveAction(ivrRequest, callRecord);\r\n\r\n\t\tassertFetch(response, \"Response/Say\", TEN);\r\n\t}", "public Vector processDownloadTransaction();", "@POST\n\t@Path(\"/requestFromSwitch\")\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic Response switchUpdate(TransactionDTO transDTO) {\n\n\t\tString METHOD_NAME = \"switchUpdate\";\n\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tCloudServiceExceptionLogger.LogCloudServiceExecuting(CLASS_NAME,\n\t\t\t\tMETHOD_NAME);\n\n\t\tTransactionInitiateRespDTO status = null;\n\n\t\tResponse response = null;\n\n\t\tCloudSvrQrCodeTxn dbDetails = null;\n\n\t\ttry {\n\n\t\t\tif (TransactionHelper.checkMandatorySwitchReqFields(transDTO)) {\n\n\t\t\t\tdbDetails = mapQrCode.get(transDTO.getTerminalId());\n\n\t\t\t\tif (dbDetails != null) {\n\n\t\t\t\t\tdbDetails.setStatusCode(transDTO.getStatusCode());\n\n\t\t\t\t\tdbDetails\n\t\t\t\t\t\t\t.setProcessPayment(WebServiceConstants.IS_PROCESS_REQ_YES);\n\t\t\t\t\tdbDetails.setTxnStartDate(transDTO.getTxnStartDate());\n\t\t\t\t\t// isUpdate = transactionService.updateRrnService(dbDetail);\n\t\t\t\t\t// new code\n\n\t\t\t\t\tdbDetails = mapQrCode.put(transDTO.getTerminalId(),\n\t\t\t\t\t\t\tdbDetails);\n\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tCloudSvrQrCodeTxn kolhsDetail1 = kohlTransactionService.getMapQrCode().get(transDTO.getTerminalId());\n\t\t\t\t\t\n\t\t\t\t\tif (kolhsDetail1!=null){\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tkolhsDetail1.setProcessPayment(WebServiceConstants.IS_PROCESS_REQ_YES);\n\t\t\t\t\t\tkolhsDetail1.setTxnStartDate(transDTO.getTxnStartDate());\n\t\t\t\t\t\t//kohlTransactionService.getMapQrCode().put(transDTO.getTerminalId(), kolhsDetail1);\n\t\t\t\t\t\t//kolhsDetail1 = mapQrCode.put(transDTO.getTerminalId(),kolhsDetail1);\n\t\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\t\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tstatus = CloudServiceStatus\n\t\t\t\t\t\t.getTransactionStatus(CloudServiceStatus\n\t\t\t\t\t\t\t\t.getStatusByErrorCode(ErrorCodeConstants.ENTITY_NULL_OR_EMPTY));\n\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\n\t\t\tstatus = CloudServiceStatus\n\t\t\t\t\t.getTransactionStatus(CloudServiceStatus\n\t\t\t\t\t\t\t.getStatusByErrorCode(com.omnypay.log.ErrorCodeConstants.GET_REQUEST_FROM_SWITCH));\n\n\t\t\tString message = \"Exception occured while process payment response from switch server \";\n\n\t\t\tCloudServiceExceptionLogger.LogCloudServiceException(ex,\n\t\t\t\t\tCLASS_NAME, METHOD_NAME, message, null);\n\n\t\t\t// return getRequestFromSwitchException(ex);\n\n\t\t} finally {\n\n\t\t\tCloudServiceExceptionLogger.LogCloudServiceExecuted(CLASS_NAME,\n\t\t\t\t\tMETHOD_NAME);\n\t\t\tresponse = Response.status(javax.ws.rs.core.Response.Status.OK)\n\t\t\t\t\t.entity(status).build();\n\t\t}\n\n\t\treturn response;\n\n\t}", "public void updatePassengerRequestSend() {\n\n updatePassengerResponse = given().\n header(\"Content-Type\", \"application/json\").\n body(updatePassengerBody.toString()).\n when().\n put(BaseEnvironmet + PromoPara1 + cartId + UpdatePassengerPara);\n\n logger.info(\"Update Passenger Request URL is: \" + BaseEnvironmet + PromoPara1 + cartId + UpdatePassengerPara);\n// updatePassengerResponse.prettyPrint().toString();\n\n }", "@Override\n\tpublic Response call() throws Exception {\n\t\tClientResponse response = callWebService(this.spaceEntry);\n\t\tthis.transId = (int) response.getEntity(Integer.class);\n\t\tresponse.close();\n\t\t/*wait for web service to provide tuple Object result*/\n\t\tawaitResult();\n\t\t\n\t\t/*return result*/\n\t\treturn result;\n\t}", "@Test(description = \"Implements A.1.4 DGIWG Transactional CSW - Update (Requirement 18)\", dependsOnMethods = \"issueGetRecords_EnsureInsert\")\n public void issueUpdateOperation() {\n this.requestDocument = requestCreator.createUpdateRequest();\n this.response = this.cswClient.submitPostRequest( transactionUrl, this.requestDocument );\n assertStatusCode( this.response.getStatus(), 200 );\n assertXmlContentType( this.response.getHeaders() );\n this.responseDocument = this.response.getEntity( Document.class );\n\n assertQualifiedName( responseDocument, CSW, \"TransactionResponse\" );\n assertSchemaValid( cswValidator, new DOMSource( this.responseDocument ) );\n\n int totalUpdated = parseTotalUpdated();\n assertTrue( totalUpdated == 1, \"Expected totalUpdated 1 but was \" + totalUpdated );\n }", "public void service(SourceBean request, SourceBean response) throws Exception \r\n\t{\r\n\t\tdebug(\"service\", \"start service method\");\r\n\t\tString messageExec = (String)request.getAttribute(SpagoBIConstants.MESSAGEDET);\r\n\t\tdebug(\"service\", \"using message\" + messageExec);\r\n\t\tString subMessageExec = (String)request.getAttribute(SUBMESSAGEDET);\r\n\t\tdebug(\"service\", \"using sub-message\" + subMessageExec);\r\n\t\t//if submessage is valorized it gives the value to message \r\n\t\tif (subMessageExec != null && !subMessageExec.equals(\"\")) messageExec = subMessageExec;\r\n\t\terrorHandler = getErrorHandler();\r\n\t\trequestContainer = this.getRequestContainer();\r\n\t\tsession = requestContainer.getSessionContainer();\r\n\t\tpermanentSession = session.getPermanentContainer();\r\n\t\tdebug(\"service\", \"errorHanlder, requestContainer, session, permanentSession retrived \");\r\n execContr = new ExecutionController(); \r\n \r\n\t\ttry{\r\n\t\t\tif(messageExec == null) {\r\n\t\t\t\tEMFUserError userError = new EMFUserError(EMFErrorSeverity.ERROR, 101);\r\n\t\t\t\tSpagoBITracer.critical(AdmintoolsConstants.NAME_MODULE, \"ExecuteBIObjectModule\", \r\n\t\t\t\t\t\t\t\t\t \"service\", \"The execution-message parameter is null\");\r\n\t\t\t\tthrow userError;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_CREATE_PAGE)) {\r\n\t\t\t\tpageCreationHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_RUN_SUBOJECT)) {\r\n\t\t\t\texecutionSubObjectHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_DELETE_SUBOJECT)) {\r\n\t\t\t\tdeleteSubObjectHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_SELECTED_ROLE)) {\r\n\t\t\t\tselectRoleHandler(request, response);\t\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_RETURN_FROM_LOOKUP)) {\r\n\t\t\t\tlookUpReturnHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_PHASE_RUN)) {\r\n\t\t\t\texecutionHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_CHANGE_STATE)){\r\n\t\t\t\tchangeStateHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.EXEC_SNAPSHOT_MESSAGE)) {\r\n\t\t\t\texecSnapshotHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.ERASE_SNAPSHOT_MESSAGE)) {\r\n\t\t\t\teraseSnapshotHandler(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.VIEWPOINT_SAVE)) {\r\n\t\t\t\tsaveViewPoint(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.VIEWPOINT_ERASE)) {\r\n\t\t\t\teraseViewpoint(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.VIEWPOINT_EXEC)) {\t\t\t\t\r\n\t\t\t\texecViewpoint(request, response);\r\n\t\t\t} else if(messageExec.equalsIgnoreCase(SpagoBIConstants.VIEWPOINT_VIEW)) {\t\t\t\t\r\n\t\t\t\tviewViewpoint(request, response);\t\t\t\t\r\n\t\t\t} else {\t\r\n\t\t \t SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, \r\n\t\t \t \t\t \"ExecuteBIObjectMOdule\", \r\n\t\t \t \t\t \"service\", \r\n\t\t \t \t\t \"Illegal request of service\");\r\n\t\t \t\terrorHandler.addError(new EMFUserError(EMFErrorSeverity.ERROR, 102)); \r\n\t\t \t}\r\n\t } \r\n\t catch (EMFUserError e) { \r\n\t \terrorHandler.addError(e); \r\n\t }\r\n }", "public void createStockQuoteProxy390() throws Exception{\r\n ESBAddProxyServiceTest esbAddProxyServiceTest = new ESBAddProxyServiceTest(selenium);\r\n ESBCommon esbCommon = new ESBCommon(selenium);\r\n ESBXqueryMediatorTest esbXqueryMediatorTest = new ESBXqueryMediatorTest(selenium);\r\n ESBSendMediatorTest esbSendMediatorTest = new ESBSendMediatorTest(selenium);\r\n //Creating a local entry to store the WSDL file\r\n\r\n //Options which could be used are Specify in-line, Specify source URL, Pick from registry, None\r\n esbAddProxyServiceTest.addProxyName(\"StockQuoteProxy390\", \"Custom Proxy\");\r\n esbAddProxyServiceTest.addRegistryLookupWsdl(\"proxy_wsdl\");\r\n esbAddProxyServiceTest.specifyStartOnload(\"true\");\r\n esbAddProxyServiceTest.setTransport(\"http\");\r\n esbAddProxyServiceTest.removeTransport(\"https\");\r\n esbAddProxyServiceTest.clickNext();\r\n\r\n //Available options are inSeqOpAnon, inSeqOpReg, inSeqOpImp, inSeqOpNone\r\n esbAddProxyServiceTest.selectInSequence(\"inSeqOpAnon\", null);\r\n esbCommon.addRootLevelChildren(\"Add Child\",\"Transform\",\"XQuery\");\r\n esbXqueryMediatorTest.addXqueryKey(\"0\",\"xquery-key-req\");\r\n esbXqueryMediatorTest.addVariables(\"ELEMENT\",\"payload\",null);\r\n esbCommon.mediatorUpdate();\r\n esbCommon.sequenceSave();\r\n\r\n esbCommon.addRootLevelChildren(\"Add Child\",\"Core\",\"Send\");\r\n esbSendMediatorTest.addAnonSendMediator(\"1\");\r\n esbSendMediatorTest.addMandInfoSendMediator(\"http://localhost:9000/services/SimpleStockQuoteService\");\r\n esbSendMediatorTest.saveEndpoint();\r\n esbCommon.mediatorUpdate();\r\n esbCommon.sequenceSave();\r\n\r\n //Available options are epOpImp, epOpAnon, epOpReg, epOpNone\r\n esbAddProxyServiceTest.selectEndpoint(\"epOpNone\", null);\r\n esbAddProxyServiceTest.clickNext();\r\n\r\n //Available options are outSeqOpAnon, outSeqOpReg, outSeqOpImp, inSeqOpNone\r\n esbAddProxyServiceTest.selectOutSequence(\"outSeqOpAnon\", null);\r\n esbCommon.addRootLevelChildren(\"Add Child\",\"Transform\",\"XQuery\");\r\n esbXqueryMediatorTest.addXqueryKey(\"0\",\"xquery-key-res\");\r\n esbXqueryMediatorTest.addVariables(\"ELEMENT\",\"payload\",null);\r\n esbXqueryMediatorTest.addExpressionVariable(\"ELEMENT\",\"code\",\"self::node()//m0:return/m0:symbol/child::text()\",null);\r\n esbXqueryMediatorTest.addVariableNamespace(\"m0\",\"http://services.samples/xsd\");\r\n esbXqueryMediatorTest.addExpressionVariable(\"DOUBLE\",\"price\",\"self::node()//m0:return/m0:last/child::text()\",null);\r\n esbXqueryMediatorTest.addVariableNamespace(\"m0\",\"http://services.samples/xsd\");\r\n esbCommon.mediatorUpdate();\r\n esbCommon.sequenceSave();\r\n\r\n esbCommon.addRootLevelChildren(\"Add Child\",\"Core\",\"Send\");\r\n esbSendMediatorTest.addNormalSendMediator(\"1\");\r\n esbCommon.mediatorUpdate();\r\n esbCommon.sequenceSave();\r\n\r\n //Available options are faultSeqOpAnon, faultSeqOpReg, faultSeqOpImp, faultSeqOpNone\r\n esbAddProxyServiceTest.selectFaultSequence(\"faultSeqOpNone\", null,null,null,null);\r\n esbAddProxyServiceTest.saveProxyService();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public void testSendRequestXMLAccuracy_AuditServiceLatestInvoiceNumberUsed() throws Exception {\r\n List<BillingCostExportDetail> records = new ArrayList<BillingCostExportDetail>();\r\n records.add(prepareExportDetail(1, \"customer1\", 1.1f));\r\n records.add(prepareExportDetail(2, \"customer1\", 1.2f));\r\n records.add(prepareExportDetail(3, \"customer2\", 1.3f));\r\n\r\n PagedResult<BillingCostExportDetail> billingCostExportDetails = new PagedResult<BillingCostExportDetail>();\r\n billingCostExportDetails.setRecords(records);\r\n\r\n this.billingCostAuditService.setBillingCostExportDetails(billingCostExportDetails);\r\n this.billingCostAuditService.setLatestInvoiceNumber(\"511-110\");\r\n\r\n SendRequestXMLResponse response = this.instance.sendRequestXML(new SendRequestXML());\r\n assertMatchFile(\"SendRequestXML should match.\",\r\n TEST_FILES + \"request1.xml\", response.getSendRequestXMLResult());\r\n\r\n Map<String, long[]> updates = (Map<String, long[]>) this.serviceContext.getProperty(\"QuickBooksImportUpdates\");\r\n assertEquals(\"Should find updates about 2 customer.\", 2, updates.size());\r\n assertLongArrayMatch(\"Should find 2 updates for customer1.\", new long[] {1, 2}, updates.get(\"511-111\"));\r\n assertLongArrayMatch(\"Should find 1 updates for customer2.\", new long[] {3}, updates.get(\"511-112\"));\r\n }", "ServiceResponse execute(RequestParameters request);", "public void postDownloadProgress(Request<?> request, Response<?> response);", "@Override\r\n public void transferCustody(TransferCustody body)\r\n throws DispositionReportFaultMessage {\r\n long startTime = System.currentTimeMillis();\r\n EntityManager em = PersistenceManager.getEntityManager();\r\n EntityTransaction tx = em.getTransaction();\r\n logger.info(\"Inbound transfer request (via replication api, node to node\");\r\n try {\r\n tx.begin();\r\n //*this node is transfering data to another node\r\n //ValidateReplication.unsupportedAPICall();\r\n //a remote node just told me to give up control of some of my entities\r\n\r\n //EntityTransaction tx = em.getTransaction();\r\n //confirm i have a replication config\r\n boolean ok = false;\r\n ReplicationConfiguration FetchEdges = ReplicationNotifier.FetchEdges();\r\n if (FetchEdges != null) {\r\n for (int i = 0; i < FetchEdges.getOperator().size(); i++) {\r\n //confirm that the destination node is in the replication config\r\n if (FetchEdges.getOperator().get(i).getOperatorNodeID().equals(body.getTransferOperationalInfo().getNodeID())) {\r\n ok = true;\r\n break;\r\n }\r\n }\r\n }\r\n if (!ok) {\r\n throw new TransferNotAllowedException(new ErrorMessage(\"E_transferNotAllowedUnknownNode\"));\r\n }\r\n\r\n new ValidateReplication(null).validateTransfer(em, body);\r\n\r\n TransferEntities te = new TransferEntities();\r\n te.setKeyBag(body.getKeyBag());\r\n te.setTransferToken(body.getTransferToken());\r\n te.setAuthInfo(null);\r\n //make the change\r\n //enqueue in replication notifier\r\n //discard the token\r\n logger.debug(\"request validated, processing transfer\");\r\n List<ChangeRecord> executeTransfer = new UDDICustodyTransferImpl().executeTransfer(te, em, body.getTransferOperationalInfo().getAuthorizedName(), body.getTransferOperationalInfo().getNodeID());\r\n\r\n for (ChangeRecord c : executeTransfer) {\r\n try {\r\n c.setChangeID(new ChangeRecordIDType());\r\n c.getChangeID().setNodeID(getNode());\r\n c.getChangeID().setOriginatingUSN(null);\r\n ReplicationNotifier.enqueue(MappingApiToModel.mapChangeRecord(c));\r\n } catch (UnsupportedEncodingException ex) {\r\n logger.error(\"\", ex);\r\n }\r\n }\r\n /**\r\n * The custodial node must verify that it has granted\r\n * permission to transfer the entities identified and\r\n * that this permission is still valid. This operation\r\n * is comprised of two steps:\r\n *\r\n * 1. Verification that the transferToken was issued by\r\n * it, that it has not expired, that it represents the\r\n * authority to transfer no more and no less than those\r\n * entities identified by the businessKey and tModelKey\r\n * elements and that all these entities are still valid\r\n * and not yet transferred. The transferToken is\r\n * invalidated if any of these conditions are not met.\r\n *\r\n * 2. If the conditions above are met, the custodial\r\n * node will prevent any further changes to the entities\r\n * identified by the businessKey and tModelKey elements\r\n * identified. The entity will remain in this state\r\n * until the replication stream indicates it has been\r\n * successfully processed via the replication stream.\r\n * Upon successful verification of the custody transfer\r\n * request by the custodial node, an empty message is\r\n * returned by it indicating the success of the request\r\n * and acknowledging the custody transfer. Following the\r\n * issue of the empty message, the custodial node will\r\n * submit into the replication stream a\r\n * changeRecordNewData providing in the operationalInfo,\r\n * the nodeID accepting custody of the datum and the\r\n * authorizedName of the publisher accepting ownership.\r\n * The acknowledgmentRequested attribute of this change\r\n * record MUST be set to \"true\".\r\n *\r\n *\r\n *\r\n * Finally, the custodial node invalidates the\r\n * transferToken in order to prevent additional calls of\r\n * the transfer_entities API.\r\n */\r\n tx.commit();\r\n long procTime = System.currentTimeMillis() - startTime;\r\n serviceCounter.update(ReplicationQuery.TRANSFER_CUSTODY,\r\n QueryStatus.SUCCESS, procTime);\r\n } catch (DispositionReportFaultMessage d) {\r\n logger.error(\"Unable to process node to node custody transfer \", d);\r\n throw d;\r\n } finally {\r\n if (em != null && em.isOpen()) {\r\n em.close();\r\n }\r\n if (tx.isActive()) {\r\n tx.rollback();\r\n }\r\n }\r\n }", "TransferResponse.Receipt transfer(Account from, Account to, double amount);", "public int updateUser(Candidat c) {\n String url = StaticVars.baseURL + \"/updateuser\";\n System.out.println(url);\n ConnectionRequest req = new ConnectionRequest();\n\n req.setUrl(url);\n req.setPost(true);\n\nreq.setHttpMethod(\"PUT\"); \n\n\n String can = String.valueOf(currentCandidat.getId());\n req.addArgument(\"id\", can);\n String login =String .valueOf(currentCandidat.getLogin());\n req.addArgument(\"login\",login);\n req.addArgument(\"email\", String .valueOf(currentCandidat.getEmail()));\n req.addArgument(\"pays\", String .valueOf(currentCandidat.getPays()));\n req.addArgument(\"ville\", String .valueOf(currentCandidat.getVille()));\n req.addArgument(\"tel\", Integer.toString(currentCandidat.getTel()));\n req.addArgument(\"domaine\", String .valueOf(currentCandidat.getDomaine()));\n\n req.addResponseListener(new ActionListener<NetworkEvent>() {\n @Override\n public void actionPerformed(NetworkEvent evt) {\n result = req.getResponseCode();\n \n System.out.println(result);\n }\n });\n NetworkManager.getInstance().addToQueueAndWait(req);\n\n return result;\n }", "@Override\r\n\t@OperationLog(operateType = \"add\" ,operationDesc = \"收货\" ,objectSerial= \"{serialNum}\")\r\n\tpublic void confirmTakeDelivery(TakeDelivery takeDelivery,List<DeliveryMateriel> deliveryMateriels,\r\n\t\t\tString currenLoginName) throws Exception {\n\t\t//takeDelivery.set(takeDeliveryParams.getTakeDelivery().getSerialNum());\r\n\t\t//takeDelivery.setSerialNum(takeDeliveryParams.getTakeDelivery().getSerialNum());\r\n\t\t//takeDelivery.setSerialNum(takeDeliveryParams.getTakeDelivery().getSerialNum());\r\n\t\tDelivery delivery=delivery2Mapper.selectByDeliveryPrimaryKey(takeDelivery.getDeliverSerial());\r\n\t\tOrderInfo o=orderInfoMapper.selectByPrimaryKey(delivery.getOrderSerial());\r\n\t\tOrderInfo orderInfo=new OrderInfo();\r\n\t\torderInfo.setSerialNum(delivery.getOrderSerial());\r\n\t\tDelivery deliverynew=new Delivery();\r\n\t\tdeliverynew.setSerialNum(takeDelivery.getDeliverSerial());\r\n\t\tif(\"1\".equals(o.getContractContent().substring(4, 5))){//验收条款有效\r\n\t\t\ttakeDelivery.setStatus(TakeDelivery.APPLY_COMPLETE); //待检验\r\n\t\t\tthis.createStockInCheckRecord(takeDelivery,currenLoginName);\r\n\t\t\torderInfo.setDeliverStatus(orderInfo.WAIT_IN_CHECK);//已收货待检验\r\n\t\t\tdeliverynew.setStatus(DeliveryVO.WAIT_CHECK);\r\n\t\t}else{\r\n\t\t\ttakeDelivery.setStatus(TakeDelivery.CHECK_COMPLETE); //已完成\r\n\t\t\torderInfo.setDeliverStatus(orderInfo.WAIT_INRECORD);//待入库\r\n\t\t\tdeliverynew.setStatus(DeliveryVO.WAIT_IN_RECORD);\r\n\t\t\t//生成入库单\r\n\t\t\tStockInOutRecord stockInOutRecord=new StockInOutRecord();\r\n\t\t\tstockInOutRecord.setSerialNum(ApplicationUtils.random32UUID());\r\n\t\t\tstockInOutRecord.setTakeDeliverSerial(takeDelivery.getSerialNum());\r\n\t\t\tstockInOutRecord.setDeliverSerial(\"\");\r\n\t\t\tstockInOutRecord.setInOutNum(orderService.getNumCode(\"IN\"));\r\n\t\t\tstockInOutRecord.setDelFlg(\"0\");\r\n\t\t\tstockInOutRecord.setStatus(\"0\");\r\n\t\t\tstockInOutRecord.setCreator(currenLoginName);\r\n\t\t\tstockInOutRecord.setCreateTime(new Date());\r\n\t\t\tstockInOutRecord.setUpdater(currenLoginName);\r\n\t\t\tstockInOutRecord.setUpdateTime(new Date());\r\n\t\t\tstockInOutRecordMapper.insert(stockInOutRecord);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t//更新订单状态待清关\r\n\t\t\r\n\t\torderInfoMapper.updateByPrimaryKeySelective(orderInfo);\r\n\t\ttakeDeliveryMapper.updateByPrimaryKeySelective(takeDelivery);\r\n\t\t\r\n\t\t//没有审批时,直接收货\r\n\t\tTakeDelivery _takeDelivery = takeDeliveryMapper.selectByPrimaryKey(takeDelivery.getSerialNum());\r\n\t\ttakeDelivery.setDeliverSerial(_takeDelivery.getDeliverSerial());\r\n\t\t\r\n\t\tdelivery2Mapper.updateByPrimaryKeySelective(deliverynew);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//删除已保存的收货物料\r\n\t\tDeliveryMaterielExample example = new DeliveryMaterielExample();\r\n\t\texample.createCriteria().andDeliverSerialEqualTo(takeDelivery.getSerialNum());\r\n\t\tdeliveryMaterielMapper.deleteByExample(example);\r\n\t\t\r\n\t for(DeliveryMateriel materiel : deliveryMateriels){\r\n\t\t\tmateriel.setSerialNum(ApplicationUtils.random32UUID());\r\n\t\t\tmateriel.setDeliverSerial(takeDelivery.getSerialNum());\r\n\t\t\tmateriel.setDelFlg(\"0\");\r\n\t\t\tmateriel.setCreator(currenLoginName);\r\n\t\t\tmateriel.setCreateTime(new Date());\r\n\t\t\tmateriel.setUpdater(currenLoginName);\r\n\t\t\tmateriel.setUpdateTime(new Date());\r\n\t\t\tdeliveryMaterielMapper.insert(materiel);\r\n\t\t}\r\n\t\t\r\n\t}", "public interface MovilizerDistributionService {\n\n // ---------------------------------------------------------------------- Webservice interaction\n\n /**\n * Set systemd Id and password for the request and erases the replies from next response.\n *\n * @param systemId the system id to be set in the request.\n * @param password the password to be set in the request.\n * @param request request to be modified for upload.\n * @return the same request entered in the method parameters but with the credentials and number\n * of replies changed.\n * @since 12.11.1.0\n */\n MovilizerRequest prepareUploadRequest(Long systemId, String password, MovilizerRequest request);\n\n /**\n * Set systemd Id and password for the request and set the number of replies replies from next\n * response.\n *\n * @param systemId the system id to be set in the request.\n * @param password the password to be set in the request.\n * @param numResponses the number of responses to receive in the response.\n * @param request request to be modified for upload.\n * @return the same request entered in the method parameters but with the credentials and number\n * of replies changed.\n * @since 12.11.1.0\n */\n MovilizerRequest prepareDownloadRequest(Long systemId, String password, Integer numResponses,\n MovilizerRequest request);\n\n /**\n * Perform a synchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @return the response coming from the cloud with the corresponding acknowledgements, errors,\n * replies and datacontainers.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @since 12.11.1.0\n */\n MovilizerResponse getReplyFromCloudSync(MovilizerRequest request);\n\n /**\n * Perform a synchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @param connectionTimeoutInMillis connection timeout to be used in the call.\n * @param receiveTimeoutInMillis receive timeout to be used in the call.\n * @return the response coming from the cloud with the corresponding acknowledgements, errors,\n * replies and datacontainers.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @since 12.11.1.0\n */\n MovilizerResponse getReplyFromCloudSync(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);\n\n /**\n * Perform an asynchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @return A completable future with the response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @since 15.11.2.2\n */\n CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request);\n\n /**\n * Perform an asynchronous request the Movilizer cloud.\n *\n * @param request request to be used in the call.\n * @param connectionTimeoutInMillis connection timeout to be used in the call.\n * @param receiveTimeoutInMillis receive timeout to be used in the call.\n * @return A completable future with the response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @since 12.11.2.2\n */\n CompletableFuture<MovilizerResponse> getReplyFromCloud(MovilizerRequest request,\n Integer connectionTimeoutInMillis,\n Integer receiveTimeoutInMillis);\n\n /**\n * Indicate if the response java instance has errors.\n *\n * @param response the response to be analyzed.\n * @return true in case response has errors else false.\n * @since 12.11.1.3\n */\n Boolean responseHasErrors(MovilizerResponse response);\n\n /**\n * Generate a string with errors.\n *\n * @param response the response that contains the errors.\n * @return string represantion of the errors to use in messages.\n * @since 12.11.1.3\n */\n String responseErrorsToString(MovilizerResponse response);\n\n /**\n * Send all files that has .mxml extension in a folder and subfolders collecting all cloud\n * responses.\n *\n * @param folder to walk for the request files.\n * @return a list with all the cloud responses.\n * @since 15.11.1.5\n */\n List<MovilizerResponse> batchUploadFolderSync(Path folder);\n\n // ----------------------------------------------------------------------------- Document upload\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see UploadResponse\n * @since 12.11.1.0\n */\n UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see UploadResponse\n * @since 12.11.1.0\n */\n UploadResponse uploadDocumentSync(Path documentFilePath, long systemId, String password,\n String documentPool, String documentKey, String language,\n String ackKey);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see UploadResponse\n * @since 12.11.1.2\n */\n UploadResponse uploadDocumentSync(InputStream documentInputStream, String filename,\n long systemId, String password, String documentPool,\n String documentKey, String language, String ackKey,\n Integer connectionTimeoutInMillis);\n\n /**\n * Perform a synchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return the upload response with the results of the upload\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see UploadResponse\n * @since 12.11.1.2\n */\n UploadResponse uploadDocumentSync(Path documentFilePath, long systemId, String password,\n String documentPool, String documentKey, String language,\n String ackKey, Integer connectionTimeoutInMillis);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection problems.\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(Path documentFilePath, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the input stream.\n *\n * @param documentInputStream the input stream containing the blob/document to upload.\n * @param filename the name of the file for the document.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection problems.\n *\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(InputStream documentInputStream,\n String filename, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey,\n Integer connectionTimeoutInMillis);\n\n /**\n * Perform an asynchronous blob upload to the Movilizer Cloud given the path to a file.\n *\n * @param documentFilePath the path to the document file to upload.\n * @param systemId the system id where the document is going to be uploaded to.\n * @param password the password of the system id where the document is going to be uploaded to.\n * @param documentPool the document pool of the document.\n * @param documentKey the document key for the document.\n * @param language the language of the document.\n * @param ackKey the acknowledge key for the document.\n * @param connectionTimeoutInMillis timeout of the request.\n * @return a future with the upload response.\n * @throws MovilizerWebServiceException when there's connection or file access problems.\n *\n * @see CompletableFuture\n * @see UploadResponse\n * @since 15.11.2.2\n */\n CompletableFuture<UploadResponse> uploadDocument(Path documentFilePath, long systemId,\n String password, String documentPool,\n String documentKey, String language,\n String ackKey,\n Integer connectionTimeoutInMillis);\n\n // ----------------------------------------------------------------------------------- XML utils\n\n /**\n * Read a Movilizer element from the webservice name space (MovilizerMovelet, MovilizerReply,\n * etc...) and creates a java object instance of the class indicated.\n *\n * @param elementString string value of the serialization of the object.\n * @param movilizerElementClass class of the Movilizer object to create from the string.\n * @param <T> Movilizer object class\n * @return the java instance parsed from the string.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there are parsing\n * problems.\n * @since 12.11.1.3\n */\n <T> T getElementFromString(final String elementString, final Class<T> movilizerElementClass);\n\n /**\n * Print a Movilizer element from the webservice name space (MovilizerMovelet, MovilizerReply,\n * etc...) to string.\n *\n * @param movilizerElement java instance of the Movilizer element.\n * @param movilizerElementClass class of the Movilizer element to use.\n * @param <T> Movilizer object class\n * @return XML string representation for the Movilizer element given.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there are parsing\n * problems.\n * @since 12.11.1.3\n */\n <T> String printMovilizerElementToString(final T movilizerElement,\n final Class<T> movilizerElementClass);\n\n // ------------------------------------------------------------------------------ File XML utils\n\n /**\n * Read and parses a Movilizer Request file (.mxml) from the file system.\n *\n * @param filePath path to the request file.\n * @return the java instance parsed from the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * file access problems.\n * @since 12.11.1.0\n */\n MovilizerRequest getRequestFromFile(Path filePath);\n\n /**\n * Read and parses a Movilizer Request from the given String.\n *\n * @param requestString non null string with a valid xml request.\n * @return the java instance parsed from the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * string problems.\n * @since 12.11.1.1\n */\n MovilizerRequest getRequestFromString(String requestString);\n\n /**\n * Persist a request java instance to a file.\n *\n * @param request the request to be persisted.\n * @param filePath the path to the file.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException when there's parsing or\n * file access problems.\n * @since 12.11.1.0\n */\n void saveRequestToFile(MovilizerRequest request, Path filePath);\n\n /**\n * Generate a string from a request java instance.\n *\n * @param request the request to be transformed into string.\n * @return the string representation of the request.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException if there's parsing\n * problems.\n * @since 12.11.1.0\n */\n String requestToString(MovilizerRequest request);\n\n /**\n * Generate a string from a response java instance.\n *\n * @param response the response to be transformed into string.\n * @return the string representation of the response.\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerXMLException if there's parsing\n * problems.\n * @since 12.11.1.0\n */\n String responseToString(MovilizerResponse response);\n\n // ------------------------------------------------------------------------------ MAF Management\n\n /**\n * Read a file into an MAF source file for latter source uploading.\n *\n * @param sourceFile file to read\n * @return MafSource with the source and the metadata\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles reading the file.\n * @see com.movilizer.mds.webservice.models.maf.MafEventScript\n * @see com.movilizer.mds.webservice.models.maf.MafLibraryScript\n * @see com.movilizer.mds.webservice.models.maf.MafGenericScript\n * @since 15.11.2.1\n */\n MafSource readSource(File sourceFile);\n\n /**\n * Deploy a MAF source to the cloud.\n *\n * @param systemId where to deploy the file\n * @param password for the system id given\n * @param token for MAF access\n * @param source file to upload\n * @return MafResponse with the result of the operation\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles uploading the file.\n * @see com.movilizer.mds.webservice.models.maf.communications.MafEventResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafLibraryResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafGenericResponse\n * @since 15.11.2.1\n */\n MafResponse deploySourceSync(long systemId, String password, String token, MafSource source);\n\n /**\n * Deploy a MAF source to the cloud.\n *\n * @param systemId where to deploy the file\n * @param password for the system id given\n * @param token for MAF access\n * @param sourceFile file to upload\n * @return MafResponse with the result of the operation\n * @throws com.movilizer.mds.webservice.exceptions.MovilizerMAFManagementException when having\n * troubles uploading the file.\n * @see com.movilizer.mds.webservice.models.maf.communications.MafEventResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafLibraryResponse\n * @see com.movilizer.mds.webservice.models.maf.communications.MafGenericResponse\n * @since 15.11.2.1\n */\n MafResponse deploySourceSync(long systemId, String password, String token, File sourceFile);\n}", "void transfer(long amount, Account account, Account targetAccount) throws NotFoundException;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the value of the policySetId property.
public String getPolicySetId() { return policySetId; }
[ "public void setPolicySetId(final String value) {\n this.policySetId = value;\n }", "public String policyId() {\n return this.policyId;\n }", "public String getPolicyId() {\n return this.PolicyId;\n }", "public long getPolicyId() {\n return policyId;\n }", "public int getPolicyId() {\n\t\treturn policyId;\n\t}", "public String policyDefinitionId() {\n return this.policyDefinitionId;\n }", "@Schema(description = \"(Write-Only) Id of permission set\")\n public Long getPermissionSetId() {\n return permissionSetId;\n }", "public int getPolicyID(int policy_id) {\n int id = 0;\n try {\n checkPolicyID.setInt(1, policy_id);\n ResultSet resultset = checkPolicyID.executeQuery();\n while (resultset.next()) {\n id = resultset.getInt(\"policy_id\");\n System.out.println(\"Policy ID: \" + id);\n }\n resultset.close();\n }\n catch (SQLException exception) {\n System.out.println(\"Invalid Input!\");\n }\n return id;\n }", "public String getPolicyStoreId() {\n return this.policyStoreId;\n }", "public String getPolicyUuid() {\n\t\treturn policyUuid;\n\t}", "public void setPolicyId(long policyId) {\n this.policyId = policyId;\n }", "public List<JAXBElement<?>> getPolicySetOrPolicyOrPolicySetIdReference() {\n if (policySetOrPolicyOrPolicySetIdReference == null) {\n policySetOrPolicyOrPolicySetIdReference = new ArrayList<JAXBElement<?>>();\n }\n return this.policySetOrPolicyOrPolicySetIdReference;\n }", "public String getPolicySet();", "public String getPolicy() {\n return policy;\n }", "public String getPolicyRef() {\n return this.policyRef;\n }", "@Schema(description = \"(Write-Only) Id of model set\")\n public Long getModelSetId() {\n return modelSetId;\n }", "public long getPolicyNumber() {\n return policyNumber;\n }", "public void setPolicyId(int PolicyId);", "public Integer getConceptSetId() {\n\t\treturn conceptSetId;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the project path given the path of the a selected file in the workspace and the workspace path
public static String getProjectPathFromFileInWorkspace(String selectedFile, String workspacePath) { String toRemove = selectedFile.replace(workspacePath + "\\", ""); String toAdd = toRemove.substring(0, toRemove.indexOf("\\")); String result = workspacePath.replace(toRemove, "") + "\\" + toAdd; return result.replace("\\", "/"); }
[ "private static File getProjectsPath() {\n File projectsPath = loadFilePath();\n if (projectsPath == null) {\n JFileChooser fc = createFileChooser();\n if (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) {\n return fc.getSelectedFile();\n }\n }\n return projectsPath;\n }", "java.lang.String getWorkspaceFile();", "public static String getProjectPath() {\n\t\tif (!projectPath.isEmpty()) {\n\t\t\treturn projectPath;\n\t\t} else {\n\t\t\treturn \"No file yet\";\n\t\t}\n\t}", "public String getProjectPath() {\n String path = null;\n try {\n String tmp = Paths.get(ClassLoader.getSystemResource(\"\").toURI()).getParent().toString();\n int idx = tmp.lastIndexOf(File.separator);\n path = tmp.substring(0,idx);\n path = path + File.separator +\"src\";\n Log.debug(\"Project path is \" + path);\n } catch (URISyntaxException e) {\n Log.error( \"Project path not found!\", e );\n }\n\n return path;\n }", "public String getProjectFilePath()\r\n\t{\r\n\t\tif (projectFilePath == null || projectFilePath.length() < 1)\r\n\t\t\tprojectFilePath = root + File.separator + id + File.separator + \"Project.xml\";\r\n\t\treturn projectFilePath;\r\n\t}", "public static IProject getSelectedProject() {\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\n\t\tISelectionService service = window.getSelectionService();\n\t\tISelection selection = service.getSelection();\n\t\tObject element = null;\n\t\tIResource resource;\n\t\tIProject selProject = null;\n\t\tif (selection instanceof IStructuredSelection) {\n\t\t\tIStructuredSelection structuredSel =\n\t\t\t\t\t(IStructuredSelection) selection;\n\t\t\telement = structuredSel.getFirstElement();\n\t\t}\n\t\tif (element instanceof IResource) {\n\t\t\tresource = (IResource) element;\n\t\t\tselProject = resource.getProject();\n\t\t} else {\n\t\t\tIWorkbenchPage page = window.getActivePage();\n\t\t\tIFile file = (IFile) page.getActiveEditor().\n\t\t\t\t\tgetEditorInput().getAdapter(IFile.class);\n\t\t\tselProject = file.getProject();\n\t\t}\n\t\treturn selProject;\n\t}", "private static String getProjectPathString() {\n Path projectPath = Paths.get(\"\").toAbsolutePath();\n String projectPathString = projectPath.normalize().toString();\n return projectPathString;\n }", "public static IProject projectForPath(IPath path) {\r\n \tIProject result = null;\r\n \tif (path != null) {\r\n \t\tIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\r\n \t\tresult = root.getProject(path.segment(0));\r\n \t}\r\n \treturn result;\r\n }", "java.lang.String getProjectDir();", "public String getProjectFilePath() {\n\t\tif (projectFileIO != null) {\n\t\t\treturn projectFileIO.getFilePath();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public String getProjectPath() {\n\t\treturn this.projectPath;\n\t}", "public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PROJECT_EXPLORER);\n\t\tif (selection instanceof StructuredSelection) {\n\t\t\tIResource resource = (IResource) ((StructuredSelection) selection).getFirstElement();\n\t\t\tactiveProject = resource.getProject();\n\t\t}\n\t\t\n\t\treturn activeProject;\n\t}", "Project getCurrentProject();", "private String findPath() {\r\n\t\tTreePath[] paths = tree.getSelectionPaths();\r\n\t\tString temp = \"\";\r\n\t\t\r\n\t\tif(paths != null) {\r\n for (int i = 0; i < paths.length; i++) {\r\n \t\r\n \t//gets the absolute path of the selected directory\r\n \tfor(int j = 0; j < paths[i].getPathCount(); j++) {\r\n \t\tif(j == 0) {\r\n \t\ttemp = temp + paths[i].getPathComponent(j);\r\n \t\t}\r\n \t\telse {\r\n \t\t\ttemp = temp + \"/\" + paths[i].getPathComponent(j);\r\n \t\t}\r\n \t}\r\n }\r\n\t\t}\r\n\t\treturn temp;\r\n\t}", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "public String getProjectDirectoryPath() \r\n\t{\r\n\t\treturn root + File.separator + id;\r\n\t}", "private IProject getProject(IFile fileToCompile){\r\n\t\treturn fileToCompile.getProject();\r\n\t}", "String getTemplateProjectPath();", "Workspace getCurrentWorkspace();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
optional string lastDigits = 3;
public java.lang.String getLastDigits() { java.lang.Object ref = lastDigits_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); lastDigits_ = s; return s; } else { return (java.lang.String) ref; } }
[ "String getLastFourDigits();", "public Builder setLastDigits(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n lastDigits_ = value;\n onChanged();\n return this;\n }", "boolean hasLastDigits();", "public java.lang.String getLastDigits() {\n java.lang.Object ref = lastDigits_;\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 lastDigits_ = s;\n }\n return s;\n }\n }", "Integer getLastDigit() {\n return lastDigit;\n }", "public void setLastFourDigits(String value) {\n this.lastFourDigits = value;\n }", "public void setNumberLastDigits(final String numberLastDigits) {\n\n\t\tthis.numberLastDigits = numberLastDigits;\n\t}", "public String getLastFourDigits() {\n return lastFourDigits;\n }", "private static void threeDigit(Optional<Integer> optional) {\n if (optional.isPresent()) {\n Integer num = optional.get();\n String string = \"\" + num;\n if (string.length() == 3) {\n System.out.println(string);\n }\n }\n }", "public void endNumber(String string) {}", "public String getLastFiveDigits() {\n return lastFiveDigits;\n }", "public static int lastThreeDigits(long Number) {\t\n\t\treturn (int)(Math.abs(Number)%1000);\t\n\t}", "public void checkForCouldBeWholeNumber() {\n if (precision > 17 && digits.length() > 3) {\r\n int i = digits.length()-2;\r\n char ch = digits.charAt(i); // second last character\r\n if (ch == '9') {\r\n while (i > 0 && digits.charAt(i-1) == '9') {\r\n i--;\r\n } \r\n if (i > 0 && i < digits.length() - 3) {\r\n digits = digits.substring(0, i-1)+Character.toString((char) (digits.charAt(i-1) + 1));\r\n precision = digits.length();\r\n }\r\n } else if (ch == '0') {\r\n while (i > 0 && digits.charAt(i-1) == '0') {\r\n i--;\r\n } \r\n if (i > 0 && i < digits.length() - 3) {\r\n digits = digits.substring(0, i);\r\n precision = digits.length();\r\n }\r\n }\r\n }\r\n }", "public void setLastFiveDigits(String value) {\n this.lastFiveDigits = value;\n }", "public boolean lastDigit(int a, int b, int c) {\r\n \r\n int r1 = a % 10;\r\n int r2 = b % 10;\r\n int r3 = c % 10;\r\n \r\n return (r1 == r2 || r1 == r3 || r2 == r1 || r2 == r3);\r\n \r\n}", "public String digit(String digit);", "public void setLast(String l){last = l;}", "String longestDigitsPrefix(String inputString) {\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < inputString.length(); i++) {\n char c = inputString.charAt(i);\n if (Character.isDigit(c)) {\n stringBuilder.append(c);\n } else {\n break;\n }\n }\n return stringBuilder.toString();\n }", "static int toThreeDigit(int a, int b, int c) {\n return a*100 + b*10 + c;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Syncs the local and remote notes and sets condition based notifications for each new note By time sets notification alarm for requested time By location sets geofence for requested location
@Override public void onReceive(final Context context, final Intent intent) { Model.getInstance().init(context); Model.getInstance().syncNotesFromServer(new Model.GetNotesListener() { @Override public void onResult(List<Note> notes) { Log.d(TAG, "Syncing Data...."); List<String> geoNotes = new ArrayList<String>(); for (Note note : notes) { if (note.getTimeToShow() != null) { NotificationAlarmReceiver.setAlarm(context, note); } else if (note.getLocationToShow() != null) { geoNotes.add(note.getId()); } } // Start a service for connecting to google location api with the location notes if (geoNotes.size() > 0) { Intent intentS = new Intent(context, GeofenceNoteService.class); intentS.putStringArrayListExtra(GeofenceNoteService.NOTE_PARAM_NAME, (ArrayList<String>) geoNotes); context.startService(intentS); } } }); }
[ "public void changeNoteSyncStatus(List<Note> notes) {\n openDatabase();\n clearValues();\n String clause = MySQLiteOpenHelper.SQL_NOTE_ID + \"=?\";\n for (int i = 0; i < notes.size(); i++) {\n String nId = String.valueOf(notes.get(i).getnId());\n values.put(MySQLiteOpenHelper.SQL_NOTE_SYNC, 1);\n update(MySQLiteOpenHelper.NOTE, values, clause, new String[]{nId});\n }\n closeDatabase();\n }", "public void storeNotificationsToNotificationList(String notificationDetails)\n {\n String[] allNoti = notificationDetails.split(\";\");\n \n \n for (int line = 0; line < allNoti.length ; line++)\n {\n String[] details = allNoti[line].split(\"///\");\n String jobSeekerUsername = details[0];\n String[] notifications = details[1].split(\",\");\n ArrayList<String> notification = new ArrayList<String>();\n for (int i = 0; i < notifications.length; i++)\n {\n notification.add(notifications[i]);\n }\n getJobSeeker(jobSeekerUsername).setNotification(notification);\n }\n }", "public void onUpdateNotifications() {\n\t\tSystem.out.println(\"UPDATE NOTIFICATION\");\n\t\tnew NotificationAsyncTask().execute();\n\t\t// Check for an incoming notification. Save the info if it is valid\n//\t\tUri intentUri = getIntent().getData();\n//\t\tif (intentUri != null) {\n//\t\t\tString requestIdParam = intentUri.getQueryParameter(\"request_ids\");\n//\t\t\tif (requestIdParam != null) {\n//\t\t\t\tString array[] = requestIdParam.split(\",\"); System.out.println(\"array not size: \" + array.length);\n//\t\t\t\tif(array.length > 0)\n//\t\t\t\t\tnew NotificationAsyncTask().execute();\n//\t\t\t\t//for (int i = 0; i < array.length; i++) {\n//\t\t\t\t\t//requestId = array[i];\n//\t\t\t\t\t//Log.i(\"onActivityCreated\", \"Request id: \" + requestId);\n//\t\t\t\t\t//getRequestData(requestId);\n//\t\t\t\t//}\n////\t\t\t\tif (ClimbApplication.notifications.isEmpty())\n////\t\t\t\t\tToast.makeText(this, getString(R.string.no_notification), Toast.LENGTH_SHORT).show();\n////\t\t\t\telse\n////\t\t\t\t\tToast.makeText(this, getResources().getQuantityString(R.plurals.n_notification, ClimbApplication.notifications.size()), Toast.LENGTH_SHORT).show();\n//\n//\t\t\t}\n//\n//\t\t}\n\t}", "private void createNotifications() {\n \ttry {\n \t\t\n \t\t// TODO check performance of ALL notifications, probably not best solution...\n \t\t\n \t\teggsToColorNotification = nm.createNotification(eggsToColorRef, new NotificationListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void entryOperationFinished(Notification arg0, Operation arg1, List<? extends Serializable> arg2) {\n\t\t\t\t\tfor(Serializable s : arg2)\t{\n\t\t\t\t\t\tif(!(s instanceof Egg))\t{\n\t\t\t\t\t\t\ts = ((Entry) s).getValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(s instanceof Egg)\t{\n\t\t\t\t\t\t\t\tgui.updateEgg(1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, Operation.WRITE);\n \t\t\n \t\t\n \tproductsNotification = nm.createNotification(productsRef, new NotificationListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void entryOperationFinished(Notification arg0, Operation arg1,\n\t\t\t\t\t\tList<? extends Serializable> arg2) {\n\t\t\t\t\t\n\t\t\t\t\tfor(Serializable s : arg2)\t{\n\t\t\t\t\t\tSerializable obj = ((Entry) s).getValue();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(obj instanceof Egg)\t{\n\t\t\t\t\t\t\tgui.addColoredEgg(1);\n\t\t\t\t\t\t} else if(obj instanceof ChocolateRabbit)\t{\n\t\t\t\t\t\t\tgui.updateChoco(1);\n\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\tlog.error(\"NO EGG / ChocoBunny given - RETURN\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, Operation.WRITE);\n \t\t\n \t\n \tnestsNotification = nm.createNotification(nestsRef, new NotificationListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void entryOperationFinished(Notification arg0, Operation arg1,\n\t\t\t\t\t\tList<? extends Serializable> arg2) {\n\t\t\t\t\t\n\t\t\t\t\tfor(Serializable s : arg2)\t{\n\t\t\t\t\t\tSerializable obj = ((Entry) s).getValue();\n\t\t\t\t\t\tif(obj instanceof Nest)\t{\n\t\t\t\t\t\t\tNest nest = (Nest) obj;\n\t\t\t\t\t\t\tif(!nest.isComplete())\t{\n\t\t\t\t\t\t\t\tlog.error(\"GIVEN NEST IS NOT COMPLETED - ERROR!\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!nest.isTested() && !nest.isShipped())\t{\n\t\t\t\t\t\t\t\t// first time written here\n\t\t\t\t\t\t\t\tgui.addNest(nest);\n\t\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\t\tgui.updateNest(nest);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\tlog.error(\"ERROR: NO NEST GIVEN!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, Operation.WRITE);\n \t\n \tnestsCompletedNotification = nm.createNotification(nestsCompletedRef, new NotificationListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void entryOperationFinished(Notification arg0, Operation arg1,\n\t\t\t\t\t\tList<? extends Serializable> arg2) {\n\t\t\t\t\t\n\t\t\t\t\tfor(Serializable s : arg2)\t{\n\t\t\t\t\t\tSerializable obj = ((Entry) s).getValue();\n\t\t\t\t\t\tif(obj instanceof Nest)\t{\n\t\t\t\t\t\t\tNest nest = (Nest) obj;\n\t\t\t\t\t\t\tif(!nest.isComplete())\t{\n\t\t\t\t\t\t\t\tlog.error(\"GIVEN NEST IS NOT COMPLETED - ERROR!\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// final destination for nest\n\t\t\t\t\t\t\tgui.addCompletedNest(nest);\n\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\tlog.error(\"ERROR: NO NEST GIVEN!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, Operation.WRITE);\n \t\n \tnestsErrorNotification = nm.createNotification(nestsErrorRef, new NotificationListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void entryOperationFinished(Notification arg0, Operation arg1,\n\t\t\t\t\t\tList<? extends Serializable> arg2) {\n\t\t\t\t\t\n\t\t\t\t\tfor(Serializable s : arg2)\t{\n\t\t\t\t\t\tSerializable obj = ((Entry) s).getValue();\n\t\t\t\t\t\tif(obj instanceof Nest)\t{\n\t\t\t\t\t\t\tNest nest = (Nest) obj;\n\t\t\t\t\t\t\tif(!nest.isComplete())\t{\n\t\t\t\t\t\t\t\tlog.error(\"GIVEN NEST IS NOT COMPLETED - ERROR!\");\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgui.addErrorNest(nest);\n\t\t\t\t\t\t} else\t{\n\t\t\t\t\t\t\tlog.error(\"ERROR: NO NEST GIVEN!\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, Operation.WRITE);\n \t\n\t\t} catch (MzsCoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t}", "private void setNotifications() {\n RealmManager realmManager = new RealmManager();\n realmManager.open();\n RecurringDao recurringDao = realmManager.createRecurringDao();\n\n List<Recurring> recurringTransactions = recurringDao.getAllRecurringTransactions();\n NotificationScheduler notificationScheduler = new NotificationScheduler(this);\n\n for (Recurring recurring : recurringTransactions) {\n notificationScheduler.schedule(recurring);\n }\n realmManager.close();\n }", "public void pushReminders(Date date) {\n if(tripQueue != null) {\n for(Trip trip : tripQueue.get(date)) {\n @SuppressWarnings(\"deprecation\")\n String title = \"Your next Trip to \" + trip.getDestinLoc() + \" is in \"\n + Integer.toString(trip.getOriginTime().getDay() - new Date().getDay())\n + \" days!\";\n \n String body = \",\\n\\n\" + title + \"\\nWe hope you'll have a great time,\"\n + \" but in case you have to cancel please do so ASAP\"\n + \" for the sake of everyone else. \\n\\n\"\n + \"Be safe! -/n BearRides Dev Team\";\n String greeting;\n Message message;\n \n for(User user : trip.getRiders()) {\n greeting = \"Hi \" + user.getName();\n \n message = new Message(user);\n message.setTitle(title);\n message.setBody(greeting + body);\n message.setHidden(true);\n message.setNotification(true);\n \n insert(message);\n user.insertNotification(message);\n }\n User driver = trip.getDriver();\n greeting = \"Hi \" + driver.getName();\n \n message = new Message(driver);\n message.setTitle(title);\n message.setBody(greeting + body);\n message.setHidden(true);\n message.setNotification(true);\n \n insert(message);\n driver.insertNotification(message);\n }\n }else {\n }\n }", "private void setupAlarms()\n {\n this.am = (AlarmManager)getSystemService(Context.ALARM_SERVICE);\n /* Setup location update alarm */\n this.recvr = new LocAlarm();\n registerReceiver(this.recvr,\n new IntentFilter(LocAlarm.class.toString()),\n null, null);\n Intent i = new Intent(LocAlarm.class.toString());\n this.amintent = PendingIntent.getBroadcast(this, 0, i, 0);\n }", "private void syncRecentEvents() {\n\t\tAcalDateTime from = new AcalDateTime().applyLocalTimeZone().addDays(-32).shiftTimeZone(\"UTC\");\n\t\tAcalDateTime until = new AcalDateTime().applyLocalTimeZone().addDays(+68).shiftTimeZone(\"UTC\");\n\n\t\tif (Constants.LOG_DEBUG)\n\t\t\tLog.println(Constants.LOGD,TAG, \"Doing a recent sync of events from \"+from.toString()+\" to \"+until.toString());\t\t\t\n\n\t\tDavNode root;\n\t\ttry {\n\t\t\troot = requestor.doXmlRequest(\"REPORT\", collectionPath, SynchronisationJobs.getReportHeaders(1),\n\t\t\t\t\tString.format(calendarQuery, from.fmtIcal(), until.fmtIcal()));\n\t\t}\n\t\tcatch ( SSLHandshakeException e ) {\n\t\t\tLog.w(TAG,\"SSL Handshake Exception\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tif ( root == null ) {\n\t\t\tLog.println(Constants.LOGD,TAG, \"REPORT failed for events \"+from.toString()+\" to \"+until.toString()+\" on \"+requestor.fullUrl());\n\t\t\treturn;\n\t\t}\n\n\t\t//ArrayList<ResourceModification> changeList = new ArrayList<ResourceModification>(); \n\t\tDMQueryList queryList = processor.getNewQueryList();\n\n\t\tList<DavNode> responses = root.getNodesFromPath(\"multistatus/response\");\n\n\t\tfor (DavNode response : responses) {\n\t\t\tString name = response.segmentFromFirstHref(\"href\");\n\t\t\tContentValues cv = null;\n\t\t\tArrayList<ContentValues> cvList = processor.query(null,\n\t\t\t\t\t\t\t\t\t\tResourceTableManager.COLLECTION_ID+\"=? AND \"+ResourceTableManager.RESOURCE_NAME+\"=?\",\n\t\t\t\t\t\t\t\t\t\tnew String[] {Long.toString(collectionId), name}, null, null, null);\n\t\t\tif (!cvList.isEmpty()) cv = cvList.get(0);\n\n\t\t\t//WriteActions action = WriteActions.UPDATE;\n\t\t\tDMQueryBuilder builder = processor.getNewQueryBuilder();\n\t\t\tbuilder.setAction(QUERY_ACTION.UPDATE);\n\t\t\tif ( cv == null ) {\n\t\t\t\tcv = new ContentValues();\n\t\t\t\tcv.put(ResourceTableManager.COLLECTION_ID, collectionId);\n\t\t\t\tcv.put(ResourceTableManager.RESOURCE_NAME, name);\n\t\t\t\tcv.put(ResourceTableManager.NEEDS_SYNC, 1);\n\t\t\t\tbuilder.setAction(QUERY_ACTION.INSERT);\n\t\t\t\t//action= WriteActions.INSERT;\n\t\t\t} else {\n\t\t\t\tbuilder.setWhereClause(ResourceTableManager.RESOURCE_ID+\" = ?\")\n\t\t\t\t\t.setwhereArgs(new String[]{cv.getAsString(ResourceTableManager.RESOURCE_ID)});\n\t\t\t}\n\t\t\tif ( !parseResponseNode(response, cv) ) continue;\n\n\t\t\t//changeList.add( new ResourceModification(action,cv,null));\n\t\t\tbuilder.setValues(cv);\n\t\t\tqueryList.addAction(builder.build());\n\t\t}\n\n\t\t//ResourceModification.commitChangeList(acalService, changeList, processor.getTableName());\n\t\tprocessor.processActions(queryList);\n\n\t}", "public void insertToQueue(List<Note> notes) {\n clearValues();\n openDatabase();\n for (int i = 0; i < notes.size(); i++) {\n values.put(MySQLiteOpenHelper.SQL_NOTE_ID, notes.get(i).getnId());\n values.put(MySQLiteOpenHelper.SQL_NOTE_TITLE, notes.get(i).getnTitle());\n values.put(MySQLiteOpenHelper.SQL_NOTE_CONTENT, notes.get(i).getnContent());\n values.put(MySQLiteOpenHelper.SQL_NOTE_TIME, notes.get(i).getnTime());\n values.put(MySQLiteOpenHelper.SQL_NOTE_SYNC, notes.get(i).getnSync());\n values.put(MySQLiteOpenHelper.QUEUE_REQUEST_TYPE, MySQLiteOpenHelper.QUEUE_REQUEST_TYPE_ADD);\n insert(MySQLiteOpenHelper.QUEUE, null, values);\n }\n closeDatabase();\n }", "public void sync_notifications() {\n Log.i(TAG,\"********** sync_notifications\");\n\n if (NotifierConfiguration.cfg_notifier_paused) {\n Log.i(TAG, \"Notifier paused. Ignoring...\");\n return;\n }\n\n sync_in_progress = true;\n /**\n * Initially mark everything in notifications table as inactive\n */\n ntfcn_items.markAllInactive();\n\n for (StatusBarNotification asbn : getActiveNotifications()) {\n StatusBarNotification sbn = asbn.clone();\n\n String condensed_string = ntfcn_items.getCondensedString(sbn);\n\n Log.i(TAG,\"Condensed string: \" + condensed_string);\n\n try {\n PackageManager pm = getPackageManager();\n String app_name = (String) pm.getApplicationLabel(\n pm.getApplicationInfo(sbn.getPackageName(), PackageManager.GET_META_DATA));\n\n Log.i(TAG,\"ID :\" + sbn.getId() + \"\\t\" + sbn.getNotification().tickerText +\n \"\\t\" + sbn.getPackageName());\n\n Log.i(TAG,\"App name :\" + app_name + \"\\n\");\n\n HashSet<String> exclusion_list = NotifierConfiguration.excluded_packages;\n if (exclusion_list.contains(sbn.getPackageName())) {\n Log.i(TAG, \"Pkg: \" + sbn.getPackageName() + \" in exclusion list. Ignoring.\");\n continue;\n }\n\n /** skip group headers */\n if ( ((sbn.getNotification().flags & Notification.FLAG_GROUP_SUMMARY) != 0)) {\n Log.i(TAG, \"skippiing group header key: \" + sbn.getKey());\n continue;\n }\n\n /** Add a new active notification entry or\n * just mark it as active if it already exists\n */\n addActiveSBN(sbn);\n\n\n /**\n if (sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEMPLATE).equals(\n \"android.app.Notification$MessagingStyle\")\n ) {\n\n Log.e(TAG, \"Messaging\");\n Log.i(TAG, \"Extra Messages: \" +\n sbn.getNotification().extras.get(NotificationCompat.EXTRA_MESSAGES).toString());\n\n Log.i(TAG, \"Extra Messages History: \" +\n sbn.getNotification().extras.get(Notification.EXTRA_HISTORIC_MESSAGES));\n\n Log.i(TAG, \"Extra conversation title: \" +\n sbn.getNotification().extras.get(NotificationCompat.EXTRA_CONVERSATION_TITLE));\n }\n\n\n Log.i(TAG, \"Flags: \" +\n ((sbn.getNotification().flags & Notification.FLAG_GROUP_SUMMARY) != 0));\n\n Log.i(TAG, \"Title :\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TITLE) + \"\\n\");\n Log.i(TAG, \"Text :\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEXT) + \"\\n\");\n Log.i(TAG, \"Extra conv titles: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_CONVERSATION_TITLE));\n\n Log.i(TAG, \"Extra info text: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_INFO_TEXT));\n Log.i(TAG, \"Extra Messages: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_MESSAGES));\n\n Log.i(TAG, \"Extra big text lines\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_BIG_TEXT));\n Log.i(TAG, \"Extra text lines\" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TEXT_LINES));\n Log.i(TAG, \"Extra sub text \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_SUB_TEXT));\n Log.i(TAG, \"Extra summary text \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_SUMMARY_TEXT));\n\n Log.i(TAG, \"Extra title big: \" + sbn.getNotification().extras.get(NotificationCompat.EXTRA_TITLE_BIG));\n\n\n Log.i(TAG, \"SBN group? \" + sbn.isGroup());\n Log.i(TAG, \"Clearable? \" + sbn.isClearable());\n Log.i(TAG, \"Posted at \" + DateUtils.getRelativeTimeSpanString(sbn.getPostTime()));\n Log.i(TAG, \"Group key \" + sbn.getGroupKey());\n Log.i(TAG, \"SBN key \" + sbn.getKey());\n Log.i(TAG, \"TAG \" + sbn.getTag());\n Log.i(TAG, \"Click Action :\" + sbn.getNotification().contentIntent.toString());\n\n Log.i(TAG, \"Delete Action :\" + sbn.getNotification().deleteIntent.toString());\n\n for (Notification.Action action : sbn.getNotification().actions) {\n Log.i(TAG, \"Action :\" + action.title + \" Intent: \" + action.actionIntent.toString() + \"\\n\");\n }\n */\n } catch(Exception e) {\n Log.e(TAG, \"Exception occurred while syncing notifications: \" + e.getMessage());\n }\n }\n\n /**\n * If there are entries previously marked inactive, but doesn't have its cleared time set,\n * Set its cleared time to now\n */\n ntfcn_items.update_cleared_time_if_zero();\n this.num_active = ntfcn_items.getActiveCount();\n sync_in_progress = false;\n\n /** Update active notifications count in persistent notification */\n pnotif_builder.setContentText(\"Tap to open Notifications Center\");\n\n if (NotifierConfiguration.cfg_svc_notification_enabled) {\n show_notification();\n }\n\n /**\n * TODO: if needed, remove all inactive applications at this point\n * if NotifierConfiguration.cfg_cache_notifications_enabled is false\n */\n }", "public void refreshNotes(){\n \t\tclearNotes();\n \n \t\tfor(Note n : db.getNoteList()){\n \t\t\taddNote(n);\n \t\t}\n \n \t}", "private void sendNotifications() {\n for (long sid : self.getCurrentAndNextConfigVoters()) {\n QuorumVerifier qv = self.getQuorumVerifier();\n ToSend notmsg = new ToSend(\n ToSend.mType.notification,\n proposedLeader,\n proposedZxid,\n logicalclock.get(),\n QuorumPeer.ServerState.LOOKING,\n sid,\n proposedEpoch,\n qv.toString().getBytes(UTF_8));\n\n LOG.debug(\n \"Sending Notification: {} (n.leader), 0x{} (n.zxid), 0x{} (n.round), {} (recipient),\"\n + \" {} (myid), 0x{} (n.peerEpoch) \",\n proposedLeader,\n Long.toHexString(proposedZxid),\n Long.toHexString(logicalclock.get()),\n sid,\n self.getMyId(),\n Long.toHexString(proposedEpoch));\n\n sendqueue.offer(notmsg);\n }\n }", "public void updateNotes() {\n\t\tprev2_note = prev_note;\n\t\tprev_note = current_note;\n\t\tcurrent_note = next_note;\n\t\t\n\t\t// increment note_index. set to 0 if at end \n\t\tnote_index++;\n\t\tif (note_index == notes.length)\n\t\t\tnote_index = 0;\n\t\t\n\t\t// find the next note that's coming\n\t\tsetNextNote();\n\t}", "@Override\n\tpublic void update(Note note, Boolean noteOn, Note[] availableNotes) {\n\t\t// If the note is a new note on message, and there is a note that is\n\t\t// currently on\n\t\tif (currentNoteOn != null && noteOn) {\n\t\t\t// Turn the current note off\t\t\t\t\n\t\t\tnotifyObservers(currentNoteOn, false, availableNotes);\n\n\t\t\t// Assign the new note to be the current note\n\t\t\tcurrentNoteOn = note;\n\n\t\t\t// Turn on the new note\n\t\t\tnotifyObservers(currentNoteOn, true, availableNotes);\n\n\t\t\t// The note is the first note on message\n\t\t} else if (currentNoteOn == null && noteOn) {\n\t\t\tcurrentNoteOn = note;\n\t\t\tnotifyObservers(currentNoteOn, true, availableNotes);\n\t\t\t// note off message received\n\t\t} else if (currentNoteOn != null) {\n\t\t\tif (note.equals(currentNoteOn)) {\n\t\t\t\t//this is the last note, turn it off!\n\t\t\t\tnotifyObservers(currentNoteOn, false, availableNotes);\n\t\t\t\tcurrentNoteOn = null;\n\t\t\t}\n\t\t}\n\t}", "public void set_notifications(String actionType) {\n int hour, minute;\n\n if (actionType.equals(\"notify_morning\")) {\n hour = 8;\n minute = 0;\n } else {\n hour = 20;\n minute = 0;\n }\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n Intent intent = new Intent(getApplicationContext(), NotificationReciever.class);\n intent.setAction(actionType);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);\n assert alarmManager != null;\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), AlarmManager.INTERVAL_DAY, pendingIntent);\n Log.d(TAG, \"Notification Initialized: [\" + actionType + \"]\");\n\n }", "Notifications createNotifications();", "private void markNotified(int custId, String type) {\n\t\tconnect();\n\t\ttry {\n\t\t\tStatement statement = connection.createStatement();\n\t\t\t// Sets user notified\n\t\t\tString query = \"UPDATE Notification SET Notified=\" + true +\n\t\t\t\t\t\t\t\" WHERE CustID=\" + custId + \" AND Type='\" + type + \"'\";\n\t\t\tstatement.executeUpdate(query);\n\t\t\tstatement.close();\n\t\t\tlog.info(\"NOTIFICATION UPDATE\");\n\t\t} catch (SQLException e) {\n\t\t\tlog.severe(\"Could not mark notified\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void retrieveNotification() { =====================================================\n // Creating Notification Model\n // =====================================================\n\n// Bitmap patientAvatar1 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_18);\n// Bitmap patientAvatar2 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_19);\n// Bitmap patientAvatar3 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_20);\n//\n// Patient patient1 = new Patient(\"Garry\", \"Reese\", \"123AB456\", patientAvatar1);\n// Patient patient2 = new Patient(\"Lillian\", \"Wade\", \"987CD654\", patientAvatar2);\n// Patient patient3 = new Patient(\"Laura\", \"Freeman\", \"AV12G64\", patientAvatar3);\n//\n// Bitmap caregiverAvatar1 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_01);\n// Bitmap caregiverAvatar2 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_02);\n// Bitmap caregiverAvatar3 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_03);\n// Bitmap caregiverAvatar4 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_04);\n// Bitmap caregiverAvatar5 = BitmapFactory.decodeResource(getResources(), R.drawable.avatar_05);\n//\n// DateTime date1 = DateTime.now();\n// DateTime date2 = DateTime.now().minusDays(2).minusHours(2);\n// DateTime date3 = DateTime.now().minusDays(5).plusHours(1);\n// DateTime date4 = DateTime.now().minusDays(4).minusHours(2);\n// DateTime date5 = DateTime.now().minusDays(1).plusHours(1);\n// DateTime date6 = DateTime.now().minusDays(3).plusHours(5);\n//\n// String caregiverName1 = \"John Doe\";\n// String caregiverName2 = \"Jane Doe\";\n// String caregiverName3 = \"Tracy Lee\";\n// String caregiverName4 = \"Apple Tan\";\n// String caregiverName5 = \"Bethany Mandler\";\n//\n// String summary1 = \"Updated information of patient Garry Reese\";\n// String summary2 = \"Log new problem for patient Lilian Wade\";\n// String summary3 = \"Create new patient Laura Freeman\";\n// String summary4 = \"Recommended the game category memory to patient Garry Reese\";\n// String summary5 = \"Updated the milk allergy of patient Lillian Wade\";\n// String summary6 = \"Log new problem for patient Garry Reese\";\n//\n// Notification notification1 = new Notification(date1, caregiverName1, caregiverAvatar1, summary1, patient1, Notification.STATUS_NONE, Notification.TYPE_UPDATE_INFO_FIELD);\n// Notification notification2 = new Notification(date2, caregiverName2, caregiverAvatar2, summary2, patient2, Notification.STATUS_NONE, Notification.TYPE_NEW_INFO_OBJECT);\n// Notification notification3 = new Notification(date3, caregiverName3, caregiverAvatar3, summary3, patient3, Notification.STATUS_NONE, Notification.TYPE_NEW_PATIENT);\n// Notification notification4 = new Notification(date4, caregiverName4, caregiverAvatar4, summary4, patient1, Notification.STATUS_NONE, Notification.TYPE_GAME_RECOMMENDATION);\n// Notification notification5 = new Notification(date5, caregiverName5, caregiverAvatar5, summary5, patient2, Notification.STATUS_NONE, Notification.TYPE_UPDATE_INFO_OBJECT);\n// Notification notification6 = new Notification(date6, caregiverName3, caregiverAvatar3, summary6, patient1, Notification.STATUS_NONE, Notification.TYPE_NEW_INFO_OBJECT);\n//\n ArrayList<Notification> notificationList = new ArrayList<>();\n//// notificationList.add(notification1);\n//// notificationList.add(notification2);\n//// notificationList.add(notification3);\n//// notificationList.add(notification4);\n//// notificationList.add(notification5);\n//// notificationList.add(notification6);\n\n dbfile db = new dbfile();\n notificationList = db.prepareNotificationList(getApplicationContext());\n Log.v(\"WHY LIKE THAT\", String.valueOf(notificationList.size()));\n // =====================================================\n // Building the Notification Group based on the notification\n // =====================================================\n\n HashMap patientAndNotificationGroupMap = new HashMap();\n\n for(Notification notification:notificationList) {\n Patient currentPatient = notification.getAffectedPatient();\n String patientNric = currentPatient.getNric();\n\n if (patientAndNotificationGroupMap.containsKey(patientNric)) {\n NotificationGroup notifGroup = (NotificationGroup) patientAndNotificationGroupMap.get(patientNric);\n if(notification.getStatus() == Notification.STATUS_NONE) {\n notifGroup.getUnprocessedNotif().add(notification);\n } else {\n notifGroup.getProcessedNotif().add(notification);\n }\n } else {\n NotificationGroup newNotifGroup = new NotificationGroup();\n newNotifGroup.setAffectedPatient(currentPatient);\n if(notification.getStatus() == Notification.STATUS_NONE) {\n newNotifGroup.getUnprocessedNotif().add(notification);\n } else {\n newNotifGroup.getProcessedNotif().add(notification);\n }\n patientAndNotificationGroupMap.put(patientNric, newNotifGroup);\n }\n }\n\n ArrayList<NotificationGroup> notificationGroupList = new ArrayList<>();\n NotificationComparator comparator = new NotificationComparator();\n for (Object obj : patientAndNotificationGroupMap.values()) {\n NotificationGroup notificationGroup = (NotificationGroup) obj;\n\n // Set notification status\n UtilsUi.setNotificationGroupStatus(this, notificationGroup);\n\n // Sort the notifications by date\n Collections.sort(notificationGroup.getProcessedNotif(), comparator);\n Collections.sort(notificationGroup.getUnprocessedNotif(), comparator);\n\n // Set the summary\n UtilsUi.setNotificationGroupSummary(this, notificationGroup);\n\n notificationGroupList.add(notificationGroup);\n }\n\n DataHolder.setNotificationGroupList(notificationGroupList);\n }", "public synchronized void addNotifications(List<ClientNotification> clientNotifications) {\n\n if (clientNotifications != null && !clientNotifications.isEmpty()) {\n SQLiteDatabase db = databaseSQLHelper.getWritableDatabase();\n\n for (ClientNotification clientNotification : clientNotifications) {\n addClientNotification(db, clientNotification);\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
this.jdbcTemplate.update("insert in to account (name,sic_category__c)", "hello","helloworld");
public void insertAccounts(){ this.jdbcTemplate.update("insert into account (name,sic_category__c) values(?,?)", new PreparedStatementSetter(){ public void setValues(PreparedStatement ps) throws SQLException { ps.setString(1, "hello"); ps.setString(2, "WOCAONIMA"); }}); }
[ "@Insert({\n \"insert into jsh_accounthead (Id, Type, \",\n \"OrganId, HandsPersonId, \",\n \"ChangeAmount, TotalPrice, \",\n \"AccountId, BillNo, \",\n \"BillTime, Remark, \",\n \"tenant_id, delete_Flag)\",\n \"values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, \",\n \"#{organid,jdbcType=BIGINT}, #{handspersonid,jdbcType=BIGINT}, \",\n \"#{changeamount,jdbcType=DECIMAL}, #{totalprice,jdbcType=DECIMAL}, \",\n \"#{accountid,jdbcType=BIGINT}, #{billno,jdbcType=VARCHAR}, \",\n \"#{billtime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}, \",\n \"#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})\"\n })\n int insert(JshAccountHead record);", "@Insert({\r\n \"insert into tax_invitation (id, question_id, \",\r\n \"user_id)\",\r\n \"values (#{id,jdbcType=INTEGER}, #{questionId,jdbcType=INTEGER}, \",\r\n \"#{userId,jdbcType=VARCHAR})\"\r\n })\r\n int insert(TaxInvitation record);", "@Insert({\n \"insert into USER1.CAR (ID, BRAND, \",\n \"MODEL, TYPE, PLATE, \",\n \"SEATS)\",\n \"values (#{id,jdbcType=DECIMAL}, #{brand,jdbcType=VARCHAR}, \",\n \"#{model,jdbcType=VARCHAR}, #{type,jdbcType=DECIMAL}, #{plate,jdbcType=VARCHAR}, \",\n \"#{seats,jdbcType=DECIMAL})\"\n })\n int insert(Car record);", "@Insert({\n \"insert into cabinet_info (status, power_one, \",\n \"power_two, power_three, \",\n \"temperature_one, temperature_two, \",\n \"temperature_three, value_one, \",\n \"value_two, value_three, \",\n \"value_four, device_name, \",\n \"device_key, tenant_id, \",\n \"alarm_value_one, alarm_value_two)\",\n \"values (#{status,jdbcType=INTEGER}, #{powerOne,jdbcType=INTEGER}, \",\n \"#{powerTwo,jdbcType=INTEGER}, #{powerThree,jdbcType=INTEGER}, \",\n \"#{temperatureOne,jdbcType=DECIMAL}, #{temperatureTwo,jdbcType=DECIMAL}, \",\n \"#{temperatureThree,jdbcType=DECIMAL}, #{valueOne,jdbcType=INTEGER}, \",\n \"#{valueTwo,jdbcType=INTEGER}, #{valueThree,jdbcType=DECIMAL}, \",\n \"#{valueFour,jdbcType=DECIMAL}, #{deviceName,jdbcType=VARCHAR}, \",\n \"#{deviceKey,jdbcType=VARCHAR}, #{tenantId,jdbcType=VARCHAR}, \",\n \"#{alarmValueOne,jdbcType=INTEGER}, #{alarmValueTwo,jdbcType=INTEGER})\"\n })\n @Options(useGeneratedKeys=true,keyProperty=\"id\")\n int insert(CabinetInfo record);", "public void saveStudentBynamedParameterJdbcTemplate(Student s) {\r\n\t\tString query = \"insert into student values (:id,:name,:department)\";\r\n\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"id\", s.getId());\r\n\t\tmap.put(\"name\", s.getName());\r\n\t\tmap.put(\"department\", s.getDepartment());\r\n\r\n\t\tnamedParameterJdbcTemplate.execute(query, map, new PreparedStatementCallback<Object>() {\r\n\r\n\t\t\tpublic Object doInPreparedStatement(PreparedStatement ps) throws SQLException, DataAccessException {\r\n\t\t\t\treturn ps.executeUpdate();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Insert({\n \"insert into actions_accounts (actor, permission, \",\n \"action_id)\",\n \"values (#{actor,jdbcType=VARCHAR}, #{permission,jdbcType=VARCHAR}, \",\n \"#{actionId,jdbcType=INTEGER})\"\n })\n int insert(ActionsAccounts record);", "@Insert({\n \"insert into person (p_id, p_name, \",\n \"p_age)\",\n \"values (#{pId,jdbcType=INTEGER}, #{pName,jdbcType=VARCHAR}, \",\n \"#{pAge,jdbcType=INTEGER})\"\n })\n int insert(Person record);", "@Insert({\n \"insert into pms_base_catalog3 (name, catalog2_id)\",\n \"values (#{name,jdbcType=VARCHAR}, #{catalog2Id,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys=true,keyProperty=\"id\")\n int insert(BaseCatalog3 record);", "@Insert({\n \"insert into mt_product_spu (id, cate_back_id, \",\n \"cate_front, brand_id, \",\n \"type, title, subtitle, \",\n \"product_desc_id, specs_desc_id, \",\n \"support_desc_id, main_image_id, \",\n \"resource, status, \",\n \"created_at, modified_at, \",\n \"is_deleted)\",\n \"values (#{id,jdbcType=INTEGER}, #{cateBackId,jdbcType=INTEGER}, \",\n \"#{cateFront,jdbcType=VARCHAR}, #{brandId,jdbcType=INTEGER}, \",\n \"#{type,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{subtitle,jdbcType=VARCHAR}, \",\n \"#{productDescId,jdbcType=INTEGER}, #{specsDescId,jdbcType=INTEGER}, \",\n \"#{supportDescId,jdbcType=INTEGER}, #{mainImageId,jdbcType=INTEGER}, \",\n \"#{resource,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, \",\n \"#{createdAt,jdbcType=TIMESTAMP}, #{modifiedAt,jdbcType=TIMESTAMP}, \",\n \"#{isDeleted,jdbcType=TINYINT})\"\n })\n int insert(Spu record);", "@SqlUpdate(\n \"insert into user_medical_provider (user_id, umbrella_study_id, institution_type_id,\"\n + \" user_medical_provider_guid, institution_name, physician_name, city, state, country, postal_code, phone,\"\n + \" legacy_guid, street)\"\n + \" values (:userId, :umbrellaStudyId, \"\n + \" (select institution_type_id from institution_type where institution_type_code = :institutionType), \"\n + \" :userMedicalProviderGuid, :institutionName, :physicianName, :city, :state, :country, :postalCode, \"\n + \":phone, :legacyGuid, :street)\"\n )\n int insert(@BindBean MedicalProviderDto medicalProviderDto);", "public static int insertCategory(Category category) throws SQLException {\r\n Connection con = null;\r\n try{\r\n con = DbConnection.getConnection();\r\n String sql =\"CALL InsertCategory(?,?,?)\";\r\n CallableStatement statement = con.prepareCall(sql);\r\n statement.setString(1,category.getName());\r\n statement.setInt(2,category.getOrder());\r\n statement.setInt(3,category.getParent());\r\n return statement.executeUpdate();\r\n }\r\n catch(SQLException ex) {\r\n System.out.println(ex.getMessage());\r\n }\r\n finally{\r\n if(con!=null){\r\n con.close();\r\n }\r\n }\r\n return 0;\r\n }", "@Insert({\n \"insert into activity_signup (id, activity_id, \",\n \"user_id, create_time, \",\n \"create_by, name, \",\n \"age, head_img, grade, \",\n \"phone, address)\",\n \"values (#{id,jdbcType=INTEGER}, #{activityId,jdbcType=INTEGER}, \",\n \"#{userId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, \",\n \"#{createBy,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, \",\n \"#{age,jdbcType=INTEGER}, #{headImg,jdbcType=VARCHAR}, #{grade,jdbcType=VARCHAR}, \",\n \"#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR})\"\n })\n int insert(ActivitySignup record);", "@Insert({\n \"insert into ACTIVITY_SHOP (ACTIVITY_ID, SHOP_INFO_ID, \",\n \"CREATE_TIME)\",\n \"values (#{activityId,jdbcType=INTEGER}, #{shopInfoId,jdbcType=VARCHAR}, \",\n \"#{createTime,jdbcType=TIMESTAMP})\"\n })\n int insert(ActivityShop record);", "@Insert({\n \"insert into pms_product_info (product_name, description, \",\n \"catalog3_id, tm_id)\",\n \"values (#{productName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, \",\n \"#{catalog3Id,jdbcType=BIGINT}, #{tmId,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys=true,keyProperty=\"id\")\n int insert(ProductInfo record);", "@Insert\n long insert(SpeciesCategory speciesCategory);", "@Insert({\n \"insert into base_price_type (id, name, \",\n \"type, order_num, \",\n \"remark)\",\n \"values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, \",\n \"#{type,jdbcType=INTEGER}, #{orderNum,jdbcType=INTEGER}, \",\n \"#{remark,jdbcType=VARCHAR})\"\n })\n int insert(BasePriceType record);", "public void add(Contact contact) {\n String sql = \"insert into contact (name, email, address, telephone) values (?, ?, ?, ?)\";\n System.out.println(\"Nombreeeeeeee \" + contact.getName());\n jdbcTemplate.update(sql, contact.getName(), contact.getEmail(), contact.getAddress(), contact.getTelephone());\n\t}", "public void updateCustomer(Customer customer) throws SQLException;", "private void insertIntoSuperSighting(Sighting sighting){\n final String INSERT_INTO_SUPER_SIGHTING =\"INSERT INTO super_sighting(superId, sightingId) \"\n + \"VALUES(?,?)\";\n \n for(Superperson superperson: sighting.getSuperpersons()){\n jdbc.update(INSERT_INTO_SUPER_SIGHTING, superperson.getId(), sighting.getId());\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determine whether the post to the element is based on old information based on a "read" JSON attribute whose value is the date when the posting process originally read the element's data, and the "modified" JSON attribute whose value is the date when the posting process originally modified the element's data.
private boolean inConflictImpl( EmsScriptNode element, JSONObject elementJson, Date lastModified, String lastModString, boolean checkRead) { // TODO -- could check for which properties changed since the "read" // date to allow concurrent edits to different properties of the same // element. String readTime = null; try { readTime = elementJson.getString( checkRead ? Acm.JSON_READ : Acm.JSON_LAST_MODIFIED ); } catch ( JSONException e ) { return false; } if (Debug.isOn()) System.out.println( "%% %% %% time = " + readTime ); if ( readTime == null) { return false; } Date readDate = null; readDate = TimeUtils.dateFromTimestamp( readTime ); if (Debug.isOn()) System.out.println( "%% %% %% date = " + readDate ); if ( readDate != null ) { return readDate.compareTo( lastModified ) < 0; } Debug.error( "Bad date format or parse bug! lastModified = " + lastModified + ", date = " + readDate + ", elementJson=" + elementJson ); return readTime.compareTo( lastModString ) > 0; // FIXME? This sign should be reversed, right? }
[ "protected void fixReadTimeForConflict( EmsScriptNode element, JSONObject elementJson ) throws JSONException {\n\n if ( elementJson == null ) return;\n Date modTime = ( element == null ? null : element.getLastModified( null ) );\n\n Date now = new Date();\n if ( modTime == null || now.after( modTime ) ) {\n modTime = now;\n }\n String currentTime = EmsScriptNode.getIsoTime( modTime );\n if ( elementJson.has( Acm.JSON_READ) ) {\n elementJson.put( Acm.JSON_READ, currentTime );\n }\n if ( elementJson.has( Acm.JSON_LAST_MODIFIED ) ) {\n elementJson.put( Acm.JSON_LAST_MODIFIED, currentTime );\n }\n }", "public boolean isDataModified() {\r\n\t\tint stat = getPageDataStoresStatus();\r\n\r\n\t\tif (stat == DataStoreBuffer.STATUS_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW_MODIFIED)\r\n\t\t\treturn true;\r\n\t\telse if (stat == DataStoreBuffer.STATUS_NEW)\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "private boolean isChangedOdoReading(MaintenanceRequest po){\n\t\tboolean isDiff = false;\n\t\tOdometerReading odoReading = null;\n\t\t\n\t\tif(!MALUtilities.isEmpty(po.getCurrentOdo())){\n\t\t\todoReading = odometerService.getOdometerReading(po);\t\t\t\n\t\t\tif(MALUtilities.isEmpty(odoReading)){\n\t\t\t\tisDiff = true;\n\t\t\t} else {\n\t\t\t\tif(po.getCurrentOdo() != odoReading.getReading() || !po.getActualStartDate().equals(odoReading.getReadingDate())){\n\t\t\t\t\tisDiff = true;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isDiff;\n\t}", "public boolean isUpdateDateModified() {\n return updateDate_is_modified; \n }", "public boolean wasChanged() {\n if (lastChange != wFile.lastModified()) {\n this.lastChange = wFile.lastModified();\n return true;\n } else {\n return false;\n }\n }", "boolean isModified();", "public boolean isArraivaldateModified() {\n return arraivaldate_is_modified; \n }", "private boolean canUpdateReadMarker(MessageRow newMessageRow, MessageRow currentReadMarkerRow) {\n return (currentReadMarkerRow != null &&\n mAdapter.getPosition(newMessageRow) == mAdapter.getPosition(currentReadMarkerRow) + 1\n && newMessageRow.getEvent().getOriginServerTs() > currentReadMarkerRow.getEvent().originServerTs);\n }", "public boolean isDataStatusModified() {\n return dataStatus_is_modified; \n }", "public static boolean isNotModified(\n HttpServletRequest request, HttpServletResponse response, IdentifiableObject object) {\n String tag = IdentifiableObjectUtils.getLastUpdatedTag(object);\n\n response.setHeader(HEADER_ETAG, tag);\n\n String inputTag = request.getHeader(HEADER_IF_NONE_MATCH);\n\n if (object != null && inputTag != null && tag != null && inputTag.equals(tag)) {\n response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);\n\n return true;\n }\n\n return false;\n }", "public boolean isModified();", "@Test\n\tpublic void testNormalUpdateExpectNoChangeInLastStatusChangedOn() throws Exception {\n\t\tString createResourceContentReq = \"{\\\"request\\\": {\\\"content\\\": {\\\"name\\\": \\\"Test Resource Content\\\",\\\"code\\\": \\\"test.res.1\\\",\\\"mimeType\\\": \\\"application/pdf\\\",\\\"contentType\\\":\\\"Resource\\\"}}}\";\n\t\tString contentId = createContent(createResourceContentReq);\n\t\tResponse getResponse = getContent(contentId);\n\t\tString lastStatusChangedOn = (String) ((Map<String, Object>)getResponse.getResult().get(\"content\")).get(\"lastStatusChangedOn\");\n\t\tupdate(contentId);\n\n\t\tResponse getRespPostUpdate = getContent(contentId);\n\t\tString lastStatusChangedOnPostUpdate = (String) ((Map<String, Object>)getRespPostUpdate.getResult().get(\"content\")).get(\"lastStatusChangedOn\");\n\t\tassertEquals(lastStatusChangedOn,lastStatusChangedOnPostUpdate);\n\t}", "public boolean isModifiedCreateDate()\n\t{\n\t\treturn ((this.flagsMod & 0x1)!=0);\n\t}", "public boolean isModifiedAnnotations() {\n return modified.get(6);\n }", "public boolean lastUpdateKnown() {\n return lastUpdate != UNKNOWN_DATE;\n }", "public boolean wasDataUpdated() {\n\t\treturn true;\n\t}", "public boolean isLogdateModified() {\n return logdate_is_modified; \n }", "public boolean isModified () {\r\n \t\treturn modified;\r\n \t}", "private boolean isModified( File file ) {\r\n\t\tString dateFromClient = request.getHeaderFields().get( HeaderFields.IF_MODIFIED_SINCE );\r\n\t\tif ( dateFromClient == null )\r\n\t\t\treturn true;\r\n\t\t// Remove last three significant digits, because convert date from\r\n\t\t// String to long lose last three significant digits.\r\n\t\tlong lastModified = ( file.lastModified() / 1000L ) * 1000L;\r\n\t\ttry {\r\n\t\t\tDate clientDate = ( Date ) Utils.DATE_FORMATE.parse( dateFromClient );\r\n\t\t\treturn lastModified > clientDate.getTime();\r\n\t\t} catch ( Exception e ) {\r\n\t\t\t// If there is exception, assume file is modified\r\n\t\t}\r\n\t\treturn true;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieves a string representation of the ParamDescrs.
@Override public String toString() { return Native.paramDescrsToString(getContext().nCtx(), getNativeObject()); }
[ "java.lang.String getParams();", "protected String paramsToString() {\n if (params == null) {\n return \"\";\n } else if (algParams != null) {\n return algParams.toString();\n } else {\n return \", params unparsed\";\n }\n }", "public String getParamDesc() {\n return paramDesc;\n }", "public String getParameterDescription()\n {\n if (parameter == null)\n return \"\";\n else\n return this.parameter.getDescription();\n }", "public String toString() {\n\t\treturn this.getName() + m_parameterString;\n\t}", "@Override\n public String toString() {\n return paramName;\n }", "@JsonIgnore\r\n\tpublic String getParameterValuesAsString() {\r\n\t\tif (parameterValues == null || parameterValues.isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tStringBuffer buffer = new StringBuffer();\r\n\t\tIterator it = parameterValues.iterator();\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tString aValue = (String) it.next();\r\n\t\t\tbuffer.append(aValue);\r\n\t\t\tif (it.hasNext()) {\r\n\t\t\t\tbuffer.append(\";\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn buffer.toString();\r\n\t}", "public String getParametersString()\n {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[\");\n sb.append(\"name=\");\n sb.append(getName());\n sb.append(\",minPool=\");\n sb.append(getMinPool());\n sb.append(\",maxPool=\");\n sb.append(getMaxPool());\n sb.append(\",maxSize=\");\n sb.append(getMaxSize());\n sb.append(\",idleTimeout=\");\n sb.append(getIdleTimeout());\n sb.append(\"]\");\n return sb.toString();\n }", "public String describeParameters() {\n String description;\n\n description = \"generation: \" + generation + \"\\n\";\n description += \"replacementRate: \" + replacementRate + \"\\n\";\n description += \"crossoverRate: \" + crossoverRate + \"\\n\";\n if (scalingObject != null) {\n description += \"scalingObject: \" + scalingObject.toString() + \"\\n\";\n }\n else {\n description += \"No scalingObject\\n\";\n }\n description += \"selectionObject: \" + selectionObject.toString() + \"\\n\";\n return description;\n }", "@Override\n public String toString() {\n\tStringBuffer buf = new StringBuffer();\n\n\tbuf.append(pf.name).append(\"(\");\n\tfor (int i = 0; i < params.length; i++) {\n\t if (i > 0) {\n\t\tbuf.append(\", \");\n\t }\n\t buf.append(params[i]);\n\t}\n\tbuf.append(\")\");\n\n\treturn buf.toString();\n }", "public String getParameterDescription(int id)\n {\n return getParameter(id).getDescription();\n }", "public String getParameters() {\n if (parameters == null) {\n return null;\n }\n return new JSONObject(parameters).toString();\n }", "public String getParamAsString(String paramName);", "public String getParams()\n {\n if (this.params == null)\n {\n this.params = new JSONObject();\n }\n \n return this.params.toString();\n }", "public List getParameterValuesDescription() {\r\n\t\treturn parameterValuesDescription;\r\n\t}", "public String printRepNodeParams() {\n StringBuilder sb = new StringBuilder();\n\n for (Entry<RepNodeId, RepNodeParams> e : repNodeParams.entrySet()) {\n sb.append(\"\\n-- Parameters for \").append(e.getKey());\n sb.append(\" --\\n\");\n\n for (Parameter p : e.getValue().getMap()) {\n sb.append(p.getName()).append(\" = \");\n sb.append(p.asString()).append(\"\\n\");\n }\n }\n return sb.toString();\n }", "@Override\r\n public String toString() {\r\n return \"Parameter Code: \" + this.code + \"\\nDescription: \" + this.description + \"\\nCategory Description: \" + this.categoryDescription;\r\n }", "String getResponseParameters();", "public String paramsToString(String projectionName){\r\n\t\tGridDatatype grid = this.gridMap.get(projectionName);\r\n\t\t\r\n\t\treturn (grid == null) ? null : grid.getProjection().paramsToString();\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the color key and color chooser buttons
public JPanel addColorOptions () { String title = "Color Key"; JPanel modelPane = new JPanel(); modelPane.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createTitledBorder(title), BorderFactory.createEmptyBorder(5,5,5,5))); modelPane.setLayout(new GridLayout(3,2)); changeCauseColor = new JButton("Cause"); changeCauseColor.setBackground(Util.toColor(Util.CAUSES_COLOR)); changeCauseColor.setActionCommand(CHANGE_CAUSE_COLOR); changeCauseColor.setToolTipText("Change Cause Color"); changeCauseColor.addActionListener(this); changePreventColor = new JButton("Prevent"); changePreventColor.setBackground(Util.toColor(Util.PREVENTS_COLOR)); changePreventColor.setActionCommand(CHANGE_PREVENTS_COLOR); changePreventColor.setToolTipText("Change Prevent Color"); changePreventColor.addActionListener(this); changeAllowColor = new JButton("Allow"); changeAllowColor.setBackground(Util.toColor(Util.ALLOWS_COLOR)); changeAllowColor.setActionCommand(CHANGE_ALLOWS_COLOR); changeAllowColor.setToolTipText("Change Allow Color"); changeAllowColor.addActionListener(this); changeHelpColor = new JButton("Help"); changeHelpColor.setBackground(Util.toColor(Util.HELPS_COLOR)); changeHelpColor.setActionCommand(CHANGE_HELPS_COLOR); changeHelpColor.setToolTipText("Change Help Color"); changeHelpColor.addActionListener(this); changeDespiteColor = new JButton("Despite"); changeDespiteColor.setBackground(Util.toColor(Util.DESPITE_COLOR)); changeDespiteColor.setActionCommand(CHANGE_DESPITE_COLOR); changeDespiteColor.setToolTipText("Change Despite Color"); changeDespiteColor.addActionListener(this); changeInvalidColor = new JButton("Invalid"); changeInvalidColor.setBackground(Util.toColor(Util.INVALID_COLOR)); changeInvalidColor.setActionCommand(CHANGE_INVALID_COLOR); changeInvalidColor.setToolTipText("Change Invalid Color"); changeInvalidColor.addActionListener(this); modelPane.add(changeCauseColor); modelPane.add(changeAllowColor); modelPane.add(changePreventColor); modelPane.add(changeDespiteColor); modelPane.add(changeHelpColor); modelPane.add(changeInvalidColor); return modelPane; }
[ "public void createButtons() {\n // Loop through the colors hashmap for this palette\n for (String key : mColors.keySet()) {\n\n // Create the image button for each color.\n ImageButton newImageButton = new ImageButton(mContext);\n\n // Set the color of the ImageButton to be the one that the Colors\n // HashMap has defined.\n newImageButton.setBackgroundResource(R.drawable.color_button);\n\n // Divide by 4, one for each palette.\n double paletteWidth = Math.floor(buttonSize);\n // Divide by 7, one for each palette element (5), the directional\n // buttons (1) and the advanced buttons (1).\n double paletteHeight = Math.floor(buttonSize);\n\n // Give the ImageButton some parameters.\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n (int) paletteWidth, (int) paletteHeight);\n newImageButton.setLayoutParams(params);\n\n // Set a tag so we can identify this view if an event is fired.\n newImageButton.setTag(key);\n\n Drawable bgShape = newImageButton.getBackground();\n ((GradientDrawable) bgShape).setShape(GradientDrawable.OVAL);\n ((GradientDrawable) bgShape).setColor(mColors.get(key));\n\n // Calculate the stroke size based on the device being used.\n\n // If the key is the default color, highlight it, because this is\n // the current inital default selected color.\n if (mColors.get(key) == defaultColor) {\n\n ((GradientDrawable) bgShape).setStroke(mStrokeSize, 0xBBFFFFFF);\n ColorPalette.sLastTag = key;\n\n } else {\n ((GradientDrawable) bgShape).setStroke(mStrokeSize, 0x44FFFFFF);\n }\n\n bgShape.setBounds(0, 0, (int) paletteWidth, (int) paletteHeight);\n\n // Set the context's onClick() listener to each button.\n newImageButton.setOnClickListener(this);\n\n // Add the new image button to the list of palette image buttons.\n // Make sure to tag appropriately with the corresponding color hm\n // tag.\n mIbColors.put(key, newImageButton);\n }\n }", "private void createRgbHsbButtons() {\n \t\n Composite comp1 = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, false);\n gl.horizontalSpacing = 10;\n comp1.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n comp1.setLayoutData(gd);\n\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(comp1, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n \n Composite catComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 20;\n catComp.setLayout(gl);\n gd = new GridData(GridData.CENTER);\n gd.horizontalAlignment = SWT.CENTER;\n \n catComp.setLayoutData(gd);\n\n Label selCatLbl = new Label( catComp, SWT.None );\n selCatLbl.setText(\"Category\");\n \n final Combo selCmapCatCombo = new Combo( catComp, SWT.DROP_DOWN | SWT.READ_ONLY );\n selCmapCatCombo.setItems( availColorMapCats );\n selCmapCatCombo.select(0);\n \n selCmapCatCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCat = selCmapCatCombo.getText();\n \t\tif( seldCat.equals( seldCmapCat ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapCat = seldCat;\n \t\tseldCmapName = null;\n \t\tavailColorMaps.clear();\n \t\t\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n \t\n createSliderData();\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n Composite cmapComp = new Composite(comp1, SWT.NONE);\n gl = new GridLayout(1, false);\n gl.horizontalSpacing = 10;\n cmapComp.setLayout(gl);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n cmapComp.setLayoutData(gd);\n\n Label selCmapLbl = new Label( cmapComp, SWT.None );\n selCmapLbl.setText(\"Colormap\");\n \n selCmapCombo = new Combo( cmapComp, SWT.DROP_DOWN );\n selCmapCombo.setItems( availColorMaps.toArray(new String[0] ) );\n selCmapCombo.select(0);\n \n selCmapCombo.addSelectionListener( new SelectionAdapter() {\n \tpublic void widgetSelected(SelectionEvent event) {\n \t\tString seldCmap = selCmapCombo.getText();\n \t\tif( seldCmap.equals( seldCmapName ) ) {\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tseldCmapName = seldCmap;\n\n \t\tif( initColorMap() ) {\n createSliderData();\n \t\t}\n colorBar.setNewColorMap(sliderText, colorArray);\n \t}\n });\n \n// selCmapCombo.addModifyListener( new ModifyListener() {\n//\t\t\t@Override\n//\t\t\tpublic void modifyText(ModifyEvent e) { \n//\t\t\t\tseldCmapName = selCmapCombo.getText();\n//\t\t\t}\n// });\n }", "private void createRgbHsbButtons(Composite parent) {\n // Create a group to contain the RGB and HSB radio buttons.\n Group colorGroup = new Group(parent, SWT.NONE);\n colorGroup.setText(\" Use color model: \");\n\n RowLayout groupRowLayout = new RowLayout();\n groupRowLayout.marginLeft = 10;\n groupRowLayout.marginRight = 10;\n groupRowLayout.spacing = 10;\n colorGroup.setLayout(groupRowLayout);\n colorGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\n\n // Create the RGB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the RGB\n // sliders.\n rgbRdo = new Button(colorGroup, SWT.RADIO);\n rgbRdo.setText(\"RGB\");\n rgbRdo.setSelection(true);\n rgbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n\n // Create the HSB radio button. When the radio button is selected\n // update the upper and lower color wheel objects to display the HSB\n // sliders.\n hsbRdo = new Button(colorGroup, SWT.RADIO);\n hsbRdo.setText(\"HSB\");\n hsbRdo.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n changeColorWheels();\n }\n });\n }", "private void createButtons() {\n Button deafultButton = new Button(\"Use default keys\");\n addExtraButton(deafultButton, deafultButton.getText().length());\n deafultButton.setOnAction(e -> {\n GameEngine.setUpDefaultControlKeys();\n });\n }", "private void createColorControls() {\n // Create the color wheel.\n zoneColorWheel = new ColorWheelComp(shell, \"Color Control\", true);\n zoneColorWheel.showRgbSliders(false);\n\n // Create the Zone Group Color canvas.\n GridData gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);\n gd.widthHint = CANVAS_WIDTH;\n gd.heightHint = CANVAS_HEIGHT;\n colorMapCanvas = new Canvas(shell, SWT.DOUBLE_BUFFERED);\n colorMapCanvas.setLayoutData(gd);\n colorMapCanvas.addPaintListener(new PaintListener() {\n public void paintControl(PaintEvent e) {\n drawCanvas(e.gc);\n }\n });\n\n colorMapCanvas.addMouseMoveListener(this);\n colorMapCanvas.addMouseListener(this);\n\n // Create the Undo button.\n gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n undoBtn = new Button(shell, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(false);\n\n rgbArray.set(lastRGBIndex, lastRGB);\n\n colorMapCanvas.redraw();\n }\n });\n\n // Create the Revert button.\n gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n revertBtn = new Button(shell, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n rgbArray.clear();\n rgbArray.addAll(originalRgbArray);\n\n colorMapCanvas.redraw();\n }\n });\n }", "private JMenuItem buildColorChooser() {\n final JMenuItem chooseColor = new JMenuItem(\"Color...\");\n \n chooseColor.addActionListener(new ActionListener() {\n \n /**\n * Method for choosing the color.\n * @param theEvent a mouse-click.\n */\n @Override\n public void actionPerformed(final ActionEvent theEvent) { \n final Color result = JColorChooser.showDialog(null, \"Choose a new color\", \n myDrawingPanel.getColor());\n if (result != null) {\n chooseColor.setIcon(new ColorIcon(result)); \n myDrawingPanel.setColor(result);\n }\n }\n });\n \n chooseColor.setMnemonic(KeyEvent.VK_C);\n chooseColor.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, \n ActionEvent.ALT_MASK));\n chooseColor.setToolTipText(\"A menu for choosing the ink color of the tool.\");\n chooseColor.setIcon(new ColorIcon(Color.BLACK));\n \n return chooseColor;\n }", "private void createBottomButtons() {\n // Create a composite that will contain the control buttons.\n Composite bottonBtnComposite = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(3, true);\n gl.horizontalSpacing = 10;\n bottonBtnComposite.setLayout(gl);\n GridData gd = new GridData(GridData.FILL_HORIZONTAL);\n bottonBtnComposite.setLayoutData(gd);\n\n // Create the Interpolate button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n interpolateBtn = new Button(bottonBtnComposite, SWT.PUSH);\n interpolateBtn.setText(\"Interpolate\");\n interpolateBtn.setLayoutData(gd);\n interpolateBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorData upperColorData = upperColorWheel.getColorData();\n ColorData lowerColorData = lowerColorWheel.getColorData();\n\n colorBar.interpolate(upperColorData, lowerColorData, rgbRdo\n .getSelection());\n undoBtn.setEnabled(true);\n updateColorMap();\n }\n });\n\n // Create the Undo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n undoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n undoBtn.setText(\"Undo\");\n undoBtn.setEnabled(false);\n undoBtn.setLayoutData(gd);\n undoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n undoBtn.setEnabled(colorBar.undoColorBar());\n updateColorMap();\n redoBtn.setEnabled(true);\n }\n });\n\n // Create the Redo button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n redoBtn = new Button(bottonBtnComposite, SWT.PUSH);\n redoBtn.setText(\"Redo\");\n redoBtn.setEnabled(false);\n redoBtn.setLayoutData(gd);\n redoBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n redoBtn.setEnabled(colorBar.redoColorBar());\n updateColorMap();\n undoBtn.setEnabled(true);\n }\n });\n\n // Create the Revert button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n revertBtn = new Button(bottonBtnComposite, SWT.PUSH);\n revertBtn.setText(\"Revert\");\n revertBtn.setLayoutData(gd);\n revertBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n colorBar.revertColorBar();\n updateColorMap();\n undoBtn.setEnabled(false);\n redoBtn.setEnabled(false);\n }\n });\n\n // Create the Save button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n saveBtn = new Button(bottonBtnComposite, SWT.PUSH);\n saveBtn.setText(\"Save\");\n saveBtn.setLayoutData(gd);\n if( seldCmapName == null ) {\n saveBtn.setEnabled(false);\n }\n \n saveBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n ColorMap cm = (ColorMap) cmapParams.getColorMap();\n seldCmapName = selCmapCombo.getText();\n \n// int sepIndx = seldCmapName.indexOf(File.separator);\n// String cmapCat = seldCmapName.substring(0,seldCmapName.indexOf(File.separator));\n// String cmapName = seldCmapName.substring( seldCmapName.indexOf(File.separator));\n if (lockedCmaps != null && lockedCmaps.isLocked(seldCmapName)) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists and is locked.\\n\\n\" +\n \t\t\t\"You cannot overwrite it.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tconfirmDlg.open();\n \tcolorBar.undoColorBar();\n updateColorMap();\n \treturn;\n } \n else if( ColorMapUtil.colorMapExists( seldCmapCat, seldCmapName ) ) {\n \tMessageDialog confirmDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Save Colormap\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" already exists.\\n\\n\" +\n \t\t\t\"Do you want to overwrite it?\",\n \t\t\tMessageDialog.QUESTION, new String[]{\"Yes\", \"No\"}, 0);\n \tconfirmDlg.open();\n\n \tif( confirmDlg.getReturnCode() == MessageDialog.CANCEL ) {\n \t\treturn;\n \t}\n }\n\n try {\n ColorMapUtil.saveColorMap( cm, seldCmapCat, seldCmapName );\n \n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Colormap Saved\", null, \n \t\t\t\"Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\" Saved.\",\n \t\t\tMessageDialog.INFORMATION, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n } catch (VizException e) {\n MessageDialog msgDlg = new MessageDialog( \n \t\t\tNcDisplayMngr.getCaveShell(), \n \t\t\t\"Error\", null, \n \t\t\t\"Error Saving Colormap \" +seldCmapCat+File.separator +seldCmapName + \n \t\t\t\"\\n\"+e.getMessage(),\n \t\t\tMessageDialog.ERROR, new String[]{\"OK\"}, 0);\n \tmsgDlg.open();\n }\n\n completeSave();\n }\n });\n\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.FILL_HORIZONTAL);\n gd.grabExcessHorizontalSpace = false;\n deleteBtn = new Button(bottonBtnComposite, SWT.PUSH);\n deleteBtn.setText(\"Delete\");\n deleteBtn.setLayoutData(gd);\n deleteBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tdeleteColormap();\n }\n });\n Label sep = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\n gd = new GridData(GridData.FILL_HORIZONTAL);\n sep.setLayoutData(gd);\n\n // \n // Create the Delete button.\n gd = new GridData(GridData.HORIZONTAL_ALIGN_END);\n Button closeBtn = new Button(shell, SWT.PUSH);\n closeBtn.setText(\" Close \");\n closeBtn.setLayoutData(gd);\n closeBtn.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent event) {\n \tshell.dispose();\n }\n });\n }", "public void createButtons() {\n\t\tescapeBackground = new GRect(200, 150, 300, 400);\n\t\tescapeBackground.setFilled(true);\n\t\tescapeBackground.setColor(Color.gray);\n\n\t\tbutton1 = new GButton(\"Return to Game\", 250, 175, 200, 50, Color.cyan);\n\t\tbutton3 = new GButton(\"Exit Level\", 250, 330, 200, 50, Color.cyan);\n\t\tbutton4 = new GButton(\"Return to Menu\", 250, 475, 200, 50, Color.cyan);\n\n\t\tescapeButtons.add(button1);\n\t\tescapeButtons.add(button3);\n\t\tescapeButtons.add(button4);\n\n\t}", "void makeButtons(String key, String value1, String value2)\n { \n try\n {\n final RenderingHints.Key k \n = (RenderingHints.Key) RenderingHints.class.getField(key).get(null);\n final Object v1 = RenderingHints.class.getField(value1).get(null);\n final Object v2 = RenderingHints.class.getField(value2).get(null);\n JLabel label = new JLabel(key);\n\n buttonBox.add(label, new GBC(0, r).setAnchor(GBC.WEST)); \n ButtonGroup group = new ButtonGroup();\n JRadioButton b1 = new JRadioButton(value1, true);\n\n buttonBox.add(b1, new GBC(1, r).setAnchor(GBC.WEST)); \n group.add(b1);\n b1.addActionListener(new \n ActionListener()\n {\n public void actionPerformed(ActionEvent event)\n {\n hints.put(k, v1);\n canvas.setRenderingHints(hints);\n }\n });\n JRadioButton b2 = new JRadioButton(value2, false);\n\n buttonBox.add(b2, new GBC(2, r).setAnchor(GBC.WEST)); \n group.add(b2);\n b2.addActionListener(new \n ActionListener()\n {\n public void actionPerformed(ActionEvent event)\n {\n hints.put(k, v2);\n canvas.setRenderingHints(hints);\n }\n });\n hints.put(k, v1);\n r++;\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private JButton createColourButton(Color color) {\n //Create a JButton object and store it in a local var\n JButton jb = new JButton(\"\");\n\n //set JButton attributes\n jb.setPreferredSize(new Dimension(50, 30));\n jb.setBackground(color);\n jb.setFont(new Font(\"Calibri\", Font.BOLD, 14));\n jb.setFocusPainted(false);\n\n //add an action listener to the JButton\n jb.addActionListener(e -> {\n //if pen colour tool chosen\n if (line) {\n /*\n store change in VEC file and assign current pen\n colour with chosen colour\n */\n penColor = color;\n fileString += \"PEN \" + VDRTool.Canvas.getHex(color) + \"\\n\";\n line = false;\n\n } else {\n /*\n store change in VEC file and assign current fill\n colour with chosen colour\n */\n fillColor = color;\n fileString += \"FILL \" + VDRTool.Canvas.getHex(color) + \"\\n\";\n line = true;\n\n }\n });\n\n //Return the JButton object\n return jb;\n }", "private void createColorPicker() {\r\n\t\tLabel colorLabel = new Label(shapeConstants.color());\r\n\t\tcolorLabel.setStyleName(\"imageFragment-controlpanel-label\");\r\n\r\n\t\tcolorPicker = new ColorPicker();\r\n\t\ttry {\r\n\t\t\tcolorPicker.setRGB(shape.getColor().getR(), shape.getColor().getG(), \r\n\t\t\t\t\tshape.getColor().getB());\r\n\t\t} catch (Exception e) {}\r\n\t\tcolorPicker.addChangeHandler(new ChangeHandler() {\r\n\t\t\tpublic void onChange(ChangeEvent event) {\r\n\t\t\t\tshape.setColor(new Color(colorPicker.getHexColor()));\r\n\t\t\t\tredrawShape();\r\n\t\t\t\tDOM.setStyleAttribute(colorPreview.getElement(), \"backgroundColor\", \"#\" +\r\n\t\t\t\t\t\tcolorPicker.getHexColor());\r\n\t\t\t}\t\t\t\r\n\t\t});\r\n\t\r\n\t\tcolorPreview.setStyleName(\"imageFragment-controlpanel-color-preview\");\r\n\t\tDOM.setStyleAttribute(colorPreview.getElement(), \"backgroundColor\", \"#\" + \r\n\t\t\t\tcolorPicker.getHexColor());\r\n\t\t\r\n\t\tcolorPreview.addClickHandler(new ClickHandler() {\r\n\t\t\tpublic void onClick(ClickEvent event) {\r\n\t\t\t\tif(contentPanel.remove(colorPicker)==false)\r\n\t\t\t\t\tcontentPanel.add(colorPicker);\r\n\t\t\t}\t\t\t\r\n\t\t});\r\n\t\t\t\t\r\n\t\tcontentTable.setWidget(2,0,colorLabel);\r\n\t\tcontentTable.setWidget(2,1,colorPreview);\t\t\r\n\t}", "public colorSet()\n {\n ColorChoice = 1;\n setBackground(Color.white);\n GridBagLayout layout = new GridBagLayout();\n GridBagConstraints constraints = new GridBagConstraints();\n colorPanel.setLayout(layout);\n constraints.insets = new Insets (5, 5, 5, 5);\n constraints.fill = GridBagConstraints.BOTH;\n constraints.anchor = GridBagConstraints.SOUTHWEST;\n constraints.weightx = 0; constraints.weighty = 0;\n constraints.gridwidth = 1; constraints.gridheight = 1;\n //\n constraints.gridx = 1; constraints.gridy = 1;\n colorPanel.add(blackButton, constraints);\n //\n constraints.gridx = 2; constraints.gridy = 1;\n colorPanel.add(blueButton, constraints);\n blueButton.setLabel(\" Blue \");\n blueButton.setActionCommand(\"blue\");\n //\n constraints.gridx = 3; constraints.gridy = 1;\n colorPanel.add(cyanButton, constraints);\n //\n constraints.gridx = 4; constraints.gridy = 1;\n colorPanel.add(darkGrayButton, constraints);\n //\n constraints.gridx = 5; constraints.gridy = 1;\n colorPanel.add(grayButton, constraints);\n //\n constraints.gridx = 1; constraints.gridy = 2;\n colorPanel.add(greenButton, constraints);\n //\n constraints.gridx = 2; constraints.gridy = 2;\n colorPanel.add(lightGrayButton, constraints);\n //\n constraints.gridx = 3; constraints.gridy = 2;\n colorPanel.add(magentaButton, constraints);\n //\n constraints.gridx = 4; constraints.gridy = 2;\n colorPanel.add(orangeButton, constraints);\n //\n constraints.gridx = 5; constraints.gridy = 2;\n colorPanel.add(pinkButton, constraints);\n //\n constraints.gridx = 1; constraints.gridy = 3;\n colorPanel.add(redButton, constraints);\n //\n constraints.gridx = 2; constraints.gridy = 3;\n colorPanel.add(whiteButton, constraints);\n //\n constraints.gridx = 3; constraints.gridy = 3;\n colorPanel.add(yellowButton, constraints);\n }", "private ColorFrame()\n\t{\n\t\t// setSize(400, 300);\n\t\tsetTitle(\"Color Selection\");\n\t\tsetModal(true);\n\t\tsetLocation(300, 300);\n\t\tsetResizable(false);\n\t\tgetContentPane().add(jcc = new JColorChooser(), BorderLayout.CENTER);\n\n\t\tJButton jb = new JButton(\"Select Color\");\n\t\tjb.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tcolor = jcc.getColor();\n\t\t\t}\n\t\t});\n\t\tJButton jbc = new JButton(\"Cancel\");\n\t\tjbc.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\tcancel = true;\n\t\t\t}\n\t\t});\n\n\t\tJPanel bottom = new JPanel(new GridLayout(1,2));\n\t\tbottom.add(jb);\n\t\tbottom.add(jbc);\n\t\tgetContentPane().add(bottom, BorderLayout.SOUTH);\n\t\tpack();\n\t}", "void createDialogComponents(Color color) {\r\n GridBagConstraints constr = new GridBagConstraints();\r\n constr.gridwidth = 1;\r\n constr.gridheight = 4;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n\r\n constr.gridx = 0;\r\n constr.gridy = 0;\r\n\r\n // Create color wheel canvas\r\n colorCanvas = new ColorCanvas(50, color);\r\n add(colorCanvas, constr);\r\n\r\n // Create input boxes to enter values\r\n Font font = new Font(\"DialogInput\", Font.PLAIN, 10);\r\n redInput = new TextField(3);\r\n redInput.addFocusListener(this);\r\n redInput.setFont(font);\r\n greenInput = new TextField(3);\r\n greenInput.addFocusListener(this);\r\n greenInput.setFont(font);\r\n blueInput = new TextField(3);\r\n blueInput.addFocusListener(this);\r\n blueInput.setFont(font);\r\n\r\n // Add the input boxes and labels to the component\r\n Label label;\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.SOUTH;\r\n constr.insets = new Insets(0, 0, 0, 0);\r\n constr.gridx = 1;\r\n constr.gridy = 0;\r\n label = new Label(\"Red:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n label = new Label(\"Green:\", Label.RIGHT);\r\n add(label, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTH;\r\n label = new Label(\"Blue:\", Label.RIGHT);\r\n add(label, constr);\r\n\r\n constr.gridheight = 1;\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.SOUTHWEST;\r\n constr.insets = new Insets(0, 0, 0, 10);\r\n constr.gridx = 2;\r\n constr.gridy = 0;\r\n add(redInput, constr);\r\n constr.gridy = 1;\r\n constr.anchor = GridBagConstraints.WEST;\r\n add(greenInput, constr);\r\n constr.gridy = 2;\r\n constr.anchor = GridBagConstraints.NORTHWEST;\r\n add(blueInput, constr);\r\n\r\n // Add color swatches\r\n Panel panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 4, 4));\r\n oldSwatch = new ColorSwatch(false);\r\n oldSwatch.setForeground(color);\r\n panel.add(oldSwatch);\r\n newSwatch = new ColorSwatch(false);\r\n newSwatch.setForeground(color);\r\n panel.add(newSwatch);\r\n\r\n constr.fill = GridBagConstraints.HORIZONTAL;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 1;\r\n constr.gridy = 3;\r\n constr.gridwidth = 2;\r\n add(panel, constr);\r\n\r\n // Add buttons\r\n panel = new Panel();\r\n panel.setLayout(new GridLayout(1, 2, 10, 2));\r\n Font buttonFont = new Font(\"SansSerif\", Font.BOLD, 12);\r\n okButton = new Button(\"Ok\");\r\n okButton.setFont(buttonFont);\r\n okButton.addActionListener(this);\r\n cancelButton = new Button(\"Cancel\");\r\n cancelButton.addActionListener(this);\r\n cancelButton.setFont(buttonFont);\r\n panel.add(okButton);\r\n panel.add(cancelButton);\r\n\r\n constr.fill = GridBagConstraints.NONE;\r\n constr.anchor = GridBagConstraints.CENTER;\r\n constr.gridx = 0;\r\n constr.gridy = 4;\r\n constr.gridwidth = 3;\r\n add(panel, constr);\r\n }", "private void define_select_color(){\n\n TextView white_panel = (TextView) findViewById(R.id.palette_white);\n TextView black_panel = (TextView) findViewById(R.id.palette_black);\n TextView red_panel = (TextView) findViewById(R.id.palette_red);\n TextView blue_panel = (TextView) findViewById(R.id.palette_blue);\n\n white_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=WHITE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n black_panel.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n selected_color=BLACK;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n red_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = RED;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n blue_panel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selected_color = BLUE;\n canvasView.setPaintColor(getSelectedColor(selected_color));\n }\n });\n\n\n\n }", "public static void createButtons() {\n\t\tplayBtn = new PlayButton(BUTTON_COLOR);\n\t\tresetBtn = new ResetButton(BUTTON_COLOR);\n\t\tpauseBtn = new PauseButton(BUTTON_COLOR);\n\t\tjumpBtn = new JumpButton(BUTTON_COLOR);\n\t\tstepBtn = new StepButton(BUTTON_COLOR);\n\t\tfileBtn = new FileUploadButton(BUTTON_COLOR);\n\t\tspeedSlider = new SpeedSlider(MINSLIDERSPEED, MAXSLIDERSPEED, DEFAULTSLIDERSPEED);\n\t\tswitchBtn = new SwitchButton();\n\t\tswitchNeighborBtn = new SwitchNeighborButton();\n\t\tchartBtn = new ChartButton(BUTTON_COLOR);\n\t\tjumpField = new TextField();\n\t\t\n\t\ttitle = new Text();\n\t\tsetTitleAuthor();\n\t\tMainView.createDropDownMenu();\n\t\tMainView.getGroup().getChildren().addAll(playBtn, resetBtn, pauseBtn, jumpBtn, stepBtn, fileSelector, jumpField, title, speedSlider, fileBtn, switchNeighborBtn, chartBtn, switchBtn);\n\t}", "private void createButtons()\r\n {\n createPlayGameButton();\r\n // Instantiates the menu buttons I.e. scores button.\r\n createCheckScoresButton();\r\n // Instantiates the menu buttons I.e. help button.\r\n createHelpButton();\r\n // Instantiates the menu buttons I.e. credits button.\r\n createCreditsButton();\r\n // Instantiates the menu buttons I.e. quit button.\r\n createQuitButton();\r\n }", "private JButton createToolButton(String str, final int toolNum) {\n //Create a JButton object and store it in a local var\n JButton jb = new JButton(str);\n\n //add an action listener to the JButton object\n jb.addActionListener(this);\n\n //set JButton attributes\n jb.setPreferredSize(new Dimension(100, 30));\n jb.setBackground(null);\n jb.setFont(new Font(\"Calibri\", Font.BOLD, 14));\n jb.setFocusPainted(false);\n\n //add an action listener to the JButton\n jb.addActionListener(e -> {\n VDRTool.Canvas.setCurrentTool(toolNum);\n if (VDRTool.Canvas.getCurrentTool() == 11) {\n\n //create input colour variable\n Color chosenColour;\n\n //if pen colour tool chosen\n if (line) {\n //open colour picker window\n chosenColour = JColorChooser.showDialog(null, \"Choose a pen colour\", penColor);\n\n /*\n if a colour is chosen, store change in VEC file\n and assign current pen colour with chosen colour\n */\n if (chosenColour != null) {\n penColor = chosenColour;\n fileString += \"PEN \" + VDRTool.Canvas.getHex(penColor) + \"\\n\";\n line = false;\n }\n } else {\n /*\n if a colour is chosen, store change in VEC file\n and assign current fill colour with chosen colour\n */\n chosenColour = JColorChooser.showDialog(null, \"Choose fill colour\", fillColor);\n if (chosenColour != null) {\n fillColor = chosenColour;\n fileString += \"FILL \" + VDRTool.Canvas.getHex(fillColor) + \"\\n\";\n line = true;\n }\n }\n } else if (VDRTool.Canvas.getCurrentTool() == 12) {\n //empty fill colour if no fill tool chosen\n fillColor = null;\n }\n });\n\n //Return the JButton object\n return jb;\n }", "private void createColorPicker(Composite parent){\n\t\t pickColorButton = new Button(parent, SWT.WRAP);\n\t\t pickColorButton.setToolTipText(Messages.ColorDialog_pickerButtonTooltip);\n\t\t pickColorButton.setFont(buttonFont);\n\t\t pickColorButton.setAlignment(SWT.CENTER);\n\t\t GridData buttonData = new GridData();\n\t\t buttonData.widthHint = 50;\n\t\t buttonData.heightHint = 50;\n\t\t buttonData.verticalAlignment = SWT.CENTER;\n\t\t pickColorButton.setLayoutData(buttonData);\n\t\t pickColorButton.setText(\"\");\n\t\t pickColorButton.setImage(getPickerImage(24));\n\t\t //When the button is pressed the color picking thread is started,\n\t //the button is disabled and its content is changed to tell the user\n\t //how to stop the picking thread\n\t\t pickColorButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t @Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tisAcquiring = true;\n\t\t\t\tcolorPickerThread.setStop(false);\n\t\t\t\tDisplay.getCurrent().timerExec(TIMER_INTERVAL, colorPickerThread);\n pickColorButton.setImage(null);\n pickColorButton.setText(Messages.ColorDialog_stopPickingActionText);\n pickColorButton.setEnabled(false);\n pickColorButton.setLayoutData(new GridData(GridData.FILL_BOTH));\n pickColorButton.getParent().layout(true, true);\n // getShell().forceFocus();\n\t\t\t}\n\t\t });\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Act do whatever the EnemyC wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment.
public void act() { if(GameWorld.gamePaused == false) { move(); despawn(); if (go == true) { super.act(); } } }
[ "public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }", "public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }", "public void act() \n {\n fly();\n killBadGuys();\n }", "public void act() \n {\n projectileMove();\n tembak();\n tembak2();\n tembak3();\n tembak4();\n }", "public void act()\n { \n proceedGame();\n playMusic();\n showInstruction();\n }", "public void act() \n {\n if(isTouching(Player.class) )//&& alreadyAsked==false && alreadyOpened==false)\n {\n if(Greenfoot.isKeyDown(\"e\"))\n {\n //askPlayer();\n //alreadyAsked=true;\n advanceRound();\n }\n }\n //else if(!isTouching(Player.class))\n //alreadyAsked=false; \n\n //super.act();\n Map zombieMap = (Map) getWorld();\n if(Player.isAlive==false &&count==0)\n {\n gameOver.play();\n zombieMap.drawText(\"Game Over!\",zombieMap.getMaxX()/2-75,zombieMap.getMaxY()/2);\n if(Player.round!=1)\n zombieMap.drawText(\"You survived \"+Player.round+\" rounds\",zombieMap.getMaxX()/2-150,zombieMap.getMaxY()/2+50);\n else\n zombieMap.drawText(\"You survived \"+Player.round+\" round\",zombieMap.getMaxX()/2-150,zombieMap.getMaxY()/2+50);\n count++;\n }\n }", "@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }", "@Override\r\n\t\t\tpublic void act() {\n\t\t\t\tLoveHunterXX.game.setScreen(LoveHunterXX.ss);\r\n\t\t\t\tLoveHunterXX.ss.snake.play();\r\n\t\t\t}", "public void act() \n {\n // Add your action code here.\n \n }", "public void act()\n {\n time();\n score(0);\n if(time % 100 == 0)\n {\n addZombies(2);\n }\n }", "public void act() \n {\n setImage(gif.getCurrentImage());\n move(zombieSpeed);\n checkGameOver();\n setSpeed(-1);\n zombieHit(25, \"zombie_normal_dying.gif\", 800, 10); \n }", "public void act() \n {\n // Add your action code here.\n if (Greenfoot.mouseClicked(this))\n {\n getWorldOfType(G3World.class).appendProgramStep(command);\n }\n }", "public void act() \r\n {\r\n // If the unit can be built.\r\n if(canBuild){\r\n // And this button is clicked.\r\n if(Greenfoot.mouseClicked(this)){\r\n ((GameWorld) getWorld()).build(unitType);\r\n getWorld().getObjects(BotHud.class).get(0).closeBuild();\r\n }\r\n }\r\n }", "public void act() \n {\n // Add your action code here.\n press();\n\n }", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void act() {\r\n System.out.println(\"Acting!\");\r\n /*super.act();\r\n roundsToNextAction -= 1;\r\n if (roundsToNextAction <= 0){\r\n switchRotation();\r\n actUponDecision();\r\n think();\r\n }\r\n */\r\n physics();\r\n if (Greenfoot.getRandomNumber(3) == 2){\r\n move();\r\n }\r\n move();\r\n switchRotation();\r\n }", "public void act() \n {\n collision();\n }", "public void act() { \n check = borde(flag);\n if(check == true )\n restaura();\n moveRandom(move);\n if(animationE % 3 == 0){\n checkanimation();\n } \n animationE++; \n alive=checkfire();\n if(alive == true){\n enemyoff();\n } \n \n }", "public void act() \r\n {\r\n if(completed && isMouseClicked(true)==1)\r\n {\r\n speaker.sound.stop();\r\n levelBoard l=new levelBoard();\r\n l.stopSound();\r\n Greenfoot.setWorld(new Level(level));\r\n } \r\n if(!completed && isMouseClicked(false)==1)\r\n {\r\n JOptionPane.showMessageDialog(null, \"This level is locked.\", \"Crab World\", 1);\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handle 'Add Selected' courses button for batch add courses to elective courses list. Calls service object's addElectiveCourses() method and redirects back to Edit page. This can be invoked by form submission OR a link, therefore request method is GET.
@RequestMapping(value = "/staff/addelectivecourses/{id}", method = RequestMethod.GET) public ModelAndView addElectiveCourses(@PathVariable("id") Long programID, Long[] courseIDs) { ModelAndView modelAndView = new ModelAndView("staff/programedit"); try { programService.addElectiveCourses(programID, courseIDs); String infoMessage = "Elective courses updated successfully."; modelAndView.addObject("infoMessage", infoMessage); } catch (CustomServiceException ex) { modelAndView.addObject("errorMessage", ex.getErrorMsg()); } Program program = programService.getProgramById(programID); modelAndView.addObject("program", program); return modelAndView; }
[ "@RequestMapping(value = \"/staff/addcorecourses/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView addCoreCourses(@PathVariable(\"id\") Long programID, Long[] courseIDs) {\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/programedit\");\n\t\ttry {\n\t\t\tprogramService.addCoreCourses(programID, courseIDs);\n\t\t\tString infoMessage = \"Core courses updated successfully.\";\n\t\t\tmodelAndView.addObject(\"infoMessage\", infoMessage);\n\t\t} catch (CustomServiceException ex) {\n\t\t\tmodelAndView.addObject(\"errorMessage\", ex.getErrorMsg());\n\t\t}\n\t\tProgram program = programService.getProgramById(programID);\n\t\tmodelAndView.addObject(\"program\", program);\n\t\t\n\t\treturn modelAndView;\n\t}", "private void addCourse() {\n\n if(clientSession.isTeacherRole())\n return;\n\n LinkedTreeMap courseMap = (LinkedTreeMap) packet.getArgument(\"course\");\n\n Course course = Course.parse(courseMap);\n\n if(clientDatabase.addCourse(course)) {\n\n coursesList(true);\n\n } else {\n\n Packet addCourseErrorPacket = new PacketBuilder()\n .ofType(PacketType.ADDCOURSE.getError())\n .build();\n\n clientRepository.sendPacketIO(channel, addCourseErrorPacket);\n\n }\n\n }", "@RequestMapping(value = \"/staff/addcompulsorycourses/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView addCompulsoryCourses(@PathVariable(\"id\") Long majorID, Long[] courseIDs) {\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/majoredit\");\n\t\ttry {\n\t\t\tmajorService.addCompulsoryCourses(majorID, courseIDs);\n\t\t\tString infoMessage = \"Compulsory courses updated successfully.\";\n\t\t\tmodelAndView.addObject(\"infoMessage\", infoMessage);\n\t\t} catch (CustomServiceException ex) {\n\t\t\tmodelAndView.addObject(\"errorMessage\", ex.getErrorMsg());\n\t\t}\n\t\tMajor major = majorService.getMajorById(majorID);\n\t\tmodelAndView.addObject(\"major\", major);\n\t\tList<Program> programList = programService.getProgramsByStatus(true);\n\t\tmodelAndView.addObject(\"programList\", programList);\n\t\t\n\t\treturn modelAndView;\n\t}", "@POST\n @Path(\"/addCourse\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response addCourses(Course course) {\n try {\n System.out.println(\"hit admin add course Rest\");\n adminHandler.addCourses(course);\n return Response.status(201).entity(\"Course Added\").build();\n } catch(CourseAlreadyPresentInCatalogueException | SQLException ex){\n return Response.status(501).entity(ex.getMessage()).build();\n }\n\n }", "private void addNewCoursesOnClick(){\n dataSource.open();\n dataSource.createCourses(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString());\n dataSource.close();\n CoursesListElement courses = new CoursesListElement(editTextCourses.getText().toString(),editTextTeacher.getText().toString(),editTextWhen.getText().toString(),editTextWhere.getText().toString(),editTextGrading.getText().toString(),editTextOther.getText().toString(),0);\n listElements.add(courses);\n // setting list adapter\n listView.setAdapter(new ActionListAdapter(getActivity(),R.id.list_courses, listElements));\n newCourses.setVisibility(View.GONE);\n editTextCourses.setText(\"\");\n editTextTeacher.setText(\"\");\n editTextWhen.setText(\"\");\n editTextWhere.setText(\"\");\n editTextGrading.setText(\"\");\n editTextOther.setText(\"\");\n }", "private void addCourse() {\r\n\t\ttry {\r\n\t\t\tcheckValidation();\r\n\t\t\tconvertInputValues();\r\n\t\t\tNewCourseMethods newCourseMethods = new NewCourseMethods();\r\n\t\t\tnewCourseMethods.addNewCourse(binder, name, description, teacherName, courseCoverPhotoFile, duration, level, category, price, givesCertificate);\r\n\t\t}\r\n\t\tcatch (NewCourseException ex) {\r\n\t\t\tif (ex.getNewCourseTypeError() == NewCourseTypeError.VALIDATION_FAILED) {\r\n\t\t\t\tNotification notif = new Notification(\"Warning\", \"Correct the field(s) in red.\",\r\n\t\t\t\t\t Notification.TYPE_WARNING_MESSAGE);\r\n\t\t\t\tnotif.show(Page.getCurrent());\r\n\t\t\t\t\r\n\t\t\t\tlogger.log(java.util.logging.Level.SEVERE, \"Not all fields are filled in as expected! Validation failed!\");\r\n\t\t\t}\r\n\t\t\telse if (ex.getNewCourseTypeError() == NewCourseTypeError.DATABASE_FAIL) {\r\n\t\t\t\tNotification notif = new Notification(\"Warning\", \"Failed to save it to the database.\",\r\n\t\t\t\t\t Notification.TYPE_WARNING_MESSAGE);\r\n\t\t\t\tnotif.show(Page.getCurrent());\r\n\t\t\t\t\r\n\t\t\t\tlogger.log(java.util.logging.Level.SEVERE, \"Failed to add the course to the database!\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void addCourse() {\n\t\t// TODO Auto-generated method stub\n\t\t//// Exception related to existing course ID\n\t\ttry {\n\t\t\tlogger.info(\"In addCourse method\");\n\t\t\tCourse course = new Course();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tlogger.info(\"Enter Course Name\");\n\t\t\tcourse.setCourseName(sc.nextLine());\n\t\t\tlogger.info(\"Enter Course Id\");\n\t\t\tcourse.setCourseID(sc.nextInt());\n\t\t\tlogger.info(\"Enter Number of Credits\");\n\t\t\tcourse.setCredits(sc.nextInt());\n\t\t\tboolean res = adminDAO.addCourse(course);\n\t\t\tif(res==false)\n\t\t\t\tthrow new AdminCRSException(\"Failed to Add New Course\");\n\t\t\tlogger.info(\"====================================\");\n\t\t\tlogger.info(\"Add Course Status : \" + res);\n\t\t\tlogger.info(\"====================================\");\n\t\t} catch (AdminCRSException e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t}", "@RequestMapping(value = \"/staff/electivecourseslist/{id}\")\n\tpublic ModelAndView listElectiveCourses(@PathVariable(\"id\") Long programID,\t@RequestParam(required = false) Integer page, \n\t\t\t@RequestParam(required = false) Integer pageSize, HttpSession session) {\n\t\t\n\t\tPagedListHolder<Course> resultList = (PagedListHolder<Course>) session.getAttribute(\"StaffController_electiveCoursesList\");\n\t\t\n\t\tif ((page == null && pageSize == null) || resultList == null) {\t// first request (not page navigation) - get prerequisites from service\n\t\t\tpage = 0;\n\t\t\tresultList = new PagedListHolder<Course>(programService.getAvailableElectiveCourses(programID));\n\t\t\tsession.setAttribute(\"StaffController_electiveCoursesList\", resultList);\n\t\t\tif (pageSize == null) {\n\t\t\t\tpageSize = DEFAULT_PAGE_SIZE;\n\t\t\t}\n\t\t}\n\t\tif (page == null) {\n\t\t\tpage = 0;\n\t\t}\n\t\tresultList.setPage(page);\n\t\tif (pageSize != null) {\n\t\t\tresultList.setPageSize(pageSize);\n\t\t}\n\t\t\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/courseselectlist\", \"resultList\", resultList);\n\t\tmodelAndView.addObject(\"programID\", programID);\n\t\tmodelAndView.addObject(\"actionType\", \"addElectiveCourses\");\n\t\t\n\t\treturn modelAndView;\n\t}", "@RequestMapping(path=\"/addCourse\", method=RequestMethod.GET)\n\tpublic ModelAndView addNewCourse()\n\t{\n\t\t//return MAV to addCourse\n\t\treturn new ModelAndView(\"addCourse\", \"course\", new Course());\n\t}", "public void addNewCourse(View view) {\n Intent intent = new Intent (this, NewCourseActivity.class);\n intent.putExtra(\"courselist\", courseList);\n startActivity(intent);\n finish();\n }", "private void addCourseAction(JButton addCourseButton) {\n addCourseButton.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent actionEvent) {\n\n try {\n Course course = new Course(subjectTextField.getText(), courseNoTextField.getText(),\n sectionTextField.getText(), termTextField.getText());\n\n courseDAO.addCourseToSchedule(course, account);\n\n List courses = courseDAO.getRegistrationFromAccount(account);\n CourseTableModel model = new CourseTableModel(courses);\n scheduleTable.setModel(model);\n } catch (Exception e1) {\n JOptionPane.showMessageDialog(null, \"Error: \" + e1,\n \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n\n }\n });\n }", "@RequestMapping(value = \"/staff/removeelectivecourses/{id}\", method = RequestMethod.POST)\n\tpublic ModelAndView removeElectiveCourses(@PathVariable(\"id\") Long programID, Long[] courseIDs) {\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/programedit\");\n\t\ttry {\n\t\t\tprogramService.removeElectiveCourses(programID, courseIDs);\n\t\t\tString infoMessage = \"Elective courses updated successfully.\";\n\t\t\tmodelAndView.addObject(\"infoMessage\", infoMessage);\n\t\t} catch (CustomServiceException ex) {\n\t\t\tmodelAndView.addObject(\"errorMessage\", ex.getErrorMsg());\n\t\t}\n\t\tProgram program = programService.getProgramById(programID);\n\t\tmodelAndView.addObject(\"program\", program);\n\t\t\n\t\treturn modelAndView;\n\t}", "private ModelAndView addCourse() {\n ModelAndView model = new ModelAndView(\"admin/register-course\");\n\n model.addObject(\"course\", new Course());\n model.addObject(\"activities\", activityService.findAllOrderByName());\n model.addObject(\"teachers\", activityService.getActivityTeachersMap());\n return model;\n }", "@RequestMapping(value = \"/staff/addprerequisites/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView addPrerequisites(@PathVariable(\"id\") Long courseID, Long[] courseIDs) {\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/courseedit\");\n\t\ttry {\n\t\t\tcourseService.addPrerequisites(courseID, courseIDs);\n\t\t\tString infoMessage = \"Course prerequisites updated successfully.\";\n\t\t\tmodelAndView.addObject(\"infoMessage\", infoMessage);\n\t\t} catch (CustomServiceException ex) {\n\t\t\tmodelAndView.addObject(\"errorMessage\", ex.getErrorMsg());\n\t\t}\n\t\tCourse course = courseService.getCourseById(courseID);\n\t\tmodelAndView.addObject(\"course\", course);\n\t\t\n\t\treturn modelAndView;\n\t}", "private void addSavedCourseToACL() {\n System.out.println(\"(note that selecting a saved course will extract it and it will need to be saved again)\\n\");\n int numSavedCourses = courseList.getCourseList().size();\n if (numSavedCourses == 0) {\n System.out.println(\"There are no saved courses at the moment\");\n return;\n }\n System.out.println(\"The current saved courses are \\n\");\n printSavedCoursesNames();\n System.out.println(\"Select which one you want to add (select number) \");\n int courseSelected = obtainIntSafely(1, numSavedCourses,\n \"Please choose the number next to a course\");\n\n activeCourseList.add(courseList.getCourseList().get(courseSelected - 1));\n courseList.removeCourseFromList(courseSelected - 1);\n System.out.println(\"Added!\");\n }", "public static ArrayList<Course> addCourses() {\n System.out.println(\"\\nAdd a course!\");\n do {\n listOfCourses.add(createCourse());\n System.out.print(\"\\n Would you like to add a new course?(yes or no): \");\n boolean yesOrNo = yesOrNoValidation();\n if (yesOrNo) {\n } else if (!yesOrNo) {\n break;\n }\n } while (true);\n return listOfCourses;\n }", "@GetMapping(\"/admin/courses/course\")\n public ModelAndView processCourse(@RequestParam(value = \"id\", required = false) Integer id) {\n return (null == id) ? addCourse() : getCourse(id);\n }", "@Override\r\n\tpublic void addSchoolSelected(String ecoleId) {\r\n\t\tif (ecoleId.equals(\"\")){\r\n\t\t\tWindow.alert(\"Veuillez choisir l'école.\");\r\n\t\t}\r\n\t\t\r\n\t\tCoursRequestFactory rf = GWT.create(CoursRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tCoursRequestContext rc = rf.coursRequest();\r\n\t\trc.listAll(ecoleId).fire(new Receiver<List<CoursProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<CoursProxy> response) {\r\n\t\t\t\tgetView().setCourseAddList(response);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void addCourse(FutureCourse c) throws Exception{\n for (FutureCourse course: selectedCourses){\n if ((course.getCourse()+course.getNumber()).equals(c.getCourse()+c.getNumber()))\n throw new Exception(\"Duplicate Course \" + course.getCourse() +\"-\"+ course.getNumber());\n if (!course.getTerm().equals(c.getTerm()))\n throw new Exception(\"Selected courses occur in different terms.\");\n if (course.hasTimeConflict(c))\n throw new Exception(\"Current Selected Course \" + c.toString() +\"\\nhas time conflict with \"+\n course.toString());\n }\n selectedCourses.add(c);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Saves this calibration to a file of given name.
public void save(String pName) { CalibrationData lCalibrationData = new CalibrationData(mLightSheetMicroscope); lCalibrationData.copyFrom(mLightSheetMicroscope); lCalibrationData.copyFrom(mPositionersMap); lCalibrationData.saveTo(getFile(pName)); }
[ "public void save()\n {\n save(mCalibrationDataName.get());\n }", "public void save() {\r\n\t\t\r\n\t\tJFileChooser fileChooser = new JFileChooser(\"C:\\\\Users\\\\fevri\\\\Desktop\\\\University\\\\Java\\\\Save Files\"); // file chooser will open to the specified directory\r\n\t\tint status = fileChooser.showSaveDialog(null); // open the save dialog allowing the user to give the file a name and directory\r\n\t\tif (status == JFileChooser.APPROVE_OPTION) { \r\n\t\t\ttry (FileWriter fw = new FileWriter(fileChooser.getSelectedFile())) { // try to create a FileWriter object with the user's file being the designated file for the FileWriter\r\n\t\t\t\tfw.write(this.buildingSpec); // write the building's spec to the file\r\n\t\t\t\tfw.close(); // close the file\r\n\t\t\t} catch (Exception ex) { // if an exception happens\r\n\t\t\t\tex.printStackTrace(); // print the exception stack\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public final void saveToFile() {\n\t\tWrite.midi(getScore(), getName()+\".mid\"); \n\t}", "protected static void save(String fileName) {\n\t\tif (curMIDI != null) {\n\t\t\ttry {\n\t\t\t\tMidiSystem.write(curMIDI, 1, new File(fileName));\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Could not save file\");\n\t\t\t}\n\t\t}\n\t}", "private void saveAs(){\n\t\tString fileName = JOptionPane.showInputDialog(this, \"Save as:\");\n\t\tif(fileName != null){\n\t\t\tif(fileName.contains(\".\") || fileName.contains(\"\\\\\") || fileName.equals(\"\"))\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Error: Invalid file name\", \"Whoops!\", JOptionPane.ERROR_MESSAGE);\n\t\t\telse{\n\t\t\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\") + \"/\");\t\t//Only allow the user to select directories to place the file in\n\t\t\t\tfileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\t\t\tint result = fileChooser.showOpenDialog(null);\n\t\t\t\tif(result == JFileChooser.APPROVE_OPTION){\n\t\t\t\t\tFile dir = fileChooser.getSelectedFile();\n\t\t\t\t\tcurrPathway = dir.getAbsolutePath() + \"/\" + fileName + \".bracket\";\t\t//Write the file with the .bracket extension\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmodel.writeFile(new File(currPathway));\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(this, \"An error has occured, the file has not been saved\", \"Whoops!\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void saveGame(Puzzle puzzle, String name) throws IOException {\n FileWriter wr;\n File file = new File(System.getenv(\"APPDATA\")+\"\\\\SudokuGR04\\\\\" + name + \".txt\");\n wr = new FileWriter(file);\n puzzle.setName(name);\n try {\n //generate File in dir SudokuGR04\n wr.write(puzzle.export());\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n wr.close();\n }\n }", "private void SaveToFile(){\n\t\ttry {\n\t\t\tFile file=new File(\"data/\"+stage+\".kml\");\n\t\t\tPrintWriter pw=new PrintWriter(file);\n\t\t\tpw.write(str.toString());\n\t\t\tpw.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void autoSave(){\n\t\ttry {\n\t\t\t//read in file\n\t\t\tFile file = new File(System.getProperty(\"user.dir\")+\"/Default.scalcsave\");\n\t\t\tObjectOutputStream output = new ObjectOutputStream(new FileOutputStream(file));\n\t\t\toutput.writeObject(SaveFile.getSaveFile());\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Save Success\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected void saveAs() {\n\t\tJFileChooser fc = new JFileChooser();\n\t\tfc.setDialogTitle(\"Save document\");\n\t\tif (fc.showSaveDialog(this) != JFileChooser.APPROVE_OPTION) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Nothing was saved\",\n\t\t\t\t\t\"Info message\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\tPath file = fc.getSelectedFile().toPath();\n\t\tif (!file.toString().endsWith(\".jvd\")) {\n\t\t\tJOptionPane.showMessageDialog(this, \"File format must be \\\".jvd\\\"\",\n\t\t\t\t\t\"Invalid format\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\tif (Files.exists(file)) {\n\t\t\tint r = JOptionPane.showConfirmDialog(this, \"File \" + file\n\t\t\t\t\t+ \" already exists. Do you want to overwrite it?\",\n\t\t\t\t\t\"Warning\", JOptionPane.YES_NO_OPTION,\n\t\t\t\t\tJOptionPane.QUESTION_MESSAGE);\n\t\t\tif (r != JOptionPane.YES_OPTION) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcurrentModel = file;\n\t\tString text = makeFile();\n\t\ttry {\n\t\t\tFiles.write(file, text.getBytes(StandardCharsets.UTF_8));\n\t\t} catch (IOException e1) {\n\t\t\tJOptionPane\n\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\tthis,\n\t\t\t\t\t\t\t\"Error while attempting to create file: \"\n\t\t\t\t\t\t\t\t\t+ e1.getMessage(), \"Error\",\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\tstateChanged = false;\n\n\t}", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void SaveChanges(String name){\n createSaveFile();\r\n String s = null;\r\n try{\r\n inTxtFile = new Scanner(new FileInputStream(name));\r\n }catch (FileNotFoundException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n while(inTxtFile.hasNext()) {\r\n s = inTxtFile.next();\r\n s = reduceSign2(s);\r\n s = s.toLowerCase();\r\n p.write(s + \" \");\r\n }\r\n inTxtFile.close();\r\n p.close();\r\n }", "public void saveAsFile(String path)\n {\n call(\"SaveAsFile\", path);\n }", "private void saveToFile(){\n this.currentMarkovChain.setMarkovName(this.txtMarkovChainName.getText());\n saveMarkovToCSVFileInformation();\n \n //Save to file\n Result result = DigPopGUIUtilityClass.saveDigPopGUIInformationSaveFile(\n this.digPopGUIInformation,\n this.digPopGUIInformation.getFilePath());\n }", "private void saveAs()\t{\n\t\tJFileChooser d = new JFileChooser();\n\t\tint ret = d.showSaveDialog(null);\n\t\tif (ret == JFileChooser.APPROVE_OPTION) {\n\t\t\tcanvas.saveCanvasAs(d.getSelectedFile().getAbsolutePath());\n\t\t}\n\t}", "public void savePose(String name, List<ServoControl> servos) throws IOException {\n File poseDirectory = new File(posesDirectory);\r\n if (!poseDirectory.exists()) {\r\n poseDirectory.mkdirs();\r\n }\r\n\r\n log.info(\"Saving pose name {}\", name);\r\n Pose p = new Pose(name, servos);\r\n // p.save()\r\n String filename = poseDirectory.getAbsolutePath() + File.separator + name + \".pose\";\r\n p.savePose(filename);\r\n }", "public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }", "public void saveFile()\n {\n try {\n bjEditor.save();\n }\n catch (IOException ioe) {}\n }", "public void saveTo(PApplet applet, String filename, boolean isCamera) {\n ProjectiveDeviceCalibration calib = new ProjectiveDeviceCalibration();\n calib.setWidth(this.w);\n calib.setHeight(this.h);\n calib.setIntrinsics(intrinsics);\n calib.isCamera(isCamera);\n if (this.hasExtrinsics()) {\n calib.setExtrinsics(extrinsics);\n }\n calib.saveTo(applet, filename);\n }", "public void save(String fileName) {\r\n\t\twhile (!calc.isDone()) {\r\n\t\t\ttry { Thread.sleep(1000); }\r\n\t\t\tcatch (InterruptedException ex) {System.out.println(\"eh? interrupted geh\");}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tImageIO.write(fractal,\"jpg\",new File(fileName+\".jpg\"));\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tSystem.out.println(\"image io probs in fractal save() : \");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//setVisible(false);\r\n\t\t//try {dispose(); this.finalize();}\r\n\t\t//catch (Throwable e) {e.printStackTrace();}\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds and returns pathway crossreference
public PathwayXref addPathwayXRef(PathwayXref xref) throws IllegalArgumentException { if (xref == null) { throw new IllegalArgumentException("'xref' must not be null"); } if (pathwayXRefs == null) { pathwayXRefs = new HashSet<PathwayXref>(); } pathwayXRefs.add(xref); xref.addEntry(this); return xref; }
[ "org.hl7.fhir.String addNewReference();", "x0101.oecdStandardAuditFileTaxPT1.ReferencesDocument.References addNewReferences();", "public int addCrossRef(CrossRef crossref) throws AlreadyExistsException,ChangeVetoException {\n \n if (this.crossrefs.contains(crossref)) throw new AlreadyExistsException(\"Cross reference has already been made\");\n \n int index = this.crossrefs.size();\n \n if(!this.hasListeners(BioEntry.CROSSREF)) {\n \n this.crossrefs.ensureCapacity(index+1);\n \n this.crossrefs.add(crossref);\n \n } else {\n \n ChangeEvent ce = new ChangeEvent(\n \n this,\n \n BioEntry.CROSSREF,\n \n crossref,\n \n this.crossrefs.contains(crossref)?crossref:null\n \n );\n \n ChangeSupport cs = this.getChangeSupport(BioEntry.CROSSREF);\n \n synchronized(cs) {\n \n cs.firePreChangeEvent(ce);\n \n this.crossrefs.ensureCapacity(index+1);\n \n this.crossrefs.add(crossref);\n \n cs.firePostChangeEvent(ce);\n \n }\n \n }\n \n return index;\n \n }", "Reference createReference();", "org.hl7.fhir.DocumentReference addNewDocumentReference();", "public void addReference() {\r\n mReferenced = true;\r\n }", "private static void createCrossReferenceSection(String path,LODEParser lodeParser, Configuration c, Properties lang){\n String crossRef = \"<html>\"+Constants.getCrossReferenceSectionTitleAndPlaceHolder(c, lang);\n String classesList = lodeParser.getClassList(),propList = lodeParser.getPropertyList(), dataPropList = lodeParser.getDataPropList(),\n annotationPropList = lodeParser.getAnnotationPropList(), namedIndividualList = lodeParser.getNamedIndividualList();\n if(classesList!=null && !\"\".equals(classesList)){\n crossRef += lodeParser.getClasses();\n }\n if(propList!=null && !\"\".equals(propList)){\n crossRef += lodeParser.getProperties();\n }\n if(dataPropList!=null && !\"\".equals(dataPropList)){\n crossRef += lodeParser.getDataProp();\n }\n if(c.isIncludeAnnotationProperties() && annotationPropList!=null && !\"\".equals(annotationPropList)){\n crossRef += lodeParser.getAnnotationProp();\n }\n if(c.isIncludeNamedIndividuals() && namedIndividualList!=null && !\"\".equals(namedIndividualList)){\n crossRef += lodeParser.getNamedIndividuals();\n }\n //add legend\n crossRef+=Constants.getLegend(lang)+\"\\n</html>\\n\";\n saveDocument(path+File.separator+\"crossref-\"+c.getCurrentLanguage()+\".html\", crossRef,c);\n }", "public void addReference(Reference ref) {\n references.addElement(ref);\n }", "public net.opengis.gml.x32.ClothoidType.RefLocation addNewRefLocation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n net.opengis.gml.x32.ClothoidType.RefLocation target = null;\n target = (net.opengis.gml.x32.ClothoidType.RefLocation)get_store().add_element_user(REFLOCATION$0);\n return target;\n }\n }", "ReferenceLink createReferenceLink();", "public org.purl.dc.elements.x11.SimpleLiteral addNewReferences()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.purl.dc.elements.x11.SimpleLiteral target = null;\r\n target = (org.purl.dc.elements.x11.SimpleLiteral)get_store().add_element_user(REFERENCES$0);\r\n return target;\r\n }\r\n }", "public void addRef(String word) {\n addRef(word.toCharArray()); }", "public de.uni_koblenz.jgralabtest.schemas.citymap.Way add_to(de.uni_koblenz.jgralabtest.schemas.citymap.Junction vertex);", "public Path getChild(\n Path crossReference\n ) {\n return new Path(\n \tthis,\n \tcrossReference\n );\n }", "void establishReference(long reference_id);", "private void addReferences() throws BuildException {\n Hashtable thisReferences\n = (Hashtable) getProject().getReferences().clone();\n Hashtable newReferences = newProject.getReferences();\n Enumeration e;\n if (references.size() > 0) {\n for (e = references.elements(); e.hasMoreElements();) {\n Reference ref = (Reference) e.nextElement();\n String refid = ref.getRefId();\n if (refid == null) {\n throw new BuildException(\"the refid attribute is required\"\n + \" for reference elements\");\n }\n if (!thisReferences.containsKey(refid)) {\n log(\"Parent project doesn't contain any reference '\"\n + refid + \"'\",\n Project.MSG_WARN);\n continue;\n }\n \n thisReferences.remove(refid);\n String toRefid = ref.getToRefid();\n if (toRefid == null) {\n toRefid = refid;\n }\n copyReference(refid, toRefid);\n }\n }\n \n // Now add all references that are not defined in the\n // subproject, if inheritRefs is true\n if (inheritRefs) {\n for (e = thisReferences.keys(); e.hasMoreElements();) {\n String key = (String) e.nextElement();\n if (newReferences.containsKey(key)) {\n continue;\n }\n copyReference(key, key);\n }\n }\n }", "ReferenceProperty createReferenceProperty();", "x0101.oecdStandardAuditFileTaxPT1.OrderReferencesDocument.OrderReferences addNewOrderReferences();", "org.landxml.schema.landXML11.RoadsideDocument.Roadside addNewRoadside();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }