blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
sequencelengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
sequencelengths
1
1
author_id
stringlengths
0
313
1f3046e5a659c50a8dee44ec5802b097987f9732
a158b0fe3aa5017af38608aacea9db6dcf07c0de
/Algorithm/src/atin84/dovelet/stairs3/ArithSeq.java
47b77420be307cea190c09e02239c75880609ddf
[]
no_license
atin84/starsign
3e3133e1f708774d2c070ce79f647e5a27b083de
3213a115876a364e78762db34b04adbb46ffdf1b
refs/heads/master
2016-08-07T02:01:21.340582
2014-09-17T04:48:27
2014-09-17T04:48:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
548
java
package atin84.dovelet.stairs3; import java.util.Scanner; /** * arith_seq * http://183.106.113.109/30stair/arith_seq/arith_seq.php?pname=arith_seq * @author atin84 * */ public class ArithSeq { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int k1 = sc.nextInt(); int k2 = sc.nextInt(); int k3 = sc.nextInt(); if((k3 - k1)% k2 != 0) { System.out.println("X"); } else { int result = 1; result += (k3 - k1) / k2; System.out.println(result); } } }
55795c83dde7a2155f6fa736b2a0fddd6071c798
2a80b4010ce81967b7e491575feb172f28026da6
/src/main/java/org/lineageos/eleven/ui/activities/SlidingPanelActivity.java
c68197459ccec2503bd1c14a4db4f769d6661f84
[ "Apache-2.0" ]
permissive
Forsakenrox/Eleven
c71d19456c0e47390d97a428a0241a8c89ac5448
caaa205054e9e510856244d80eb4f4bbf9b36a4c
refs/heads/master
2020-04-13T03:12:46.332070
2019-01-08T19:46:12
2019-01-08T19:46:12
162,925,078
0
0
null
null
null
null
UTF-8
Java
false
false
10,684
java
/* * Copyright (C) 2012 Andrew Neal * Copyright (C) 2014 The CyanogenMod Project * Licensed under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law * or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ package org.lineageos.eleven.ui.activities; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.view.ViewPager; import android.view.View; import android.widget.LinearLayout; import org.lineageos.eleven.R; import org.lineageos.eleven.slidinguppanel.SlidingUpPanelLayout; import org.lineageos.eleven.slidinguppanel.SlidingUpPanelLayout.SimplePanelSlideListener; import org.lineageos.eleven.ui.HeaderBar; import org.lineageos.eleven.ui.fragments.AudioPlayerFragment; import org.lineageos.eleven.ui.fragments.QueueFragment; import org.lineageos.eleven.utils.ElevenUtils; import org.lineageos.eleven.utils.MusicUtils; import org.lineageos.eleven.widgets.BlurScrimImage; /** * This class is used to display the {@link ViewPager} used to swipe between the * main {@link Fragment}s used to browse the user's music. * * @author Andrew Neal ([email protected]) */ public abstract class SlidingPanelActivity extends BaseActivity { public enum Panel { Browse, MusicPlayer, Queue, None, } private static final String STATE_KEY_CURRENT_PANEL = "CurrentPanel"; private SlidingUpPanelLayout mFirstPanel; private SlidingUpPanelLayout mSecondPanel; protected Panel mTargetNavigatePanel; private final ShowPanelClickListener mShowBrowse = new ShowPanelClickListener(Panel.Browse); private final ShowPanelClickListener mShowMusicPlayer = new ShowPanelClickListener(Panel.MusicPlayer); // this is the blurred image that goes behind the now playing and queue fragments private BlurScrimImage mBlurScrimImage; /** * Opens the now playing screen */ private final View.OnClickListener mOpenNowPlaying = new View.OnClickListener() { /** * {@inheritDoc} */ @Override public void onClick(final View v) { if (MusicUtils.getCurrentAudioId() != -1) { openAudioPlayer(); } else { MusicUtils.shuffleAll(SlidingPanelActivity.this); } } }; @Override protected void initBottomActionBar() { super.initBottomActionBar(); // Bottom action bar final LinearLayout bottomActionBar = (LinearLayout)findViewById(R.id.bottom_action_bar); // Display the now playing screen or shuffle if this isn't anything // playing bottomActionBar.setOnClickListener(mOpenNowPlaying); } /** * {@inheritDoc} */ @Override protected void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); mTargetNavigatePanel = Panel.None; setupFirstPanel(); setupSecondPanel(); // get the blur scrim image mBlurScrimImage = (BlurScrimImage)findViewById(R.id.blurScrimImage); if (savedInstanceState != null) { int panelIndex = savedInstanceState.getInt(STATE_KEY_CURRENT_PANEL, Panel.Browse.ordinal()); Panel targetPanel = Panel.values()[panelIndex]; showPanel(targetPanel); mTargetNavigatePanel = Panel.None; if (targetPanel == Panel.Queue) { mFirstPanel.setSlidingEnabled(false); } } } @Override protected void onSaveInstanceState(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(STATE_KEY_CURRENT_PANEL, getCurrentPanel().ordinal()); } private void setupFirstPanel() { mFirstPanel = (SlidingUpPanelLayout)findViewById(R.id.sliding_layout); mFirstPanel.setPanelSlideListener(new SimplePanelSlideListener() { @Override public void onPanelSlide(View panel, float slideOffset) { onSlide(slideOffset); } @Override public void onPanelExpanded(View panel) { checkTargetNavigation(); } @Override public void onPanelCollapsed(View panel) { checkTargetNavigation(); } }); } private void setupSecondPanel() { mSecondPanel = (SlidingUpPanelLayout)findViewById(R.id.sliding_layout2); mSecondPanel.setPanelSlideListener(new SimplePanelSlideListener() { @Override public void onPanelSlide(View panel, float slideOffset) { // if we are not going to a specific panel, then disable sliding to prevent // the two sliding panels from fighting for touch input if (mTargetNavigatePanel == Panel.None) { mFirstPanel.setSlidingEnabled(false); } onSlide(slideOffset); } @Override public void onPanelExpanded(View panel) { checkTargetNavigation(); } @Override public void onPanelCollapsed(View panel) { // re-enable sliding when the second panel is collapsed mFirstPanel.setSlidingEnabled(true); checkTargetNavigation(); } }); // setup the header bar setupHeaderBar(R.id.secondHeaderBar, R.string.page_play_queue, mShowMusicPlayer); // set the drag view offset to allow the panel to go past the top of the viewport // since the previous view's is hiding the slide offset, we need to subtract that // from action bat height int slideOffset = getResources().getDimensionPixelOffset(R.dimen.sliding_panel_indicator_height); slideOffset -= ElevenUtils.getActionBarHeight(this); mSecondPanel.setSlidePanelOffset(slideOffset); } @Override protected void onPause() { super.onPause(); } /** * {@inheritDoc} */ @Override public int setContentView() { return R.layout.activity_base; } @Override public void onBackPressed() { Panel panel = getCurrentPanel(); switch (panel) { case Browse: super.onBackPressed(); break; default: case MusicPlayer: showPanel(Panel.Browse); break; case Queue: showPanel(Panel.MusicPlayer); break; } } public void openAudioPlayer() { showPanel(Panel.MusicPlayer); } public void showPanel(Panel panel) { // if we are already at our target panel, then don't do anything if (panel == getCurrentPanel()) { return; } // TODO: Add ability to do this instantaneously as opposed to animate switch (panel) { case Browse: // if we are two panels over, we need special logic to jump twice mTargetNavigatePanel = panel; mSecondPanel.collapsePanel(); // re-enable sliding on first panel so we can collapse it mFirstPanel.setSlidingEnabled(true); mFirstPanel.collapsePanel(); break; case MusicPlayer: mSecondPanel.collapsePanel(); mFirstPanel.expandPanel(); break; case Queue: // if we are two panels over, we need special logic to jump twice mTargetNavigatePanel = panel; mSecondPanel.expandPanel(); mFirstPanel.expandPanel(); break; case None: break; default: break; } } protected void onSlide(float slideOffset) { } /** * This checks if we are at our target panel and resets our flag if we are there */ protected void checkTargetNavigation() { if (mTargetNavigatePanel == getCurrentPanel()) { mTargetNavigatePanel = Panel.None; } getAudioPlayerFragment().setVisualizerVisible(getCurrentPanel() == Panel.MusicPlayer); } public Panel getCurrentPanel() { if (mSecondPanel.isPanelExpanded()) { return Panel.Queue; } else if (mFirstPanel.isPanelExpanded()) { return Panel.MusicPlayer; } else { return Panel.Browse; } } public void clearMetaInfo() { super.clearMetaInfo(); mBlurScrimImage.transitionToDefaultState(); } @Override public void onMetaChanged() { super.onMetaChanged(); // load the blurred image mBlurScrimImage.loadBlurImage(ElevenUtils.getImageFetcher(this)); } @Override public void onCacheUnpaused() { super.onCacheUnpaused(); // load the blurred image mBlurScrimImage.loadBlurImage(ElevenUtils.getImageFetcher(this)); } protected AudioPlayerFragment getAudioPlayerFragment() { return (AudioPlayerFragment)getSupportFragmentManager().findFragmentById(R.id.audioPlayerFragment); } protected QueueFragment getQueueFragment() { return (QueueFragment)getSupportFragmentManager().findFragmentById(R.id.queueFragment); } protected HeaderBar setupHeaderBar(final int containerId, final int textId, final View.OnClickListener headerClickListener) { final HeaderBar headerBar = (HeaderBar) findViewById(containerId); headerBar.setFragment(getQueueFragment()); headerBar.setTitleText(textId); headerBar.setBackgroundColor(Color.TRANSPARENT); headerBar.setBackListener(mShowBrowse); headerBar.setHeaderClickListener(headerClickListener); return headerBar; } private class ShowPanelClickListener implements View.OnClickListener { private Panel mTargetPanel; public ShowPanelClickListener(Panel targetPanel) { mTargetPanel = targetPanel; } @Override public void onClick(View v) { showPanel(mTargetPanel); } } }
b9a6b50b5db60bd0d964349a08f99107665bdf7d
4bbde3ca8a5af5af7916f8008efd1ee8b9e1341c
/src/main/java/com/hajder/travelagency/bean/LocaleBean.java
e8e1a25eef055eb6a2335a85dbb0808c4c68ee49
[]
no_license
phajder/TravelAgency
304831e546ac6e7752edb1c786b37f5e0fcb33cb
4cad45dcd06f07ca78914d88c7e5f4218c49097b
refs/heads/master
2021-06-11T07:55:08.736540
2017-01-17T02:27:00
2017-01-17T02:27:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.hajder.travelagency.bean; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import java.util.LinkedHashMap; import java.util.Locale; import java.util.Map; /** * Created by Piotr on 20.12.2016. * @author Piotr Hajder */ @ManagedBean @SessionScoped public class LocaleBean { private static Map<String, Object> locales; private Locale locale; static { locales = new LinkedHashMap<>(); locales.put("Polski", new Locale("pl")); locales.put("English", Locale.ENGLISH); } @PostConstruct public void init() { locale = FacesContext.getCurrentInstance().getExternalContext().getRequestLocale(); } public Map<String, Object> getLocalesInMap() { return locales; } public Locale getLocale() { return locale; } public String getLanguage() { return locale.getLanguage(); } public void setLanguage(String language) { locale = new Locale(language); FacesContext.getCurrentInstance().getViewRoot().setLocale(locale); } }
f54d784edfb0085ed2024310b11a57ac5db0de91
3e5ef22fc983b7c0bb21a26a46c371879e37dbc0
/app/src/main/java/com/zspirytus/enjoymusic/receivers/MyHeadSetPlugOutReceiver.java
3ecb9eaad724857413f5700d5e619d9479bf1fa2
[ "MIT" ]
permissive
spirytusz/EnjoyMusic
a0f04f2dafffefb3d278c2722d9fc482c7a7a15a
ffa803b7a82cea29b14baad04e7314e0454484b7
refs/heads/master
2022-03-02T00:52:00.998755
2019-04-21T07:50:14
2019-04-21T07:50:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.zspirytus.enjoymusic.receivers; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.media.AudioManager; import com.zspirytus.enjoymusic.engine.BackgroundMusicController; /** * 耳机拔出事件接收广播 * Created by ZSpirytus on 2018/8/11. */ public class MyHeadSetPlugOutReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (AudioManager.ACTION_AUDIO_BECOMING_NOISY.equals(action)) { if (BackgroundMusicController.getInstance().isPlaying()) { BackgroundMusicController.getInstance().pause(); } } } }
fe1ed9200aa7d046090907d7774ffce354678e69
255cf6f012dd3e200b9e4e021cfb40b394e4f2f3
/src/main/java/com/trade_accounting/controllers/rest/SupplierAccountRestController.java
cdae7fcebf76c8f9bcb20fe3f8c875a8b0d68211
[]
no_license
ArtemZaikovsky/Back
28cbc4104e8f38d1a98175c7b06ecb2c009f8189
de512acb694d9bae6e5fa2e852e6b1881157516c
refs/heads/main
2023-07-17T11:46:43.612093
2021-08-20T13:53:09
2021-08-20T13:53:09
398,292,819
0
0
null
null
null
null
UTF-8
Java
false
false
9,069
java
package com.trade_accounting.controllers.rest; import com.trade_accounting.models.SupplierAccount; import com.trade_accounting.models.dto.SupplierAccountDto; import com.trade_accounting.services.interfaces.CheckEntityService; import com.trade_accounting.services.interfaces.SupplierAccountService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import net.kaczmarzyk.spring.data.jpa.domain.Equal; import net.kaczmarzyk.spring.data.jpa.domain.Like; import net.kaczmarzyk.spring.data.jpa.domain.LikeIgnoreCase; import net.kaczmarzyk.spring.data.jpa.web.annotation.And; import net.kaczmarzyk.spring.data.jpa.web.annotation.Spec; import org.springframework.data.jpa.domain.Specification; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; @RestController @Tag(name="SupplierAccount Rest Controller", description = "CRUD операции со счетами поставщиков") @Api(tags = "SupplierAccount Rest Controller") @RequestMapping("api/supplierAccount") public class SupplierAccountRestController { private final SupplierAccountService invoices; private final CheckEntityService checkEntityService; public SupplierAccountRestController(SupplierAccountService invoices, CheckEntityService checkEntityService) { this.invoices = invoices; this.checkEntityService = checkEntityService; } @GetMapping @ApiOperation(value = "getAll", notes = "Получение списка всех счетов поставщиков") @ApiResponses(value = { @ApiResponse(code = 200, message = "Успешное получение счетов поставщиков"), @ApiResponse(code = 404, message = "Данный контроллер не найден"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 401, message = "Нет доступа к данной операции")} ) public ResponseEntity<List<SupplierAccountDto>> getAll() { List<SupplierAccountDto> getAll = invoices.getAll(); return ResponseEntity.ok(getAll); } @GetMapping("/search/{nameFilter}") @ApiOperation(value = "searchTerm", notes = "Получение списка некоторых счетов") @ApiResponses(value = { @ApiResponse(code = 200, message = "Успешное получение отф. списка контрагентов"), @ApiResponse(code = 404, message = "Данный контроллер не найден"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 401, message = "Нет доступа к данной операции")} ) public ResponseEntity<List<SupplierAccountDto>> searchByNameFilter(@ApiParam(name ="nameFilter", value = "Переданный в URL searchTerm, по которому необходимо найти контрагента") @PathVariable(name = "nameFilter") String nameFilter) { List<SupplierAccountDto> listSupplier = invoices.searchByString(nameFilter); return ResponseEntity.ok(listSupplier); } @GetMapping("/{id}") @ApiOperation(value = "getById", notes = "Получение счета поставщика по id") @ApiResponses(value = { @ApiResponse(code = 200, message = "Счет поставщика найден"), @ApiResponse(code = 404, message = "Данный контроллер не найден"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 401, message = "Нет доступа к данной операции")} ) public ResponseEntity<SupplierAccountDto> getById(@ApiParam(name = "id", type = "Long", value = "Переданный в URL id, по которому необходимо найти счет поставщика") @PathVariable(name = "id") Long id) { checkEntityService.checkExistsSupplierAccountById(id); return ResponseEntity.ok(invoices.getById(id)); } @PostMapping @ApiOperation(value = "create", notes = "Добавление нового счета поставщика") @ApiResponses(value = { @ApiResponse(code = 200, message = "Счет поставщика создан"), @ApiResponse(code = 201, message = "Запрос принят и счет поставщика добавлен"), @ApiResponse(code = 404, message = "Данный контроллер не найден"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 401, message = "Нет доступа к данной операции")} ) public ResponseEntity<SupplierAccountDto> create(@ApiParam(name = "invoice", value = "DTO счета, который необходимо создать") @RequestBody SupplierAccountDto invoice) { return ResponseEntity.ok().body(invoices.create(invoice)); } @PutMapping @ApiOperation(value = "create", notes = "Изменение счета поставщика") @ApiResponses(value = { @ApiResponse(code = 200, message = "Информация о счете обновлена"), @ApiResponse(code = 201, message = "Запрос принят и счет поставщика обновлен"), @ApiResponse(code = 404, message = "Данный контроллер не найден"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 401, message = "Нет доступа к данной операции")} ) public ResponseEntity<SupplierAccountDto> update(@ApiParam(name = "invoice", value = "DTO счета, который необходимо создать") @RequestBody SupplierAccountDto invoice) { return ResponseEntity.ok().body(invoices.update(invoice)); } @ApiOperation(value = "deleteById", notes = "Удаляет счет поставщика на основе переданного ID") @DeleteMapping("/{id}") @ApiResponses(value = { @ApiResponse(code = 200, message = "Счет поставщика успешно удален"), @ApiResponse(code = 204, message = "Запрос получен и обработан, данных для возврата нет"), @ApiResponse(code = 401, message = "Нет доступа к данной операции"), @ApiResponse(code = 403, message = "Операция запрещена"), @ApiResponse(code = 404, message = "Данный контроллер не найден") }) public ResponseEntity<SupplierAccountDto> deleteById(@ApiParam(name = "id", type = "Long", value = "Переданный в URL id по которому необходимо удалить счет поставщика") @PathVariable(name = "id") Long id) { invoices.deleteById(id); return ResponseEntity.ok().build(); } @GetMapping("/querySupplier") @ApiOperation(value = "searchByFilter", notes = "Получение списка счетов по заданным параметрам") public ResponseEntity<List<SupplierAccountDto>> getAllFilter( @And({ @Spec(path = "id", params = "id", spec = Equal.class), @Spec(path = "date", params = "date", spec = Equal.class), @Spec(path = "contractor.name", params = "contractorDto", spec = LikeIgnoreCase.class), @Spec(path = "company.name", params = "companyDto", spec = LikeIgnoreCase.class), @Spec(path = "warehouse.name", params = "warehouseDto", spec = LikeIgnoreCase.class), })Specification<SupplierAccount> supplier) { return ResponseEntity.ok(invoices.search(supplier)); } }
bc9abcc3ce7f9c80a2b43a1154ae11e5cef5f960
64db48c5830a6976de397e64017d44e817467d65
/app/src/main/java/com/example/lkbwei/freeOrder/DataBase/OrderTable.java
7c80425d4893b4410e805f211115e0c138f61c14
[]
no_license
lkbwei/FreeOrder
f4877ed4002306b109e6776994de21359a5fbd07
0ded88fafa6fcd14c78506d22cfad6516a5c9565
refs/heads/master
2021-01-19T04:58:38.427139
2017-04-07T13:49:32
2017-04-07T13:49:32
87,407,122
0
0
null
null
null
null
UTF-8
Java
false
false
1,964
java
package com.example.lkbwei.freeOrder.DataBase; import cn.bmob.v3.BmobObject; /** * Created by lkbwei on 2017/3/14. */ public class OrderTable extends BmobObject { private String Boss; private String Restaurant; private String Customer; private String FoodName; private Double Price; private String Comment; private String ImageUrl1; private String ImageUrl2; private String ImageUrl3; private Integer Status;//0表示未提交的订单,1表示以接单 public String getRestaurant() { return Restaurant; } public void setRestaurant(String restaurant) { Restaurant = restaurant; } public Integer getStatus() { return Status; } public void setStatus(Integer status) { Status = status; } public String getBoss() { return Boss; } public void setBoss(String boss) { Boss = boss; } public String getComment() { return Comment; } public void setComment(String comment) { Comment = comment; } public String getCustomer() { return Customer; } public void setCustomer(String customer) { Customer = customer; } public String getFoodName() { return FoodName; } public void setFoodName(String foodName) { FoodName = foodName; } public String getImageUrl1() { return ImageUrl1; } public void setImageUrl1(String imageUrl1) { ImageUrl1 = imageUrl1; } public String getImageUrl2() { return ImageUrl2; } public void setImageUrl2(String imageUrl2) { ImageUrl2 = imageUrl2; } public String getImageUrl3() { return ImageUrl3; } public void setImageUrl3(String imageUrl3) { ImageUrl3 = imageUrl3; } public Double getPrice() { return Price; } public void setPrice(Double price) { Price = price; } }
db018f890bf758e1c4206bb6de81fdfc557aea46
2744bc9ca30a0708d175e097b29e9f2ca0695300
/src/java/api/ApplicationConfig.java
042afaa34d08fdd9d2b5977ad4ea609250060931
[]
no_license
ruvazi/CA2
27e8bcd66650b6cb09824bcee256a662cd622958
143ef3fb5d56b4ad6edc93551ed8c70196ab6b5c
refs/heads/master
2021-01-10T04:34:02.933328
2015-10-07T10:37:07
2015-10-07T10:37:07
43,738,064
0
0
null
null
null
null
UTF-8
Java
false
false
1,038
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package api; import java.util.Set; import javax.ws.rs.core.Application; /** * * @author Emil */ @javax.ws.rs.ApplicationPath("webresources") public class ApplicationConfig extends Application { @Override public Set<Class<?>> getClasses() { Set<Class<?>> resources = new java.util.HashSet<>(); addRestResourceClasses(resources); return resources; } /** * Do not modify addRestResourceClasses() method. * It is automatically populated with * all resources defined in the project. * If required, comment out calling this method in getClasses(). */ private void addRestResourceClasses(Set<Class<?>> resources) { resources.add(api.PersonResource.class); resources.add(exceptions.InternalServerExceptionMapper.class); } }
64ab88cdeab823e229d953588c165ac42c83915b
a363c46e7cbb080db2b3a69a70ebf912195e25c7
/ls-modules/ls-special/src/main/java/cn/lonsun/site/contentModel/internal/dao/impl/ModelTemplateSpecialDaoImpl.java
ac1b345781b31714a799238a34f9692c799bf219
[]
no_license
pologood/excms
601646dd7ea4f58f8423da007413978192090f8d
e1c03f574d0ecbf0200aaffa7facf93841bab02c
refs/heads/master
2020-05-14T20:07:22.979151
2018-10-06T10:51:37
2018-10-06T10:51:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
935
java
package cn.lonsun.site.contentModel.internal.dao.impl; import cn.lonsun.core.base.dao.impl.MockDao; import cn.lonsun.core.base.entity.AMockEntity; import cn.lonsun.site.contentModel.internal.dao.IModelTemplateSpecialDao; import cn.lonsun.site.contentModel.internal.entity.ModelTemplateEO; import org.springframework.stereotype.Repository; import java.util.HashMap; import java.util.Map; /** * Created by Administrator on 2017/9/26. */ @Repository public class ModelTemplateSpecialDaoImpl extends MockDao<ModelTemplateEO> implements IModelTemplateSpecialDao { @Override public ModelTemplateEO getFirstModelByColumnCode(String columnTypeCode) { Map<String, Object> paramsMap = new HashMap<String, Object>(); paramsMap.put("modelTypeCode", columnTypeCode); paramsMap.put("recordStatus", AMockEntity.RecordStatus.Normal.toString()); return getEntity(ModelTemplateEO.class, paramsMap); } }
408c0f909cecea1108bfd0587c3fe3832644bea6
8ea65bae451eb88c4b5f1b30972d9a239d463d55
/baselib/src/main/java/com/cat/zeus/utils/CrashHandler.java
19d6f0034ebad90d956cdb23af221abae628b3f7
[]
no_license
toberole/android_base_demo
7158bf485a64c86c391dff7ca2a9657ca65d5a61
6f7847af9c23b3f04e5c7df67311ce3859ddfb2f
refs/heads/master
2022-10-31T14:41:14.720225
2020-06-14T13:05:32
2020-06-14T13:05:32
257,482,210
0
0
null
null
null
null
UTF-8
Java
false
false
6,367
java
package com.cat.zeus.utils; import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.os.Build; import java.io.BufferedWriter; import java.io.Closeable; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.Date; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class CrashHandler implements Thread.UncaughtExceptionHandler { private Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); private ThreadPoolExecutor executor; private Context context; private CrashListener listener; private File logFileDir; public void init(Context context, File logFileDir, CrashListener listener) { this.context = context; this.logFileDir = logFileDir; this.listener = listener; this.executor = new ThreadPoolExecutor(3, 3, 30, TimeUnit.SECONDS, new LinkedBlockingDeque<Runnable>()); this.executor.allowCoreThreadTimeOut(true); Thread.setDefaultUncaughtExceptionHandler(this); } @Override public void uncaughtException(final Thread thread, final Throwable ex) { executor.execute(new Runnable() { @Override public void run() { File logFile = new File(logFileDir, getFormatDate() + "_log.crash"); writeLog_(logFile, "CrashHandler", ex.getMessage(), ex); if (listener != null) { listener.onCrash(thread, ex, logFile.getAbsolutePath()); } else { defaultHandler.uncaughtException(thread, ex); } } }); } public void writeLog(File logFile, String tag, String message, Throwable ex) { FileWriter fileWriter = null; BufferedWriter bufdWriter = null; PrintWriter printWriter = null; try { fileWriter = new FileWriter(logFile, true); bufdWriter = new BufferedWriter(fileWriter); printWriter = new PrintWriter(fileWriter); bufdWriter.append(buildTitle(context)); bufdWriter.append(buildBody(context)); bufdWriter.append("\r\n" + getFormatDate()).append(" ").append("E").append('/').append(tag).append(" ") .append(message).append('\n'); bufdWriter.flush(); ex.printStackTrace(printWriter); printWriter.flush(); fileWriter.flush(); } catch (IOException e) { e.printStackTrace(); } finally { // IOUtil.closeQuietly(fileWriter, bufdWriter, printWriter); } } public void writeLog_(File logFile, String tag, String message, Throwable ex) { FileOutputStream fout = null; PrintStream printStream = null; try { fout = new FileOutputStream(logFile, true); fout.write(buildTitle(context).getBytes()); fout.flush(); fout.write(buildBody(context).getBytes()); fout.flush(); fout.write(("\r\n" + getFormatDate() + " " + "E" + '/' + tag + " " + message + '\n').getBytes()); fout.flush(); printStream = new PrintStream(fout); ex.printStackTrace(printStream); printStream.flush(); fout.flush(); } catch (IOException e) { e.printStackTrace(); } finally { // IOUtil.closeQuietly(fout, printStream); } } private String buildTitle(Context context) { return "Crash Log: " + context.getPackageManager().getApplicationLabel(context.getApplicationInfo()) + "\r\n"; } private String buildBody(Context context) { StringBuilder sb = new StringBuilder(); sb.append("APPLICATION INFORMATION").append('\n'); PackageManager pm = context.getPackageManager(); ApplicationInfo ai = context.getApplicationInfo(); sb.append("Application : ").append(pm.getApplicationLabel(ai)).append('\n'); try { PackageInfo pi = pm.getPackageInfo(ai.packageName, 0); sb.append("Version Code: ").append(pi.versionCode).append('\n'); sb.append("Version Name: ").append(pi.versionName).append('\n'); } catch (PackageManager.NameNotFoundException e) { e.printStackTrace(); } sb.append('\n').append("DEVICE INFORMATION").append('\n'); sb.append("Board: ").append(Build.BOARD).append('\n'); sb.append("BOOTLOADER: ").append(Build.BOOTLOADER).append('\n'); sb.append("BRAND: ").append(Build.BRAND).append('\n'); sb.append("CPU_ABI: ").append(Build.CPU_ABI).append('\n'); sb.append("CPU_ABI2: ").append(Build.CPU_ABI2).append('\n'); sb.append("DEVICE: ").append(Build.DEVICE).append('\n'); sb.append("DISPLAY: ").append(Build.DISPLAY).append('\n'); sb.append("FINGERPRINT: ").append(Build.FINGERPRINT).append('\n'); sb.append("HARDWARE: ").append(Build.HARDWARE).append('\n'); sb.append("HOST: ").append(Build.HOST).append('\n'); sb.append("ID: ").append(Build.ID).append('\n'); sb.append("MANUFACTURER: ").append(Build.MANUFACTURER).append('\n'); sb.append("PRODUCT: ").append(Build.PRODUCT).append('\n'); sb.append("TAGS: ").append(Build.TAGS).append('\n'); sb.append("TYPE: ").append(Build.TYPE).append('\n'); sb.append("USER: ").append(Build.USER).append("\r\n"); return sb.toString(); } private static String getFormatDate() { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); return simpleDateFormat.format(new Date()); } public static CrashHandler getInstance() { return CrashHandlerHolder.instance; } private static class CrashHandlerHolder { public static CrashHandler instance = new CrashHandler(); } public static interface CrashListener { void onCrash(Thread thread, Throwable ex, String savedLogFilePath); } }
140c763a632f7806c4be56667dc0d9b052cf85ee
56cd965b524bfb09aa0fac3614e3cbbcf56f4ab2
/microblog-scheduler/scheduler-quartz/src/main/java/com/cloud/frame/scheduler/quartz/config/QuartzConfig.java
caf0743f3485d0923b1c2825197e924867da7afb
[]
no_license
taoyonggang/micro-blog
26ffc929ba54347da2caa4ecc26c81f04f65604e
5b66bcc5108eb50e13dd5776f0e4eee0965ebd1d
refs/heads/master
2020-04-23T13:54:24.100461
2019-02-18T03:24:59
2019-02-18T03:24:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,787
java
package com.cloud.microblog.scheduler.quartz.config; import org.quartz.Scheduler; import org.quartz.spi.JobFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.scheduling.quartz.SchedulerFactoryBean; import java.io.IOException; import java.util.Properties; /** * @program: top-parent * @description: quartz 配置 * @author: Mr.lgj * @version: * @See: * @create: 2018-11-20 17:19 **/ @Configuration public class QuartzConfig { @Autowired JobFactory jobFactory; //获取工厂bean @Bean public SchedulerFactoryBean schedulerFactoryBean() { SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); try { schedulerFactoryBean.setQuartzProperties(quartzProperties()); schedulerFactoryBean.setJobFactory(jobFactory); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return schedulerFactoryBean; } //指定quartz.properties @Bean public Properties quartzProperties() throws IOException { PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean(); propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties")); propertiesFactoryBean.afterPropertiesSet(); return propertiesFactoryBean.getObject(); } //创建schedule @Bean(name = "scheduler") public Scheduler scheduler() { return schedulerFactoryBean().getScheduler(); } }
bb19cbfc96c44a88d3fbd2af37428cb2e85c75e2
f42d7da85f9633cfb84371ae67f6d3469f80fdcb
/com4j-20120426-2/visio/visiotool/VisGraphicItemTypes.java
e0c9b06e46ab68f4c50262d357c86ad21218be6c
[ "BSD-2-Clause" ]
permissive
LoongYou/Wanda
ca89ac03cc179cf761f1286172d36ead41f036b5
2c2c4d1d14e95e98c0a3af365495ec53775cc36b
refs/heads/master
2023-03-14T13:14:38.476457
2021-03-06T10:20:37
2021-03-06T10:20:37
231,610,760
1
0
null
null
null
null
UTF-8
Java
false
false
732
java
package visiotool ; import com4j.*; /** */ public enum VisGraphicItemTypes implements ComEnum { /** * <p> * The value of this constant is 2 * </p> */ visTypeIconSet(2), /** * <p> * The value of this constant is 3 * </p> */ visTypeTextCallout(3), /** * <p> * The value of this constant is 4 * </p> */ visTypeDataBar(4), /** * <p> * The value of this constant is 5 * </p> */ visTypeColorByValue(5), /** * <p> * The value of this constant is 6 * </p> */ visTypeHeading(6), ; private final int value; VisGraphicItemTypes(int value) { this.value=value; } public int comEnumValue() { return value; } }
29de393f36457b080342687f84f6443bc38149b9
a1d4927da81e352cf8a2c8d7c2cffc9afb22aec0
/src/main/java/service/LeaveRoleService.java
c22782f8531bc1bf2c3183c50e12cf0c0e92d6c5
[]
no_license
senthilgdr/lms-persistence
ed16ed3c6b935e002cbc166e104198eb5f892354
f68756c1d84a7d62ac807b0827859ec9c2849819
refs/heads/master
2021-01-12T01:02:24.859750
2017-02-25T13:28:42
2017-02-25T13:28:42
78,334,497
0
1
null
null
null
null
UTF-8
Java
false
false
340
java
package service; import java.util.List; import dao.LeaveRoleDAO; import model.LeaveRole; public class LeaveRoleService { private LeaveRoleDAO ldDao = new LeaveRoleDAO(); public List<LeaveRole> list() { return ldDao.list(); } public LeaveRole findByRoleId(long id) { return ldDao.findById(id); } }
578c8b3e3581db81e90a196f00bf885ce19a99bf
8a49a3c6f88f1f5ef0213130157929d0684ed6b0
/Sokoban/src/soko/Direction.java
91de4360cf7f46225a8467258c422daca38ccaf3
[]
no_license
Boti97/sokoban
02dbef57334c632ef760f5554bc3c3d4dde57689
b85403ecbada1428e39efe85a4505412628b10d7
refs/heads/master
2021-04-03T07:12:24.256926
2018-03-11T22:40:29
2018-03-11T22:40:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
69
java
package soko; public enum Direction { Up, Down, Right, Left }
d3dc76cc38cd9a1322d19c51b51a3bbc36b367b1
b7d3ececaabf96d3144c252b67142bd229d8f3fc
/src/main/java/com/solomatoff/tracker/UserAction.java
82ceaafb9ac27f3678af080226e8b582831676dc
[]
no_license
vsolomatov/job4j_tracker
1cdf2420490b43845d4c8a6df9c1d80fd011f9a0
2972cbc7a5effc2e2770f99403904c689772d192
refs/heads/master
2023-08-25T03:28:40.458786
2021-10-12T06:27:07
2021-10-12T06:27:07
416,197,274
0
0
null
null
null
null
UTF-8
Java
false
false
158
java
package com.solomatoff.tracker; public interface UserAction { String returnKey(); void execute(Input input, Tracker tracker); String info(); }
64f32eca2a158b8435c75a24c7ba9bcb5a34d2de
42c43cbe50c422ad3a11752e9091667e8bce2b24
/generative/naivebayes/NaiveBayesGaussian.java
6b7960d012d9ce58565509604dc2369da0beaec0
[]
no_license
rangsansith/Machine-Learning-2
d4c0968ed95a50bd0d427bf03a3ddfb5e9ba9533
b5e81f4670b1c0fb09c1c20a094fb48a78ad297c
refs/heads/master
2020-04-04T15:40:39.822854
2015-12-15T00:01:51
2015-12-15T00:01:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,939
java
package hw3.generative.naivebayes; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.Random; public class NaiveBayesGaussian { static int len=4601; static int featlen=57; static int classno=2; static int trainlen,testlen; static double[][] features = new double[len][featlen]; static double[] labels = new double[len]; static ArrayList<double[][]> featklist = new ArrayList<double[][]>(); static ArrayList<double[]> labelsklist = new ArrayList<double[]>(); static ArrayList<Integer> indexlist = new ArrayList<Integer>(); static double[][] featurestrain = new double[1][featlen]; static double [] labelstrain = new double[1]; static double [][] featurestest= new double[1][featlen]; static double [] labelstest= new double[1]; static Double[] globalmean; private static void readData() { int one=0,zero=0; try { FileReader featureread = new FileReader("data/spambase.data"); BufferedReader featurereadbr = new BufferedReader(featureread); String sCurrentLine; String[] feats; int ind=0; while ((sCurrentLine = featurereadbr.readLine()) != null) { indexlist.add(ind); feats=sCurrentLine.split(","); for(int i=0;i<feats.length-1;i++) { features[ind][i]=Double.parseDouble(feats[i]); } labels[ind]=Double.parseDouble(feats[feats.length-1]); if(labels[ind]==0.0) zero++; else one++; ind++; } featurereadbr.close(); featureread.close(); }catch(Exception e){ e.printStackTrace(); } //System.out.println(zero+" "+one+" "+(double) zero/(zero+one)); } private static void randSplits(int folds) { HashMap<Integer, Boolean> seen = new HashMap<Integer, Boolean>(); int kfold=len/folds,listno=0,one=0,zero=0; Random n = new Random(); while(indexlist.size()!=0){ one=0;zero=0; int r=Math.min(kfold, indexlist.size()); double[][] featurestemp = new double[r][featlen]; double [] labelstemp = new double[r]; for (int i = 0; i < kfold; i++) { if(indexlist.size()==0) break; int ind=n.nextInt(indexlist.size()); int tmpind=indexlist.get(ind); if(seen.containsKey(tmpind)) System.out.println("Error: bad Coder"); else seen.put(tmpind, true); for (int j = 0; j < featlen; j++) { featurestemp[i][j]=features[tmpind][j]; } labelstemp[i]=labels[tmpind]; if(labels[tmpind]==0.0) zero++; else if(labels[tmpind]==1.0) one++; else System.out.println("Error: bad Coder"); indexlist.remove(ind); } System.out.println(zero+" "+one+" "+(double) zero/(zero+one)); featklist.add(listno,featurestemp); labelsklist.add(listno,labelstemp); listno++; } } private static void uniformSplits(int folds){ ArrayList<ArrayList<double[]>> tft= new ArrayList<ArrayList<double[]>>(); ArrayList<ArrayList<Double>> tlt= new ArrayList<ArrayList<Double>>(); for (int i = 0; i < folds; i++) { tft.add(new ArrayList<double[]>()); tlt.add(new ArrayList<Double>()); } for (int i = 0; i < len; i++) { ArrayList<double[]> temp = tft.get(i%folds); temp.add(features[i]); tft.set(i%folds, temp); ArrayList<Double> lemp = tlt.get(i%folds); lemp.add(labels[i]); tlt.set(i%folds,lemp); } if(tft.size()!=tlt.size()) System.out.println("Error: BadCode"); int one=0,zero=0,listno=0; for (int i = 0; i < tft.size(); i++) { one=0;zero=0; double[][] featurestemp = new double[tft.get(i).size()][featlen]; double [] labelstemp = new double[tlt.get(i).size()]; for (int j = 0; j < tft.get(i).size(); j++) { featurestemp[j]=tft.get(i).get(j); labelstemp[j]=tlt.get(i).get(j); if(labelstemp[j]==0) zero++; else one++; } //System.out.println(zero+" "+one+" "+(double) zero/(zero+one)); featklist.add(listno,featurestemp); labelsklist.add(listno,labelstemp); listno++; } } private static void pickKfold(int k){ k--; testlen=labelsklist.get(k).length; trainlen=len-testlen; featurestrain=new double[trainlen][featlen]; labelstrain=new double[trainlen]; featurestest=new double[testlen][featlen]; labelstest=new double[testlen]; int ind=0; for (int i = 0; i < featklist.size(); i++) { if(i==k) { featurestest=featklist.get(k); labelstest=labelsklist.get(k); continue; } double[][] tf = featklist.get(i); double[] tl = labelsklist.get(i); for (int j = 0; j < tl.length; j++) { featurestrain[ind]=tf[j]; labelstrain[ind]=tl[j]; ind++; } } } private static Double[] getMean(double[][] features,int x,int y){ Double[] mean=new Double[y]; for (int i = 0; i < y; i++) { mean[i]=0.0; for (int j = 0; j < x; j++) { mean[i]+=features[j][i]; } mean[i]/=(double) x; } return mean; } private static Double[][] getMinMax(double[][] features,int x,int y){ Double[][] minmax=new Double[2][y]; for (int i = 0; i < y; i++) { minmax[0][i]=1000000000000.0; minmax[1][i]=-100000000000.0; for (int j = 0; j < x; j++) { minmax[0][i]=Math.min(features[j][i],minmax[0][i]); minmax[1][i]=Math.max(features[j][i],minmax[1][i]); } } return minmax; } private static Double[] getStd(double[][] features,int x,int y,Double[] mean){ Double[] std=new Double[y]; for (int i = 0; i < y; i++) { std[i]=0.0; for (int j = 0; j < x; j++) { std[i]+=Math.pow(features[j][i]-mean[i],2); } std[i]=Math.sqrt(std[i]/(double) x); } return std; } private static Double[] getVar(double[][] features,int x,int y,Double[] mean){ Double[] std=new Double[y]; for (int i = 0; i < y; i++) { std[i]=0.0; for (int j = 0; j < x; j++) { std[i]+=Math.pow(features[j][i]-mean[i],2); } std[i]=(std[i]/x); } return std; } private static Double[][][] getMinMaxbyClass(double[][] features,double[] labels,int x,int y,double[] val){ Double[][][] minmax=new Double[val.length][2][y]; for (int i = 0; i < y; i++) { for (int k = 0; k < val.length; k++) { minmax[k][0][i]=1000000000000.0; minmax[k][1][i]=-100000000000.0; for (int j = 0; j < x; j++) { if(labels[j]==val[k]) { minmax[k][0][i]=Math.min(features[j][i],minmax[k][0][i]); minmax[k][1][i]=Math.max(features[j][i],minmax[k][1][i]); } } } } return minmax; } private static Double[][] getMeanbyClass(double[][] features,double[] labels,int x,int y,double[] val){ Double[][] mean=new Double[val.length][y]; Double[] len=new Double[val.length]; for (int i = 0; i < y; i++) { for (int k = 0; k < val.length; k++) { mean[k][i]=0.0; len[k]=0.0; for (int j = 0; j < x; j++) { if(labels[j]==val[k]) { mean[k][i]+=features[j][i]; len[k]++; } } mean[k][i]/=len[k]; } } return mean; } private static Double[][] getBiasedVarbyClass(double[][] features,double[] labels,int x,int y,double[] val,Double[][] mean){ Double[][] std=new Double[val.length][y]; Double[] len=new Double[val.length]; for (int i = 0; i < y; i++) { for (int k = 0; k < val.length; k++) { std[k][i]=0.0; len[k]=0.0; for (int j = 0; j < x; j++) { if(labels[j]==val[k]) { std[k][i]+=Math.pow(features[j][i],2); len[k]++; } } std[k][i]=(std[k][i]/(len[k]))-Math.pow(mean[k][i],2); } } return std; } private static Double[][] getVarbyClass(double[][] features,double[] labels,int x,int y,double[] val,Double[][] mean){ Double[][] std=new Double[val.length][y]; Double[] len=new Double[val.length]; for (int i = 0; i < y; i++) { for (int k = 0; k < val.length; k++) { std[k][i]=0.0; len[k]=0.0; for (int j = 0; j < x; j++) { if(labels[j]==val[k]) { std[k][i]+=Math.pow(features[j][i]-mean[k][i],2); len[k]++; } } std[k][i]/=(len[k]-1); } } return std; } private static Double[][] getCommonVarbyClass(double[][] features,double[] labels,int x,int y,double[] val, Double[][] mean){ Double[][] std=new Double[val.length][y]; for (int i = 0; i < y; i++) { std[0][i]=0.0; for (int j = 0; j < x; j++) { std[0][i]+=Math.pow(features[j][i]-mean[(int) labels[j]][i],2); } std[0][i]/=(double) x; } std[1]=std[0]; return std; } private static void normalize(double[][] features,int x,int y,Double[] mean,Double[] std){ for (int i = 0; i < y; i++) { for (int j = 0; j < x; j++) { features[j][i]-=mean[i]; features[j][i]/=std[i]; } } } private static void noramalizeboth(double[][] features,double[][] featurestest,int trx,int tex,int y){ Double[] mean=getMean(features, trx, y); Double[] std=getStd(features, trx, y, mean); normalize(features, trx, y, mean, std); normalize(featurestest, tex, y, mean, std); } private static double GaussianModel(double mu,double var,double actval){ double ans=1.0/(Math.sqrt(2.0*Math.PI*var)); ans*=Math.exp(-0.5*Math.pow((actval-mu), 2)/var); return ans; } private static double[][] ROCGaussian(double[][]featureseval,double[] labelseval,Double[][] classmean,Double[][] classvar,double spam,double ham,int tetrlen) { ArrayList<Double> threshlist = new ArrayList<Double>(); for (int j = 0; j < tetrlen; j++) { double spamprob=spam,hamprob=ham; for (int k = 0; k < featlen; k++) { spamprob*=GaussianModel(classmean[1][k], classvar[1][k], featureseval[j][k]); hamprob*=GaussianModel(classmean[0][k], classvar[0][k], featureseval[j][k]); } if(spamprob==0) { spamprob=hamprob/10; } if(hamprob==0) { hamprob=spamprob/10; } threshlist.add(Math.log(spamprob/hamprob)); } Collections.sort(threshlist); threshlist.add(0,threshlist.get(0)-1); threshlist.add(threshlist.size(),threshlist.get(threshlist.size()-1)+1); double[][] thrcc=new double[threshlist.size()][4]; for (int i = 0; i < threshlist.size(); i++) { evaluateGaussian(featureseval, labelseval, classmean, classvar, thrcc[i], spam, ham, tetrlen,threshlist.get(i)); } return thrcc; } private static double evaluateGaussian(double[][]featureseval,double[] labelseval,Double[][] classmean,Double[][] classvar,double cc[],double spam,double ham,int tetrlen,double threshold) { double acc=0; double tp=0.0,fp=0.0,tn=0.0,fn=0.0; // Testing the model for (int j = 0; j < tetrlen; j++) { double spamprob=spam,hamprob=ham; for (int k = 0; k < featlen; k++) { spamprob*=GaussianModel(classmean[1][k], classvar[1][k], featureseval[j][k]); hamprob*=GaussianModel(classmean[0][k], classvar[0][k], featureseval[j][k]); } if(spamprob==0) { spamprob=hamprob/10; } if(hamprob==0) { hamprob=spamprob/10; } if(Math.log(spamprob/hamprob)>threshold) { if(labelseval[j]==1) { acc++; tp++; } else { fp++; } } else { if(labelseval[j]==0) { acc++; tn++; } else { fn++; } } } acc/=((double) tetrlen); cc[0]=tp; cc[1]=fp; cc[2]=tn; cc[3]=fn; System.out.println("Accuracy: "+acc*100+" "+spam+" "+ham+" "+tp+" "+fp+" "+tn+" "+fn); return acc; } private static double[][] Gaussian(double[][] cc,double[] acc, boolean mode){ //noramalizeboth(featurestrain, featurestest, trainlen, testlen, featlen); double[] val={0,1}; Double[][] classmean=getMeanbyClass(featurestrain, labelstrain, trainlen, featlen, val); Double[][] classvar=getCommonVarbyClass(featurestrain, labelstrain, trainlen, featlen, val, classmean); /*classvar[0]=getCommonVarbyClass(featurestrain, labelstrain, trainlen, featlen, classmean); classvar[1]=classvar[0]; *///classvar[1]=getCommonVarbyClass(featurestrain, labelstrain, trainlen, featlen, classmean); /*Double[][] classmean=getMeanbyClass(features, labels, len, featlen, val); Double[][] classvar=getVarbyClass(features, labels, len, featlen, val, classmean); */ /*Double[][] classmeanc=getMeanbyClass(featurestrain, labelstrain, trainlen, featlen, val); Double[][] classvarc=getVarbyClass(featurestrain, labelstrain, trainlen, featlen, val, classmean); classmean[0]=getMean(featurestrain, trainlen, featlen); classmean[1]=getMean(featurestrain, trainlen, featlen); classvar[0]=getStd(featurestrain, trainlen, featlen, classmean[0]); classvar[1]=getStd(featurestrain, trainlen, featlen, classmean[1]);*/ //classvar[0]=getVar(featurestrain, trainlen, featlen, classmean[0]); //classvar[1]=getVar(featurestrain, trainlen, featlen, classmean[1]); int spamcount=0; for (int j = 0; j < trainlen; j++) { spamcount+=labelstrain[j]; } /*for (int i = 0; i < classvar[0].length; i++) { classvar[0][i]=Math.pow(classvar[0][i], 2); classvar[1][i]=Math.pow(classvar[1][i], 2); System.out.println(i+" "+classvar[0][i]+" "+classvarc[0][i]+" "+classvarc[1][i]); System.out.println(i+" "+classmean[0][i]+" "+(classmeanc[0][i]*(trainlen-spamcount)+classmeanc[1][i]*spamcount)/(double) trainlen); }*/ double spam=((double) spamcount)/((double) trainlen),ham=1-spam; //evaluate if(!mode) { acc[0]=evaluateGaussian(featurestrain, labelstrain, classmean, classvar, cc[0], spam, ham, trainlen,0.0); acc[1]=evaluateGaussian(featurestest, labelstest, classmean, classvar, cc[1], spam, ham, testlen,0.0); } else { return ROCGaussian(featurestest, labelstest, classmean, classvar, spam, ham, testlen); } return null; } public static void main(String[] args) { readData(); Double[] mn = getMean(features, len, featlen); Double[] std = getStd(features, len, featlen, mn); //normalize(features, len, featlen, mn, std); globalmean=getMean(features, len, featlen); //randSplits(2); int folds=10,model=4; uniformSplits(folds); for (int i = 1; i <=folds ; i++) { pickKfold(i); Gaussian(new double[2][4], new double[2], false); } } }
e88fd02fe53fc41427bca2ca4a57fb68a581d7cd
e4795906751db63ef8534ae90ee6f0cb27822af9
/src/main/java/com/panasalbk/app/models/Address.java
9f59bb5bd6c08d29fd3bb2f6ffa84f1a2c513c93
[]
no_license
panasal/pana-sal-bk
6684f994df3297100c83dff1d4523d967608f90c
dc9990930fdc4f2e25d0a48d805acd504516ade5
refs/heads/master
2021-01-16T21:24:18.276198
2017-07-29T15:27:12
2017-07-29T15:27:12
98,783,666
0
0
null
null
null
null
UTF-8
Java
false
false
1,502
java
package com.panasalbk.app.models; /** * Latest edition date: 06/02/17 * Address Class * Dependency to Customer Class * @author AloniD * */ public class Address { /* * >> Attributes */ private String streetNumber; private String streetName; private String placeNumber; private String place; private String city; private String province; private String postalCode; /* * >> Properties */ public String getStreetNumber() { return streetNumber; } public void setStreetNumber(String streetNumber) { this.streetNumber = streetNumber; } public String getStreetName() { return streetName; } public void setStreetName(String streetName) { this.streetName = streetName; } public String getPlace() { return place; } public void setPlace(String place) { this.place = place; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getPostalCode() { return postalCode; } public void setPostalCode(String postalCode) { this.postalCode = postalCode; } /* * >> Constructor */ public Address(String valStNum, String valStName, String valPlace, String valCity, String valProv, String valPC) { setStreetNumber(valStNum); setStreetName(valStName); setPlace(valPlace); setCity(valCity); setProvince(valProv); setPostalCode(valPC); } }
527b58d7fa5a951a71a133edc860852d5a6a31c8
b26f18c0b77daac5195d4283ca24273cbfb4b34e
/src/main/java/com/service/BookDocumentService.java
edc3eaeef5425de474b82fa685942686556b21f1
[]
no_license
ooliinyk/libraryNew
258092fe4f92fd831c80a8475345b6b8f2d985d9
fb58c764e61502cbf6ae158fcbbbd9e3a07a4863
refs/heads/master
2021-01-10T06:03:30.256430
2016-04-04T10:40:11
2016-04-04T10:40:11
54,590,922
0
0
null
null
null
null
UTF-8
Java
false
false
359
java
package com.service; import com.entity.BookDocument; import java.util.List; /** * Created by user on 19.03.2016. */ public interface BookDocumentService { BookDocument findById(int id); List<BookDocument> findAll(); List<BookDocument> findAllByUserId(int id); void saveDocument(BookDocument document); void deleteById(int id); }
0965dc8afddb929b01adf34bfa622838e4c5b95c
329be945c297354a23dc4fd69122d54e1dea9ed5
/hrm_basic_parent/hrm_basic_util/src/main/java/com/ymy/hrm/util/LetterUtil.java
44b53ae8b95fa6c748a8c4001ad5c3861489444d
[]
no_license
jackyang92/hrm_parent
d57fa7f3b7f46704108ce3a84a027dbc91b22f20
ae9db97fe6f78ea45ec06f56f7950ff88150c1e1
refs/heads/master
2022-07-05T04:13:39.059021
2019-10-07T01:57:43
2019-10-07T01:57:43
205,696,724
1
0
null
2022-06-17T03:28:10
2019-09-01T15:36:25
Java
UTF-8
Java
false
false
6,016
java
package com.ymy.hrm.util; import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * 取得给定汉字串的首字母串,即声母串 Title: ChineseCharToEn(含常用汉字,不常见汉字及多音字) * @date: 2014-1-15 注:只支持GB2312字符集中的汉字 * */ public class LetterUtil { private final static int[] li_SecPosValue = { 1601, 1637, 1833, 2078, 2274, 2302, 2433, 2594, 2787, 3106, 3212, 3472, 3635, 3722, 3730, 3858, 4027, 4086, 4390, 4558, 4684, 4925, 5249, 5590 }; private final static String[] lc_FirstLetter = { "a", "b", "c", "d", "e", "f", "g", "h", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "w", "x", "y", "z" }; private static Map<String, String> exceptWords = new HashMap<String, String>(); static { exceptWords.put("a", "庵鳌"); exceptWords.put("b", "璧亳並侼別匂"); exceptWords.put("c", "茌丞丒丳刅"); exceptWords.put("d", "渎砀棣儋丟"); exceptWords.put("e", ""); exceptWords.put("f", "邡冹兝"); exceptWords.put("g", "崮藁莞丐丱乢亁仠冮匃匄"); exceptWords.put("h", "骅珲潢湟丆冴匢"); exceptWords.put("j", "泾蛟暨缙旌莒鄄丌丩丮丯丼亅伋冏匊匛匞"); exceptWords.put("k", "丂匟"); exceptWords.put("l", "崂涞栾溧漯浏耒醴泸阆崃両刢劽啰"); exceptWords.put("m", "渑汨丏冐冺兞冇"); exceptWords.put("n", ""); exceptWords.put("o", "瓯"); exceptWords.put("p", "邳濮郫丕伂冸"); exceptWords.put("q", "喬綦衢岐朐邛丠丬亝冾兛匤"); exceptWords.put("r", "榕刄"); exceptWords.put("s", "泗睢沭嵊歙莘嵩鄯丄丗侺兙"); exceptWords.put("t", "潼滕郯亣侹侻"); exceptWords.put("w", "婺涠汶亾仼卍卐"); exceptWords.put("x", "鑫盱浔荥淅浠亵丅伈兇"); exceptWords.put("y", "懿眙黟颍兖郓偃鄢晏丣亜伇偐円匜"); exceptWords.put("z", "梓涿诏柘秭圳伀冑刣"); } private final static String polyphoneTxt = "重庆|cq,音乐|yy"; /** * 取得给定汉字串的首字母串,即声母串 * * @param str 给定汉字串 * @return 声母串 */ public static String getAllFirstLetter(String str) { if (str == null || str.trim().length() == 0) { return ""; } // 多音字判定 for (String polyphone : polyphoneTxt.split(",")) { String[] chinese = polyphone.split("[|]"); if (str.indexOf(chinese[0]) != -1) { str = str.replace(chinese[0], chinese[1]); } } String _str = ""; for (int i = 0; i < str.length(); i++) { _str = _str + getFirstLetter(str.substring(i, i + 1)); } return _str; } /** * 取得给定汉字的首字母,即声母 * * @param chinese 给定的汉字 * @return 给定汉字的声母 */ public static String getFirstLetter(String chinese) { if (chinese == null || chinese.trim().length() == 0) { return ""; } String chineseTemp = chinese; chinese = conversionStr(chinese, "GB2312", "ISO8859-1"); if (chinese.length() > 1) { // 判断是不是汉字 int li_SectorCode = (int) chinese.charAt(0); // 汉字区码 int li_PositionCode = (int) chinese.charAt(1); // 汉字位码 li_SectorCode = li_SectorCode - 160; li_PositionCode = li_PositionCode - 160; int li_SecPosCode = li_SectorCode * 100 + li_PositionCode; // 汉字区位码 if (li_SecPosCode > 1600 && li_SecPosCode < 5590) { for (int i = 0; i < 23; i++) { if (li_SecPosCode >= li_SecPosValue[i] && li_SecPosCode < li_SecPosValue[i + 1]) { chinese = lc_FirstLetter[i]; break; } } } else { // 非汉字字符,如图形符号或ASCII码 chinese = matchPinYin(chinese); } } // 如还是无法匹配,再次进行拼音匹配 if (chinese.equals("?")) { chinese = matchPinYin(chineseTemp, false); } return chinese; } /** * 汉字匹配拼音对照 * * @param chinese * @return */ private static String matchPinYin(String chinese, boolean needConvert) { String chineseTemp = chinese; if (needConvert) { chinese = conversionStr(chinese, "ISO8859-1", "GB2312"); } chinese = chinese.substring(0, 1); // findRepeatWord(exceptWords); for (Entry<String, String> letterSet : exceptWords.entrySet()) { if (letterSet.getValue().indexOf(chinese) != -1) { chinese = letterSet.getKey(); break; } } chinese = chineseTemp.equals(chinese) ? "?" : chinese; return chinese; } private static String matchPinYin(String chinese) { return matchPinYin(chinese, true); } /** * 字符串编码转换 * * @param str 要转换编码的字符串 * @param charsetName 原来的编码 * @param toCharsetName 转换后的编码 * @return 经过编码转换后的字符串 */ private static String conversionStr(String str, String charsetName, String toCharsetName) { try { str = new String(str.getBytes(charsetName), toCharsetName); } catch (UnsupportedEncodingException ex) { System.out.println("字符串编码转换异常:" + ex.getMessage()); } return str; } @SuppressWarnings("unused") private static void findRepeatWord(Map<String, String> wordsMap) { String words = wordsMap.values().toString().replaceAll("[, ]", ""); words = words.substring(1, words.length() - 1); for (char word : words.toCharArray()) { int count = findStr2(words, String.valueOf(word)); if (count > 1) { System.out.println("汉字:【" + word + "】出现了" + count + "次!"); } } } private static int findStr2(String srcText, String keyword) { int count = 0; Pattern p = Pattern.compile(keyword); Matcher m = p.matcher(srcText); while (m.find()) { count++; } return count; } public static void main(String[] args) { System.out.println(LetterUtil.getFirstLetter("源码时代")); String address = "(金浜小区)栖山路1689弄"; System.out.println("获取拼音首字母:" + LetterUtil.getAllFirstLetter(address)); } }
477ec3ac313fc2fab2c95fc12e06bd489167dbf2
f7082b3d5ec81f1e3341adb9d0d94bbdbb4c37dc
/1. Fundamental-Level/Java/OOP-Bacis-June-2016/[EX]/05. Inheritance/src/problem4_MordorsCrueltyPlan/Main.java
8cee5feb3457a01527b3f45a56e4a2727d14f4a7
[]
no_license
krisdx/SoftUni
0e5f368b83ca55ec25fce92e2aed86f59f8bff70
67eef32f60cd527e89dc05087a74a18ef93cf5c9
refs/heads/master
2021-01-24T10:32:23.173482
2017-03-08T07:26:32
2017-03-08T07:26:32
54,333,693
1
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package problem4_MordorsCrueltyPlan; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { public static void main(String[] args) throws IOException { Map<String, Integer> foods = new HashMap<>(); int gandalfMoood = 0; initializeFoods(foods); BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); String[] foodInput = reader.readLine().toLowerCase().split("\\s+"); for (String food : foodInput) { if (foods.containsKey(food)){ gandalfMoood += foods.get(food); } else { gandalfMoood--; } } System.out.println(gandalfMoood); if (gandalfMoood < -5) { System.out.println("Angry"); } else if (gandalfMoood >= -5 && gandalfMoood < 0 ) { System.out.println("Sad"); } else if (gandalfMoood >= 0 && gandalfMoood < 15) { System.out.println("Happy"); } else { System.out.println("JavaScript"); } } private static void initializeFoods(Map<String, Integer> foods) { foods.put("cram", 2); foods.put("lembas", 3); foods.put("apple", 1); foods.put("melon", 1); foods.put("honeycake", 5); foods.put("mushrooms", -10); } }
3c49dec5df08d0bacc3e801cf758a4e25e49c2f0
3c160379ecaea26202f478b18cdc7042b9f504ee
/src/ConnectionListener.java
6d8453d124278bbc49fd97a3db7d6e171e7df5af
[]
no_license
hrghauri/SYSC3303_TFTP
de98d749baf8b64b196a5e040ccfc54239eda57f
ac920273fa10b0c387efa5fda3c03553d2d703e8
refs/heads/master
2020-03-23T01:19:19.023406
2016-06-09T21:56:00
2016-06-09T21:56:00
140,910,761
0
0
null
null
null
null
UTF-8
Java
false
false
1,729
java
import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; import Common.Packet; public class ConnectionListener implements Runnable{ private DatagramSocket socket69; private DatagramPacket receivePacket; private int activeConnectionsCount; private Boolean quite[]; public ConnectionListener(Boolean quite[]){ try { socket69 = new DatagramSocket(69); } catch (SocketException se) { se.printStackTrace(); System.exit(1); } activeConnectionsCount = 0; this.quite = quite; } public void closeSocket69(){ socket69.close(); } @Override public void run() { while(true){ byte data[] = new byte[518]; receivePacket = new DatagramPacket(data, data.length); try { socket69.receive(receivePacket); } catch (IOException e) { // TODO Auto-generated catch block System.out.println("Server has stopped listening on user command or " + "is unable to listen anymore for any unexpected exeption. "); //e.printStackTrace(); } if (socket69.isClosed()) break; System.out.println("A request has been received while listening on port 69."); if(!quite[0]) Packet.displayReceivedPacket(receivePacket, "ConnectionListener"); String connectionId = "connectionManager No "+String.valueOf(activeConnectionsCount); Thread connectionManagerThread = new Thread(new ConnectionManager(receivePacket, quite),connectionId); activeConnectionsCount++; connectionManagerThread.start(); System.out.println("New connection manager has formed: "+connectionId); } } }
5c57e3ebaab35a47d3fa73f4e1fc470f62d5a846
79f595dd6263834cf03781dd0d90adc9b86209d0
/JavaAssignment/src/ankitaS/Assignment2_Q6.java
0175ea47150444bb8500b686eec1161434b64400
[]
no_license
KrishnaKTechnocredits/JAVATechnoCreditsG3
c2eb4e07d6c31dd59c2ac2f83aac2f1cc7d9a951
7608c8f4e7ed9011c141a4fcbf03ea0af40a4fb2
refs/heads/master
2021-10-23T18:36:59.825664
2019-03-19T06:05:21
2019-03-19T06:05:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,039
java
//program to check equality of two array package ankitaS; public class Assignment2_Q6 { void CheckEqualityofArray(int array1[], int array2[]) { // method to check // equality of two // array boolean flag = true; if (array1.length == array2.length) { for (int array_index = 0; array_index < array1.length; array_index++) { if (array1[array_index] != array2[array_index]) { flag = false; } } if (flag == true) { System.out.println("Two array are equal"); } else { System.out.println("Two array are not equal"); } } else { System.out.println("Array length should be equal"); } } public static void main(String[] args) { // TODO Auto-generated method stub InputFromUser input = new InputFromUser(); Assignment2_Q6 assignment2_Q6 = new Assignment2_Q6(); System.out.println("Enter size and element of 2 array "); int array1[] = input.InputArray(); int array2[] = input.InputArray(); assignment2_Q6.CheckEqualityofArray(array1, array2); } }
8a86119dcbdcdb530542720324c4c2dc4296d2c8
48407c6f112031e6b67401679fdadf4dd3200581
/app/src/main/java/com/glodon/bim/business/qualityManage/model/ModelModel.java
f714d3f2aae742b763516d648f4230868f0564a0
[]
no_license
heartsoul/estate-android
33a346738c3a9fbe9490a027818f499ea262c050
bb6a84551f7ac5c6593cbee570e6ad50bca11ce8
refs/heads/master
2020-03-12T00:04:56.522325
2018-04-16T07:49:10
2018-04-16T07:49:10
130,340,484
0
0
null
null
null
null
UTF-8
Java
false
false
2,830
java
package com.glodon.bim.business.qualityManage.model; import android.text.TextUtils; import com.glodon.bim.basic.log.LogUtil; import com.glodon.bim.basic.network.NetRequest; import com.glodon.bim.business.greendao.provider.DaoProvider; import com.glodon.bim.business.qualityManage.bean.ModelListBean; import com.glodon.bim.business.qualityManage.bean.ModelSingleListItem; import com.glodon.bim.business.qualityManage.bean.ModelSpecialListItem; import com.glodon.bim.business.qualityManage.bean.ProjectVersionBean; import com.glodon.bim.business.qualityManage.contract.ModelContract; import java.util.List; import rx.Observable; /** * 描述:选择模型 * 作者:zhourf on 2017/11/22 * 邮箱:[email protected] */ public class ModelModel implements ModelContract.Model { public String cookie; public ModelModel() { cookie = new DaoProvider().getCookie(); } /** * 查询单体列表 * * @param id 项目id */ @Override public Observable<List<ModelSingleListItem>> getSingleList(long id) { return NetRequest.getInstance().getCall( ModelApi.class).getSingleList(id, cookie); } /** * 查询专业列表 */ @Override public Observable<List<ModelSpecialListItem>> getSpecialList() { return NetRequest.getInstance().getCall( ModelApi.class).getSpecialList(false,cookie); } /** * 获取当前已发布的最新版本 */ @Override public Observable<ProjectVersionBean> getLatestVersion(long projectId) { return NetRequest.getInstance().getCall( ModelApi.class).getLatestVersion(projectId, cookie); } /** * 根据专业和单体查询模型列表 * * @param projectId 项目id * @param projectVersionId 最新版本 * @param buildingId 单体 * @param specialtyCode 专业 */ @Override public Observable<ModelListBean> getModelList(long projectId, String projectVersionId, long buildingId, String specialtyCode) { LogUtil.e("projectId="+projectId); LogUtil.e("projectVersionId="+projectVersionId); LogUtil.e("buildingId="+buildingId); LogUtil.e("specialtyCode="+specialtyCode); if (buildingId != 0 && !TextUtils.isEmpty(specialtyCode)) { return NetRequest.getInstance().getCall(ModelApi.class).getModelList(projectId, projectVersionId, buildingId, specialtyCode, cookie); } else if (buildingId != 0) { return NetRequest.getInstance().getCall( ModelApi.class).getModelList(projectId, projectVersionId, buildingId, cookie); } else if (!TextUtils.isEmpty(specialtyCode)) { return NetRequest.getInstance().getCall( ModelApi.class).getModelList(projectId, projectVersionId, specialtyCode, cookie); } return null; } }
a8b4cceb66a6baac194cb76d3275c194a3c3b3d3
487c321221d953876aed88398d8ee19f8391d410
/app/src/main/java/com/yfy/app/info_submit/frament/EditTextFragment.java
695220c30c5dd91e98bf060d162f0b6797e1a6c1
[]
no_license
Zhaoxianxv/rebirth
e3bd0734344e955ac7adec99e1c08095db04463c
34452d363c4815266e033737b7be68e71495e2ea
refs/heads/master
2020-09-15T03:39:46.068726
2020-09-04T13:13:47
2020-09-04T13:13:47
223,339,537
0
0
null
null
null
null
UTF-8
Java
false
false
4,425
java
package com.yfy.app.info_submit.frament; import android.annotation.SuppressLint; import android.inputmethodservice.KeyboardView; import android.os.Bundle; import android.text.Editable; import android.text.Selection; import android.text.TextWatcher; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.EditText; import android.widget.RelativeLayout; import android.widget.TextView; import com.yfy.app.info_submit.activity.FormWriteItemActivity; import com.yfy.app.info_submit.constants.InfosConstant; import com.yfy.app.info_submit.infos.ItemType; import com.yfy.app.info_submit.infos.WriteItem; import com.yfy.app.info_submit.utils.KeyboardUtil; import com.yfy.app.info_submit.utils.LegalityJudger; import com.yfy.app.info_submit.utils.Util; import com.yfy.rebirth.R; public class EditTextFragment extends AbstractFragment implements OnClickListener, TextWatcher { private EditText item_edittext; private TextView postfix_tv; private RelativeLayout wu_rela; private TextView if_wu_tv; private KeyboardView keyboardview; private KeyboardUtil keyboardUtil; private View view; private WriteItem writeItem; private boolean isSfz; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment_edittext, null); initView(); return view; } @SuppressLint("CutPasteId") private void initView() { int position1 = getArguments().getInt("position1"); int position2 = getArguments().getInt("position2"); writeItem = InfosConstant.totalList.get(position1).get(position2); String itemName = writeItem.getItemName(); String itemValue = writeItem.getItemValue(); if (itemValue.equals("无") || LegalityJudger.isEmpty(itemValue)) { itemValue = ""; ((FormWriteItemActivity) getActivity()).setOkClicked(false); } else { ((FormWriteItemActivity) getActivity()).setOkClicked(true); } item_edittext = (EditText) view.findViewById(R.id.item_edittext); postfix_tv = (TextView) view.findViewById(R.id.postfix_tv); wu_rela = (RelativeLayout) view.findViewById(R.id.wu_rela); if_wu_tv = (TextView) view.findViewById(R.id.if_wu_tv); keyboardview = (KeyboardView) view.findViewById(R.id.keyboard_view); if_wu_tv.setText("若暂无" + "“" + itemName + "”," + "请点击..."); item_edittext.setHint("请输入" + itemName); item_edittext.setText(itemValue); Editable etext = item_edittext.getText(); Selection.setSelection(etext, etext.length()); item_edittext.addTextChangedListener(this); ItemType itemType = writeItem.getItemType(); if (itemType.getPostfix() != null && !itemType.getPostfix().equals("")) { postfix_tv.setVisibility(View.VISIBLE); postfix_tv.setText(itemType.getPostfix()); } if (itemType.getSysmbol() == 1) { keyboardUtil = new KeyboardUtil(keyboardview, getActivity(), item_edittext, R.xml.symbols1); } else if (itemType.getSysmbol() == 2) { keyboardUtil = new KeyboardUtil(keyboardview, getActivity(), item_edittext, R.xml.symbols2); } if (keyboardUtil != null) { Util.hideSoftInputMethod(getActivity(), item_edittext); keyboardUtil.showKeyboard(); } if (itemType.isCanWu()) { wu_rela.setVisibility(View.VISIBLE); wu_rela.setOnClickListener(this); } if (writeItem.getItemKey().equals("sfz") && itemType.getSysmbol() == 1) { isSfz = true; } } @Override public String getData() { return item_edittext.getText().toString(); } public void setHint(String itemName) { item_edittext.setHint("请输入" + itemName); } @Override public void onClick(View v) { item_edittext.setText("无"); Editable ed = item_edittext.getText(); Selection.setSelection(ed, ed.length()); writeItem.setItemValue("无"); getActivity().finish(); } @Override public void afterTextChanged(Editable arg0) { // TODO Auto-generated method stub } @Override public void beforeTextChanged(CharSequence c, int arg1, int arg2, int arg3) { } @Override public void onTextChanged(CharSequence c, int arg1, int arg2, int arg3) { String s = c.toString().trim(); if (c == null || s.equals("") || (isSfz && !LegalityJudger.ShenFenHaoMaTip(s))) { ((FormWriteItemActivity) getActivity()).setOkClicked(false); } else { ((FormWriteItemActivity) getActivity()).setOkClicked(true); } } }
f3d08f5a68f5182c3976f3251e8190b50ecee5e2
c64ab493f263f716787c81c5abaed8246e8e4dc8
/src/protect_oiler/Problem22.java
b073150c431ffae3f084bc074a0ea112560badfa
[]
no_license
rakshendra/Practice
13ad8b75671ea967e90393deccf533b19306f0aa
8d04f35e7f45f586bef4f3ecb2eaccc7c6c7365e
refs/heads/master
2020-04-13T02:05:36.248753
2020-02-27T17:23:16
2020-02-27T17:23:16
162,893,014
0
0
null
null
null
null
UTF-8
Java
false
false
238
java
package src.protect_oiler; import java.io.File; public class Problem22 { public static void main(String[] args){ File file = new File("C:\\Users\\raksh\\IdeaProjects\\Practice\\src\\protect_oiler\\p022_names.txt"); } }
be22ef7d5ec23d0fdcf00d265408e7136f18ca63
6acab3aee074d72b173fda7738c2b8b43fea3566
/Strategy/StrategyThree.java
fcd8c7e280db6a14c9dc8a68c6c6eee911847932
[]
no_license
androidwolf/designpattern--Stategy
5f98f40fc489dadf6b14b7081ba923045a008dac
ab0a0d8774166c928187aa92209116c6f6f677b1
refs/heads/master
2020-05-30T14:46:54.962063
2016-09-27T01:03:49
2016-09-27T01:03:49
69,305,731
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
package Strategy; import java.util.Arrays; public class StrategyThree implements ComputableStrategy { @Override public double computableStrategy(double[] a) { if (a.length <= 2) return 0; double score = 0, sum = 0; Arrays.sort(a); for (int i = 1; i < a.length - 1; i++) { sum = sum + a[i]; } score = sum/(a.length-2); return score; } }
ce56cbed175fcb3e60764f6dc5c5dd8f075e243e
a360efd58fe8a7d52cb66525c762caf424883dcc
/BigStudent2/app/src/main/java/com/example/laptop/bigstudent2/base/BaseActivity.java
4de5bc8ecb2cbaaf45ad63ba9b6fd12d78c7eb34
[]
no_license
WilliamEyre/bigStudent
dc1c389157c9fead13fbae073272e9255fbb6222
d83672953727a37687348492de59fb69a873aada
refs/heads/master
2021-08-20T02:55:22.244329
2017-11-28T02:33:07
2017-11-28T02:33:07
112,263,552
0
0
null
null
null
null
UTF-8
Java
false
false
943
java
package com.example.laptop.bigstudent2.base; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import com.example.laptop.bigstudent2.app.App; import com.example.laptop.bigstudent2.utils.Tutils; /** * Created by Laptop on 2017/11/28. */ public abstract class BaseActivity <P extends BasePresenter,M extends BaseModel> extends AppCompatActivity { public P mPresenter; public M mModle; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(getLayoutId()); App.baseActivity = this; mPresenter = Tutils.getT(this,0); mModle = Tutils.getT(this,1); if (this instanceof BaseView){ mPresenter.setMV(mModle,this); } initView(); } public abstract void initView(); protected abstract int getLayoutId(); }
123ea2267b282a07005cd1b1c8dd8578c8b00c67
9a52eeaf13f9f7593dbe3de539469aca1c233757
/app/src/main/java/com/android/tv/TvApplication.java
be1bd2ecbaef6f29c18459b0155bf3b141a1dcfa
[]
no_license
johnjcool/TV
1942eb4c34bb753e8dbf16ebd99114cf0a3a26da
e1ed59a055c41dcdc72e49df7175c5fa469374ad
refs/heads/master
2020-03-31T22:30:02.802799
2018-10-11T17:19:30
2018-10-11T17:19:30
152,620,829
0
1
null
null
null
null
UTF-8
Java
false
false
21,039
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tv; import android.annotation.TargetApi; import android.app.Activity; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.media.tv.TvContract; import android.media.tv.TvInputInfo; import android.media.tv.TvInputManager; import android.media.tv.TvInputManager.TvInputCallback; import android.os.Build; import android.os.Bundle; import android.support.annotation.Nullable; import android.text.TextUtils; import android.util.Log; import android.view.KeyEvent; import com.android.tv.common.BaseApplication; import com.android.tv.common.concurrent.NamedThreadFactory; import com.android.tv.common.feature.CommonFeatures; import com.android.tv.common.recording.RecordingStorageStatusManager; import com.android.tv.common.ui.setup.animation.SetupAnimationHelper; import com.android.tv.common.util.Clock; import com.android.tv.common.util.Debug; import com.android.tv.common.util.SharedPreferencesUtils; import com.android.tv.data.ChannelDataManager; import com.android.tv.data.PreviewDataManager; import com.android.tv.data.ProgramDataManager; import com.android.tv.data.epg.EpgFetcher; import com.android.tv.data.epg.EpgFetcherImpl; import com.android.tv.dvr.DvrDataManager; import com.android.tv.dvr.DvrDataManagerImpl; import com.android.tv.dvr.DvrManager; import com.android.tv.dvr.DvrScheduleManager; import com.android.tv.dvr.DvrStorageStatusManager; import com.android.tv.dvr.DvrWatchedPositionManager; import com.android.tv.dvr.recorder.RecordingScheduler; import com.android.tv.dvr.ui.browse.DvrBrowseActivity; import com.android.tv.recommendation.ChannelPreviewUpdater; import com.android.tv.recommendation.RecordedProgramPreviewUpdater; import com.android.tv.tuner.TunerInputController; import com.android.tv.tuner.util.TunerInputInfoUtils; import com.android.tv.util.SetupUtils; import com.android.tv.util.TvInputManagerHelper; import com.android.tv.util.Utils; import java.util.List; import java.util.concurrent.Executor; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * Live TV application. * * <p>This includes all the Google specific hooks. */ public abstract class TvApplication extends BaseApplication implements TvSingletons, Starter { private static final String TAG = "TvApplication"; private static final boolean DEBUG = false; /** Namespace for LiveChannels configs. LiveChannels configs are kept in piper. */ public static final String CONFIGNS_P4 = "configns:p4"; /** * Broadcast Action: The user has updated LC to a new version that supports tuner input. {@link * TunerInputController} will receive this intent to check the existence of tuner input when the * new version is first launched. */ public static final String ACTION_APPLICATION_FIRST_LAUNCHED = " com.android.tv.action.APPLICATION_FIRST_LAUNCHED"; private static final String PREFERENCE_IS_FIRST_LAUNCH = "is_first_launch"; private static final NamedThreadFactory THREAD_FACTORY = new NamedThreadFactory("tv-app-db"); private static final ExecutorService DB_EXECUTOR = Executors.newSingleThreadExecutor(THREAD_FACTORY); private String mVersionName = ""; private final MainActivityWrapper mMainActivityWrapper = new MainActivityWrapper(); private SelectInputActivity mSelectInputActivity; private ChannelDataManager mChannelDataManager; private volatile ProgramDataManager mProgramDataManager; private PreviewDataManager mPreviewDataManager; private DvrManager mDvrManager; private DvrScheduleManager mDvrScheduleManager; private DvrDataManager mDvrDataManager; private DvrWatchedPositionManager mDvrWatchedPositionManager; private RecordingScheduler mRecordingScheduler; private RecordingStorageStatusManager mDvrStorageStatusManager; @Nullable private InputSessionManager mInputSessionManager; // STOP-SHIP: Remove this variable when Tuner Process is split to another application. // When this variable is null, we don't know in which process TvApplication runs. private Boolean mRunningInMainProcess; private TvInputManagerHelper mTvInputManagerHelper; private boolean mStarted; private EpgFetcher mEpgFetcher; private TunerInputController mTunerInputController; @Override public void onCreate() { super.onCreate(); SharedPreferencesUtils.initialize( this, new Runnable() { @Override public void run() { if (mRunningInMainProcess != null && mRunningInMainProcess) { checkTunerServiceOnFirstLaunch(); } } }); try { PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0); mVersionName = pInfo.versionName; } catch (PackageManager.NameNotFoundException e) { Log.w(TAG, "Unable to find package '" + getPackageName() + "'.", e); mVersionName = ""; } Log.i(TAG, "Starting Live TV " + getVersionName()); // In SetupFragment, transitions are set in the constructor. Because the fragment can be // created in Activity.onCreate() by the framework, SetupAnimationHelper should be // initialized here before Activity.onCreate() is called. mEpgFetcher = EpgFetcherImpl.create(this); SetupAnimationHelper.initialize(this); getTvInputManagerHelper(); Log.i(TAG, "Started Live TV " + mVersionName); Debug.getTimer(Debug.TAG_START_UP_TIMER).log("finish TvApplication.onCreate"); } /** Initializes application. It is a noop if called twice. */ @Override public void start() { if (mStarted) { return; } mStarted = true; mRunningInMainProcess = true; Debug.getTimer(Debug.TAG_START_UP_TIMER).log("start TvApplication.start"); if (mRunningInMainProcess) { getTvInputManagerHelper() .addCallback( new TvInputCallback() { @Override public void onInputAdded(String inputId) { if (TvFeatures.TUNER.isEnabled(TvApplication.this) && TextUtils.equals( inputId, getEmbeddedTunerInputId())) { TunerInputInfoUtils.updateTunerInputInfo( TvApplication.this); } handleInputCountChanged(); } @Override public void onInputRemoved(String inputId) { handleInputCountChanged(); } }); if (TvFeatures.TUNER.isEnabled(this)) { // If the tuner input service is added before the app is started, we need to // handle it here. TunerInputInfoUtils.updateTunerInputInfo(TvApplication.this); } if (CommonFeatures.DVR.isEnabled(this)) { mDvrScheduleManager = new DvrScheduleManager(this); mDvrManager = new DvrManager(this); mRecordingScheduler = RecordingScheduler.createScheduler(this); } mEpgFetcher.startRoutineService(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { ChannelPreviewUpdater.getInstance(this).startRoutineService(); RecordedProgramPreviewUpdater.getInstance(this) .updatePreviewDataForRecordedPrograms(); } } Debug.getTimer(Debug.TAG_START_UP_TIMER).log("finish TvApplication.start"); } private void checkTunerServiceOnFirstLaunch() { SharedPreferences sharedPreferences = this.getSharedPreferences( SharedPreferencesUtils.SHARED_PREF_FEATURES, Context.MODE_PRIVATE); boolean isFirstLaunch = sharedPreferences.getBoolean(PREFERENCE_IS_FIRST_LAUNCH, true); if (isFirstLaunch) { if (DEBUG) Log.d(TAG, "Congratulations, it's the first launch!"); getTunerInputController() .onCheckingUsbTunerStatus(this, ACTION_APPLICATION_FIRST_LAUNCHED); SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean(PREFERENCE_IS_FIRST_LAUNCH, false); editor.apply(); } } @Override public EpgFetcher getEpgFetcher() { return mEpgFetcher; } @Override public synchronized SetupUtils getSetupUtils() { return SetupUtils.createForTvSingletons(this); } /** Returns the {@link DvrManager}. */ @Override public DvrManager getDvrManager() { return mDvrManager; } /** Returns the {@link DvrScheduleManager}. */ @Override public DvrScheduleManager getDvrScheduleManager() { return mDvrScheduleManager; } /** Returns the {@link RecordingScheduler}. */ @Override @Nullable public RecordingScheduler getRecordingScheduler() { return mRecordingScheduler; } /** Returns the {@link DvrWatchedPositionManager}. */ @Override public DvrWatchedPositionManager getDvrWatchedPositionManager() { if (mDvrWatchedPositionManager == null) { mDvrWatchedPositionManager = new DvrWatchedPositionManager(this); } return mDvrWatchedPositionManager; } @Override @TargetApi(Build.VERSION_CODES.N) public InputSessionManager getInputSessionManager() { if (mInputSessionManager == null) { mInputSessionManager = new InputSessionManager(this); } return mInputSessionManager; } /** Returns {@link ChannelDataManager}. */ @Override public ChannelDataManager getChannelDataManager() { if (mChannelDataManager == null) { mChannelDataManager = new ChannelDataManager(this, getTvInputManagerHelper()); mChannelDataManager.start(); } return mChannelDataManager; } @Override public boolean isChannelDataManagerLoadFinished() { return mChannelDataManager != null && mChannelDataManager.isDbLoadFinished(); } /** Returns {@link ProgramDataManager}. */ @Override public ProgramDataManager getProgramDataManager() { if (mProgramDataManager != null) { return mProgramDataManager; } Utils.runInMainThreadAndWait( new Runnable() { @Override public void run() { if (mProgramDataManager == null) { mProgramDataManager = new ProgramDataManager(TvApplication.this); mProgramDataManager.start(); } } }); return mProgramDataManager; } @Override public boolean isProgramDataManagerCurrentProgramsLoadFinished() { return mProgramDataManager != null && mProgramDataManager.isCurrentProgramsLoadFinished(); } /** Returns {@link PreviewDataManager}. */ @TargetApi(Build.VERSION_CODES.O) @Override public PreviewDataManager getPreviewDataManager() { if (mPreviewDataManager == null) { mPreviewDataManager = new PreviewDataManager(this); mPreviewDataManager.start(); } return mPreviewDataManager; } /** Returns {@link DvrDataManager}. */ @TargetApi(Build.VERSION_CODES.N) @Override public DvrDataManager getDvrDataManager() { if (mDvrDataManager == null) { DvrDataManagerImpl dvrDataManager = new DvrDataManagerImpl(this, Clock.SYSTEM); mDvrDataManager = dvrDataManager; dvrDataManager.start(); } return mDvrDataManager; } @Override @TargetApi(Build.VERSION_CODES.N) public RecordingStorageStatusManager getRecordingStorageStatusManager() { if (mDvrStorageStatusManager == null) { mDvrStorageStatusManager = new DvrStorageStatusManager(this); } return mDvrStorageStatusManager; } /** Returns the main activity information. */ @Override public MainActivityWrapper getMainActivityWrapper() { return mMainActivityWrapper; } /** Returns {@link TvInputManagerHelper}. */ @Override public TvInputManagerHelper getTvInputManagerHelper() { if (mTvInputManagerHelper == null) { mTvInputManagerHelper = new TvInputManagerHelper(this); mTvInputManagerHelper.start(); } return mTvInputManagerHelper; } @Override public synchronized TunerInputController getTunerInputController() { if (mTunerInputController == null) { mTunerInputController = new TunerInputController( ComponentName.unflattenFromString(getEmbeddedTunerInputId())); } return mTunerInputController; } @Override public boolean isRunningInMainProcess() { return mRunningInMainProcess != null && mRunningInMainProcess; } /** * SelectInputActivity is set in {@link SelectInputActivity#onCreate} and cleared in {@link * SelectInputActivity#onDestroy}. */ public void setSelectInputActivity(SelectInputActivity activity) { mSelectInputActivity = activity; } public void handleGuideKey() { if (!mMainActivityWrapper.isResumed()) { startActivity(new Intent(Intent.ACTION_VIEW, TvContract.Programs.CONTENT_URI)); } else { mMainActivityWrapper.getMainActivity().getOverlayManager().toggleProgramGuide(); } } /** Handles the global key KEYCODE_TV. */ public void handleTvKey() { if (!mMainActivityWrapper.isResumed()) { startMainActivity(null); } } /** Handles the global key KEYCODE_DVR. */ public void handleDvrKey() { startActivity(new Intent(this, DvrBrowseActivity.class)); } /** Handles the global key KEYCODE_TV_INPUT. */ public void handleTvInputKey() { TvInputManager tvInputManager = (TvInputManager) getSystemService(Context.TV_INPUT_SERVICE); List<TvInputInfo> tvInputs = tvInputManager.getTvInputList(); int inputCount = 0; boolean hasTunerInput = false; for (TvInputInfo input : tvInputs) { if (input.isPassthroughInput()) { if (!input.isHidden(this)) { ++inputCount; } } else if (!hasTunerInput) { hasTunerInput = true; ++inputCount; } } if (inputCount < 2) { return; } Activity activityToHandle = mMainActivityWrapper.isResumed() ? mMainActivityWrapper.getMainActivity() : mSelectInputActivity; if (activityToHandle != null) { // If startActivity is called, MainActivity.onPause is unnecessarily called. To // prevent it, MainActivity.dispatchKeyEvent is directly called. activityToHandle.dispatchKeyEvent( new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_TV_INPUT)); activityToHandle.dispatchKeyEvent( new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_TV_INPUT)); } else if (mMainActivityWrapper.isStarted()) { Bundle extras = new Bundle(); extras.putString(Utils.EXTRA_KEY_ACTION, Utils.EXTRA_ACTION_SHOW_TV_INPUT); startMainActivity(extras); } else { startActivity( new Intent(this, SelectInputActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); } } private void startMainActivity(Bundle extras) { // The use of FLAG_ACTIVITY_NEW_TASK enables arbitrary applications to access the intent // sent to the root activity. Having said that, we should be fine here since such an intent // does not carry any important user data. Intent intent = new Intent(this, MainActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); if (extras != null) { intent.putExtras(extras); } startActivity(intent); } /** * Returns the version name of the live channels. * * @see PackageInfo#versionName */ public String getVersionName() { return mVersionName; } /** * Checks the input counts and enable/disable TvActivity. Also upda162 the input list in {@link * SetupUtils}. */ @Override public void handleInputCountChanged() { handleInputCountChanged(false, false, false); } /** * Checks the input counts and enable/disable TvActivity. Also updates the input list in {@link * SetupUtils}. * * @param calledByTunerServiceChanged true if it is called when BaseTunerTvInputService is * enabled or disabled. * @param tunerServiceEnabled it's available only when calledByTunerServiceChanged is true. * @param dontKillApp when TvActivity is enabled or disabled by this method, the app restarts by * default. But, if dontKillApp is true, the app won't restart. */ public void handleInputCountChanged( boolean calledByTunerServiceChanged, boolean tunerServiceEnabled, boolean dontKillApp) { TvInputManager inputManager = (TvInputManager) getSystemService(Context.TV_INPUT_SERVICE); boolean enable = (calledByTunerServiceChanged && tunerServiceEnabled) || TvFeatures.UNHIDE.isEnabled(TvApplication.this); if (!enable) { List<TvInputInfo> inputs = inputManager.getTvInputList(); boolean skipTunerInputCheck = false; // Enable the TvActivity only if there is at least one tuner type input. if (!skipTunerInputCheck) { for (TvInputInfo input : inputs) { if (calledByTunerServiceChanged && !tunerServiceEnabled && getEmbeddedTunerInputId().equals(input.getId())) { continue; } if (input.getType() == TvInputInfo.TYPE_TUNER) { enable = true; break; } } } if (DEBUG) Log.d(TAG, "Enable MainActivity: " + enable); } PackageManager packageManager = getPackageManager(); ComponentName name = new ComponentName(this, TvActivity.class); int newState = enable ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED : PackageManager.COMPONENT_ENABLED_STATE_DISABLED; if (packageManager.getComponentEnabledSetting(name) != newState) { packageManager.setComponentEnabledSetting( name, newState, dontKillApp ? PackageManager.DONT_KILL_APP : 0); Log.i(TAG, (enable ? "Un-hide" : "Hide") + " Live TV."); } getSetupUtils().onInputListUpdated(inputManager); } @Override public Executor getDbExecutor() { return DB_EXECUTOR; } }
33b7567bbabcd0a0382304f312a4072e3a653411
690c8424361f1f208348e496b5d4cbecdce928a1
/app/src/androidTest/java/com/trilochan/topic4/ExampleInstrumentedTest.java
40a2717087181e24a5416b762df49d941d50d7c4
[]
no_license
Trilochankc/Topic4
ed6b89e5266b9a63a6e969eddc40c3553ef8e868
65d04f2ec45405f95de8ddb6f6f9ff4cd14762c2
refs/heads/master
2020-09-14T07:49:23.702291
2019-11-21T02:20:31
2019-11-21T02:20:31
223,069,415
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
package com.trilochan.topic4; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.trilochan.topic4", appContext.getPackageName()); } }
0c7fa0e22bd7c859e1b9756f6836b5229665c3bb
2fc236dcb4ebf52e7a447471efdbcd8761d5a6bd
/Assignment 2/UpdateBookDialog.java
49784e7bea6574971335e0d7c5bd020d98fa0c94
[]
no_license
ZenonZeni/Object-Oriented-Programming
802eea1ebe5e2acfff1d770656b481d1bf5ac980
4f9d37738e4b39b2c80cf71f8ca4f570cc9b7d07
refs/heads/main
2023-02-01T00:47:50.713405
2020-12-16T07:13:34
2020-12-16T07:13:34
308,821,405
0
0
null
null
null
null
UTF-8
Java
false
false
1,259
java
package A2; /** * The dialog for updating a book. * @edited by: Christopher Nguyen * A2 * @date: 11/14/2019 */ public class UpdateBookDialog extends BookPropertyDialog { /** * Constructor */ public UpdateBookDialog(BookListWindow owner) { super(owner, "Update Book"); titleTextField.setEnabled(false); saveButton.setText("UPDATE"); } /** * Initializes the text fields with the given book. * @param Book book */ public void showBook(Book book) { // TODO Add your code here... titleTextField.setText(book.getTitle()); authorsTextField.setText(book.getAuthors()); pagesTextField.setText(Integer.toString(book.getPages())); if (book.getCategory()==Book.BookCategory.Programming) { categoryComboBox.setSelectedIndex(0); } else if (book.getCategory()==Book.BookCategory.Database) { categoryComboBox.setSelectedIndex(1); } else{ categoryComboBox.setSelectedIndex(2); } this.setVisible(true); } @Override /** * @param Book book * note: calls a method to update the object with the give parama book */ protected void doSave(Book book) { bookCollection.update(book); } }
98f6d54ef55d87ebc0bcb2b5a8064868938f9896
c149a4c519aeb5ea2cc57502b6881c22272f2519
/src/br/com/estudos15_override_teste/A.java
fd8bcbdf6e76490149a258cf6331ed9a62e5f551
[]
no_license
GabrielGGhost/EstudoJavaTraineeAJ1-AJ3
cc8a747c0e1b1297dbed7dac1f4d4f5f60a75f25
45c3d1cad2dd0e4ba1c5880536a6269ea1ebad82
refs/heads/master
2022-12-25T07:10:24.231491
2020-10-03T03:07:45
2020-10-03T03:07:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
129
java
package br.com.estudos15_override_teste; public class A { public void testar() { System.out.println("Testando A..."); } }
e5aeb80d09992f9ad1e2c25d959c78869726a2a7
f9f7f0b8f8666dee50cba2158b1ce64abceb0535
/mini_compiler/src/main/java/com/jihan/mini_compiler/PayEntryVisitor.java
c629fdc5069104c375099dbca99799d81aa42cb0
[ "MIT" ]
permissive
Jihannn/LearningDemo
8c48811cf11645ad52216286b2c233e6f8c80a2f
f8003b849ef1752f0b3fbf3946151358fb1bd796
refs/heads/master
2020-07-02T02:37:57.141618
2019-08-31T05:37:07
2019-08-31T05:37:07
201,388,673
0
0
null
null
null
null
UTF-8
Java
false
false
1,499
java
package com.jihan.mini_compiler; import com.squareup.javapoet.JavaFile; import com.squareup.javapoet.TypeName; import com.squareup.javapoet.TypeSpec; import java.io.IOException; import javax.annotation.processing.Filer; import javax.lang.model.element.Modifier; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.SimpleAnnotationValueVisitor7; final class PayEntryVisitor extends SimpleAnnotationValueVisitor7<Void, Void> { private final Filer FILER; private String mPackageName = null; PayEntryVisitor(Filer FILER) { this.FILER = FILER; } @Override public Void visitString(String s, Void p) { mPackageName = s; return p; } @Override public Void visitType(TypeMirror t, Void p) { generateJavaCode(t); return p; } private void generateJavaCode(TypeMirror typeMirror) { final TypeSpec targetActivity = TypeSpec.classBuilder("WXPayEntryActivity") .addModifiers(Modifier.PUBLIC) .addModifiers(Modifier.FINAL) .superclass(TypeName.get(typeMirror)) .build(); final JavaFile javaFile = JavaFile.builder(mPackageName + ".wxapi", targetActivity) .addFileComment("微信支付入口文件") .build(); try { javaFile.writeTo(FILER); } catch (IOException e) { e.printStackTrace(); } } }
83678c19cc6db6435ca317687fad74231d796c93
ea3f45400ac04f1c148beb849619327a964fc5ed
/src/standardtest/may2017/prob2/LibraryMember.java
71bfd5076bc92fd19ef1b20c1bbd896f5a1eff1e
[]
no_license
vorleakchy/mpp
d12053c0b6a39e5a3b16b4cf7fc4900c70f58a56
53ea54e336099ebe83fab3394ea523314f8016e6
refs/heads/master
2020-04-08T14:18:30.863590
2018-12-20T00:00:39
2018-12-20T00:00:39
159,431,261
1
0
null
null
null
null
UTF-8
Java
false
false
818
java
package standardtest.may2017.prob2; public class LibraryMember { private String memberId; private String firstName; private String lastName; private String phone; private CheckoutRecord checkoutRecord; public LibraryMember(String memberId, String firstName, String lastName, String phone) { super(); this.memberId = memberId; this.firstName = firstName; this.lastName = lastName; this.phone = phone; } public String getMemberId() { return memberId; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public String getPhone() { return phone; } public CheckoutRecord getCheckoutRecord() { return checkoutRecord; } public void setCheckoutRecord(CheckoutRecord checkoutRecord) { this.checkoutRecord = checkoutRecord; } }
ef3c67b42128a7226a62da2632a9543a2da461fa
fd7632b65edcc03954ef021a12d73e0913f152f7
/common-hibernate/src/main/java/com/htp/repository/spingdata/SpringDataRoleDao.java
2b709a4f3056a75e0644783f7b425d9f07f9636a
[]
no_license
Andreibich/project_stock_jd2
17c31bbd67e76ae90b1416604c9e7834c6f8b6df
e6627392eacd14ab4b442ca686dcebf594f08a57
refs/heads/master
2022-06-22T16:52:48.413772
2019-06-03T19:12:08
2019-06-03T19:12:10
187,281,684
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package com.htp.repository.spingdata; import com.htp.domain.hibernate.HibernateRole; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; public interface SpringDataRoleDao extends JpaRepository<HibernateRole, Long> { HibernateRole findByRoleName(String roleName); }
d3232b4f19111f552cf8d77e15fde8c23ad66efa
cff02be8ffd197a0c734647cdfef112a197dbb04
/app/src/main/java/ir/android_developing/chargeapp/GiftcardPurchaseFragment.java
2035891b56e470d3d9057f97f6fb183f2f161150
[]
no_license
mehrdadbahri/charge-app-android
970f2fe77c865ec1561a2d809be329b8d5a2a661
350251d0af64466d6a9983f11b33d79c8063344b
refs/heads/master
2021-10-28T22:28:27.287477
2019-01-30T18:40:57
2019-01-30T18:40:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,098
java
package ir.android_developing.chargeapp; import android.app.Activity; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.database.Cursor; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.provider.ContactsContract; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.app.ActionBar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.AppCompatButton; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.EditText; import android.widget.ImageView; import android.widget.RadioButton; import android.widget.TextView; import com.androidnetworking.AndroidNetworking; import com.androidnetworking.error.ANError; import com.androidnetworking.interfaces.JSONObjectRequestListener; import com.google.gson.Gson; import net.steamcrafted.materialiconlib.MaterialDrawableBuilder; import org.json.JSONException; import org.json.JSONObject; import cn.pedant.SweetAlert.SweetAlertDialog; import fr.castorflex.android.smoothprogressbar.SmoothProgressBar; public class GiftcardPurchaseFragment extends Fragment implements View.OnClickListener { private RadioButton saman, mellat, zarinpal; private String selectedGateway; private EditText editTextPhone; private SharedPreferences sharedpreferences; private String selectedGiftcardId; private AppCompatButton buyBtn; private SmoothProgressBar progressBar; private Boolean progressBarStatus = false; private View view; public GiftcardPurchaseFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ActionBar actionBar = ((AppCompatActivity) getActivity()).getSupportActionBar(); assert actionBar != null; actionBar.setTitle("خرید گیفت کارت"); actionBar.setDisplayShowHomeEnabled(true); actionBar.setDisplayHomeAsUpEnabled(true); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view = inflater.inflate(R.layout.fragment_giftcard_purchase, container, false); sharedpreferences = getContext().getSharedPreferences("KiooskData", Context.MODE_PRIVATE); Bundle bundle = this.getArguments(); String strPackage = bundle.getString("selectedGiftcard"); Package p = new Gson().fromJson(strPackage, Package.class); selectedGiftcardId = p.getId(); ((TextView) view.findViewById(R.id.tv_selected_giftcard_price)).setText(p.getPrice() + " " + "تومان"); ((TextView) view.findViewById(R.id.tv_selected_giftcard_detail)).setText(p.getName()); ((ImageView) view.findViewById(R.id.iv_selected_giftcard_logo)).setImageDrawable(getGiftcardDrawable(p.getId())); saman = (RadioButton) view.findViewById(R.id.saman_gateway); mellat = (RadioButton) view.findViewById(R.id.mellat_gateway); zarinpal = (RadioButton) view.findViewById(R.id.zarrinpal_gateway); saman.setOnClickListener(v -> { saman.setChecked(true); mellat.setChecked(false); zarinpal.setChecked(false); selectedGateway = "Saman"; }); mellat.setOnClickListener(v -> { saman.setChecked(false); mellat.setChecked(true); zarinpal.setChecked(false); selectedGateway = "Mellat"; }); zarinpal.setOnClickListener(v -> { saman.setChecked(false); mellat.setChecked(false); zarinpal.setChecked(true); selectedGateway = "ZarinPal"; }); buyBtn = (AppCompatButton) view.findViewById(R.id.buy_selected_giftcard_btn); Drawable cartIcon = MaterialDrawableBuilder.with(getContext()) .setIcon(MaterialDrawableBuilder.IconValue.CART) .setColor(Color.WHITE) .build(); buyBtn.setCompoundDrawablesRelativeWithIntrinsicBounds(cartIcon, null, null, null); buyBtn.setOnClickListener(this); ImageView searchContact = (ImageView) view.findViewById(R.id.btn_search__selected_giftcard); searchContact.setOnClickListener(this); editTextPhone = (EditText) view.findViewById(R.id.phone_number_selected_giftcard); if (sharedpreferences.contains("phoneNumber")) editTextPhone.setText(sharedpreferences.getString("phoneNumber", "")); progressBar = (SmoothProgressBar) view.findViewById(R.id.pb_topup); AndroidNetworking.initialize(getContext()); return view; } @Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { String transitionName = getArguments().getString("transitionName"); view.findViewById(R.id.cv_selected_giftcard_card).setTransitionName(transitionName); } } private Drawable getGiftcardDrawable(String name) { MaterialDrawableBuilder drawableBuilder = MaterialDrawableBuilder.with(getContext()); if (name.toLowerCase().contains("itunes")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.ITUNES); drawableBuilder.setColor(getContext().getResources().getColor(R.color.itunesColor)); } else if (name.toLowerCase().contains("googleplay")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.GOOGLE); drawableBuilder.setColor(getContext().getResources().getColor(R.color.googlePlayColor)); } else if (name.toLowerCase().contains("microsoft")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.MICROSOFT); drawableBuilder.setColor(getContext().getResources().getColor(R.color.microsoftColor)); } else if (name.toLowerCase().contains("amazon")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.AMAZON); drawableBuilder.setColor(getContext().getResources().getColor(R.color.amazonColor)); } else if (name.toLowerCase().contains("xbox")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.XBOX); drawableBuilder.setColor(getContext().getResources().getColor(R.color.xboxColor)); } else if (name.toLowerCase().contains("playstationplus")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.PLAYSTATION); drawableBuilder.setColor(getContext().getResources().getColor(R.color.playstationPlusColor)); } else if (name.toLowerCase().contains("playstation")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.PLAYSTATION); drawableBuilder.setColor(getContext().getResources().getColor(R.color.playstationColor)); } else if (name.toLowerCase().contains("steam")) { drawableBuilder.setIcon(MaterialDrawableBuilder.IconValue.STEAM); drawableBuilder.setColor(getContext().getResources().getColor(R.color.steamColor)); } return drawableBuilder.build(); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.buy_selected_giftcard_btn: v.setEnabled(false); String phoneNumber = editTextPhone.getText().toString(); if (isphoneNumber(phoneNumber)) { SharedPreferences.Editor editor = sharedpreferences.edit(); editor.putString("phoneNumber", phoneNumber); editor.apply(); } else { SweetAlertDialog dialog = new SweetAlertDialog(getContext(), SweetAlertDialog.ERROR_TYPE); dialog.setTitleText("خطا"); dialog.setContentText("شماره تلفن وارد شده صحیح نمی باشد."); dialog.setConfirmText("OK"); dialog.setOnShowListener(dialog1 -> { SweetAlertDialog alertDialog = (SweetAlertDialog) dialog1; ((TextView) alertDialog.findViewById(R.id.content_text)) .setTextColor(getResources().getColor(R.color.colorPrimaryText)); ((TextView) alertDialog.findViewById(R.id.title_text)) .setTextColor(getResources().getColor(R.color.colorDanger)); }); dialog.setOnDismissListener(dialog1 -> { progressBar.progressiveStop(); progressBarStatus = false; buyBtn.setEnabled(true); }); dialog.show(); return; } progressBar.setIndeterminate(true); progressBar.progressiveStart(); progressBarStatus = true; String scriptVersion = "Android"; buyGiftcard(selectedGiftcardId, phoneNumber, selectedGateway, scriptVersion); break; case R.id.btn_search_topup: Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI); intent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE); startActivityForResult(intent, 0); break; } } @Override public void onResume() { Handler handler = new Handler(); Runnable runnableCode = () -> handler.postDelayed(() -> { if (progressBar != null) { progressBar.progressiveStop(); progressBarStatus = false; } }, 100); handler.post(runnableCode); buyBtn.setEnabled(true); super.onResume(); } @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); if (isVisibleToUser){ if (view != null && progressBarStatus){ progressBar.progressiveStop(); progressBarStatus = false; } } } private void buyGiftcard(String selectedGiftcardId, String phoneNumber, String selectedGateway, String scriptVersion) { JSONObject jsonData = new JSONObject(); try { jsonData.put("productId", selectedGiftcardId); jsonData.put("cellphone", phoneNumber); jsonData.put("issuer", selectedGateway); jsonData.put("scriptVersion", scriptVersion); jsonData.put("firstOutputType", "json"); jsonData.put("secondOutputType", "view"); jsonData.put("redirectToPage", "False"); String webserviceID = "587ceaef-4ee0-46dd-a64e-31585bef3768"; jsonData.put("webserviceId", webserviceID); String url = "https://chr724.ir/services/v3/EasyCharge/BuyProduct"; AndroidNetworking.post(url) .addJSONObjectBody(jsonData) .build() .getAsJSONObject(new JSONObjectRequestListener() { @Override public void onResponse(JSONObject response) { try { if (response.getString("status").equals("Success")) { String paymentUrl = response.getJSONObject("paymentInfo").getString("url"); Intent i = new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse(paymentUrl)); startActivity(i); } else { SweetAlertDialog dialog = new SweetAlertDialog(getContext(), SweetAlertDialog.ERROR_TYPE); dialog.setTitleText("خطا"); dialog.setContentText(response.getString("errorMessage")); dialog.setConfirmText("OK"); dialog.setOnShowListener(dialog1 -> { SweetAlertDialog alertDialog = (SweetAlertDialog) dialog1; ((TextView) alertDialog.findViewById(R.id.content_text)) .setTextColor(getResources().getColor(R.color.colorPrimaryText)); ((TextView) alertDialog.findViewById(R.id.title_text)) .setTextColor(getResources().getColor(R.color.colorDanger)); }); dialog.show(); } } catch (JSONException | ActivityNotFoundException e) { e.printStackTrace(); } } @Override public void onError(ANError error) { SweetAlertDialog dialog = new SweetAlertDialog(getContext(), SweetAlertDialog.ERROR_TYPE); dialog.setTitleText("خطا"); dialog.setContentText("خطا در اتصال به سرور! لطفا از اتصال به اینترنت اطمینال حاصل نمایید سپس مجددا امتحان کنید."); dialog.setConfirmText("OK"); dialog.setOnShowListener(dialog1 -> { SweetAlertDialog alertDialog = (SweetAlertDialog) dialog1; ((TextView) alertDialog.findViewById(R.id.content_text)) .setTextColor(getResources().getColor(R.color.colorPrimaryText)); ((TextView) alertDialog.findViewById(R.id.title_text)) .setTextColor(getResources().getColor(R.color.colorDanger)); }); dialog.show(); } }); } catch (JSONException e) { e.printStackTrace(); } } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == 0) { if (resultCode == Activity.RESULT_OK) { Uri contactUri = data.getData(); String[] projection = {ContactsContract.CommonDataKinds.Phone.NUMBER}; Cursor cursor = this.getActivity().getContentResolver() .query(contactUri, projection, null, null, null); assert cursor != null; cursor.moveToFirst(); int column = cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER); String number = cursor.getString(column); editTextPhone.setText(number.replace("+98", "0")); cursor.close(); } } } private String getOperator(String number) { if (number.startsWith("093") || number.startsWith("090")) { return "MTN"; } else if (number.startsWith("094")) { return "WiMax"; } else if (number.startsWith("091") || number.startsWith("0990")) { return "MCI"; } else if (number.startsWith("0921") || number.startsWith("0922")) { return "RTL"; } return null; } private boolean isphoneNumber(String phoneNumber) { return getOperator(phoneNumber) != null && phoneNumber.length() == 11; } }
c7077ad16c5c84ac0aac1f172f4f11709efa408a
5a774c954d6f317281ac7e575dea1ce01e3a2066
/src/main/java/org/generation/blogpessoal/seguranca/UserDetailsImpl.java
0952f29825237deea18fc13ce5c93fe37774b689
[ "MIT" ]
permissive
Anderson815/Blog_Pessoal_-_API_REST
9737c857390cc53786b8166d18096e4dee4659cb
40c1b12d903fb42b04a77f2ed1da4ea230eb2b6b
refs/heads/master
2023-05-13T21:13:18.568797
2021-06-09T00:36:21
2021-06-09T00:36:21
362,188,671
0
0
null
null
null
null
UTF-8
Java
false
false
1,334
java
package org.generation.blogpessoal.seguranca; import java.util.Collection; import org.generation.blogpessoal.model.Usuario; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; public class UserDetailsImpl implements UserDetails{ private static final long SerialVersionUID = 1L; private String userName; private String password; public UserDetailsImpl(Usuario user) { this.userName = user.getUsuario(); this.password = user.getSenha(); } public UserDetailsImpl() {} @Override public Collection<? extends GrantedAuthority> getAuthorities() { // TODO Auto-generated method stub return null; } @Override public String getPassword() { // TODO Auto-generated method stub return this.password; } @Override public String getUsername() { // TODO Auto-generated method stub return this.userName; } @Override public boolean isAccountNonExpired() { // TODO Auto-generated method stub return true; } @Override public boolean isAccountNonLocked() { // TODO Auto-generated method stub return true; } @Override public boolean isCredentialsNonExpired() { // TODO Auto-generated method stub return true; } @Override public boolean isEnabled() { // TODO Auto-generated method stub return true; } }
1b2450b81f2ae0d48aa75961bc0b05c1df996a1c
22382bda78336703a16ddd0e2aef001217766ae6
/app/src/test/java/com/example/officemanagement/ExampleUnitTest.java
671945be81fe43f4850c03d80b39ee6fa42822d2
[]
no_license
sayedseu/Office-Managemnt-App
d4e1af20fd5a4bc418c66c5fdfbf2fc2c2c0e87b
50e89f31a676a2eb622dc60177676f6c64ee7c58
refs/heads/master
2022-04-04T01:33:19.258978
2020-01-22T23:32:52
2020-01-22T23:32:52
235,688,756
0
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.example.officemanagement; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
d3ef98c10fc323dc73c38c6c68a6e583723db500
8e194cd97abc4e2938889e8457b21d6c409b8351
/src/main/java/com/wb/pro/service/observable/ProductListJdObserver.java
d95d8eb10d36a72891e3dfd24307e219e6d1bdbe
[]
no_license
sky0504/pro
f5fe74801425e9e2be63fdf921d2c10def6f537c
a45bee4c76ce913bd674a7c450bc3d35d0793e1d
refs/heads/master
2021-06-20T18:29:09.175595
2021-04-15T11:57:01
2021-04-15T11:57:01
200,950,086
0
0
null
null
null
null
UTF-8
Java
false
false
495
java
package com.wb.pro.service.observable; import com.wb.pro.util.LogPrintUtil; import java.util.Observable; import java.util.Observer; /** * 京东电商接口 * * @author: WangBin * @create: 2020-01-31 20:05 **/ public class ProductListJdObserver implements Observer { @Override public void update(Observable o, Object arg) { String newProduct = arg.toString(); LogPrintUtil.systemOutPrintln("发送新产品【" + newProduct + "】同步到京东商城"); } }
e103a3f1c8d2b8289548974934edaf094f732465
eb6b3fa48347c20e11efd17ccddaff41668b9fc2
/app/src/main/java/com/ece651group8/uwaterloo/ca/ece_651_group8/dao/TokenDao.java
faa2569e406c2e276a5e342d832ea0cc22625b7f
[]
no_license
Justin-YueLiu/ECE_651_Group8
1571c9dbb3ec8859939fb0caff67aa24747aa8e5
f1f05700eb5616a17829a3c89f8a12d37a4306fa
refs/heads/master
2021-01-11T02:04:19.039420
2016-12-02T03:41:35
2016-12-02T03:41:35
70,842,204
0
0
null
null
null
null
UTF-8
Java
false
false
240
java
package com.ece651group8.uwaterloo.ca.ece_651_group8.dao; import android.database.sqlite.SQLiteDatabase; public interface TokenDao { public boolean save(SQLiteDatabase db, String token); public String query(SQLiteDatabase db); }
750fe64d37f5658bd943875e01ecc991079a7156
6a61e393dfad6a6cefdf4f06798917c3a7aee971
/external-programs/jbook/Misc_ThrowingException.java
5807fa23e7f56e23bb701e8560f6898c8115eee1
[]
no_license
kframework/java-semantics
388bead15b594f3b2478441a5d95c02d7a0ccbf6
f27067ee7a38d236499992eed1b48064e70680fa
refs/heads/master
2021-09-22T20:42:43.662165
2021-09-15T19:53:33
2021-09-15T19:53:33
11,711,471
14
7
null
2016-03-16T22:03:02
2013-07-27T21:42:38
Java
UTF-8
Java
false
false
944
java
// Example adapted from // http://www.thrishna.com/java/examples/java/exception/ThrowingException.htm public class Misc_ThrowingException { public void foo( boolean throwException ) throws Exception{ System.out.println( "in foo" ); if( throwException ){ System.out.println( "throwing exception" ); throw new Exception( "testing exception" ); } System.out.println( "after throwing exception" ); } public static void main( String[] arg ){ Misc_ThrowingException tester = new Misc_ThrowingException(); try{ System.out.println( "calling foo" ); tester.foo( false ); System.out.println( "called foo" ); System.out.println( "calling foo" ); tester.foo( true ); System.out.println( "will not reach here" ); }catch( Exception e ){ System.out.println( "got exception " + e + e.toString() ); } } }
b01934244eb40ebc33dc77f1457aaf18d3d80f17
308d55898c891bf8702b537b125378b8885e289b
/geode-tcp-server/src/main/java/org/apache/geode/distributed/internal/tcpserver/ClientSocketCreator.java
2ca7d9511544d911c7fc93bee682432e8deb7bd2
[ "BSD-3-Clause", "MIT", "Apache-2.0", "LicenseRef-scancode-public-domain", "BSD-2-Clause", "LicenseRef-scancode-unknown" ]
permissive
apache/geode
6913469dd6c8805a4a7c9ad606efb99fe831a646
e4e0aee30c14cff039d39a7dc79c1263aa1bef22
refs/heads/develop
2023-09-03T23:56:44.728138
2023-07-13T10:16:12
2023-07-13T10:16:12
34,839,383
1,646
582
Apache-2.0
2023-08-19T01:03:46
2015-04-30T07:00:05
Java
UTF-8
Java
false
false
1,826
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance with the License. You may obtain a * copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.apache.geode.distributed.internal.tcpserver; import java.io.IOException; import java.net.Socket; /** * ClientSocketCreator should be used, in most cases, in client caches and for WAN * connections. It allows the use of a socket factory in creating connections to servers. */ public interface ClientSocketCreator { /** * Returns true if this socket creator is configured to use SSL by default */ boolean useSSL(); /** * After creating a socket connection use this method to initiate the SSL * handshake. If SSL is not enabled for the socket this method does nothing. */ void handshakeIfSocketIsSSL(Socket socket, int timeout) throws IOException; /** * Create a connection to the given host/port using client-cache defaults for things * like socket buffer size */ Socket connect(HostAndPort addr, int connectTimeout) throws IOException; Socket connect(HostAndPort addr, int connectTimeout, int socketBufferSize, TcpSocketFactory socketFactory) throws IOException; }
0f1a93af165ba430389d9f09fb68d9f16149c39e
7c7b97f300b7f37cb6cc7f001dafa77bb5b03e9d
/app/src/main/java/com/startupideas/startupideas/MainActivity.java
5e0da78a436cde37abb72b4cc1a60106949fde10
[]
no_license
jwngma/Startup-Ideas
1884103e9e165dcd5ec1037463c091f6560c0238
874a6ce9de67847abc46765dc8cf12a38413ba28
refs/heads/master
2020-05-24T22:49:45.368657
2019-05-19T17:03:14
2019-05-19T17:03:14
187,504,602
1
0
null
null
null
null
UTF-8
Java
false
false
4,272
java
package com.startupideas.startupideas; import android.content.Intent; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.design.widget.NavigationView; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.CardView; import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.RelativeLayout; public class MainActivity extends AppCompatActivity { Toolbar toolbar; DrawerLayout drawerLayout; ActionBarDrawerToggle actionBarDrawerToggle; NavigationView navigationView; private CardView business_idea_btn,Indian_Startup_Procedures_btn; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); toolbar=findViewById(R.id.toolbar); setSupportActionBar(toolbar); getSupportActionBar().setTitle("StartUp Ideas"); navigationView=findViewById(R.id.navigation_nav); drawerLayout = findViewById(R.id.navigation_drawer); actionBarDrawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, R.string.drawer_ope, R.string.drawer_close); drawerLayout.setDrawerListener(actionBarDrawerToggle); /* init Activities*/ initAllIdeas(); } private void initAllIdeas() { business_idea_btn=findViewById(R.id.Business_Ideas); Indian_Startup_Procedures_btn=findViewById(R.id.Indian_Startup_Procedures); business_idea_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sendToBusinessideaActivity(); } }); Indian_Startup_Procedures_btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sendtoIndian_Startup_Procedures(); } }); } private void sendtoIndian_Startup_Procedures() { Intent intent= new Intent(MainActivity.this,IndianStartupProceduresActivity.class); startActivity(intent); } private void sendToBusinessideaActivity() { Intent intent= new Intent(MainActivity.this,BusinessIdeasActivity.class); startActivity(intent); } private void setupNavigation() { navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() { @Override public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) { switch (menuItem.getItemId()){ case R.id.settings: setFragment(new SettingsFragment()); getSupportActionBar().setTitle("Settings"); drawerLayout.closeDrawers(); menuItem.setChecked(true); break; } return true; } }); } private void setFragment(Fragment fragment){ FragmentManager manager= getSupportFragmentManager(); FragmentTransaction transaction=manager.beginTransaction(); transaction.replace(R.id.container,fragment); transaction.addToBackStack(null); transaction.commit(); } @Override protected void onPostCreate(@Nullable Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); actionBarDrawerToggle.syncState(); } @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); getMenuInflater().inflate(R.menu.options,menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item); switch (item.getItemId()){ case R.id.search_menu: ; } return true; } }
911d899b347717739a7e8320b0877fdb27cdbbbc
4967b4de7ca2cbf960991d7f736f2d38e0bfb28e
/src/main/java/io/feaggle/toggle/BasicExperimentToggle.java
6d1339b0d1dcf125b8b5b3f9085c0789d1b1d455
[ "MIT" ]
permissive
feaggle/feaggle
886fd184e2abf1a5376c27bf71db69aec0afe9ac
8221dfaffc8e4d05d71dd004b42cc0088019ccc3
refs/heads/master
2020-03-30T17:58:06.422570
2019-06-04T19:14:56
2019-06-04T19:14:56
151,477,261
7
0
null
null
null
null
UTF-8
Java
false
false
1,054
java
/* * Copyright (c) 2019-present, Kevin Mas Ruiz * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ package io.feaggle.toggle; import io.feaggle.driver.DrivenBy; import io.feaggle.toggle.experiment.ExperimentCohort; import io.feaggle.toggle.experiment.ExperimentDriver; import java.util.concurrent.atomic.AtomicReference; public class BasicExperimentToggle<Cohort extends ExperimentCohort> implements ExperimentToggle<Cohort>, DrivenBy<ExperimentDriver<Cohort>> { private final String name; private final AtomicReference<ExperimentDriver<Cohort>> driver; public BasicExperimentToggle(String name) { this.name = name; this.driver = new AtomicReference<>(null); } @Override public void drive(ExperimentDriver<Cohort> contextExperimentDriver) { driver.set(contextExperimentDriver); } @Override public boolean isEnabledFor(Cohort cohort) { return driver.get().isEnabledForCohort(name, cohort); } }
78d7c283808d68c19c1d3f3e51a61246d58980e9
7f24ca0d2ab2447279d0aaa83af539c8683a9589
/app/src/main/java/com/vincent/luoxiang/smsmanager/MainActivity.java
526de8a52509c8fceebc3f90af0dd8c89aca35e6
[ "Apache-2.0" ]
permissive
ynztlxdeai/SmsSender
0f9504fe5a1fdd0e018024d746c5c11e4459c3a0
87bcc33b09494e255b40ef8f9a5b380f0f412da5
refs/heads/master
2020-03-11T01:03:28.826526
2018-04-16T06:07:13
2018-04-16T06:07:13
129,680,183
0
0
null
null
null
null
UTF-8
Java
false
false
6,284
java
package com.vincent.luoxiang.smsmanager; import android.content.ContentResolver; import android.content.ContentValues; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.provider.Telephony; import android.support.annotation.RequiresApi; import android.support.v7.app.AppCompatActivity; import android.text.TextUtils; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.EditText; import java.util.Random; public class MainActivity extends AppCompatActivity implements View.OnClickListener { private static final int ONE_DAY = 1000 * 60 * 60 * 24; //【铁路客服】订单EF18430720,罗享您已购4月15日G6533次5车2A号,广州南站14:55开。 private static final String SMS_TMPLATE = "【铁路客服】订单EF%s,%s您已购%s月%s日%s次%s车%s,%s站%s开。"; private EditText mEtAdd; private EditText mEtContent; private View mSend; private boolean mModeNormal; private EditText mName; private EditText mMonth; private EditText mDay; private EditText mNum; private EditText mCar; private EditText mSeat; private EditText mStart; private EditText mTime; private View mLl; private String mDefaultSmsApp; @RequiresApi(api = Build.VERSION_CODES.KITKAT) @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initView(); initData(); initListener(); } /** * 初始化view */ public void initView() { mEtAdd = (EditText) findViewById(R.id.et_address); mEtContent = (EditText)findViewById(R.id.et_content); mName = (EditText) findViewById(R.id.et_name); mMonth = (EditText) findViewById(R.id.et_month); mDay = (EditText) findViewById(R.id.et_day); mNum = (EditText) findViewById(R.id.et_num); mCar = (EditText) findViewById(R.id.et_car); mSeat = (EditText) findViewById(R.id.et_seat); mStart = (EditText) findViewById(R.id.et_start); mTime = (EditText) findViewById(R.id.et_time); mSend = findViewById(R.id.btn_send); mLl = findViewById(R.id.ll_input_tamplate); } /** * 初始化数据 */ @RequiresApi(api = Build.VERSION_CODES.KITKAT) public void initData() { mDefaultSmsApp = Telephony.Sms.getDefaultSmsPackage(this); Intent intent = new Intent( "android.provider.Telephony.ACTION_CHANGE_DEFAULT"); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, this.getPackageName()); startActivity(intent); } /** * 初始化监听 */ public void initListener() { mSend.setOnClickListener(this); } @Override public void onClick(View view) { if (!mModeNormal){ if (TextUtils.isEmpty(mEtAdd.getText().toString()) || TextUtils.isEmpty(mEtContent.getText().toString())){ return; } }else { if (TextUtils.isEmpty(mEtAdd.getText().toString()) || TextUtils.isEmpty(mName.getText().toString()) || TextUtils.isEmpty(mMonth.getText().toString()) || TextUtils.isEmpty(mDay.getText().toString()) || TextUtils.isEmpty(mNum.getText().toString()) || TextUtils.isEmpty(mCar.getText().toString()) || TextUtils.isEmpty(mSeat.getText().toString()) || TextUtils.isEmpty(mStart.getText().toString()) || TextUtils.isEmpty(mTime.getText().toString()) ){ return; } } // 需要 使用 后门程序 --- 需要 使用 contentResolver ContentResolver resolver = getContentResolver(); // content:// Uri uri = Uri.parse("content://sms"); ContentValues values = new ContentValues(); // address, date, type, body values.put("address", mEtAdd.getText().toString()); values.put("date", System.currentTimeMillis() - ONE_DAY); values.put("type", "1"); String content = ""; if (!mModeNormal){ content = mEtContent.getText().toString(); }else { Random random = new Random(); StringBuffer str = new StringBuffer(); for(int i=0;i<8;i++){ str.append(random.nextInt(10)); } content = String.format(SMS_TMPLATE , str.toString() , mName.getText().toString() , mMonth.getText().toString() , mDay.getText().toString() , mNum.getText().toString() , mCar.getText().toString() , mSeat.getText().toString() , mStart.getText().toString() , mTime.getText().toString() ); } values.put("body", content); Uri uri1 = resolver.insert(uri, values); System.out.println(uri1.toString()); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.main_menu , menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.change_mode){ mModeNormal = !mModeNormal; if (mModeNormal){ mLl.setVisibility(View.VISIBLE); mEtContent.setVisibility(View.GONE); }else { mLl.setVisibility(View.GONE); mEtContent.setVisibility(View.VISIBLE); } } return super.onOptionsItemSelected(item); } @Override protected void onStop() { Intent intent = new Intent( "android.provider.Telephony.ACTION_CHANGE_DEFAULT"); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, mDefaultSmsApp); startActivity(intent); super.onStop(); } }
95a00fdc6a6bc0f96789091419459a3f318ced07
f3ddd233a2823e3544c7b45b7e368bcec170cf69
/app/src/test/java/com/cp/ExampleUnitTest.java
bc258041f084af3d9621d5aa9351ba6b12cd3747
[]
no_license
CaoPeng/MyAndroidDemo
cc87abdfc2d4cf2cb14596e05095c8c74a46d6e1
6e5538d5a786cf353712e2029be7d1a289b758da
refs/heads/master
2021-04-12T08:48:44.155711
2018-03-27T14:02:51
2018-03-27T14:02:51
126,661,774
0
0
null
null
null
null
UTF-8
Java
false
false
384
java
package com.cp; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
2d8bb02890c8e9a605a1d6b6f09354a1a7e7ee48
489e5079d342e025e3755f564ec94533bdd37c79
/app/src/main/java/com/example/apidemo/view/ArcProgressBar.java
0740a89031411d7918a506860dc38fd9ca56cfc0
[]
no_license
sjhsjh/APIdemo
1c81493a4b01b1d2f7648a26265751de782c5841
17d61e51e5e13491c6d66915f32710c8a11024f3
refs/heads/master
2022-12-22T12:12:10.323590
2022-12-17T07:38:24
2022-12-17T07:38:24
72,106,305
3
1
null
null
null
null
UTF-8
Java
false
false
7,439
java
package com.example.apidemo.view; import android.animation.ValueAnimator; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.RectF; import android.support.annotation.Nullable; import android.util.AttributeSet; import android.view.View; import com.blankj.utilcode.util.SizeUtils; import com.example.apidemo.R; /** * 简易弧形进度条 */ public class ArcProgressBar extends View { private static final String TAG = "ArcProgressBar"; /** * 圆弧开始的角度。3点钟方向为起始方向 */ private float mStartAngle = 0; /** * 圆弧夹角的大小。顺时针方向画圆弧 */ private float mSweepAngle = 0; /** * 当前进度0~100 */ private int mCurrentProgress = 0; /** * 一圈的动画执行时间 */ private long mDuration = 3000; /** * 圆弧的宽度 */ private int mStrokeWidth = SizeUtils.dp2px(4); /** * 圆弧进度条背景颜色 */ private int mBgColor = Color.parseColor("#65ffffff"); /** * 圆弧进度条的颜色 */ private int mProgressColor = Color.parseColor("#FCC968"); private boolean needDrawBg = true; public ArcProgressBar(Context context) { this(context, null); } public ArcProgressBar(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public ArcProgressBar(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); initAttr(context, attrs); } private void initAttr(Context context, AttributeSet attrs) { TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.ArcProgressBar); mStrokeWidth = (int) array.getDimension(R.styleable.ArcProgressBar_stroke_width, SizeUtils.dp2px(4)); mProgressColor = array.getColor(R.styleable.ArcProgressBar_progress_color, Color.parseColor("#FCC968")); mBgColor = array.getColor(R.styleable.ArcProgressBar_bg_color, Color.parseColor("#65ffffff")); mStartAngle = array.getFloat(R.styleable.ArcProgressBar_start_angle, 0f); needDrawBg = array.getBoolean(R.styleable.ArcProgressBar_need_draw_bg, true); mDuration = array.getInt(R.styleable.ArcProgressBar_duration, 3000); mCurrentProgress = array.getInt(R.styleable.ArcProgressBar_barProgress, 0); mSweepAngle = mCurrentProgress / 100f * 360; array.recycle(); initArcPaint(); if (needDrawBg) { initBgPaint(); } } private RectF mRectF = new RectF(); // 圆弧的paint private Paint mArcPaint; // 圆弧背景的paint private Paint mBgPaint; private void initArcPaint() { mArcPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mArcPaint.setAntiAlias(true); mArcPaint.setColor(mProgressColor); // 设置画笔的画出的形状 mArcPaint.setStrokeJoin(Paint.Join.ROUND); // 多线条连接拐角弧度 mArcPaint.setStrokeCap(Paint.Cap.ROUND); // 线条两端点 // 设置画笔类型 mArcPaint.setStyle(Paint.Style.STROKE); // 圆弧的宽度 mArcPaint.setStrokeWidth(mStrokeWidth); } private void initBgPaint() { mBgPaint = new Paint(); mBgPaint.setAntiAlias(true); mBgPaint.setColor(mBgColor); mBgPaint.setStrokeJoin(Paint.Join.ROUND); mBgPaint.setStrokeCap(Paint.Cap.ROUND); mBgPaint.setStyle(Paint.Style.STROKE); mBgPaint.setStrokeWidth(mStrokeWidth); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); mRectF.left = mStrokeWidth / 2; mRectF.top = mStrokeWidth / 2; mRectF.right = getWidth() - mStrokeWidth / 2; mRectF.bottom = getHeight() - mStrokeWidth / 2; // mRectF :圆弧一半厚度的外轮廓矩形区域。 // startAngle: 圆弧起始角度,单位为度。3点钟方向为起始方向! // sweepAngle: 圆弧扫过的角度,单位为度。顺时针方向! // useCenter: 如果为true时,在绘制圆弧时将圆心包括在内,通常用来绘制扇形。 // 画最背景圆弧 if (needDrawBg) { canvas.drawArc(mRectF, 0, 360, false, mBgPaint); } // 画进度圆弧 canvas.drawArc(mRectF, mStartAngle, mSweepAngle, false, mArcPaint); } /** * 设置进度圆弧的颜色 */ public void setProgressColor(int color) { if (color == 0) { throw new IllegalArgumentException("Color can no be 0"); } mProgressColor = color; } /** * 设置圆弧的颜色 */ public void setBgColor(int color) { if (color == 0) { throw new IllegalArgumentException("Color can no be 0"); } mBgColor = color; } /** * 设置圆弧的宽度 * * @param strokeWidth px */ public void setStrokeWidth(int strokeWidth) { if (strokeWidth < 0) { throw new IllegalArgumentException("strokeWidth value can not be less than 0"); } mStrokeWidth = strokeWidth; } /** * 设置动画的执行时长 * * @param duration */ public void setAnimatorDuration(long duration) { if (duration < 0) { throw new IllegalArgumentException("Duration value can not be less than 0"); } mDuration = duration; } /** * 设置圆弧开始的角度 * * @param startAngle */ public void setStartAngle(int startAngle) { mStartAngle = startAngle; } /** * 设置进度条进度 * * @param progress 0~100 */ public void setProgress(int progress, boolean withAnimation) { if (progress < 0) { throw new IllegalArgumentException("Progress value can not be less than 0"); } if (progress > 100) { progress = 100; } if (progress == mCurrentProgress) { return; } if (withAnimation) { startAnimation(progress); } else { mCurrentProgress = progress; mSweepAngle = progress / 100f * 360; invalidate(); } } public int getProgress() { return mCurrentProgress; } private ValueAnimator valueAnimator; /** * 设置动画 */ private void startAnimation(int targetProgress) { if (valueAnimator != null && valueAnimator.isRunning()) { valueAnimator.cancel(); valueAnimator = null; } valueAnimator = ValueAnimator.ofFloat(mCurrentProgress, targetProgress); long duration = (long) ((targetProgress - mCurrentProgress) / 100f * mDuration); valueAnimator.setDuration(duration > 0 ? duration : 10); valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator valueAnimator) { mCurrentProgress = ((Float) valueAnimator.getAnimatedValue()).intValue(); mSweepAngle = mCurrentProgress / 100f * 360; invalidate(); } }); valueAnimator.start(); } }
90e8c2dc10d0431b2ca73ec24081e34a8d98f31a
8c55c1166edd377029cde58e71fe562af3bf4e8e
/src/mx/unam/ciencias/cv/utils/trainer/ImageTrainer.java
f63bb872e88f207cf5de1a09038584d5a5a6f292
[]
no_license
ndrd/visual-cosmic-rainbown
d0193a5cc0b611637f998676dd0290eca80cd15d
2ce3c8b05c084d9ddaac6fc4cd5b522cd7a25a7e
refs/heads/master
2021-01-22T16:45:15.355124
2015-04-01T10:51:43
2015-04-01T10:51:43
31,004,590
0
0
null
null
null
null
UTF-8
Java
false
false
3,357
java
package mx.unam.ciencias.cv.utils.trainer; /* * This file is part of visual-cosmic-rainbown * * Copyright Jonathan Andrade 2015 * * visual-cosmic-rainbown is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * visual-cosmic-rainbown is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with visual-cosmic-rainbown. If not, see <http://www.gnu.org/licenses/>. */ /** * Use to get the mean Value of a set of training and the values of sigma * to categorize a new speciment * (Ougth to be Generic) */ import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.awt.image.BufferedImage; import java.awt.Color; import javax.imageio.ImageIO; import mx.unam.ciencias.cv.utils.models.*; public class ImageTrainer implements java.io.Serializable { /* Must be a folder */ private File folderTraining; private LinkedList<ImageD> specimens; private final int CATEGORIES = 255; private Histogram red; private Histogram green; private Histogram blue; private Color meanColor; private Color lowerBound; private Color upperBound; private double percentaje; private static ImageTrainer instance; private ImageTrainer () { specimens = new LinkedList<ImageD>(); } public static ImageTrainer getInstance() { if (instance == null) instance = new ImageTrainer(); return instance; } public Color getMeanColor() { return meanColor; } public Color getLowerBound() { return lowerBound; } public Color getUpperBound() { return upperBound; } public void trainingFromDir(String path) { folderTraining = new File(path); File[] files = folderTraining.listFiles(); /* read and list images to manipulate*/ double i = 0; percentaje = 0; for(File f : files) { percentaje = ++i/(files.length + 0.0); BufferedImage specimen = null; try { specimen = ImageIO.read(f); } catch (Exception e ) {} if (specimen != null) { specimens.add(new ImageD(specimen)); } } /* Now work with the meanColors of each image */ red = new Histogram(CATEGORIES); green = new Histogram(CATEGORIES); blue = new Histogram(CATEGORIES); for (ImageD specimen : specimens) { int [] averageRGB = specimen.getMeanColor(); red.add(averageRGB[0]); green.add(averageRGB[1]); blue.add(averageRGB[2]); } double r = red.getMeanValue(); double g = green.getMeanValue(); double b = blue.getMeanValue(); meanColor = new Color((int)r, (int)g, (int)b); double rs = red.getStdDeviation(); double gs = green.getStdDeviation(); double bs = blue.getStdDeviation(); System.out.println("meanColor " + meanColor); System.out.println("Sigma RGB (" + rs + ", " + gs + ", " + bs ); lowerBound = new Color((int)(r-rs),(int)(g-gs),(int)(b-bs)); upperBound = new Color((int)(r+rs),(int)(g+gs),(int)(b+bs)); } public double getProgress() { return (int)(percentaje * 100); } }
17938d84f17ca4f1a5e5f2df360dd0d0d9913805
1eb45109e75fc2330a11ccc2fb8c6acdde664c6b
/aesh-keyboard-example/src/main/java/org/jboss/aesh/KeyboardCommand.java
d2b3edd11104cefe84abd40e5d8d8011df6f1135
[]
no_license
aeshell/examples
96e9d16f3a942cac05c7cba08de9ae7dca5a6d66
3ba7349e267d1ccbe98f2bd34a292f6a6ee3b0e7
refs/heads/master
2021-01-10T14:56:29.690372
2015-09-14T15:59:26
2015-09-14T15:59:26
36,376,324
3
3
null
2015-05-28T11:47:25
2015-05-27T15:25:49
Java
UTF-8
Java
false
false
2,161
java
package org.jboss.aesh; import java.io.IOException; import org.jboss.aesh.cl.CommandDefinition; import org.jboss.aesh.console.command.Command; import org.jboss.aesh.console.command.CommandOperation; import org.jboss.aesh.console.command.CommandResult; import org.jboss.aesh.console.command.invocation.CommandInvocation; import org.jboss.aesh.terminal.Key; import org.jboss.aesh.terminal.Shell; import org.jboss.aesh.util.ANSI; /** * @author Helio Frota * */ @CommandDefinition(name = "keyboard", description = "") public class KeyboardCommand implements Command<CommandInvocation> { @Override public CommandResult execute(final CommandInvocation ci) throws IOException, InterruptedException { Shell shell = ci.getShell(); shell.clear(); shell.out().print(ANSI.CURSOR_HIDE); shell.enableAlternateBuffer(); Thread t = new Thread(new Runnable() { public void run() { while (true) { CommandOperation co = null; try { co = ci.getInput(); } catch (InterruptedException e) { e.printStackTrace(); } if (co.getInputKey() == Key.k) { shell.out().print("k\n"); } else if (co.getInputKey() == Key.j) { shell.out().print("j\n"); } else if (co.getInputKey() == Key.h) { shell.out().print("h\n"); } else if (co.getInputKey() == Key.l) { shell.out().print("l\n"); } else if (co.getInputKey() == Key.q || co.getInputKey() == Key.ESC) { break; } } } }); t.start(); t.join(); shell.clear(); shell.enableMainBuffer(); shell.out().print(ANSI.CURSOR_SHOW); ci.stop(); return CommandResult.SUCCESS; } }
19c82f7d3ff4dfa364fe0fbaf65a71cf502c62e0
8a42bf06144a6d08a0ffc97121ecd58d27e0b513
/Server/src/vo/IndexData.java
165898f45d37bdd57a8ada63e0def629ad4ca312
[]
no_license
ChaoYunTian/Software_second-hand-trading
7bd45ea1ae82a0afaca63a582168cbcf68d41bd5
ee1bfd58653defbe76f9ff0904131b5a2efcf92e
refs/heads/master
2020-09-01T23:44:27.627439
2019-12-29T11:34:46
2019-12-29T11:34:46
219,087,790
3
1
null
2019-12-15T11:21:14
2019-11-02T01:32:35
JavaScript
UTF-8
Java
false
false
615
java
package vo; import model.Song; import java.util.ArrayList; public class IndexData { private ArrayList<Sheetitem> recommendSheetlist; private ArrayList<Song> hotSonglist; public ArrayList<Sheetitem> getRecommendSheetlist() { return recommendSheetlist; } public void setRecommendSheetlist(ArrayList<Sheetitem> recommendSheetlist) { this.recommendSheetlist = recommendSheetlist; } public ArrayList<Song> getHotSonglist() { return hotSonglist; } public void setHotSonglist(ArrayList<Song> hotSonglist) { this.hotSonglist = hotSonglist; } }
e34bcc639a8be95531e52e754b81dfbe2c00c1cb
247f1d1bb547086a338858d74d407c284b5da285
/src/main/java/io/github/ademarizu/api/web/rest/vm/package-info.java
2a5c4f9f4138b66b21c97348958e509cc1952865
[]
no_license
ademarizu/jhipster-test-api
495c689084e21387fd5f369ce0906c13c35efe37
38e7b9b86a826d7b1a7da6ac126e28c736a4f718
refs/heads/master
2020-03-29T06:19:45.061116
2018-09-20T14:11:59
2018-09-20T14:11:59
149,619,936
0
0
null
null
null
null
UTF-8
Java
false
false
105
java
/** * View Models used by Spring MVC REST controllers. */ package io.github.ademarizu.api.web.rest.vm;
db02e28d615cb33408f9ebb2d1615203a483733f
f4e178086732e1dd16e958919c4f03238e621a67
/app/src/main/java/com/toni/gwftest/utils/RecyclerTouchListener.java
d115bf947f16c9d177d01b0008bc537494f4e65e
[]
no_license
FationSH/GWFtest
aef0463aba10a391cc20b305a1b7369fa682f2e0
3bab4ef4912f19d0f7f050ae5344451363be11d4
refs/heads/master
2023-03-29T15:17:44.324749
2021-03-28T09:09:39
2021-03-28T09:09:39
352,153,646
1
0
null
null
null
null
UTF-8
Java
false
false
1,832
java
package com.toni.gwftest.utils; import android.content.Context; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; import androidx.recyclerview.widget.RecyclerView; public class RecyclerTouchListener implements RecyclerView.OnItemTouchListener { private ClickListener clicklistener; private GestureDetector gestureDetector; public RecyclerTouchListener(Context context, final RecyclerView recycleView, final ClickListener clicklistener) { this.clicklistener = clicklistener; gestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() { @Override public boolean onSingleTapUp(MotionEvent e) { return true; } @Override public void onLongPress(MotionEvent e) { View child = recycleView.findChildViewUnder(e.getX(), e.getY()); if (child != null && clicklistener != null) { clicklistener.onLongClick(child, recycleView.getChildAdapterPosition(child)); } } }); } @Override public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) { View child = rv.findChildViewUnder(e.getX(), e.getY()); if (child != null && clicklistener != null && gestureDetector.onTouchEvent(e)) { clicklistener.onClick(child, rv.getChildAdapterPosition(child)); } return false; } @Override public void onTouchEvent(RecyclerView rv, MotionEvent e) { } @Override public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) { } public interface ClickListener { void onClick(View view, int position); void onLongClick(View view, int position); } }
b988f4ca665a2d7cf344b4435074ba6b2b76bef9
303188c71fd7fd8590038a1a430b1ba37f50c9bc
/src/connect4/Computer.java
e23a326aa900fe5a307caad5f014e15648e4759c
[]
no_license
SomeyaGinji/test
6ac797f446e71230ac1e91525790ab959d95f1d3
5f01a2d75802494ca113bca76ac05fd1c955cf8e
refs/heads/main
2023-08-15T05:30:55.051968
2021-09-24T15:02:09
2021-09-24T15:02:09
378,773,481
0
0
null
null
null
null
UTF-8
Java
false
false
13,502
java
package connect4; import java.util.Random; public class Computer { Random random = new Random(); Computer(){ } int select(int array[][],int score){ int i,j,decidej; Assessment assessment = new Assessment(); int tmparray[][] = new int[6][7]; //盤面の情報をtmparrayに記憶 for (int I=0;I<=5;I++){ for (int J=0;J<=6;J++){ tmparray[I][J] = array[I][J]; } } decidej = random.nextInt(7); //0~6の7つの乱数 //探索アルゴリズムが下に続く //盤面評価のクラスかメソッドが入るかも int[] ascore = new int[7]; int[][] bscore = new int[7][7]; int[][][] cscore = new int[7][7][7]; for (int j1=0;j1<=6;j1++) { int i1 = 5; while (i1 >= 0) { if (array[i1][j1] == -1) { array[i1][j1] = 1; break; } i1--; if (i1 == -1) { break; } } ascore[j1] = assessment.calcscore(i1, j1, array, score); //System.out.print(ascore[j1]+" "); for (int j2=0;j2<=6;j2++){ //2手先(プレイヤーの番)を考える int i2=5; while (i2>=0){ if (array[i2][j2]==-1){ //空の部分について、 array[i2][j2]=0; //プレイヤー球が入ると仮定して break; } i2--; if (i2==-1){ break; } } bscore[j1][j2] = assessment.calcscore(i2,j2,array,ascore[j1]); //System.out.print(bscore[j1][j2]+" "); for (int j3=0;j3<=6;j3++) { int i3 = 5; while (i3 >= 0) { if (array[i3][j3] == -1) { array[i3][j3] = 1; break; } i3--; if (i3 == -1) { break; } } cscore[j1][j2][j3] = assessment.calcscore(i3, j3, array, bscore[j1][j2]); System.out.print(cscore[j1][j2][j3] + " "); try { array[i3][j3]=-1; } catch (ArrayIndexOutOfBoundsException e){ } } try { array[i2][j2]=-1; } catch (ArrayIndexOutOfBoundsException e){ } } try { array[i1][j1]=-1; } catch (ArrayIndexOutOfBoundsException e){ } } //プレイヤー優勢度が一番低くなるものを探索して打つ手を決める int minscore = bscore[0][0]; for (int j1=0;j1<=6;j1++) { for (int j2=0;j2<=6;j2++) { if (bscore[j1][j2] < minscore) { minscore = bscore[j1][j2]; decidej = j1; } } } /*try { array[i][j]=-1; } catch (ArrayIndexOutOfBoundsException e){ }*/ for (int I=0;I<=5;I++){ for (int J=0;J<=6;J++){ array[I][J] = tmparray[I][J]; } } /*for (j=0;j<=6;j++){ if (ascore[2][j]<minscore){ minscore = ascore[2][j]; decidej = j; } }*/ //どの手が最善か決める /*int max = assessment.valuearray[0][0]; for (i=0;i<6;i++){ for (j=0;j<7;j++){ if(max < assessment.valuearray[i][j]){ } } }*/ // プレイヤーがリーチなら阻止する手を打つ int m,n,count; for(m=0;m<=5;m++) { for (n = 0; n <= 6; n++) { //横バージョン for (i = 0; i <= 5; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 0; //そこにプレイヤー球が入ったとして if (array[i][j] == 0 && array[i][j + 1] == 0 && array[i][j + 2] == 0 && array[i][j + 3] == 0) { //横に4つ並んでしまうとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m+1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n]=-1; } } } //縦バージョン for (i = 0; i <= 2; i++) { for (j = 0; j <= 6; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 0; //そこにプレイヤー球が入ったとして if (array[i][j] == 0 && array[i+1][j] == 0 && array[i+2][j] == 0 && array[i+3][j] == 0) { //縦に4つ並んでしまうとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m+1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n]=-1; } } } //斜め(右肩下がり)バージョン for (i = 0; i <= 2; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 0; //そこにプレイヤー球が入ったとして if (array[i][j] == 0 && array[i+1][j + 1] == 0 && array[i+2][j + 2] == 0 && array[i+3][j + 3] == 0) { //斜め(右肩下がり)に4つ並んでしまうとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m+1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n]=-1; } } } //斜め(右肩上がり)バージョン for (i = 3; i <= 5; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 0; //そこにプレイヤー球が入ったとして if (array[i][j] == 0 && array[i-1][j + 1] == 0 && array[i-2][j + 2] == 0 && array[i-3][j + 3] == 0) { //斜め(右肩上がり)に4つ並んでしまうとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m+1; I--) { //調べてる所に球を入れることは可能か調べる if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n]=-1; } } } } } for(m=0;m<=5;m++) { for (n = 0; n <= 6; n++) { //横バージョン for (i = 0; i <= 5; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 1; //そこにコンピュータ球が入ったとして if (array[i][j] == 1 && array[i][j + 1] == 1 && array[i][j + 2] == 1 && array[i][j + 3] == 1) { //横に4つ並ぶとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m + 1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n] = -1; } } } //縦バージョン for (i = 0; i <= 2; i++) { for (j = 0; j <= 6; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 0; //そこにコンピュータ球が入ったとして if (array[i][j] == 1 && array[i + 1][j] == 1 && array[i + 2][j] == 1 && array[i + 3][j] == 1) { //縦に4つ並ぶとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m + 1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n] = -1; } } } //斜め(右肩下がり)バージョン for (i = 0; i <= 2; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 1; //そこにコンピュータ球が入ったとして if (array[i][j] == 1 && array[i + 1][j + 1] == 1 && array[i + 2][j + 2] == 1 && array[i + 3][j + 3] == 1) { //斜め(右肩下がり)に4つ並ぶとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m + 1; I--) { if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n] = -1; } } } //斜め(右肩上がり)バージョン for (i = 3; i <= 5; i++) { for (j = 0; j <= 3; j++) { if (array[m][n] == -1) { //空の部分について、 array[m][n] = 1; //そこにコンピュータ球が入ったとして if (array[i][j] == 1 && array[i - 1][j + 1] == 1 && array[i - 2][j + 2] == 1 && array[i - 3][j + 3] == 1) { //斜め(右肩上がり)に4つ並ぶとき //array[m][n] = -1; count = 0; for (int I = 5; I >= m + 1; I--) { //調べてる所に球を入れることは可能か調べる if (array[I][n] != -1) { count++; } } if (count == 5 - m) { decidej = n; } } array[m][n] = -1; } } } } } System.out.println("コンピュータは"+(decidej+1)+"列に◯を入れました。"); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } if (decidej==-1){ decidej=0; } return decidej; } }
b2a274b46b8ed0d8fb456f4703384d288bc07fc4
da1cb92616cc7e876bceb2a5e9593e815d4399b8
/app/src/com/shushan/thomework101/HttpHelper/service/view/GoAcceptView.java
99b4eece2e29247d759c9e7df0147ce93d9b6d22
[]
no_license
nimingangle520/thomework101
ad6d6be17c5c1e657bcc6fd00950c43e53d83337
508024cec1841c5a8eae75e1f573aa66f1a378c7
refs/heads/master
2020-04-05T07:03:55.327309
2018-11-10T08:52:32
2018-11-10T08:52:32
150,107,769
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
package com.shushan.thomework101.HttpHelper.service.view; import com.shushan.thomework101.HttpHelper.service.entity.orders.GoAccept; public interface GoAcceptView extends View { void onSuccess(GoAccept goAccept); void onError(String result); }
f4904e64ab6783be2833d9652d22ed24db2ea4f3
ab22a3f52bbb9665cf21cc46d84134a49d280b77
/src/Hausaufgabe08/Testfall.java
a614bd0124fa489596cb852dd3993f32594b113e
[ "MIT" ]
permissive
alexemm/Programming-Homework-WS2016-17
d11ff1982795d0c0fe82736bcae58c5a18934ab3
91723ec77b906e7dc5589fc6ab46e4bb125a4cee
refs/heads/master
2022-04-24T17:32:22.874401
2020-04-29T08:13:30
2020-04-29T08:13:30
259,863,394
0
0
null
null
null
null
UTF-8
Java
false
false
422
java
package Hausaufgabe08; public class Testfall { public static void main(String[] args) { Schiebepuzzle puzzle = new Schiebepuzzle(); // Mischen nicht vergessen, ansonsten hat der Spieler sehr schnell gewonnen puzzle.mische(); System.out.println(puzzle); // Testen des Loesungsalgorithmus // -> zufaellig schieben SchiebAlg1 alg1 = new SchiebAlg1(); alg1.loese(puzzle); System.out.println(puzzle); } }
5eddd13908c38e7475e3116666d184e2c1f5ce67
d412bc71e891464fa030997ac1a69cf0c08594db
/data-tx/src/main/java/io/micronaut/transaction/support/AbstractTransactionStatus.java
e621233b022c703ebe70741a189b8fc845925b6f
[ "Apache-2.0" ]
permissive
zepfred/micronaut-data
3048c0f290d066822320ac3dd0b6743c28ced95d
13179dfa698053f07c0c4f320234695457f4fbff
refs/heads/master
2021-07-12T23:37:36.449358
2021-01-28T16:00:47
2021-01-28T16:00:47
233,688,837
0
0
Apache-2.0
2020-01-13T20:39:12
2020-01-13T20:39:12
null
UTF-8
Java
false
false
8,225
java
/* * Copyright 2017-2020 original authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.micronaut.transaction.support; import edu.umd.cs.findbugs.annotations.NonNull; import edu.umd.cs.findbugs.annotations.Nullable; import io.micronaut.transaction.SavepointManager; import io.micronaut.transaction.TransactionStatus; import io.micronaut.transaction.exceptions.NestedTransactionNotSupportedException; import io.micronaut.transaction.exceptions.TransactionException; import io.micronaut.transaction.exceptions.TransactionUsageException; /** * Abstract base implementation of the * {@link io.micronaut.transaction.TransactionStatus} interface. * * <p>Pre-implements the handling of local rollback-only and completed flags, and * delegation to an underlying {@link io.micronaut.transaction.SavepointManager}. * Also offers the option of a holding a savepoint within the transaction. * * <p>Does not assume any specific internal transaction handling, such as an * underlying transaction object, and no transaction synchronization mechanism. * * @author Juergen Hoeller * @since 1.2.3 * @see #setRollbackOnly() * @see #isRollbackOnly() * @see #setCompleted() * @see #isCompleted() * @see #getSavepointManager() * @see DefaultTransactionStatus * @param <T> The connection type */ public abstract class AbstractTransactionStatus<T> implements TransactionStatus<T> { private boolean rollbackOnly = false; private boolean completed = false; @Nullable private Object savepoint; //--------------------------------------------------------------------- // Implementation of TransactionExecution //--------------------------------------------------------------------- @Override public void setRollbackOnly() { this.rollbackOnly = true; } /** * Determine the rollback-only flag via checking both the local rollback-only flag * of this TransactionStatus and the global rollback-only flag of the underlying * transaction, if any. * @see #isLocalRollbackOnly() * @see #isGlobalRollbackOnly() */ @Override public boolean isRollbackOnly() { return (isLocalRollbackOnly() || isGlobalRollbackOnly()); } /** * Determine the rollback-only flag via checking this TransactionStatus. * <p>Will only return "true" if the application called {@code setRollbackOnly} * on this TransactionStatus object. * * @return Whether is local rollback */ public boolean isLocalRollbackOnly() { return this.rollbackOnly; } /** * Template method for determining the global rollback-only flag of the * underlying transaction, if any. * <p>This implementation always returns {@code false}. * * @return Whether is global rollback */ public boolean isGlobalRollbackOnly() { return false; } /** * Mark this transaction as completed, that is, committed or rolled back. */ public void setCompleted() { this.completed = true; } @Override public boolean isCompleted() { return this.completed; } //--------------------------------------------------------------------- // Handling of current savepoint state //--------------------------------------------------------------------- @Override public boolean hasSavepoint() { return (this.savepoint != null); } /** * Set a savepoint for this transaction. Useful for PROPAGATION_NESTED. * @see io.micronaut.transaction.TransactionDefinition.Propagation#NESTED * @param savepoint The save point */ protected void setSavepoint(@Nullable Object savepoint) { this.savepoint = savepoint; } /** * @return Get the savepoint for this transaction, if any. */ @Nullable protected Object getSavepoint() { return this.savepoint; } /** * Create a savepoint and hold it for the transaction. * @throws NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints * @throws TransactionException if an error occurs creating the save point */ public void createAndHoldSavepoint() throws TransactionException { setSavepoint(getSavepointManager().createSavepoint()); } /** * Roll back to the savepoint that is held for the transaction * and release the savepoint right afterwards. * @throws TransactionException if an error occurs rolling back to savepoint */ public void rollbackToHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot roll back to savepoint - no savepoint associated with current transaction"); } getSavepointManager().rollbackToSavepoint(savepoint); getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); } /** * Release the savepoint that is held for the transaction. * @throws TransactionException if an error occurs releasing the save point */ public void releaseHeldSavepoint() throws TransactionException { Object savepoint = getSavepoint(); if (savepoint == null) { throw new TransactionUsageException( "Cannot release savepoint - no savepoint associated with current transaction"); } getSavepointManager().releaseSavepoint(savepoint); setSavepoint(null); } //--------------------------------------------------------------------- // Implementation of SavepointManager //--------------------------------------------------------------------- /** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#createSavepoint() */ @Override public Object createSavepoint() throws TransactionException { return getSavepointManager().createSavepoint(); } /** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#rollbackToSavepoint(Object) */ @Override public void rollbackToSavepoint(Object savepoint) throws TransactionException { getSavepointManager().rollbackToSavepoint(savepoint); } /** * This implementation delegates to a SavepointManager for the * underlying transaction, if possible. * @see #getSavepointManager() * @see SavepointManager#releaseSavepoint(Object) */ @Override public void releaseSavepoint(Object savepoint) throws TransactionException { getSavepointManager().releaseSavepoint(savepoint); } /** * Return a SavepointManager for the underlying transaction, if possible. * <p>Default implementation always throws a NestedTransactionNotSupportedException. * @throws NestedTransactionNotSupportedException * if the underlying transaction does not support savepoints * @return The save point manager */ protected @NonNull SavepointManager getSavepointManager() { throw new NestedTransactionNotSupportedException("This transaction does not support savepoints"); } //--------------------------------------------------------------------- // Flushing support //--------------------------------------------------------------------- /** * This implementations is empty, considering flush as a no-op. */ @Override public void flush() { } }
6065abacaf6b918e06ef1d017b77fab0e6ae4249
44e7adc9a1c5c0a1116097ac99c2a51692d4c986
/aws-java-sdk-xray/src/main/java/com/amazonaws/services/xray/model/UntagResourceResult.java
20a24ae2eea3dd9ffd778dbd9bfdcce6c1b27ceb
[ "Apache-2.0" ]
permissive
QiAnXinCodeSafe/aws-sdk-java
f93bc97c289984e41527ae5bba97bebd6554ddbe
8251e0a3d910da4f63f1b102b171a3abf212099e
refs/heads/master
2023-01-28T14:28:05.239019
2020-12-03T22:09:01
2020-12-03T22:09:01
318,460,751
1
0
Apache-2.0
2020-12-04T10:06:51
2020-12-04T09:05:03
null
UTF-8
Java
false
false
2,316
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.xray.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/UntagResource" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UntagResourceResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable { /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UntagResourceResult == false) return false; UntagResourceResult other = (UntagResourceResult) obj; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; return hashCode; } @Override public UntagResourceResult clone() { try { return (UntagResourceResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
[ "" ]
a7990843112d3dafa359fb60bb6f886a3d3714b4
714590d8e3512194888612b55cc6e300421763d7
/we-web-parent/web-linyun-airline/src/main/java/com/linyun/airline/common/form/SQLParamForm.java
72c1fc3f6087558f60a082fff93b90bad277c3f1
[]
no_license
HKjournalists/zhiliren-we
140624a6ded06b156245ef194eba4b1cc12583fb
ab969fafc617891f46d0a36130157248f932d4af
refs/heads/master
2021-01-20T15:23:28.633464
2016-11-16T09:34:37
2016-11-16T09:34:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
569
java
/** * SqlParamForm.java * com.xiaoka.game.common.form * Copyright (c) 2016, 北京聚智未来科技有限公司版权所有. */ package com.linyun.airline.common.form; import org.nutz.dao.SqlManager; import org.nutz.dao.sql.Sql; /** * 封装复杂SQL查询参数,可直接用于接收页面参数,然后封装好查询SQL * <p> * @author 朱晓川 * @Date 2016年8月26日 */ public interface SQLParamForm { /** * 返回封装好查询参数之后的完整查询sql */ public Sql sql(final SqlManager sqlManager); }
3a84b964c47f563a74c157ffb16114699ab898d1
34221f3f7738d7a33c693e580dc6a99789349cf3
/app/src/main/java/defpackage/awt.java
d669d8a826352ddc7ee4f8aa00a7ff0c48d1f191
[]
no_license
KobeGong/TasksApp
0c7b9f3f54bc4be755b1f605b41230822d6f9850
aacdd5cbf0ba073460797fa76f1aaf2eaf70f08e
refs/heads/master
2023-08-16T07:11:13.379876
2021-09-25T17:38:57
2021-09-25T17:38:57
374,659,931
0
0
null
null
null
null
UTF-8
Java
false
false
2,493
java
package defpackage; /* renamed from: awt reason: default package */ /* compiled from: PG */ public final class awt { @java.lang.Deprecated public static final defpackage.ayd a = new defpackage.ayd("ClearcutLogger.API", c, b); private static defpackage.ayh b = new defpackage.ayh(0); private static defpackage.ayf c = new defpackage.axn(); /* access modifiers changed from: private */ public final java.lang.String d; /* access modifiers changed from: private */ public final int e; /* access modifiers changed from: private */ public java.lang.String f; /* access modifiers changed from: private */ public int g; /* access modifiers changed from: private */ public java.lang.String h; private java.lang.String i; /* access modifiers changed from: private */ public final defpackage.awy j; /* access modifiers changed from: private */ public final defpackage.bex k; /* access modifiers changed from: private */ public defpackage.awx l; /* access modifiers changed from: private */ public final defpackage.awv m; @java.lang.Deprecated public awt(android.content.Context context, java.lang.String str, java.lang.String str2) { this(context, str, str2, new defpackage.axc(context), defpackage.bey.a, new defpackage.axk(context)); } private awt(android.content.Context context, java.lang.String str, java.lang.String str2, defpackage.awy awy, defpackage.bex bex, defpackage.awv awv) { this.g = -1; this.d = context.getPackageName(); this.e = a(context); this.g = -1; this.f = str; this.h = str2; this.i = null; this.j = awy; this.k = bex; this.l = new defpackage.awx(); this.m = awv; } private static int a(android.content.Context context) { boolean z = false; try { return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode; } catch (android.content.pm.PackageManager.NameNotFoundException e2) { android.util.Log.wtf("ClearcutLogger", "This can't happen."); return z; } } static /* synthetic */ java.lang.String d(defpackage.awt awt) { return null; } static /* synthetic */ int a() { return 0; } public static /* synthetic */ boolean b() { return false; } static /* synthetic */ int[] c() { return null; } }
d04dc950a8a653025645f8a61262b1e853b104da
bfa448aae7af0a6f13bca0904b93ce981ff731c1
/PracticaFinal/app/build/generated/source/buildConfig/androidTest/debug/com/example/practicafinal/test/BuildConfig.java
235a9a6e9fe84aade81c3ca50e216ad8f8114599
[]
no_license
alejandrodfs/PracticaMoviles
2740c51f2df28657f80875013db5992924a4cc38
516c63833bf0d36c35636cf96e711fbe7ec42c2b
refs/heads/master
2020-11-24T21:55:15.958528
2020-01-31T10:41:56
2020-01-31T10:41:56
228,356,203
1
1
null
null
null
null
UTF-8
Java
false
false
467
java
/** * Automatically generated file. DO NOT MODIFY */ package com.example.practicafinal.test; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.example.practicafinal.test"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = ""; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; }
ee79aaff4354f91f4f7027379293e7af803f766b
c81dd37adb032fb057d194b5383af7aa99f79c6a
/java/com/facebook/ads/redexgen/X/FS.java
5fa2492718a83ae5c1d05691745105bbdf31108d
[]
no_license
hongnam207/pi-network-source
1415a955e37fe58ca42098967f0b3307ab0dc785
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
refs/heads/main
2023-03-30T07:49:35.920796
2021-03-28T06:56:24
2021-03-28T06:56:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package com.facebook.ads.redexgen.X; import android.os.Handler; public final class FS { public final Handler A00; public final FW A01; public FS(Handler handler, FW fw) { this.A00 = handler; this.A01 = fw; } }
844db548d1e3efae42683fe2e0b3d98b517eae4d
e060d9e89b900416d22d942d6109612d43a3273a
/Components/googleglass-1.1/lib/android/1/content/google-gdk/samples/Timer/src/com/google/android/glass/sample/timer/SetTimerActivity.java
1426a3a6432d041fce2c286123b8432ab771edf5
[ "MIT", "Apache-2.0" ]
permissive
longzheng/PTVGlass
18c2867d8b4d18aefca7f59ecd9c2b03f42ef675
da70778a6ed63921ce4ac408e2a4724e5abfdf49
refs/heads/master
2021-01-15T23:40:01.791369
2019-01-05T05:26:18
2019-01-05T05:26:18
18,239,042
16
1
null
null
null
null
UTF-8
Java
false
false
4,270
java
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.android.glass.sample.timer; import com.google.android.glass.touchpad.Gesture; import com.google.android.glass.touchpad.GestureDetector; import com.google.android.glass.widget.CardScrollView; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.media.AudioManager; import android.os.Bundle; import android.view.MotionEvent; /** * Activity to set the timer. */ public class SetTimerActivity extends Activity implements GestureDetector.BaseListener { public static final String EXTRA_DURATION_MILLIS = "duration_millis"; private static final int SELECT_VALUE = 100; private AudioManager mAudioManager; private GestureDetector mDetector; private CardScrollView mView; private SetTimerScrollAdapter mAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); mAdapter = new SetTimerScrollAdapter(this); mAdapter.setDurationMillis(getIntent().getLongExtra(EXTRA_DURATION_MILLIS, 0)); mView = new CardScrollView(this) { @Override public final boolean dispatchGenericFocusedEvent(MotionEvent event) { if (mDetector.onMotionEvent(event)) { return true; } return super.dispatchGenericFocusedEvent(event); } }; mView.setAdapter(mAdapter); setContentView(mView); mDetector = new GestureDetector(this).setBaseListener(this); } @Override public void onResume() { super.onResume(); mView.activate(); } @Override public void onPause() { super.onPause(); mView.deactivate(); } @Override public boolean onGenericMotionEvent(MotionEvent event) { return mDetector.onMotionEvent(event); } @Override public boolean onGesture(Gesture gesture) { if (gesture == Gesture.TAP) { int position = mView.getSelectedItemPosition(); SetTimerScrollAdapter.TimeComponents component = (SetTimerScrollAdapter.TimeComponents) mAdapter.getItem(position); Intent selectValueIntent = new Intent(this, SelectValueActivity.class); selectValueIntent.putExtra(SelectValueActivity.EXTRA_COUNT, component.getMaxValue()); selectValueIntent.putExtra( SelectValueActivity.EXTRA_INITIAL_VALUE, (int) mAdapter.getTimeComponent(component)); startActivityForResult(selectValueIntent, SELECT_VALUE); mAudioManager.playSoundEffect(AudioManager.FX_KEY_CLICK); return true; } return false; } @Override public void onBackPressed() { Intent resultIntent = new Intent(); resultIntent.putExtra(EXTRA_DURATION_MILLIS, mAdapter.getDurationMillis()); setResult(RESULT_OK, resultIntent); super.onBackPressed(); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK && requestCode == SELECT_VALUE) { int position = mView.getSelectedItemPosition(); SetTimerScrollAdapter.TimeComponents component = (SetTimerScrollAdapter.TimeComponents) mAdapter.getItem(position); mAdapter.setTimeComponent( component, data.getIntExtra(SelectValueActivity.EXTRA_SELECTED_VALUE, 0)); mView.updateViews(true); } } }
cade2eca566c3469af4ea6b7abf45bd31c2d6262
9e658c5c4939060b32443bd18d717854a5f38169
/activiti-spring/src/main/java/org/activiti/spring/SpringEntityManagerSessionFactory.java
995206961d057503cb358c5974ae2c8934b4ca2c
[ "Apache-2.0" ]
permissive
joshlong-attic/javaconfig-ftw
08f724e785598a950d81529d58b0bf6ce7e1282a
a394c75e8c99071adcadcfb71a3bc4841a4de744
refs/heads/master
2023-01-05T13:16:14.443223
2013-09-12T03:00:34
2013-09-12T03:00:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,295
java
/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.activiti.spring; import org.activiti.engine.impl.interceptor.Session; import org.activiti.engine.impl.interceptor.SessionFactory; import org.activiti.engine.impl.variable.EntityManagerSession; import org.activiti.engine.impl.variable.EntityManagerSessionImpl; import org.springframework.orm.jpa.EntityManagerFactoryUtils; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; /** * Session Factory for {@link EntityManagerSession}. * * Must be used when the {@link EntityManagerFactory} is managed by Spring. * This implementation will retrieve the {@link EntityManager} bound to the * thread by Spring in case a transaction already started. * * @author Joram Barrez */ public class SpringEntityManagerSessionFactory implements SessionFactory { protected EntityManagerFactory entityManagerFactory; protected boolean handleTransactions; protected boolean closeEntityManager; public SpringEntityManagerSessionFactory(Object entityManagerFactory, boolean handleTransactions, boolean closeEntityManager) { this.entityManagerFactory = (EntityManagerFactory) entityManagerFactory; this.handleTransactions = handleTransactions; this.closeEntityManager = closeEntityManager; } public Class< ? > getSessionType() { return EntityManagerFactory.class; } public Session openSession() { EntityManager entityManager = EntityManagerFactoryUtils.getTransactionalEntityManager(entityManagerFactory); if (entityManager == null) { return new EntityManagerSessionImpl(entityManagerFactory, handleTransactions, closeEntityManager); } return new EntityManagerSessionImpl(entityManagerFactory, entityManager, false, false); } }
97a650fb0801fedf2585ca8ca162687e06425611
742baa4af9ddeb8fe1b762d1ff332ba7d12bf5e5
/src/com/luv2code/jdbc/TestEagerLazyLoading.java
080cfeb0309550874f8140576dd843c6515e5ccc
[]
no_license
adavuruku/spring-hibernate
7b94db87b436ca3afaaf7d62eb18015ebbb445e2
4c053e5546c51cb9de7c2281f11aeb41c6a277ae
refs/heads/main
2023-02-13T04:51:59.951987
2021-01-18T17:38:53
2021-01-18T17:38:53
330,231,494
1
0
null
null
null
null
UTF-8
Java
false
false
1,640
java
package com.luv2code.jdbc; import org.hibernate.Session; import org.hibernate.query.Query; public class TestEagerLazyLoading { public static void main(String[] args) { Session session = HibernateUtil.getSessionFactory().openSession(); try { // in Eager Loading - the table and all its related child tables are fetched once // in Lazy Loading only the main table is fetch and child are fetch when needed. session.beginTransaction(); //Since we use the Join fetch. it will wor fine even session is close cause is already // into the memory Query<InstructorOneToManyB> query = session.createQuery("select i from InstructorOneToManyB i " + "JOIN FETCH i.allCourses where i.id=:theInstructorId", InstructorOneToManyB.class); query.setParameter("theInstructorId",12); InstructorOneToManyB delInstructor = query.getSingleResult(); System.out.println("Result : " + delInstructor); session.close(); System.out.println("Courses : " + delInstructor.getAllCourses()); // InstructorOneToManyB delInstructor = session.get(InstructorOneToManyB.class, 12); // if(delInstructor != null) { // System.out.println("Result : " + delInstructor); // session.close(); // //for lazy fetching the getCourses will fail since session is close // //but in Eager loading it will work fine since we have fetch all info out b4 closing session // System.out.println("Courses : " + delInstructor.getAllCourses()); // }else { // System.out.println("User Not Found !!!"); // } } catch (Exception e) { System.out.println(e.getMessage()); }finally { session.close(); } } }
0ba242a19c0c25aed93e0a895ac5bf61f3db3055
2675014ce51aa2be088c1c3d4126153ea3bdcf94
/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/UpdatePatchBaselineResult.java
e4b2c3a6257e055070f06481cbb9994c4b81aa22
[ "Apache-2.0" ]
permissive
erbrito/aws-java-sdk
7b621cae16c470dfe26b917781cb00f5c6a0de4e
853b7e82d708465aca43c6013ab1221ce4d50852
refs/heads/master
2021-01-25T05:50:39.073013
2017-02-02T03:58:41
2017-02-02T03:58:41
80,691,444
1
0
null
null
null
null
UTF-8
Java
false
false
19,137
java
/* * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.simplesystemsmanagement.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/ssm-2014-11-06/UpdatePatchBaseline" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdatePatchBaselineResult extends com.amazonaws.AmazonWebServiceResult<com.amazonaws.ResponseMetadata> implements Serializable, Cloneable { /** * <p> * The ID of the deleted patch baseline. * </p> */ private String baselineId; /** * <p> * The name of the patch baseline. * </p> */ private String name; /** * <p> * A set of global filters used to exclude patches from the baseline. * </p> */ private PatchFilterGroup globalFilters; /** * <p> * A set of rules used to include patches in the baseline. * </p> */ private PatchRuleGroup approvalRules; /** * <p> * A list of explicitly approved patches for the baseline. * </p> */ private com.amazonaws.internal.SdkInternalList<String> approvedPatches; /** * <p> * A list of explicitly rejected patches for the baseline. * </p> */ private com.amazonaws.internal.SdkInternalList<String> rejectedPatches; /** * <p> * The date when the patch baseline was created. * </p> */ private java.util.Date createdDate; /** * <p> * The date when the patch baseline was last modified. * </p> */ private java.util.Date modifiedDate; /** * <p> * A description of the Patch Baseline. * </p> */ private String description; /** * <p> * The ID of the deleted patch baseline. * </p> * * @param baselineId * The ID of the deleted patch baseline. */ public void setBaselineId(String baselineId) { this.baselineId = baselineId; } /** * <p> * The ID of the deleted patch baseline. * </p> * * @return The ID of the deleted patch baseline. */ public String getBaselineId() { return this.baselineId; } /** * <p> * The ID of the deleted patch baseline. * </p> * * @param baselineId * The ID of the deleted patch baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withBaselineId(String baselineId) { setBaselineId(baselineId); return this; } /** * <p> * The name of the patch baseline. * </p> * * @param name * The name of the patch baseline. */ public void setName(String name) { this.name = name; } /** * <p> * The name of the patch baseline. * </p> * * @return The name of the patch baseline. */ public String getName() { return this.name; } /** * <p> * The name of the patch baseline. * </p> * * @param name * The name of the patch baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withName(String name) { setName(name); return this; } /** * <p> * A set of global filters used to exclude patches from the baseline. * </p> * * @param globalFilters * A set of global filters used to exclude patches from the baseline. */ public void setGlobalFilters(PatchFilterGroup globalFilters) { this.globalFilters = globalFilters; } /** * <p> * A set of global filters used to exclude patches from the baseline. * </p> * * @return A set of global filters used to exclude patches from the baseline. */ public PatchFilterGroup getGlobalFilters() { return this.globalFilters; } /** * <p> * A set of global filters used to exclude patches from the baseline. * </p> * * @param globalFilters * A set of global filters used to exclude patches from the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withGlobalFilters(PatchFilterGroup globalFilters) { setGlobalFilters(globalFilters); return this; } /** * <p> * A set of rules used to include patches in the baseline. * </p> * * @param approvalRules * A set of rules used to include patches in the baseline. */ public void setApprovalRules(PatchRuleGroup approvalRules) { this.approvalRules = approvalRules; } /** * <p> * A set of rules used to include patches in the baseline. * </p> * * @return A set of rules used to include patches in the baseline. */ public PatchRuleGroup getApprovalRules() { return this.approvalRules; } /** * <p> * A set of rules used to include patches in the baseline. * </p> * * @param approvalRules * A set of rules used to include patches in the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withApprovalRules(PatchRuleGroup approvalRules) { setApprovalRules(approvalRules); return this; } /** * <p> * A list of explicitly approved patches for the baseline. * </p> * * @return A list of explicitly approved patches for the baseline. */ public java.util.List<String> getApprovedPatches() { if (approvedPatches == null) { approvedPatches = new com.amazonaws.internal.SdkInternalList<String>(); } return approvedPatches; } /** * <p> * A list of explicitly approved patches for the baseline. * </p> * * @param approvedPatches * A list of explicitly approved patches for the baseline. */ public void setApprovedPatches(java.util.Collection<String> approvedPatches) { if (approvedPatches == null) { this.approvedPatches = null; return; } this.approvedPatches = new com.amazonaws.internal.SdkInternalList<String>(approvedPatches); } /** * <p> * A list of explicitly approved patches for the baseline. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setApprovedPatches(java.util.Collection)} or {@link #withApprovedPatches(java.util.Collection)} if you * want to override the existing values. * </p> * * @param approvedPatches * A list of explicitly approved patches for the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withApprovedPatches(String... approvedPatches) { if (this.approvedPatches == null) { setApprovedPatches(new com.amazonaws.internal.SdkInternalList<String>(approvedPatches.length)); } for (String ele : approvedPatches) { this.approvedPatches.add(ele); } return this; } /** * <p> * A list of explicitly approved patches for the baseline. * </p> * * @param approvedPatches * A list of explicitly approved patches for the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withApprovedPatches(java.util.Collection<String> approvedPatches) { setApprovedPatches(approvedPatches); return this; } /** * <p> * A list of explicitly rejected patches for the baseline. * </p> * * @return A list of explicitly rejected patches for the baseline. */ public java.util.List<String> getRejectedPatches() { if (rejectedPatches == null) { rejectedPatches = new com.amazonaws.internal.SdkInternalList<String>(); } return rejectedPatches; } /** * <p> * A list of explicitly rejected patches for the baseline. * </p> * * @param rejectedPatches * A list of explicitly rejected patches for the baseline. */ public void setRejectedPatches(java.util.Collection<String> rejectedPatches) { if (rejectedPatches == null) { this.rejectedPatches = null; return; } this.rejectedPatches = new com.amazonaws.internal.SdkInternalList<String>(rejectedPatches); } /** * <p> * A list of explicitly rejected patches for the baseline. * </p> * <p> * <b>NOTE:</b> This method appends the values to the existing list (if any). Use * {@link #setRejectedPatches(java.util.Collection)} or {@link #withRejectedPatches(java.util.Collection)} if you * want to override the existing values. * </p> * * @param rejectedPatches * A list of explicitly rejected patches for the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withRejectedPatches(String... rejectedPatches) { if (this.rejectedPatches == null) { setRejectedPatches(new com.amazonaws.internal.SdkInternalList<String>(rejectedPatches.length)); } for (String ele : rejectedPatches) { this.rejectedPatches.add(ele); } return this; } /** * <p> * A list of explicitly rejected patches for the baseline. * </p> * * @param rejectedPatches * A list of explicitly rejected patches for the baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withRejectedPatches(java.util.Collection<String> rejectedPatches) { setRejectedPatches(rejectedPatches); return this; } /** * <p> * The date when the patch baseline was created. * </p> * * @param createdDate * The date when the patch baseline was created. */ public void setCreatedDate(java.util.Date createdDate) { this.createdDate = createdDate; } /** * <p> * The date when the patch baseline was created. * </p> * * @return The date when the patch baseline was created. */ public java.util.Date getCreatedDate() { return this.createdDate; } /** * <p> * The date when the patch baseline was created. * </p> * * @param createdDate * The date when the patch baseline was created. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withCreatedDate(java.util.Date createdDate) { setCreatedDate(createdDate); return this; } /** * <p> * The date when the patch baseline was last modified. * </p> * * @param modifiedDate * The date when the patch baseline was last modified. */ public void setModifiedDate(java.util.Date modifiedDate) { this.modifiedDate = modifiedDate; } /** * <p> * The date when the patch baseline was last modified. * </p> * * @return The date when the patch baseline was last modified. */ public java.util.Date getModifiedDate() { return this.modifiedDate; } /** * <p> * The date when the patch baseline was last modified. * </p> * * @param modifiedDate * The date when the patch baseline was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withModifiedDate(java.util.Date modifiedDate) { setModifiedDate(modifiedDate); return this; } /** * <p> * A description of the Patch Baseline. * </p> * * @param description * A description of the Patch Baseline. */ public void setDescription(String description) { this.description = description; } /** * <p> * A description of the Patch Baseline. * </p> * * @return A description of the Patch Baseline. */ public String getDescription() { return this.description; } /** * <p> * A description of the Patch Baseline. * </p> * * @param description * A description of the Patch Baseline. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdatePatchBaselineResult withDescription(String description) { setDescription(description); return this; } /** * Returns a string representation of this object; useful for testing and debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getBaselineId() != null) sb.append("BaselineId: ").append(getBaselineId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getGlobalFilters() != null) sb.append("GlobalFilters: ").append(getGlobalFilters()).append(","); if (getApprovalRules() != null) sb.append("ApprovalRules: ").append(getApprovalRules()).append(","); if (getApprovedPatches() != null) sb.append("ApprovedPatches: ").append(getApprovedPatches()).append(","); if (getRejectedPatches() != null) sb.append("RejectedPatches: ").append(getRejectedPatches()).append(","); if (getCreatedDate() != null) sb.append("CreatedDate: ").append(getCreatedDate()).append(","); if (getModifiedDate() != null) sb.append("ModifiedDate: ").append(getModifiedDate()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdatePatchBaselineResult == false) return false; UpdatePatchBaselineResult other = (UpdatePatchBaselineResult) obj; if (other.getBaselineId() == null ^ this.getBaselineId() == null) return false; if (other.getBaselineId() != null && other.getBaselineId().equals(this.getBaselineId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getGlobalFilters() == null ^ this.getGlobalFilters() == null) return false; if (other.getGlobalFilters() != null && other.getGlobalFilters().equals(this.getGlobalFilters()) == false) return false; if (other.getApprovalRules() == null ^ this.getApprovalRules() == null) return false; if (other.getApprovalRules() != null && other.getApprovalRules().equals(this.getApprovalRules()) == false) return false; if (other.getApprovedPatches() == null ^ this.getApprovedPatches() == null) return false; if (other.getApprovedPatches() != null && other.getApprovedPatches().equals(this.getApprovedPatches()) == false) return false; if (other.getRejectedPatches() == null ^ this.getRejectedPatches() == null) return false; if (other.getRejectedPatches() != null && other.getRejectedPatches().equals(this.getRejectedPatches()) == false) return false; if (other.getCreatedDate() == null ^ this.getCreatedDate() == null) return false; if (other.getCreatedDate() != null && other.getCreatedDate().equals(this.getCreatedDate()) == false) return false; if (other.getModifiedDate() == null ^ this.getModifiedDate() == null) return false; if (other.getModifiedDate() != null && other.getModifiedDate().equals(this.getModifiedDate()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBaselineId() == null) ? 0 : getBaselineId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getGlobalFilters() == null) ? 0 : getGlobalFilters().hashCode()); hashCode = prime * hashCode + ((getApprovalRules() == null) ? 0 : getApprovalRules().hashCode()); hashCode = prime * hashCode + ((getApprovedPatches() == null) ? 0 : getApprovedPatches().hashCode()); hashCode = prime * hashCode + ((getRejectedPatches() == null) ? 0 : getRejectedPatches().hashCode()); hashCode = prime * hashCode + ((getCreatedDate() == null) ? 0 : getCreatedDate().hashCode()); hashCode = prime * hashCode + ((getModifiedDate() == null) ? 0 : getModifiedDate().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); return hashCode; } @Override public UpdatePatchBaselineResult clone() { try { return (UpdatePatchBaselineResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
[ "" ]
85ffe6629c1fb364d2dfc0aafafc7ad9a4c07593
1086d45fe3deb1f36208d8b577a54575b2c769e2
/src/main/java/cache/UserAdCache.java
5f73a977b42b476b9347043d31411ced43587dd2
[]
no_license
a6jora/uxboost-bot
31c59177a505ed60fe719eb4150761313023fa26
fd847a10d9737a3f5dcbfa634863eda4897b9017
refs/heads/master
2023-06-04T07:06:59.978601
2021-06-14T12:20:36
2021-06-14T12:20:36
373,838,319
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package cache; import botapi.BotState; import botapi.handlers.fillinfad.UserAd; import java.util.HashMap; import java.util.Map; public class UserAdCache implements AdCache{ private Map<Integer, BotState> usersBotStates = new HashMap<>(); private Map<Integer, UserAd> usersAds = new HashMap<>(); @Override public void setUserCurrentBotState(int userId, BotState botState) { usersBotStates.put(userId, botState); } @Override public BotState getUsersCurrentBotState(int userId) { BotState botState = usersBotStates.get(userId); if (botState == null){ botState = BotState.ASK_OPTION; } return botState; } @Override public UserAd getUserAd(int userId) { UserAd userAd = usersAds.get(userId); if (userAd == null){ userAd = new UserAd(); } return userAd; } @Override public void saveUserAd(int userId, UserAd userAd) { usersAds.put(userId, userAd); } }
a514740d5218439b3f0341ece25dbf152f1828e5
3b58527c713935e3b8151bdf542035cd813135be
/src/Fibanocci.java
1be92d6d40ea3f68eb9500df12851e25cb9895ee
[]
no_license
vekon/JavaBasics
8adc66923e0544d495978d4614a7434f24ab3cf2
686d9a41b094a246c8625ef711025daa03e41105
refs/heads/master
2020-04-01T04:02:11.115997
2018-10-13T07:36:10
2018-10-13T07:36:10
152,847,281
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
import java.util.Scanner; public class Fibanocci { public static void main(String[] args) { System.out.print("Enter a number to display fibonacci series : "); Scanner in = new Scanner(System.in); int number = in.nextInt(); int f1 = 0, f2 = 1; System.out.print("Fibonacci series : "); for (int i = 1; i <= number; i++) { System.out.print(f1+", "); int sum = f1 + f2; f1 = f2; f2 = sum; } } }
eab2e86b76bf9c688d43171f42bf8923a950c8ac
e65ce599b6383d487e12740986ec78eb283bc377
/A3Portal-POM/src/test/java/com/A3Portal/Testcases/HomePageTest.java
17fa9e7e36d0a23d64f2007231e33430c3a3e96a
[]
no_license
spadeinfotech/A3portal-POM
ca01688c6b728618bb7f0e82cc8429ff49d32a20
f7917afa7419a01365ed1fc614cf599c9a9cab77
refs/heads/master
2023-05-14T20:03:06.167816
2019-06-28T07:07:08
2019-06-28T07:07:08
192,528,794
0
0
null
2023-05-09T18:08:55
2019-06-18T11:42:01
HTML
UTF-8
Java
false
false
1,561
java
package com.A3Portal.Testcases; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.A3Portal.TestPages.ContactPage; import com.A3Portal.TestPages.HomePage; import com.A3Portal.TestPages.LoginPage; import com.A3Portal.Testutil.Testutil; import com.A3Portal.base.TestBase; public class HomePageTest extends TestBase { LoginPage loginPage; HomePage homePage; Testutil testUtil; ContactPage contactsPage; public HomePageTest() { super(); } @BeforeMethod public void setUp() { initialization(); testUtil = new Testutil(); contactsPage = new ContactPage(); loginPage = new LoginPage(); homePage = loginPage.login(prop.getProperty("username"), prop.getProperty("password")); } @Test(priority=1, enabled=true) public void verifyHomePageTitleTest(){ String homePageTitle = homePage.verifyHomePageTitle(); Assert.assertEquals(homePageTitle, "Core Compete","Home page title not matched"); System.out.println("running test1"); } @Test(priority=2, enabled=false) public void verifyUserNameTest(){ testUtil.switchToFrame(); Assert.assertTrue(homePage.verifyCorrectUserName()); System.out.println("running test2"); } @Test(priority=3, enabled=false) public void verifyContactsLinkTest(){ testUtil.switchToFrame(); contactsPage = homePage.clickOnContactsLink(); } @AfterMethod public void tearDown() throws InterruptedException{ closeDriver(); System.out.println("browser closed"); } }
d8ddb626b687bee64475058b87ed8f7e987d39b4
d3864b5b47018ca9d4b83a435c80eac08f4cf8a3
/codedojo/src/com/kavanal/interviewcake/linkedlists/ContainsCycle.java
36b3de274b55a53258a7df40897674c6cc127a71
[]
no_license
bazikpath/codetryouts
cdb6e9aa83904337375bd06d8cf0faa7c1ce5f15
5d09fb9907558ee8fd4f9d1c9e33e30a4a725624
refs/heads/master
2022-06-23T01:18:24.225891
2020-05-05T18:22:35
2020-05-05T18:22:35
256,035,645
0
0
null
null
null
null
UTF-8
Java
false
false
3,291
java
package com.kavanal.interviewcake.linkedlists; import org.junit.Test; import org.junit.runner.JUnitCore; import org.junit.runner.Result; import org.junit.runner.notification.Failure; import static org.junit.Assert.*; public class ContainsCycle { public static class LinkedListNode { public int value; public LinkedListNode next; public LinkedListNode(int value) { this.value = value; } } public static boolean containsCycle(LinkedListNode firstNode) { // check if the linked list contains a cycle LinkedListNode slowRunner = firstNode; LinkedListNode fastRunner = firstNode; while (fastRunner != null && fastRunner.next != null) { slowRunner = slowRunner.next; fastRunner = fastRunner.next.next; if (fastRunner == slowRunner) { return true; } } return false; } // tests @Test public void linkedListWithNoCycleTest() { final LinkedListNode[] nodes = valuesToLinkedListNodes(new int[] {1, 2, 3, 4}); final boolean result = containsCycle(nodes[0]); assertFalse(result); } @Test public void cycleLoopsToBeginningTest() { final LinkedListNode[] nodes = valuesToLinkedListNodes(new int[] {1, 2, 3, 4}); nodes[3].next = nodes[0]; final boolean result = containsCycle(nodes[0]); assertTrue(result); } @Test public void cycleLoopsToMiddleTest() { final LinkedListNode[] nodes = valuesToLinkedListNodes(new int[] {1, 2, 3, 4, 5}); nodes[4].next = nodes[2]; final boolean result = containsCycle(nodes[0]); assertTrue(result); } @Test public void twoNodeCycleAtEndTest() { final LinkedListNode[] nodes = valuesToLinkedListNodes(new int[] {1, 2, 3, 4, 5}); nodes[4].next = nodes[3]; final boolean result = containsCycle(nodes[0]); assertTrue(result); } @Test public void emptyListTest() { final boolean result = containsCycle(null); assertFalse(result); } @Test public void oneElementLinkedListNoCycleTest() { final LinkedListNode node = new LinkedListNode(1); final boolean result = containsCycle(node); assertFalse(result); } @Test public void oneElementLinkedListCycleTest() { final LinkedListNode node = new LinkedListNode(1); node.next = node; final boolean result = containsCycle(node); assertTrue(result); } private static LinkedListNode[] valuesToLinkedListNodes(int[] values) { final LinkedListNode[] nodes = new LinkedListNode[values.length]; for (int i = 0; i < values.length; ++i) { nodes[i] = new LinkedListNode(values[i]); if (i > 0) { nodes [i - 1].next = nodes[i]; } } return nodes; } public static void main(String[] args) { Result result = JUnitCore.runClasses(ContainsCycle.class); for (Failure failure : result.getFailures()) { System.out.println(failure.toString()); } if (result.wasSuccessful()) { System.out.println("All tests passed."); } } }
04cb6c5d35899914d70cb1b6ac86e3064ca9a7f0
98f56dc73b28e9df61bf573c872f3d7d4dfd2e6a
/classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/java/awt/desktop/SystemSleepListener.java
c834c6a08c36784fa3316ad0d13581f6dc72ffe1
[ "Apache-2.0" ]
permissive
seanmcox/Bytecoder
8b136029bdcad23b244099b95da70d5cd8b9b259
98a5c8e376225a9be6293bd10bf186d415e0d716
refs/heads/master
2020-12-02T09:16:13.129224
2020-01-04T10:19:39
2020-01-04T10:19:39
230,958,751
0
0
Apache-2.0
2019-12-30T18:04:29
2019-12-30T18:04:29
null
UTF-8
Java
false
false
2,112
java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package java.awt.desktop; /** * Implementors receive notification as the system is entering sleep, and after * the system wakes. * * This notification is useful for disconnecting from network services prior to * sleep, or re-establishing a connection if the network configuration has * changed during sleep. * * @since 9 */ public interface SystemSleepListener extends SystemEventListener { /** * Called when the system is about to sleep. Note: This message may not be * delivered prior to the actual system sleep, and may be processed after * the corresponding wake has occurred. * * @param e the system sleep event */ public void systemAboutToSleep(final SystemSleepEvent e); /** * Called after the system has awoken from sleeping. * * @param e the system sleep event */ public void systemAwoke(final SystemSleepEvent e); }
40bd0c1d42136b786f6dd8ff505e93d73c7dac6f
fdb18752ce836dbe6a7c6aa4fdda2b9a036cdbb5
/proxy/src/main/java/com/yhx/pattern/dynamic/IGamePlayer.java
88f8a4f6f1b460077a0b12e8671859f63fedff1d
[]
no_license
yuhuanxi/pattern
c8b6a55f326dd1e5bcfa7c3d9d7137b54bcaecc4
fdb8c6dcf6c43563a6610ea0f4d8f0521ac32e85
refs/heads/master
2021-01-11T20:28:08.003597
2017-01-16T14:08:50
2017-01-16T14:08:50
79,124,168
0
0
null
null
null
null
UTF-8
Java
false
false
273
java
package com.yhx.pattern.dynamic; /** * @author: shipeng.yu * @time: 2017年01月08日 下午3:38 * @version: 1.0 * @since: 1.0 * @description: */ public interface IGamePlayer { void login(String name, String pass); void killEnemy(); void upgrade(); }
ec886f50a7cdd996a15f9f03126561f1b6c995d8
78528c4b0d79ad938491e9dac1a8e849a24e28ff
/ch5/FileTest_4.java
63ec8f8eb3a5246c4713ce6562084a49ef7fc69f
[]
no_license
Minkyoung-Kim121/Java_basic
70db865857eeb85a1efd984f6c8dd399eacdf15b
77173e6e5ac2d6620153def3b77cbe9037fce669
refs/heads/main
2023-04-27T16:32:38.781409
2021-05-13T13:35:42
2021-05-13T13:35:42
366,058,399
1
0
null
null
null
null
UHC
Java
false
false
1,403
java
package a.b.c; import java.io.File; // import java.io.FileWriter; // import java.io.IOException; public class FileTest_4{ public static void main(String a[]) throws java.io.IOException{ File f1 = new File(a[0]); // f1 = File 을 만들어라 f1.mkdir(); // .mkdir() 함수를 이용해서 파일을 만든다. System.out.println("f1 >>> : " + f1); // 명령행 인수로 bb 실행하면 ch5 에 bb 디렉토리 생성. File f2 = new File(f1, f1.getName() + ".txt"); // f2 = f1 에 ".txt" 를 붙여라. (.getName() 함수를 이용해서) f2.createNewFile(); // createNewFile() 함수를 이용해서 파일을 f2 만들어라 if (f2.exists()) // if, f2 is exists { java.io.FileWriter fw = null; // FileWriter 를 null 로 초기화 fw = new java.io.FileWriter(f2); fw.write("파일에 내용을 써보세요ㅛㅛㅛ"); // .write() 함수를 이용해서 fw 파일에 내용을 쓸 것이다. fw.close(); // 자원을 쓰고 나면 항상 .close() 함수로 닫아라. } File files[] = f1.listFiles(); // .listFiles()를 사용해서 f1의 배열을 만든것이 files[] System.out.println("files.length >>> : " + files.length); // 1 bb 하나 만들었기 때문 for (int i=0; i < files.length; i++) { String fileName = files[i].getName(); System.out.println("fileName >>> : " + fileName); } } }
212ccb03813d57d2b826a61db3afb1c1c9dc8405
98eb1cf17808132f483643ae74b2693f48db1e7d
/BillSplit/app/src/main/java/billsplit/pma/hdm/de/billsplit/QuantityPriceActivity.java
5c4a37e2a6c35e1efedd31be8df28c25055cba59
[]
no_license
kabdelg/BillSplit
23078008ff7474b949e04e4c5b316899cbfbcfd9
9b6ebf2d5bca9ac4b967dce2b8ac01cbe59b8474
refs/heads/master
2021-01-01T18:21:39.974373
2017-07-25T15:11:00
2017-07-25T15:11:00
98,319,521
0
0
null
null
null
null
UTF-8
Java
false
false
5,036
java
package billsplit.pma.hdm.de.billsplit; import android.content.DialogInterface; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import java.util.ArrayList; public class QuantityPriceActivity extends AppCompatActivity { int quant = 1; // ArrayList for chosen food ArrayList<String> selFood = new ArrayList<String>(); // ArrayList for price set ArrayList<Float> selPrice = new ArrayList<Float>(); @Override protected void onCreate(Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_ACTION_BAR); super.onCreate(savedInstanceState); setContentView(R.layout.activity_quantity_price); // Set header Bundle titleExtras = getIntent().getExtras(); String title2 = titleExtras.getString("selected"); TextView titleQP = (TextView) findViewById(R.id.tvPrice); titleQP.setText(title2); // Set size of popup window DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); int width = dm.widthPixels; int height = dm.heightPixels; getWindow().setLayout((int) (width*.8), (int) (height*.45)); final TextView tvQuantity = (TextView) findViewById(R.id.quantityView); tvQuantity.setText(Integer.toString(quant)); // Functions regarding plus and minus buttons Button plus_pr = (Button) findViewById(R.id.plus_price); Button minus_pr = (Button) findViewById(R.id.minus_price); plus_pr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { quant++; tvQuantity.setText(Integer.toString(quant)); } }); minus_pr.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (quant>0) { quant--; tvQuantity.setText(Integer.toString(quant)); } } }); Button confirmQP = (Button) findViewById(R.id.confirmQP); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); confirmQP.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { EditText price = (EditText) findViewById(R.id.price); Bundle titleExtras = getIntent().getExtras(); String title2 = titleExtras.getString("selected"); SharedPreferences.Editor editor = prefs.edit(); // Function is only called when price was set if (!price.getText().toString().matches("")) { int foodArrSize = prefs.getInt("foodArr", 0); // Drag out added prices and food to avoid override for (int i = 0; i < foodArrSize; i++) { selFood.add(prefs.getString("food_" + i, null)); selPrice.add(prefs.getFloat("price_" + i, 0)); } // Add new price and food for (int i = 1; i <= quant; i++) { selFood.add(title2); selPrice.add(Float.parseFloat(price.getText().toString())); } // Forward data to shared Preferences editor.putInt("foodArr", selFood.size()); for (int i = 0; i < selFood.size(); i++) { editor.putString("food_" + i, selFood.get(i)); editor.putFloat("price_" + i, selPrice.get(i)); } editor.putInt("selectedQuantity", quant); editor.commit(); finish(); } else { // Error message, if no price has been set new AlertDialog.Builder(QuantityPriceActivity.this) .setTitle("Kein Preis eingegeben") .setMessage("Bitte legen Sie einen Preis für diese Speise fest") .setNegativeButton( "Ok", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } } ).show(); } } }); } }
1dc1f3ff44248423bdebbef24eeae8e7d28cf35c
13befa8dfc25715a4410d8e161a7c2bfb71c15e4
/src/model/level/LevelEasy.java
8b00a2f08912be544332eca6b75303c61fa81ef2
[]
no_license
totine/codecool--java-se--tw-assignment--hangman-game
5058f75f435773a98592d6a9aed1c84485e8cef1
238fc2156af64bde3e9a54b451e59247a188ff6e
refs/heads/master
2021-08-23T04:46:42.901300
2017-04-21T08:56:18
2017-04-21T08:56:18
112,921,946
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package model.level; import java.util.ArrayList; import persistence.CsvHandler; /** * Created by joanna on 20.04.17. */ public class LevelEasy extends Level { public LevelEasy() { this.words = CsvHandler.getWordListForLevel("easy"); this.lives = 7; this.wordToGuess = getRandomWord(); } }
edbea0fb8a8b5524f815b62239ec80eff2ee9d1f
5dd5dfed9f3599a0a391636f4d72a0513e8d1c79
/src/org/yejt/maze/MazeGame.java
3a5c2ccd56fe7e046f74e6cb90c737037ce0ac20
[ "Unlicense" ]
permissive
keys961/Design-Pattern
4f3b5bb579befb8f72917884defb96a59ec70bcc
edacae4965e129ee5dc462970e3e629f67bc7ab4
refs/heads/master
2021-01-01T19:08:11.090098
2018-01-22T14:06:03
2018-01-22T14:06:03
98,513,827
0
0
null
null
null
null
UTF-8
Java
false
false
1,565
java
package org.yejt.maze; /** * Created by Yejt on 2017/7/28 0028. */ public class MazeGame { private Room currentRoom; public Maze createMaze(MazeFactory mazeFactory) { Maze aMaze = mazeFactory.makeMaze(); Room r1 = mazeFactory.makeRoom(1); Room r2 = mazeFactory.makeRoom(2); Door theDoor = new Door(r1, r2); aMaze.addRoom(r1); aMaze.addRoom(r2); r1.setSide(Direction.NORTH, mazeFactory.makeWall()); r1.setSide(Direction.EAST, theDoor); r1.setSide(Direction.SOUTH, mazeFactory.makeWall()); r1.setSide(Direction.WEST, mazeFactory.makeWall()); r2.setSide(Direction.NORTH, mazeFactory.makeWall()); r2.setSide(Direction.EAST, mazeFactory.makeWall()); r2.setSide(Direction.SOUTH, mazeFactory.makeWall()); r2.setSide(Direction.WEST, theDoor); //Float a = new Float(1.0f); currentRoom = r1; return aMaze; } public void gotoNextRoom(String direction) { Direction d; switch (direction) { case "N": d = Direction.NORTH; break; case "S": d = Direction.SOUTH; break; case "E": d = Direction.EAST; break; case "W": d = Direction.WEST; break; default: d = Direction.EAST; } MapSite site = currentRoom.getSide(d); if(site instanceof Door) { currentRoom = ((Door) site).otherSideFrom(currentRoom); currentRoom.enter(); } else site.enter(); } }
a2c505900f822719cec5693cc1aba6ef3b99bc44
040860662a4ea4331584b74a2891628c7619fc7c
/src/main/java/kr/co/hucloud/batch/job/stock/vo/StockVO.java
bf2504ca2125061268d6d3af3cc2d82c2af9252e
[]
no_license
Ahndaewon/HuCloudBatch
f10d54adc9bb0857be1eed657de9d2a8d9838d66
17904f7511892da3c7e37dd2f72904d73325a682
refs/heads/master
2020-03-07T19:56:17.754006
2018-04-02T08:40:23
2018-04-02T08:40:23
127,684,031
0
0
null
2018-04-02T00:51:30
2018-04-02T00:51:30
null
UTF-8
Java
false
false
1,323
java
package kr.co.hucloud.batch.job.stock.vo; public class StockVO { private int rank; private String name; private String nowPrice; private String growthRate; private String upAndDown; private String dealQuantity; private String dealAmount; private String highPrice; public int getRank() { return rank; } public void setRank(int rank) { this.rank = rank; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNowPrice() { return nowPrice; } public void setNowPrice(String nowPrice) { this.nowPrice = nowPrice; } public String getGrowthRate() { return growthRate; } public void setGrowthRate(String growthRate) { this.growthRate = growthRate; } public String getUpAndDown() { return upAndDown; } public void setUpAndDown(String upAndDown) { this.upAndDown = upAndDown; } public String getDealQuantity() { return dealQuantity; } public void setDealQuantity(String dealQuantity) { this.dealQuantity = dealQuantity; } public String getDealAmount() { return dealAmount; } public void setDealAmount(String dealAmount) { this.dealAmount = dealAmount; } public String getHighPrice() { return highPrice; } public void setHighPrice(String highPrice) { this.highPrice = highPrice; } }
7887f31113daf6653df357a19ea0d7473d036cdd
4cae639de0d01954e97746933c5a40f5c015e084
/dkplayer-sample/src/main/java/com/dueeeke/dkplayer/util/DataUtil.java
b9fdbb63c457212f2caa2b4e4b64d992cf8b2890
[ "Apache-2.0" ]
permissive
lyBigdata/DKVideoPlayer
e9a41d8e544e1ac888fc3215271ab52b3f2c3682
407a76b2b009e9b50ea0ddcebeb7903e81a9a1a5
refs/heads/master
2020-12-30T01:36:08.228046
2020-02-06T15:51:10
2020-02-06T15:51:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
11,425
java
package com.dueeeke.dkplayer.util; import android.content.Context; import com.dueeeke.dkplayer.bean.TiktokBean; import com.dueeeke.dkplayer.bean.VideoBean; import java.io.IOException; import java.io.InputStream; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.List; public class DataUtil { public static final String SAMPLE_URL = "http://vfx.mtime.cn/Video/2019/03/14/mp4/190314223540373995.mp4"; // public static List<VideoBean> getVideoList() { // List<VideoBean> videoList = new ArrayList<>(); // videoList.add(new VideoBean("七舅脑爷| 脑爷烧脑三重奏,谁动了我的蛋糕", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2018/03/2018-03-30_10-1782811316-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2018/03/29/8b5ecf95be5c5928b6a89f589f5e3637.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 你会不会在爱情中迷失了自我,从而遗忘你正拥有的美好?", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2018/02/2018-02-09_23-573150677-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2018/02/29/056bf3fabc41a1c1257ea7f69b5ee787.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 别因为你的患得患失,就怀疑爱情的重量", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2018/02/2018-02-23_57-2208169443-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2018/02/29/db48634c0e7e3eaa4583aa48b4b3180f.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 女员工遭老板调戏,被同事陷害,双面夹击路在何方?", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2017/12/2017-12-08_39-829276539-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2017/12/29/fc821f9a8673d2994f9c2cb9b27233a3.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 夺人女友,帮人作弊,不正经的学霸比校霸都可怕。", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2018/01/2018-01-05_49-2212350172-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2018/01/29/bc95044a9c40ec2d8bdf4ac9f8c50f44.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 男子被困秘密房间上演绝命游戏, 背后凶手竟是他?", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2017/11/2017-11-10_10-320769792-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2017/11/29/15f22f48466180232ca50ec25b0711a7.mp4")); // // videoList.add(new VideoBean("七舅脑爷| 男人玩心机,真真假假,我究竟变成了谁?", // "http://tanzi27niu.cdsb.mobi/wps/wp-content/uploads/2017/11/2017-11-03_37-744135043-750x420.jpg", // "http://cdnxdc.tanzi88.com/XDC/dvideo/2017/11/29/7c21c43ba0817742ff0224e9bcdf12b6.mp4")); // // return videoList; // } public static List<VideoBean> getVideoList() { List<VideoBean> videoList = new ArrayList<>(); videoList.add(new VideoBean("预告片1", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/02/04/mp4/190204084208765161.mp4")); videoList.add(new VideoBean("预告片2", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/21/mp4/190321153853126488.mp4")); videoList.add(new VideoBean("预告片3", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/19/mp4/190319222227698228.mp4")); videoList.add(new VideoBean("预告片4", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/19/mp4/190319212559089721.mp4")); videoList.add(new VideoBean("预告片5", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/18/mp4/190318231014076505.mp4")); videoList.add(new VideoBean("预告片6", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/18/mp4/190318214226685784.mp4")); videoList.add(new VideoBean("预告片7", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/19/mp4/190319104618910544.mp4")); videoList.add(new VideoBean("预告片8", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/19/mp4/190319125415785691.mp4")); videoList.add(new VideoBean("预告片9", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/17/mp4/190317150237409904.mp4")); videoList.add(new VideoBean("预告片10", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/14/mp4/190314223540373995.mp4")); videoList.add(new VideoBean("预告片11", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/14/mp4/190314102306987969.mp4")); videoList.add(new VideoBean("预告片12", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/13/mp4/190313094901111138.mp4")); videoList.add(new VideoBean("预告片13", "https://cms-bucket.nosdn.127.net/eb411c2810f04ffa8aaafc42052b233820180418095416.jpeg", "http://vfx.mtime.cn/Video/2019/03/12/mp4/190312143927981075.mp4")); videoList.add(new VideoBean("预告片14", "https://cms-bucket.nosdn.127.net/cb37178af1584c1588f4a01e5ecf323120180418133127.jpeg", "http://vfx.mtime.cn/Video/2019/03/12/mp4/190312083533415853.mp4")); return videoList; } // /** // * 抖音演示数据 // */ // public static List<VideoBean> getTikTokVideoList() { // List<VideoBean> videoList = new ArrayList<>(); // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4c87000639ab0f21c285.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=97022dc18711411ead17e8dcb75bccd2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bea0014e31708ecb03e.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=374e166692ee4ebfae030ceae117a9d0&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bb500130248a3bcdad0.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=8a55161f84cb4b6aab70cf9e84810ad2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b8300007d1906573584.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=47a9d69fe7d94280a59e639f39e4b8f4&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b61000b6a4187626dda.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=3fdb4876a7f34bad8fa957db4b5ed159&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4c87000639ab0f21c285.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=97022dc18711411ead17e8dcb75bccd2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bea0014e31708ecb03e.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=374e166692ee4ebfae030ceae117a9d0&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bb500130248a3bcdad0.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=8a55161f84cb4b6aab70cf9e84810ad2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b8300007d1906573584.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=47a9d69fe7d94280a59e639f39e4b8f4&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b61000b6a4187626dda.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=3fdb4876a7f34bad8fa957db4b5ed159&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4c87000639ab0f21c285.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=97022dc18711411ead17e8dcb75bccd2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bea0014e31708ecb03e.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=374e166692ee4ebfae030ceae117a9d0&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p1.pstatp.com/large/4bb500130248a3bcdad0.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=8a55161f84cb4b6aab70cf9e84810ad2&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b8300007d1906573584.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=47a9d69fe7d94280a59e639f39e4b8f4&line=0&ratio=720p&media_type=4&vr_type=0")); // // videoList.add(new VideoBean("", // "https://p9.pstatp.com/large/4b61000b6a4187626dda.jpeg", // "https://aweme.snssdk.com/aweme/v1/play/?video_id=3fdb4876a7f34bad8fa957db4b5ed159&line=0&ratio=720p&media_type=4&vr_type=0")); // return videoList; // } public static List<TiktokBean> tiktokData; public static List<TiktokBean> getTiktokDataFromAssets(Context context) { try { if (tiktokData == null) { InputStream is = context.getAssets().open("tiktok_data"); int length = is.available(); byte[] buffer = new byte[length]; is.read(buffer); is.close(); String result = new String(buffer, Charset.forName("UTF-8")); tiktokData = TiktokBean.arrayTiktokBeanFromData(result); } return tiktokData; } catch (IOException e) { e.printStackTrace(); } return new ArrayList<>(); } }
66527d511a8f21c799be9c1f3b36e516dae8fc1b
df351b1fe41376661afa00a6b7d6a7dca4d02108
/Banco/Banco.java
1b4ed25caf4437f9bf84ea18e0894375362ceadd
[]
no_license
ChristianARamos/JAVA-BancoArq
e2b398d8b61dcfc8ffe7176a2f32206fd73b1da9
77a5ebc6b4a2df23c70505a55a916c505f5f1324
refs/heads/master
2016-09-05T09:25:30.232129
2015-05-21T14:22:58
2015-05-21T14:22:58
35,241,204
0
0
null
null
null
null
UTF-8
Java
false
false
6,601
java
/* * Christian de Avila Ramos. */ package br.graduacao.banco; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; /** * A classe Banco faz a conexão com o banco de dados; insere, altera, apaga, * lista e atualiza os dados. * * @author ChristianRamos */ public class Banco { Connection connec; String URL = "jdbc:postgresql://localhost:5432/"; String DB = "ProjetoPOOII"; String OWNER = "postgres"; String PASS = "root"; public Banco() { try { Class.forName("org.postgresql.Driver"); //System.out.println("Driver do PostgreSQL carregado com sucesso!"); } catch (ClassNotFoundException e) { System.out.println("Erro ao carregar o driver do banco PostgreSQL." + e); } } /** * O método conectarBanco faz a conexão com o banco de dados utilizando o * driver específico. Retorna a conexão. * @return */ public Connection conectarBanco() { if (connec == null) { try { connec = DriverManager.getConnection(URL + DB, OWNER, PASS); //System.out.println("DB " + DB + " conectado com sucesso!"); } catch (SQLException e) { System.out.println("Erro ao conectar banco " + DB + "." + e); } } return connec; } /** * O método desconectarBanco realiza a desconexão com o banco de dados. */ public void desconectarBanco() { try { connec.close(); connec = null; //System.out.println("DB "+ DB + " desconectado!"); } catch (SQLException e) { System.out.println("Erro ao fechar o banco de dados!" + e); } } /** * O metodo inserirDados insere dados na tabela do banco de dados de acordo * com os parâmetros especificados. * @param nomeTabela * @param matr * @param nome * @param curso * @param discipl * @param turma * @param ano * @param sem */ public void inserirDados(String nomeTabela, int matr, String nome, String curso, String discipl, int turma, int ano, int sem) { try { String sql = "Insert into "+nomeTabela+"(matricula, nome, curso, disciplina, " + "turma, ano, semestre) values(?, ?, ?, ?, ?, ?, ?)"; PreparedStatement ps = conectarBanco().prepareStatement(sql); ps.setInt(1, matr); ps.setString(2, nome); ps.setString(3, curso); ps.setString(4, discipl); ps.setInt(5, turma); ps.setInt(6, ano); ps.setInt(7, sem); ps.execute(); ps.close(); desconectarBanco(); //System.out.println("Dados inseridos!"); } catch (SQLException e) { System.out.println("Erro ao inserir dados no banco.\n" + e); } System.out.println("Dados inseridos!"); } /** * O método listarDados lista dados da tabela do banco de dados, retornando * um String. * @param nomeTabela * @return */ public void listarDados(String nomeTabela) { String result = ""; try { String sql = "select * from "+nomeTabela; PreparedStatement ps = conectarBanco().prepareStatement(sql); ResultSet rs = ps.executeQuery(); while (rs.next()) { result += rs.getInt("matricula") + ", " + rs.getString("nome") + ", " + rs.getString("curso") + ", " + rs.getString("disciplina") + ", " + rs.getInt("turma") + ", " + rs.getInt("ano") + ", " + rs.getInt("semestre") + "\n"; } rs.close(); desconectarBanco(); } catch (SQLException e) { System.out.println("Erro ao listar dados.\n" + e); } System.out.println(result); } /** * O método atualizarDados atualiza os dados da tabela do banco de dados de * acordo com os parâmetros especificados. * @param matricula * @param nome * @param curso * @param disciplina * @param turma * @param ano * @param semestre */ public void atualizarDados(String nomeTabela, int matricula, String nome, String curso, String disciplina, int turma, int ano, int semestre) { try { String sql = "update "+nomeTabela+" set nome=?, curso=?, disciplina=?, turma=?, ano=?, semestre=? where matricula = ?"; PreparedStatement ps = conectarBanco().prepareStatement(sql); ps.setInt(7, matricula); ps.setString(1, nome); ps.setString(2, curso); ps.setString(3, disciplina); ps.setInt(4, turma); ps.setInt(5, ano); ps.setInt(6, semestre); ps.executeUpdate();//Atualiza. System.out.println("Atualização concluída com sucesso!"); ps.close(); desconectarBanco(); } catch (SQLException e) { System.out.println("Erro ao atualizar dados." + e); } } /** * O método apagarDados elimina todos os dados da tabela. * @param nomeTabela */ public void apagarDados(String nomeTabela) { try { String sql = "delete from "+nomeTabela; PreparedStatement ps = conectarBanco().prepareStatement(sql); ps.executeUpdate(); ps.close(); desconectarBanco(); } catch (SQLException e) { System.out.println("Erro ao apagar dados da tabela "+nomeTabela+".\n" + e); } } /** * A classe criarTabela cria uma tabela no GBD PostgreSQL. * @param nomeTabela */ public void criarTabela(String nomeTabela){ try{ String sql="CREATE TABLE "+nomeTabela+"(matricula integer NOT NULL,\n" + " nome character varying(45), curso character varying(45),\n" + " disciplina character varying(45), turma integer, ano integer,\n" + " semestre integer, CONSTRAINT "+nomeTabela+"_pkey PRIMARY KEY (matricula))"; PreparedStatement ps=conectarBanco().prepareStatement(sql); ps.execute(); System.out.println("Tabela "+nomeTabela+" criada com sucesso!"); ps.close(); desconectarBanco(); }catch(SQLException e){ //System.out.println("Erro ao criar tabela!"+e); } } }
a102d2e687861e89d7f17c3a0fb38cd7da6aa1f7
170d452b4651ccd610efe3eedeaad0f9d112a9a8
/src/com/sxh/newfolder/DP13_策略模式/DP_13/公式计算/CalculatorHelper.java
784717a50487c27c7eaf6a1920c7126d925e17d9
[]
no_license
JokerByrant/designPattern
76eaa04bc5f516f37c550e93326dc7a329e54c5e
9421181ce1bc67ebc12102e67317893a3a9de267
refs/heads/master
2020-07-30T17:02:12.322130
2020-06-17T08:49:01
2020-06-17T08:49:01
210,296,799
0
0
null
null
null
null
UTF-8
Java
false
false
640
java
package com.sxh.newfolder.DP13_策略模式.DP_13.公式计算; /** * 计算辅助类,用于提取出公式中的数 * @author 一池春水倾半城 * @date 2019/12/28 16:56 */ public class CalculatorHelper { /** * 提取出公式中的数 * @param formula 公式 * @param pattern 运算符 * @return */ public static double[] getValArray(String formula, String pattern) { String[] strArr = formula.trim().split(pattern); double[] array = new double[2]; array[0] = Double.parseDouble(strArr[0]); array[1] = Double.parseDouble(strArr[1]); return array; } }
[ "water!264835" ]
water!264835
280ec1b4d5264b58b6548c644f6075baa9ef51c1
810a4d4d7e300efeea6d7118184c369ca37a522e
/src/MainNInterface.java
310e12d4fc6e7129bc80e5d4487fc8e93282b325
[]
no_license
naufalabrori/Tubes-PBO
921f1f213bf963ae6321d5b2d22c54d0849c14a9
2c38e328e4884461686c58d24c6bbd92f4513abc
refs/heads/master
2020-05-16T22:48:33.580920
2019-05-31T13:15:22
2019-05-31T13:15:22
183,345,129
0
0
null
null
null
null
UTF-8
Java
false
false
5,295
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ import javafx.application.Application; import javafx.event.EventHandler; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.stage.Stage; import javafx.event.ActionEvent; import javax.swing.JOptionPane; /** * * @author hanif */ public class MainNInterface extends Application { Komponen unduh = new Komponen(); RandString UP = new RandString(); public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Permainan Hitung Hitungan"); Group root = new Group(); Scene scene = new Scene(root, 400, 400); Button button = unduh.Tombol_start(); Label timerLabel = unduh.getTimerLabel(); Label Operator = unduh.getOperator(); Label angka1 = unduh.getAngka(); Label angka2 = unduh.getAngka(); Label equal = new Label("="); TextField answer = new TextField(); Button generate = new Button(); generate.setText("Rand"); Button hasil = new Button(); hasil.setText("Cek"); hasil.setOnAction((ActionEvent event) -> { if(Operator.getText() == "+"){ int nilai,bil1,bil2,jawaban; bil1 = Integer.parseInt(angka1.getText()); bil2 = Integer.parseInt(angka2.getText()); nilai = bil1 + bil2; jawaban = Integer.parseInt(answer.getText()); if(nilai != jawaban){ JOptionPane.showMessageDialog(null, "Jawaban Anda Belum Benar, Silahkan Coba Lagi"); } else{ JOptionPane.showMessageDialog(null, "Ashiaaappp"); answer.setText(""); } } else if(Operator.getText() == "-"){ int nilai,bil1,bil2,jawaban; bil1 = Integer.parseInt(angka1.getText()); bil2 = Integer.parseInt(angka2.getText()); nilai = bil1 - bil2; jawaban = Integer.parseInt(answer.getText()); if(nilai != jawaban){ JOptionPane.showMessageDialog(null, "Jawaban Anda Belum Benar, Silahkan Coba Lagi"); } else{ JOptionPane.showMessageDialog(null, "Ashiaaappp"); answer.setText(""); } } else if(Operator.getText() == "x"){ int nilai,bil1,bil2,jawaban; bil1 = Integer.parseInt(angka1.getText()); bil2 = Integer.parseInt(angka2.getText()); nilai = bil1 * bil2; jawaban = Integer.parseInt(answer.getText()); if(nilai != jawaban){ JOptionPane.showMessageDialog(null, "Jawaban Anda Belum Benar, Silahkan Coba Lagi"); } else{ JOptionPane.showMessageDialog(null, "Ashiaaappp"); answer.setText(""); } } else if(Operator.getText() == ":"){ double nilai,bil1,bil2,jawaban; bil1 = Double.parseDouble(angka1.getText()); bil2 = Double.parseDouble(angka2.getText()); nilai = bil1 / bil2; jawaban = Double.parseDouble(answer.getText()); if(nilai != jawaban){ JOptionPane.showMessageDialog(null, "Jawaban Anda Belum Benar, Silahkan Coba Lagi"); } else{ JOptionPane.showMessageDialog(null, "Ashiaaappp"); answer.setText(""); } } }); generate.setOnAction((new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { angka1.setText(UP.getAngkaS()); angka2.setText(UP.getAngkaS()); Operator.setText(UP.getOperator()); } })); Label score1 = new Label("Nilai"); answer.setPrefWidth(40); VBox vb = new VBox(20); vb.setAlignment(Pos.CENTER); HBox hb = new HBox(20); hb.setAlignment(Pos.CENTER); hb.getChildren().addAll(angka1,Operator,angka2,equal,answer,generate,hasil); vb.setPrefWidth(scene.getWidth()); vb.getChildren().addAll(timerLabel,score1,hb,button); vb.setLayoutY(30); root.getChildren().add(vb); primaryStage.setScene(scene); primaryStage.show(); } }
[ "lenovo@NOPAL" ]
lenovo@NOPAL
410be8e8bba74cb95a7fa93274d592f4157386ce
0fb3b2989f94f49aaa5fac658e5c0110b4d1d88b
/TourGuideApp/app/src/main/java/com/example/android/tourguideapp/Place.java
4191730fc49ff5258fc4fba135e178ce941f2b3a
[]
no_license
bartaeva89/TourGuide
29b107bf90f6c6c5c90219e79f459da5fc95e316
325cabd2bd8c1a31c7e2f011880f03bfe66d869a
refs/heads/master
2020-03-19T04:28:17.975242
2018-06-12T04:36:19
2018-06-12T04:36:19
135,832,390
0
0
null
null
null
null
UTF-8
Java
false
false
540
java
package com.example.android.tourguideapp; public class Place { private String name; private String address; private int mImageResourceId; public Place(String name, String address, int mImageResourceId) { this.name = name; this.address = address; this.mImageResourceId = mImageResourceId; } public String getName() { return name; } public String getAddress() { return address; } public int getmImageResourceId() { return mImageResourceId; } }
f80bf04f4bb2e2cb39ae8093eb4b9b189afa6dbd
61086fedbbc8dc01c1e4d55392fd2aa5501eda03
/src/main/java/com/sales/market/util/CheckedException.java
0a83ced4ec8e6650d2d3948714b87ac0ab9115a9
[]
no_license
samuelBaz/spring-backend
bd5a76107e5824467e36d0695e84f8d963e9c925
599f54676cd2c5fa8c9b1578072ee84ea17494ee
refs/heads/main
2023-07-20T10:52:09.394690
2021-09-07T00:28:21
2021-09-07T00:28:21
399,600,470
0
0
null
null
null
null
UTF-8
Java
false
false
120
java
/** * @author: Samuel Bazoalto */ package com.sales.market.util; public class CheckedException extends Exception { }
7a5e76e6817fee13a1eee8fb5de696f3e1e98509
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/23/23_c19ce7b1d5055a5bbb2bd34623c1a7acd729e34e/EventModel/23_c19ce7b1d5055a5bbb2bd34623c1a7acd729e34e_EventModel_s.java
6e632e4c1e91c6d9eecd1c9428ddc7fe17d2902a
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,946
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* $Id$ */ package org.apache.fop.events.model; import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Iterator; import java.util.Map; import javax.xml.transform.OutputKeys; import javax.xml.transform.Result; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerFactoryConfigurationError; import javax.xml.transform.sax.SAXTransformerFactory; import javax.xml.transform.sax.TransformerHandler; import javax.xml.transform.stream.StreamResult; import org.xml.sax.ContentHandler; import org.xml.sax.SAXException; import org.xml.sax.helpers.AttributesImpl; import org.apache.xmlgraphics.util.XMLizable; /** * Represents a whole event model that supports multiple event producers. */ public class EventModel implements Serializable, XMLizable { private static final long serialVersionUID = 7468592614934605082L; private Map producers = new java.util.LinkedHashMap(); /** * Creates a new, empty event model */ public EventModel() { } /** * Adds the model of an event producer to the event model. * @param producer the event producer model */ public void addProducer(EventProducerModel producer) { this.producers.put(producer.getInterfaceName(), producer); } /** * Returns an iterator over the contained event producer models. * @return an iterator (Iterator&lt;EventProducerModel&gt;) */ public Iterator getProducers() { return this.producers.values().iterator(); } /** * Returns the model of an event producer with the given interface name. * @param interfaceName the fully qualified name of the event producer * @return the model instance for the event producer (or null if it wasn't found) */ public EventProducerModel getProducer(String interfaceName) { return (EventProducerModel)this.producers.get(interfaceName); } /** * Returns the model of an event producer with the given interface. * @param clazz the interface of the event producer * @return the model instance for the event producer (or null if it wasn't found) */ public EventProducerModel getProducer(Class clazz) { return getProducer(clazz.getName()); } /** {@inheritDoc} */ public void toSAX(ContentHandler handler) throws SAXException { AttributesImpl atts = new AttributesImpl(); String elName = "event-model"; handler.startElement(null, elName, elName, atts); Iterator iter = getProducers(); while (iter.hasNext()) { ((XMLizable)iter.next()).toSAX(handler); } handler.endElement(null, elName, elName); } private void writeXMLizable(XMLizable object, File outputFile) throws IOException { Result res = new StreamResult(outputFile); try { SAXTransformerFactory tFactory = (SAXTransformerFactory)SAXTransformerFactory.newInstance(); TransformerHandler handler = tFactory.newTransformerHandler(); Transformer transformer = handler.getTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); handler.setResult(res); handler.startDocument(); object.toSAX(handler); handler.endDocument(); } catch (TransformerConfigurationException e) { throw new IOException(e.getMessage()); } catch (TransformerFactoryConfigurationError e) { throw new IOException(e.getMessage()); } catch (SAXException e) { throw new IOException(e.getMessage()); } } /** * Saves this event model to an XML file. * @param modelFile the target file * @throws IOException if an I/O error occurs */ public void saveToXML(File modelFile) throws IOException { writeXMLizable(this, modelFile); } }
0710ecb7df18549b80df1b3e1a2712e3cb4a71c2
caaf7861304758dd0e073530d2dab47917c564c1
/src/main/java/com/kbalazsworks/weathersnapshot/service/DownloaderService.java
f3459e5602920dab6e80346d1d9049654b11caaa
[]
no_license
balazskrizsan/weather-snapshot
7ee6e0c12bc0eb147a3d7769474b18b432a64816
9aed238c87ceb568b56d08859829464ba9cf9fa3
refs/heads/master
2022-11-26T19:35:30.152581
2020-08-09T16:47:24
2020-08-09T16:47:24
274,982,120
0
0
null
2020-08-02T04:23:33
2020-06-25T17:59:07
Java
UTF-8
Java
false
false
4,317
java
package com.kbalazsworks.weathersnapshot.service; import com.kbalazsworks.weathersnapshot.entity.HtmlLog; import com.kbalazsworks.weathersnapshot.entity.SiteUri; import com.kbalazsworks.weathersnapshot.enums.HttpMethodEnum; import com.kbalazsworks.weathersnapshot.enums.SiteEnum; import com.kbalazsworks.weathersnapshot.enums.SiteUriEnum; import com.kbalazsworks.weathersnapshot.exception.DownloadException; import com.kbalazsworks.weathersnapshot.repository.SiteUrisWithDomain; import com.kbalazsworks.weathersnapshot.utils.factories.DateFactory; import com.kbalazsworks.weathersnapshot.utils.factories.JsoupConnectFactory; import com.kbalazsworks.weathersnapshot.utils.factories.Slf4jLoggerFactory; import com.kbalazsworks.weathersnapshot.utils.services.DateTimeService; import org.json.JSONArray; import org.json.JSONObject; import org.jsoup.Connection; import org.jsoup.nodes.Document; import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.io.IOException; import java.time.LocalDateTime; @Service public class DownloaderService { private HtmlLogService htmlLogService; private SiteUriService siteUriService; private DateFactory dateFactory; private DateTimeService dateTimeService; private JsoupConnectFactory jsoupConnectFactory; private Logger logger; @Autowired public void setHtmlLogService(HtmlLogService htmlLogService) { this.htmlLogService = htmlLogService; } @Autowired public void setSiteUriService(SiteUriService siteUriService) { this.siteUriService = siteUriService; } @Autowired public void setDateFactory(DateFactory dateFactory) { this.dateFactory = dateFactory; } @Autowired public void setDateTimeService(DateTimeService dateTimeService) { this.dateTimeService = dateTimeService; } @Autowired public void setJsoupConnectFactory(JsoupConnectFactory jsoupConnectFactory) { this.jsoupConnectFactory = jsoupConnectFactory; } @Autowired public void setLogger(Slf4jLoggerFactory logger) { this.logger = logger.create(DownloaderService.class); } public void startDownload() { LocalDateTime now = dateTimeService.convertJavaDateToLocalDateTime(dateFactory.create()); for (SiteUrisWithDomain siteUrisWithDomain : siteUriService.searchWithDomain()) { SiteUri siteUri = siteUrisWithDomain.getSiteUri(); String url = siteUrisWithDomain.getDomain().concat(siteUri.getUri()); try { Document doc = getHtmlBody(jsoupConnectFactory.create(url), siteUri); String body = doc.select("body").toString(); htmlLogService.insert( new HtmlLog( null, SiteEnum.getByValue(siteUri.getSiteId()), SiteUriEnum.getByValue(siteUrisWithDomain.getSiteUri().getSiteUriId()), siteUrisWithDomain.getSiteUri().getLatestParserVersionId(), body, now ) ); logger.info("Download from: ".concat(siteUri.getMethod().toString()).concat("|").concat(url)); } catch (IOException | DownloadException e) { logger.error("Download error on: ".concat(url), e); } } } private Document getHtmlBody(Connection connection, SiteUri siteUri) throws IOException, DownloadException { JSONObject params = siteUri.getParams(); if (null != params) { JSONArray keys = params.names(); for (int i = 0; i < keys.length(); ++i) { String key = keys.getString(i); connection.data(key, params.getString(key)); } } if (siteUri.getMethod() == HttpMethodEnum.GET) { return connection.get(); } if (siteUri.getMethod() == HttpMethodEnum.POST) { return connection.post(); } throw new DownloadException("Unhandled Method"); } }
5a25edc5a87195b010df34b902dd344afcac6dc6
dfc121836ddf54e0b43747955ef2da202c59681e
/src/main/java/com/zy/zhuang/controller/StudentController.java
1eb38428253a4b0dceb56f3007bedf96e561998f
[]
no_license
yuanjz/zhuang
a5512449442b026b982121ff6a0851326c619db5
ec5b88bf6ddbdfd1b7870087dcfed42172027d4d
refs/heads/master
2020-04-08T15:46:07.685978
2018-12-13T09:24:19
2018-12-13T09:24:19
159,491,052
0
0
null
null
null
null
UTF-8
Java
false
false
1,459
java
package com.zy.zhuang.controller; import com.zy.zhuang.dto.StudentDTO; import com.zy.zhuang.request.AddStudentRequest; import com.zy.zhuang.request.IdRequest; import com.zy.zhuang.service.StudentService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; /** * @author: YuanJiZhuang * @Date: 2018/12/13 15:47 * @Description: */ @RestController @RequestMapping("/student") public class StudentController { @Autowired private StudentService studentService; @RequestMapping(value = "/selectStudentById", method = RequestMethod.POST, consumes = "application/json", produces = "application/json") @ResponseBody public StudentDTO selectStudentById(@RequestBody IdRequest idRequest) { if (idRequest.getId() == null) { return null; } return studentService.selectStudentById(idRequest); } @RequestMapping(value = "/insertStudent", method = RequestMethod.POST, consumes = "application/json", produces = "application/json") @ResponseBody public Integer insertStudent(@RequestBody AddStudentRequest addStudentRequest) { if (addStudentRequest.getId() == null) { return null; } StudentDTO studentDTO = new StudentDTO(); BeanUtils.copyProperties(addStudentRequest, studentDTO); return studentService.insertStudent(studentDTO); } }
8c1e07eac4c0b9299e51f3d389202c12c554d128
9dfab677a152cb0e895792e51f7c719ecbffe46d
/Retail(mini-project)/Retail(MR)/GrossProfitByProduct.java
ae68908c3d68f89de1903761939d55f31f5939b5
[]
no_license
AnuR1234/Assignments
08ee8ec7184776e7163e77026aad8375a3e7c16d
8638e6dd74f0cc75031eaa490100702f6ffb3b56
refs/heads/master
2021-06-23T14:08:18.643024
2020-11-17T17:32:14
2020-11-17T17:32:14
132,868,224
0
0
null
null
null
null
UTF-8
Java
false
false
2,746
java
import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; //import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; //import org.apache.hadoop.mapreduce.Reducer.Context; //import org.apache.hadoop.mapreduce.Mapper.Context; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; public class GrossProfitByProduct { public static class MapClass extends Mapper<LongWritable,Text,Text,LongWritable> { Text prod_id=new Text(); public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException { String[] str = value.toString().split(";"); prod_id.set(str[5]); long total_cost=Long.parseLong(str[7]); long total_sales=Long.parseLong(str[8]); long profit=total_cost-total_sales; context.write(prod_id,new LongWritable(profit)); } } public static class ReduceClass extends Reducer<Text,LongWritable,Text,LongWritable> { LongWritable gross_profit=new LongWritable(); public void reduce(Text key, Iterable<LongWritable> values,Context context) throws IOException, InterruptedException { long sum= 0; for (LongWritable i : values) { sum+=i.get(); } gross_profit.set(sum); context.write(key, gross_profit); //context.write(key, new LongWritable(sum)); } } public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); //conf.set("mapreduce.input.keyvaluelinerecordreader.key.value.separator", " ;"); conf.set("mapreduce.output.keyvaluelinerecordreader.key.value.separator", " ;"); Job job = Job.getInstance(conf, "High Transactions"); job.setJarByClass(GrossProfitByProduct.class); job.setMapperClass(MapClass.class); //job.setCombinerClass(ReduceClass.class); job.setReducerClass(ReduceClass.class); //job.setNumReduceTasks(0); //job.setMapOutputKeyClass(Text.class); //job.setMapOutputValueClass(Text.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(LongWritable.class); FileInputFormat.addInputPath(job, new Path(args[0])); FileOutputFormat.setOutputPath(job, new Path(args[1])); System.exit(job.waitForCompletion(true) ? 0 : 1); } }
41b7aaebebe8284f5cabe12d1d281bea577b5e79
6b7628664773ada2d0988cbb39b7bef15d2f5f50
/antlr/JavaParsing/.antlr/JavaParser.java
fa8339ece7aa4b45dae7aadba6ed7979d72eb326
[]
no_license
HamiltonManalo/SessionTypes
29e246b9b57b0e6b3372f8ba5b85df70c099c1af
035313fb5d91a914664e46bd06a43c63efcf8f21
refs/heads/master
2020-08-12T07:21:52.578771
2020-02-09T01:20:02
2020-02-09T01:20:02
214,715,744
0
0
null
null
null
null
UTF-8
Java
false
false
241,744
java
// Generated from d:\coding projects\SessionTypes\antlr\JavaParsing\Java.g4 by ANTLR 4.7.1 import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import java.util.List; import java.util.Iterator; import java.util.ArrayList; @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) public class JavaParser extends Parser { static { RuntimeMetaData.checkVersion("4.7.1", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52, T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66, T__66=67, T__67=68, T__68=69, T__69=70, T__70=71, T__71=72, T__72=73, T__73=74, T__74=75, T__75=76, T__76=77, T__77=78, T__78=79, T__79=80, T__80=81, T__81=82, T__82=83, T__83=84, T__84=85, T__85=86, T__86=87, T__87=88, T__88=89, HexLiteral=90, DecimalLiteral=91, OctalLiteral=92, FloatingPointLiteral=93, CharacterLiteral=94, StringLiteral=95, ENUM=96, ASSERT=97, Identifier=98, COMMENT=99, WS=100, LINE_COMMENT=101; public static final int RULE_compilationUnit = 0, RULE_packageDeclaration = 1, RULE_importDeclaration = 2, RULE_typeDeclaration = 3, RULE_classDeclaration = 4, RULE_enumDeclaration = 5, RULE_interfaceDeclaration = 6, RULE_classOrInterfaceModifier = 7, RULE_modifiers = 8, RULE_typeParameters = 9, RULE_typeParameter = 10, RULE_typeBound = 11, RULE_enumBody = 12, RULE_enumConstants = 13, RULE_enumConstant = 14, RULE_enumBodyDeclarations = 15, RULE_normalInterfaceDeclaration = 16, RULE_typeList = 17, RULE_classBody = 18, RULE_interfaceBody = 19, RULE_classBodyDeclaration = 20, RULE_member = 21, RULE_methodDeclaration = 22, RULE_methodDeclarationRest = 23, RULE_genericMethodDeclaration = 24, RULE_fieldDeclaration = 25, RULE_constructorDeclaration = 26, RULE_interfaceBodyDeclaration = 27, RULE_interfaceMemberDecl = 28, RULE_interfaceMethodOrFieldDecl = 29, RULE_interfaceMethodOrFieldRest = 30, RULE_voidMethodDeclaratorRest = 31, RULE_interfaceMethodDeclaratorRest = 32, RULE_interfaceGenericMethodDecl = 33, RULE_voidInterfaceMethodDeclaratorRest = 34, RULE_constantDeclarator = 35, RULE_variableDeclarators = 36, RULE_variableDeclarator = 37, RULE_constantDeclaratorsRest = 38, RULE_constantDeclaratorRest = 39, RULE_variableDeclaratorId = 40, RULE_variableInitializer = 41, RULE_arrayInitializer = 42, RULE_modifier = 43, RULE_packageOrTypeName = 44, RULE_enumConstantName = 45, RULE_typeName = 46, RULE_type = 47, RULE_classOrInterfaceType = 48, RULE_primitiveType = 49, RULE_variableModifier = 50, RULE_typeArguments = 51, RULE_typeArgument = 52, RULE_qualifiedNameList = 53, RULE_formalParameters = 54, RULE_formalParameterDecls = 55, RULE_formalParameterDeclsRest = 56, RULE_methodBody = 57, RULE_constructorBody = 58, RULE_explicitConstructorInvocation = 59, RULE_qualifiedName = 60, RULE_literal = 61, RULE_integerLiteral = 62, RULE_booleanLiteral = 63, RULE_annotations = 64, RULE_annotation = 65, RULE_annotationName = 66, RULE_elementValuePairs = 67, RULE_elementValuePair = 68, RULE_elementValue = 69, RULE_elementValueArrayInitializer = 70, RULE_annotationTypeDeclaration = 71, RULE_annotationTypeBody = 72, RULE_annotationTypeElementDeclaration = 73, RULE_annotationTypeElementRest = 74, RULE_annotationMethodOrConstantRest = 75, RULE_annotationMethodRest = 76, RULE_annotationConstantRest = 77, RULE_defaultValue = 78, RULE_block = 79, RULE_blockStatement = 80, RULE_localVariableDeclarationStatement = 81, RULE_localVariableDeclaration = 82, RULE_variableModifiers = 83, RULE_statement = 84, RULE_catches = 85, RULE_catchClause = 86, RULE_formalParameter = 87, RULE_switchBlock = 88, RULE_switchBlockStatementGroup = 89, RULE_switchLabel = 90, RULE_forControl = 91, RULE_forInit = 92, RULE_enhancedForControl = 93, RULE_forUpdate = 94, RULE_parExpression = 95, RULE_expressionList = 96, RULE_statementExpression = 97, RULE_constantExpression = 98, RULE_expression = 99, RULE_primary = 100, RULE_creator = 101, RULE_createdName = 102, RULE_innerCreator = 103, RULE_explicitGenericInvocation = 104, RULE_arrayCreatorRest = 105, RULE_classCreatorRest = 106, RULE_nonWildcardTypeArguments = 107, RULE_arguments = 108; public static final String[] ruleNames = { "compilationUnit", "packageDeclaration", "importDeclaration", "typeDeclaration", "classDeclaration", "enumDeclaration", "interfaceDeclaration", "classOrInterfaceModifier", "modifiers", "typeParameters", "typeParameter", "typeBound", "enumBody", "enumConstants", "enumConstant", "enumBodyDeclarations", "normalInterfaceDeclaration", "typeList", "classBody", "interfaceBody", "classBodyDeclaration", "member", "methodDeclaration", "methodDeclarationRest", "genericMethodDeclaration", "fieldDeclaration", "constructorDeclaration", "interfaceBodyDeclaration", "interfaceMemberDecl", "interfaceMethodOrFieldDecl", "interfaceMethodOrFieldRest", "voidMethodDeclaratorRest", "interfaceMethodDeclaratorRest", "interfaceGenericMethodDecl", "voidInterfaceMethodDeclaratorRest", "constantDeclarator", "variableDeclarators", "variableDeclarator", "constantDeclaratorsRest", "constantDeclaratorRest", "variableDeclaratorId", "variableInitializer", "arrayInitializer", "modifier", "packageOrTypeName", "enumConstantName", "typeName", "type", "classOrInterfaceType", "primitiveType", "variableModifier", "typeArguments", "typeArgument", "qualifiedNameList", "formalParameters", "formalParameterDecls", "formalParameterDeclsRest", "methodBody", "constructorBody", "explicitConstructorInvocation", "qualifiedName", "literal", "integerLiteral", "booleanLiteral", "annotations", "annotation", "annotationName", "elementValuePairs", "elementValuePair", "elementValue", "elementValueArrayInitializer", "annotationTypeDeclaration", "annotationTypeBody", "annotationTypeElementDeclaration", "annotationTypeElementRest", "annotationMethodOrConstantRest", "annotationMethodRest", "annotationConstantRest", "defaultValue", "block", "blockStatement", "localVariableDeclarationStatement", "localVariableDeclaration", "variableModifiers", "statement", "catches", "catchClause", "formalParameter", "switchBlock", "switchBlockStatementGroup", "switchLabel", "forControl", "forInit", "enhancedForControl", "forUpdate", "parExpression", "expressionList", "statementExpression", "constantExpression", "expression", "primary", "creator", "createdName", "innerCreator", "explicitGenericInvocation", "arrayCreatorRest", "classCreatorRest", "nonWildcardTypeArguments", "arguments" }; private static final String[] _LITERAL_NAMES = { null, "'package'", "';'", "'import'", "'static'", "'.'", "'*'", "'class'", "'extends'", "'implements'", "'public'", "'protected'", "'private'", "'abstract'", "'final'", "'strictfp'", "'<'", "','", "'>'", "'&'", "'{'", "'}'", "'interface'", "'['", "']'", "'void'", "'throws'", "'='", "'native'", "'synchronized'", "'transient'", "'volatile'", "'boolean'", "'char'", "'byte'", "'short'", "'int'", "'long'", "'float'", "'double'", "'?'", "'super'", "'('", "')'", "'...'", "'this'", "'null'", "'true'", "'false'", "'@'", "'default'", "':'", "'if'", "'else'", "'for'", "'while'", "'do'", "'try'", "'finally'", "'switch'", "'return'", "'throw'", "'break'", "'continue'", "'catch'", "'case'", "'new'", "'++'", "'--'", "'+'", "'-'", "'~'", "'!'", "'/'", "'%'", "'instanceof'", "'=='", "'!='", "'^'", "'|'", "'&&'", "'||'", "'^='", "'+='", "'-='", "'*='", "'/='", "'&='", "'|='", "'%='", null, null, null, null, null, null, "'enum'", "'assert'" }; private static final String[] _SYMBOLIC_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "HexLiteral", "DecimalLiteral", "OctalLiteral", "FloatingPointLiteral", "CharacterLiteral", "StringLiteral", "ENUM", "ASSERT", "Identifier", "COMMENT", "WS", "LINE_COMMENT" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); /** * @deprecated Use {@link #VOCABULARY} instead. */ @Deprecated public static final String[] tokenNames; static { tokenNames = new String[_SYMBOLIC_NAMES.length]; for (int i = 0; i < tokenNames.length; i++) { tokenNames[i] = VOCABULARY.getLiteralName(i); if (tokenNames[i] == null) { tokenNames[i] = VOCABULARY.getSymbolicName(i); } if (tokenNames[i] == null) { tokenNames[i] = "<INVALID>"; } } } @Override @Deprecated public String[] getTokenNames() { return tokenNames; } @Override public Vocabulary getVocabulary() { return VOCABULARY; } @Override public String getGrammarFileName() { return "Java.g4"; } @Override public String[] getRuleNames() { return ruleNames; } @Override public String getSerializedATN() { return _serializedATN; } @Override public ATN getATN() { return _ATN; } public JavaParser(TokenStream input) { super(input); _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } public static class CompilationUnitContext extends ParserRuleContext { public TerminalNode EOF() { return getToken(JavaParser.EOF, 0); } public PackageDeclarationContext packageDeclaration() { return getRuleContext(PackageDeclarationContext.class,0); } public List<ImportDeclarationContext> importDeclaration() { return getRuleContexts(ImportDeclarationContext.class); } public ImportDeclarationContext importDeclaration(int i) { return getRuleContext(ImportDeclarationContext.class,i); } public List<TypeDeclarationContext> typeDeclaration() { return getRuleContexts(TypeDeclarationContext.class); } public TypeDeclarationContext typeDeclaration(int i) { return getRuleContext(TypeDeclarationContext.class,i); } public CompilationUnitContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_compilationUnit; } } public final CompilationUnitContext compilationUnit() throws RecognitionException { CompilationUnitContext _localctx = new CompilationUnitContext(_ctx, getState()); enterRule(_localctx, 0, RULE_compilationUnit); int _la; try { enterOuterAlt(_localctx, 1); { setState(219); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__0) { { setState(218); packageDeclaration(); } } setState(224); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__2) { { { setState(221); importDeclaration(); } } setState(226); _errHandler.sync(this); _la = _input.LA(1); } setState(230); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__3) | (1L << T__6) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__21) | (1L << T__48))) != 0) || _la==ENUM) { { { setState(227); typeDeclaration(); } } setState(232); _errHandler.sync(this); _la = _input.LA(1); } setState(233); match(EOF); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class PackageDeclarationContext extends ParserRuleContext { public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } public PackageDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_packageDeclaration; } } public final PackageDeclarationContext packageDeclaration() throws RecognitionException { PackageDeclarationContext _localctx = new PackageDeclarationContext(_ctx, getState()); enterRule(_localctx, 2, RULE_packageDeclaration); try { enterOuterAlt(_localctx, 1); { setState(235); match(T__0); setState(236); qualifiedName(); setState(237); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ImportDeclarationContext extends ParserRuleContext { public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } public ImportDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_importDeclaration; } } public final ImportDeclarationContext importDeclaration() throws RecognitionException { ImportDeclarationContext _localctx = new ImportDeclarationContext(_ctx, getState()); enterRule(_localctx, 4, RULE_importDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { setState(239); match(T__2); setState(241); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__3) { { setState(240); match(T__3); } } setState(243); qualifiedName(); setState(246); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__4) { { setState(244); match(T__4); setState(245); match(T__5); } } setState(248); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeDeclarationContext extends ParserRuleContext { public ClassDeclarationContext classDeclaration() { return getRuleContext(ClassDeclarationContext.class,0); } public InterfaceDeclarationContext interfaceDeclaration() { return getRuleContext(InterfaceDeclarationContext.class,0); } public EnumDeclarationContext enumDeclaration() { return getRuleContext(EnumDeclarationContext.class,0); } public List<ClassOrInterfaceModifierContext> classOrInterfaceModifier() { return getRuleContexts(ClassOrInterfaceModifierContext.class); } public ClassOrInterfaceModifierContext classOrInterfaceModifier(int i) { return getRuleContext(ClassOrInterfaceModifierContext.class,i); } public TypeDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeDeclaration; } } public final TypeDeclarationContext typeDeclaration() throws RecognitionException { TypeDeclarationContext _localctx = new TypeDeclarationContext(_ctx, getState()); enterRule(_localctx, 6, RULE_typeDeclaration); try { int _alt; setState(262); _errHandler.sync(this); switch (_input.LA(1)) { case T__3: case T__6: case T__9: case T__10: case T__11: case T__12: case T__13: case T__14: case T__21: case T__48: case ENUM: enterOuterAlt(_localctx, 1); { setState(253); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,5,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(250); classOrInterfaceModifier(); } } } setState(255); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,5,_ctx); } setState(259); _errHandler.sync(this); switch (_input.LA(1)) { case T__6: { setState(256); classDeclaration(); } break; case T__21: case T__48: { setState(257); interfaceDeclaration(); } break; case ENUM: { setState(258); enumDeclaration(); } break; default: throw new NoViableAltException(this); } } break; case T__1: enterOuterAlt(_localctx, 2); { setState(261); match(T__1); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassDeclarationContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ClassBodyContext classBody() { return getRuleContext(ClassBodyContext.class,0); } public TypeParametersContext typeParameters() { return getRuleContext(TypeParametersContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public TypeListContext typeList() { return getRuleContext(TypeListContext.class,0); } public ClassDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classDeclaration; } } public final ClassDeclarationContext classDeclaration() throws RecognitionException { ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState()); enterRule(_localctx, 8, RULE_classDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { setState(264); match(T__6); setState(265); match(Identifier); setState(267); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(266); typeParameters(); } } setState(271); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__7) { { setState(269); match(T__7); setState(270); type(); } } setState(275); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__8) { { setState(273); match(T__8); setState(274); typeList(); } } setState(277); classBody(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumDeclarationContext extends ParserRuleContext { public TerminalNode ENUM() { return getToken(JavaParser.ENUM, 0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public EnumBodyContext enumBody() { return getRuleContext(EnumBodyContext.class,0); } public TypeListContext typeList() { return getRuleContext(TypeListContext.class,0); } public EnumDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumDeclaration; } } public final EnumDeclarationContext enumDeclaration() throws RecognitionException { EnumDeclarationContext _localctx = new EnumDeclarationContext(_ctx, getState()); enterRule(_localctx, 10, RULE_enumDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { setState(279); match(ENUM); setState(280); match(Identifier); setState(283); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__8) { { setState(281); match(T__8); setState(282); typeList(); } } setState(285); enumBody(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceDeclarationContext extends ParserRuleContext { public NormalInterfaceDeclarationContext normalInterfaceDeclaration() { return getRuleContext(NormalInterfaceDeclarationContext.class,0); } public AnnotationTypeDeclarationContext annotationTypeDeclaration() { return getRuleContext(AnnotationTypeDeclarationContext.class,0); } public InterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceDeclaration; } } public final InterfaceDeclarationContext interfaceDeclaration() throws RecognitionException { InterfaceDeclarationContext _localctx = new InterfaceDeclarationContext(_ctx, getState()); enterRule(_localctx, 12, RULE_interfaceDeclaration); try { setState(289); _errHandler.sync(this); switch (_input.LA(1)) { case T__21: enterOuterAlt(_localctx, 1); { setState(287); normalInterfaceDeclaration(); } break; case T__48: enterOuterAlt(_localctx, 2); { setState(288); annotationTypeDeclaration(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassOrInterfaceModifierContext extends ParserRuleContext { public AnnotationContext annotation() { return getRuleContext(AnnotationContext.class,0); } public ClassOrInterfaceModifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classOrInterfaceModifier; } } public final ClassOrInterfaceModifierContext classOrInterfaceModifier() throws RecognitionException { ClassOrInterfaceModifierContext _localctx = new ClassOrInterfaceModifierContext(_ctx, getState()); enterRule(_localctx, 14, RULE_classOrInterfaceModifier); try { setState(299); _errHandler.sync(this); switch (_input.LA(1)) { case T__48: enterOuterAlt(_localctx, 1); { setState(291); annotation(); } break; case T__9: enterOuterAlt(_localctx, 2); { setState(292); match(T__9); } break; case T__10: enterOuterAlt(_localctx, 3); { setState(293); match(T__10); } break; case T__11: enterOuterAlt(_localctx, 4); { setState(294); match(T__11); } break; case T__12: enterOuterAlt(_localctx, 5); { setState(295); match(T__12); } break; case T__3: enterOuterAlt(_localctx, 6); { setState(296); match(T__3); } break; case T__13: enterOuterAlt(_localctx, 7); { setState(297); match(T__13); } break; case T__14: enterOuterAlt(_localctx, 8); { setState(298); match(T__14); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ModifiersContext extends ParserRuleContext { public List<ModifierContext> modifier() { return getRuleContexts(ModifierContext.class); } public ModifierContext modifier(int i) { return getRuleContext(ModifierContext.class,i); } public ModifiersContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_modifiers; } } public final ModifiersContext modifiers() throws RecognitionException { ModifiersContext _localctx = new ModifiersContext(_ctx, getState()); enterRule(_localctx, 16, RULE_modifiers); try { int _alt; enterOuterAlt(_localctx, 1); { setState(304); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,14,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(301); modifier(); } } } setState(306); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,14,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeParametersContext extends ParserRuleContext { public List<TypeParameterContext> typeParameter() { return getRuleContexts(TypeParameterContext.class); } public TypeParameterContext typeParameter(int i) { return getRuleContext(TypeParameterContext.class,i); } public TypeParametersContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeParameters; } } public final TypeParametersContext typeParameters() throws RecognitionException { TypeParametersContext _localctx = new TypeParametersContext(_ctx, getState()); enterRule(_localctx, 18, RULE_typeParameters); int _la; try { enterOuterAlt(_localctx, 1); { setState(307); match(T__15); setState(308); typeParameter(); setState(313); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(309); match(T__16); setState(310); typeParameter(); } } setState(315); _errHandler.sync(this); _la = _input.LA(1); } setState(316); match(T__17); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeParameterContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public TypeBoundContext typeBound() { return getRuleContext(TypeBoundContext.class,0); } public TypeParameterContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeParameter; } } public final TypeParameterContext typeParameter() throws RecognitionException { TypeParameterContext _localctx = new TypeParameterContext(_ctx, getState()); enterRule(_localctx, 20, RULE_typeParameter); int _la; try { enterOuterAlt(_localctx, 1); { setState(318); match(Identifier); setState(321); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__7) { { setState(319); match(T__7); setState(320); typeBound(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeBoundContext extends ParserRuleContext { public List<TypeContext> type() { return getRuleContexts(TypeContext.class); } public TypeContext type(int i) { return getRuleContext(TypeContext.class,i); } public TypeBoundContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeBound; } } public final TypeBoundContext typeBound() throws RecognitionException { TypeBoundContext _localctx = new TypeBoundContext(_ctx, getState()); enterRule(_localctx, 22, RULE_typeBound); int _la; try { enterOuterAlt(_localctx, 1); { setState(323); type(); setState(328); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__18) { { { setState(324); match(T__18); setState(325); type(); } } setState(330); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumBodyContext extends ParserRuleContext { public EnumConstantsContext enumConstants() { return getRuleContext(EnumConstantsContext.class,0); } public EnumBodyDeclarationsContext enumBodyDeclarations() { return getRuleContext(EnumBodyDeclarationsContext.class,0); } public EnumBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumBody; } } public final EnumBodyContext enumBody() throws RecognitionException { EnumBodyContext _localctx = new EnumBodyContext(_ctx, getState()); enterRule(_localctx, 24, RULE_enumBody); int _la; try { enterOuterAlt(_localctx, 1); { setState(331); match(T__19); setState(333); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__48 || _la==Identifier) { { setState(332); enumConstants(); } } setState(336); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__16) { { setState(335); match(T__16); } } setState(339); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__1) { { setState(338); enumBodyDeclarations(); } } setState(341); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumConstantsContext extends ParserRuleContext { public List<EnumConstantContext> enumConstant() { return getRuleContexts(EnumConstantContext.class); } public EnumConstantContext enumConstant(int i) { return getRuleContext(EnumConstantContext.class,i); } public EnumConstantsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumConstants; } } public final EnumConstantsContext enumConstants() throws RecognitionException { EnumConstantsContext _localctx = new EnumConstantsContext(_ctx, getState()); enterRule(_localctx, 26, RULE_enumConstants); try { int _alt; enterOuterAlt(_localctx, 1); { setState(343); enumConstant(); setState(348); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,21,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(344); match(T__16); setState(345); enumConstant(); } } } setState(350); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,21,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumConstantContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public AnnotationsContext annotations() { return getRuleContext(AnnotationsContext.class,0); } public ArgumentsContext arguments() { return getRuleContext(ArgumentsContext.class,0); } public ClassBodyContext classBody() { return getRuleContext(ClassBodyContext.class,0); } public EnumConstantContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumConstant; } } public final EnumConstantContext enumConstant() throws RecognitionException { EnumConstantContext _localctx = new EnumConstantContext(_ctx, getState()); enterRule(_localctx, 28, RULE_enumConstant); int _la; try { enterOuterAlt(_localctx, 1); { setState(352); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__48) { { setState(351); annotations(); } } setState(354); match(Identifier); setState(356); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__41) { { setState(355); arguments(); } } setState(359); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__19) { { setState(358); classBody(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumBodyDeclarationsContext extends ParserRuleContext { public List<ClassBodyDeclarationContext> classBodyDeclaration() { return getRuleContexts(ClassBodyDeclarationContext.class); } public ClassBodyDeclarationContext classBodyDeclaration(int i) { return getRuleContext(ClassBodyDeclarationContext.class,i); } public EnumBodyDeclarationsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumBodyDeclarations; } } public final EnumBodyDeclarationsContext enumBodyDeclarations() throws RecognitionException { EnumBodyDeclarationsContext _localctx = new EnumBodyDeclarationsContext(_ctx, getState()); enterRule(_localctx, 30, RULE_enumBodyDeclarations); int _la; try { enterOuterAlt(_localctx, 1); { setState(361); match(T__1); setState(365); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__3) | (1L << T__6) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__19) | (1L << T__21) | (1L << T__24) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__48))) != 0) || _la==Identifier) { { { setState(362); classBodyDeclaration(); } } setState(367); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class NormalInterfaceDeclarationContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public InterfaceBodyContext interfaceBody() { return getRuleContext(InterfaceBodyContext.class,0); } public TypeParametersContext typeParameters() { return getRuleContext(TypeParametersContext.class,0); } public TypeListContext typeList() { return getRuleContext(TypeListContext.class,0); } public NormalInterfaceDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_normalInterfaceDeclaration; } } public final NormalInterfaceDeclarationContext normalInterfaceDeclaration() throws RecognitionException { NormalInterfaceDeclarationContext _localctx = new NormalInterfaceDeclarationContext(_ctx, getState()); enterRule(_localctx, 32, RULE_normalInterfaceDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { setState(368); match(T__21); setState(369); match(Identifier); setState(371); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(370); typeParameters(); } } setState(375); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__7) { { setState(373); match(T__7); setState(374); typeList(); } } setState(377); interfaceBody(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeListContext extends ParserRuleContext { public List<TypeContext> type() { return getRuleContexts(TypeContext.class); } public TypeContext type(int i) { return getRuleContext(TypeContext.class,i); } public TypeListContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeList; } } public final TypeListContext typeList() throws RecognitionException { TypeListContext _localctx = new TypeListContext(_ctx, getState()); enterRule(_localctx, 34, RULE_typeList); int _la; try { enterOuterAlt(_localctx, 1); { setState(379); type(); setState(384); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(380); match(T__16); setState(381); type(); } } setState(386); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassBodyContext extends ParserRuleContext { public List<ClassBodyDeclarationContext> classBodyDeclaration() { return getRuleContexts(ClassBodyDeclarationContext.class); } public ClassBodyDeclarationContext classBodyDeclaration(int i) { return getRuleContext(ClassBodyDeclarationContext.class,i); } public ClassBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classBody; } } public final ClassBodyContext classBody() throws RecognitionException { ClassBodyContext _localctx = new ClassBodyContext(_ctx, getState()); enterRule(_localctx, 36, RULE_classBody); int _la; try { enterOuterAlt(_localctx, 1); { setState(387); match(T__19); setState(391); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__3) | (1L << T__6) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__19) | (1L << T__21) | (1L << T__24) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__48))) != 0) || _la==Identifier) { { { setState(388); classBodyDeclaration(); } } setState(393); _errHandler.sync(this); _la = _input.LA(1); } setState(394); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceBodyContext extends ParserRuleContext { public List<InterfaceBodyDeclarationContext> interfaceBodyDeclaration() { return getRuleContexts(InterfaceBodyDeclarationContext.class); } public InterfaceBodyDeclarationContext interfaceBodyDeclaration(int i) { return getRuleContext(InterfaceBodyDeclarationContext.class,i); } public InterfaceBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceBody; } } public final InterfaceBodyContext interfaceBody() throws RecognitionException { InterfaceBodyContext _localctx = new InterfaceBodyContext(_ctx, getState()); enterRule(_localctx, 38, RULE_interfaceBody); int _la; try { enterOuterAlt(_localctx, 1); { setState(396); match(T__19); setState(400); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__3) | (1L << T__6) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__15) | (1L << T__21) | (1L << T__24) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__48))) != 0) || _la==Identifier) { { { setState(397); interfaceBodyDeclaration(); } } setState(402); _errHandler.sync(this); _la = _input.LA(1); } setState(403); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassBodyDeclarationContext extends ParserRuleContext { public BlockContext block() { return getRuleContext(BlockContext.class,0); } public ModifiersContext modifiers() { return getRuleContext(ModifiersContext.class,0); } public MemberContext member() { return getRuleContext(MemberContext.class,0); } public ClassBodyDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classBodyDeclaration; } } public final ClassBodyDeclarationContext classBodyDeclaration() throws RecognitionException { ClassBodyDeclarationContext _localctx = new ClassBodyDeclarationContext(_ctx, getState()); enterRule(_localctx, 40, RULE_classBodyDeclaration); int _la; try { setState(413); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,32,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(405); match(T__1); } break; case 2: enterOuterAlt(_localctx, 2); { setState(407); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__3) { { setState(406); match(T__3); } } setState(409); block(); } break; case 3: enterOuterAlt(_localctx, 3); { setState(410); modifiers(); setState(411); member(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class MemberContext extends ParserRuleContext { public GenericMethodDeclarationContext genericMethodDeclaration() { return getRuleContext(GenericMethodDeclarationContext.class,0); } public MethodDeclarationContext methodDeclaration() { return getRuleContext(MethodDeclarationContext.class,0); } public FieldDeclarationContext fieldDeclaration() { return getRuleContext(FieldDeclarationContext.class,0); } public ConstructorDeclarationContext constructorDeclaration() { return getRuleContext(ConstructorDeclarationContext.class,0); } public InterfaceDeclarationContext interfaceDeclaration() { return getRuleContext(InterfaceDeclarationContext.class,0); } public ClassDeclarationContext classDeclaration() { return getRuleContext(ClassDeclarationContext.class,0); } public MemberContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_member; } } public final MemberContext member() throws RecognitionException { MemberContext _localctx = new MemberContext(_ctx, getState()); enterRule(_localctx, 42, RULE_member); try { setState(421); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,33,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(415); genericMethodDeclaration(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(416); methodDeclaration(); } break; case 3: enterOuterAlt(_localctx, 3); { setState(417); fieldDeclaration(); } break; case 4: enterOuterAlt(_localctx, 4); { setState(418); constructorDeclaration(); } break; case 5: enterOuterAlt(_localctx, 5); { setState(419); interfaceDeclaration(); } break; case 6: enterOuterAlt(_localctx, 6); { setState(420); classDeclaration(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class MethodDeclarationContext extends ParserRuleContext { public TypeContext type() { return getRuleContext(TypeContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public FormalParametersContext formalParameters() { return getRuleContext(FormalParametersContext.class,0); } public MethodDeclarationRestContext methodDeclarationRest() { return getRuleContext(MethodDeclarationRestContext.class,0); } public MethodDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_methodDeclaration; } } public final MethodDeclarationContext methodDeclaration() throws RecognitionException { MethodDeclarationContext _localctx = new MethodDeclarationContext(_ctx, getState()); enterRule(_localctx, 44, RULE_methodDeclaration); int _la; try { setState(440); _errHandler.sync(this); switch (_input.LA(1)) { case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: enterOuterAlt(_localctx, 1); { setState(423); type(); setState(424); match(Identifier); setState(425); formalParameters(); setState(430); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__22) { { { setState(426); match(T__22); setState(427); match(T__23); } } setState(432); _errHandler.sync(this); _la = _input.LA(1); } setState(433); methodDeclarationRest(); } break; case T__24: enterOuterAlt(_localctx, 2); { setState(435); match(T__24); setState(436); match(Identifier); setState(437); formalParameters(); setState(438); methodDeclarationRest(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class MethodDeclarationRestContext extends ParserRuleContext { public MethodBodyContext methodBody() { return getRuleContext(MethodBodyContext.class,0); } public QualifiedNameListContext qualifiedNameList() { return getRuleContext(QualifiedNameListContext.class,0); } public MethodDeclarationRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_methodDeclarationRest; } } public final MethodDeclarationRestContext methodDeclarationRest() throws RecognitionException { MethodDeclarationRestContext _localctx = new MethodDeclarationRestContext(_ctx, getState()); enterRule(_localctx, 46, RULE_methodDeclarationRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(444); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__25) { { setState(442); match(T__25); setState(443); qualifiedNameList(); } } setState(448); _errHandler.sync(this); switch (_input.LA(1)) { case T__19: { setState(446); methodBody(); } break; case T__1: { setState(447); match(T__1); } break; default: throw new NoViableAltException(this); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class GenericMethodDeclarationContext extends ParserRuleContext { public TypeParametersContext typeParameters() { return getRuleContext(TypeParametersContext.class,0); } public MethodDeclarationContext methodDeclaration() { return getRuleContext(MethodDeclarationContext.class,0); } public GenericMethodDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_genericMethodDeclaration; } } public final GenericMethodDeclarationContext genericMethodDeclaration() throws RecognitionException { GenericMethodDeclarationContext _localctx = new GenericMethodDeclarationContext(_ctx, getState()); enterRule(_localctx, 48, RULE_genericMethodDeclaration); try { enterOuterAlt(_localctx, 1); { setState(450); typeParameters(); setState(451); methodDeclaration(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class FieldDeclarationContext extends ParserRuleContext { public TypeContext type() { return getRuleContext(TypeContext.class,0); } public VariableDeclaratorsContext variableDeclarators() { return getRuleContext(VariableDeclaratorsContext.class,0); } public FieldDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_fieldDeclaration; } } public final FieldDeclarationContext fieldDeclaration() throws RecognitionException { FieldDeclarationContext _localctx = new FieldDeclarationContext(_ctx, getState()); enterRule(_localctx, 50, RULE_fieldDeclaration); try { enterOuterAlt(_localctx, 1); { setState(453); type(); setState(454); variableDeclarators(); setState(455); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstructorDeclarationContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public FormalParametersContext formalParameters() { return getRuleContext(FormalParametersContext.class,0); } public ConstructorBodyContext constructorBody() { return getRuleContext(ConstructorBodyContext.class,0); } public TypeParametersContext typeParameters() { return getRuleContext(TypeParametersContext.class,0); } public QualifiedNameListContext qualifiedNameList() { return getRuleContext(QualifiedNameListContext.class,0); } public ConstructorDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constructorDeclaration; } } public final ConstructorDeclarationContext constructorDeclaration() throws RecognitionException { ConstructorDeclarationContext _localctx = new ConstructorDeclarationContext(_ctx, getState()); enterRule(_localctx, 52, RULE_constructorDeclaration); int _la; try { enterOuterAlt(_localctx, 1); { setState(458); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(457); typeParameters(); } } setState(460); match(Identifier); setState(461); formalParameters(); setState(464); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__25) { { setState(462); match(T__25); setState(463); qualifiedNameList(); } } setState(466); constructorBody(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceBodyDeclarationContext extends ParserRuleContext { public ModifiersContext modifiers() { return getRuleContext(ModifiersContext.class,0); } public InterfaceMemberDeclContext interfaceMemberDecl() { return getRuleContext(InterfaceMemberDeclContext.class,0); } public InterfaceBodyDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceBodyDeclaration; } } public final InterfaceBodyDeclarationContext interfaceBodyDeclaration() throws RecognitionException { InterfaceBodyDeclarationContext _localctx = new InterfaceBodyDeclarationContext(_ctx, getState()); enterRule(_localctx, 54, RULE_interfaceBodyDeclaration); try { setState(472); _errHandler.sync(this); switch (_input.LA(1)) { case T__3: case T__6: case T__9: case T__10: case T__11: case T__12: case T__13: case T__14: case T__15: case T__21: case T__24: case T__27: case T__28: case T__29: case T__30: case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case T__48: case Identifier: enterOuterAlt(_localctx, 1); { setState(468); modifiers(); setState(469); interfaceMemberDecl(); } break; case T__1: enterOuterAlt(_localctx, 2); { setState(471); match(T__1); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceMemberDeclContext extends ParserRuleContext { public InterfaceMethodOrFieldDeclContext interfaceMethodOrFieldDecl() { return getRuleContext(InterfaceMethodOrFieldDeclContext.class,0); } public InterfaceGenericMethodDeclContext interfaceGenericMethodDecl() { return getRuleContext(InterfaceGenericMethodDeclContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public VoidInterfaceMethodDeclaratorRestContext voidInterfaceMethodDeclaratorRest() { return getRuleContext(VoidInterfaceMethodDeclaratorRestContext.class,0); } public InterfaceDeclarationContext interfaceDeclaration() { return getRuleContext(InterfaceDeclarationContext.class,0); } public ClassDeclarationContext classDeclaration() { return getRuleContext(ClassDeclarationContext.class,0); } public InterfaceMemberDeclContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceMemberDecl; } } public final InterfaceMemberDeclContext interfaceMemberDecl() throws RecognitionException { InterfaceMemberDeclContext _localctx = new InterfaceMemberDeclContext(_ctx, getState()); enterRule(_localctx, 56, RULE_interfaceMemberDecl); try { setState(481); _errHandler.sync(this); switch (_input.LA(1)) { case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: enterOuterAlt(_localctx, 1); { setState(474); interfaceMethodOrFieldDecl(); } break; case T__15: enterOuterAlt(_localctx, 2); { setState(475); interfaceGenericMethodDecl(); } break; case T__24: enterOuterAlt(_localctx, 3); { setState(476); match(T__24); setState(477); match(Identifier); setState(478); voidInterfaceMethodDeclaratorRest(); } break; case T__21: case T__48: enterOuterAlt(_localctx, 4); { setState(479); interfaceDeclaration(); } break; case T__6: enterOuterAlt(_localctx, 5); { setState(480); classDeclaration(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceMethodOrFieldDeclContext extends ParserRuleContext { public TypeContext type() { return getRuleContext(TypeContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public InterfaceMethodOrFieldRestContext interfaceMethodOrFieldRest() { return getRuleContext(InterfaceMethodOrFieldRestContext.class,0); } public InterfaceMethodOrFieldDeclContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceMethodOrFieldDecl; } } public final InterfaceMethodOrFieldDeclContext interfaceMethodOrFieldDecl() throws RecognitionException { InterfaceMethodOrFieldDeclContext _localctx = new InterfaceMethodOrFieldDeclContext(_ctx, getState()); enterRule(_localctx, 58, RULE_interfaceMethodOrFieldDecl); try { enterOuterAlt(_localctx, 1); { setState(483); type(); setState(484); match(Identifier); setState(485); interfaceMethodOrFieldRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceMethodOrFieldRestContext extends ParserRuleContext { public ConstantDeclaratorsRestContext constantDeclaratorsRest() { return getRuleContext(ConstantDeclaratorsRestContext.class,0); } public InterfaceMethodDeclaratorRestContext interfaceMethodDeclaratorRest() { return getRuleContext(InterfaceMethodDeclaratorRestContext.class,0); } public InterfaceMethodOrFieldRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceMethodOrFieldRest; } } public final InterfaceMethodOrFieldRestContext interfaceMethodOrFieldRest() throws RecognitionException { InterfaceMethodOrFieldRestContext _localctx = new InterfaceMethodOrFieldRestContext(_ctx, getState()); enterRule(_localctx, 60, RULE_interfaceMethodOrFieldRest); try { setState(491); _errHandler.sync(this); switch (_input.LA(1)) { case T__22: case T__26: enterOuterAlt(_localctx, 1); { setState(487); constantDeclaratorsRest(); setState(488); match(T__1); } break; case T__41: enterOuterAlt(_localctx, 2); { setState(490); interfaceMethodDeclaratorRest(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VoidMethodDeclaratorRestContext extends ParserRuleContext { public FormalParametersContext formalParameters() { return getRuleContext(FormalParametersContext.class,0); } public MethodBodyContext methodBody() { return getRuleContext(MethodBodyContext.class,0); } public QualifiedNameListContext qualifiedNameList() { return getRuleContext(QualifiedNameListContext.class,0); } public VoidMethodDeclaratorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_voidMethodDeclaratorRest; } } public final VoidMethodDeclaratorRestContext voidMethodDeclaratorRest() throws RecognitionException { VoidMethodDeclaratorRestContext _localctx = new VoidMethodDeclaratorRestContext(_ctx, getState()); enterRule(_localctx, 62, RULE_voidMethodDeclaratorRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(493); formalParameters(); setState(496); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__25) { { setState(494); match(T__25); setState(495); qualifiedNameList(); } } setState(500); _errHandler.sync(this); switch (_input.LA(1)) { case T__19: { setState(498); methodBody(); } break; case T__1: { setState(499); match(T__1); } break; default: throw new NoViableAltException(this); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceMethodDeclaratorRestContext extends ParserRuleContext { public FormalParametersContext formalParameters() { return getRuleContext(FormalParametersContext.class,0); } public QualifiedNameListContext qualifiedNameList() { return getRuleContext(QualifiedNameListContext.class,0); } public InterfaceMethodDeclaratorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceMethodDeclaratorRest; } } public final InterfaceMethodDeclaratorRestContext interfaceMethodDeclaratorRest() throws RecognitionException { InterfaceMethodDeclaratorRestContext _localctx = new InterfaceMethodDeclaratorRestContext(_ctx, getState()); enterRule(_localctx, 64, RULE_interfaceMethodDeclaratorRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(502); formalParameters(); setState(507); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__22) { { { setState(503); match(T__22); setState(504); match(T__23); } } setState(509); _errHandler.sync(this); _la = _input.LA(1); } setState(512); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__25) { { setState(510); match(T__25); setState(511); qualifiedNameList(); } } setState(514); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InterfaceGenericMethodDeclContext extends ParserRuleContext { public TypeParametersContext typeParameters() { return getRuleContext(TypeParametersContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public InterfaceMethodDeclaratorRestContext interfaceMethodDeclaratorRest() { return getRuleContext(InterfaceMethodDeclaratorRestContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public InterfaceGenericMethodDeclContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_interfaceGenericMethodDecl; } } public final InterfaceGenericMethodDeclContext interfaceGenericMethodDecl() throws RecognitionException { InterfaceGenericMethodDeclContext _localctx = new InterfaceGenericMethodDeclContext(_ctx, getState()); enterRule(_localctx, 66, RULE_interfaceGenericMethodDecl); try { enterOuterAlt(_localctx, 1); { setState(516); typeParameters(); setState(519); _errHandler.sync(this); switch (_input.LA(1)) { case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: { setState(517); type(); } break; case T__24: { setState(518); match(T__24); } break; default: throw new NoViableAltException(this); } setState(521); match(Identifier); setState(522); interfaceMethodDeclaratorRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VoidInterfaceMethodDeclaratorRestContext extends ParserRuleContext { public FormalParametersContext formalParameters() { return getRuleContext(FormalParametersContext.class,0); } public QualifiedNameListContext qualifiedNameList() { return getRuleContext(QualifiedNameListContext.class,0); } public VoidInterfaceMethodDeclaratorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_voidInterfaceMethodDeclaratorRest; } } public final VoidInterfaceMethodDeclaratorRestContext voidInterfaceMethodDeclaratorRest() throws RecognitionException { VoidInterfaceMethodDeclaratorRestContext _localctx = new VoidInterfaceMethodDeclaratorRestContext(_ctx, getState()); enterRule(_localctx, 68, RULE_voidInterfaceMethodDeclaratorRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(524); formalParameters(); setState(527); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__25) { { setState(525); match(T__25); setState(526); qualifiedNameList(); } } setState(529); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstantDeclaratorContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ConstantDeclaratorRestContext constantDeclaratorRest() { return getRuleContext(ConstantDeclaratorRestContext.class,0); } public ConstantDeclaratorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constantDeclarator; } } public final ConstantDeclaratorContext constantDeclarator() throws RecognitionException { ConstantDeclaratorContext _localctx = new ConstantDeclaratorContext(_ctx, getState()); enterRule(_localctx, 70, RULE_constantDeclarator); try { enterOuterAlt(_localctx, 1); { setState(531); match(Identifier); setState(532); constantDeclaratorRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableDeclaratorsContext extends ParserRuleContext { public List<VariableDeclaratorContext> variableDeclarator() { return getRuleContexts(VariableDeclaratorContext.class); } public VariableDeclaratorContext variableDeclarator(int i) { return getRuleContext(VariableDeclaratorContext.class,i); } public VariableDeclaratorsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableDeclarators; } } public final VariableDeclaratorsContext variableDeclarators() throws RecognitionException { VariableDeclaratorsContext _localctx = new VariableDeclaratorsContext(_ctx, getState()); enterRule(_localctx, 72, RULE_variableDeclarators); int _la; try { enterOuterAlt(_localctx, 1); { setState(534); variableDeclarator(); setState(539); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(535); match(T__16); setState(536); variableDeclarator(); } } setState(541); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableDeclaratorContext extends ParserRuleContext { public VariableDeclaratorIdContext variableDeclaratorId() { return getRuleContext(VariableDeclaratorIdContext.class,0); } public VariableInitializerContext variableInitializer() { return getRuleContext(VariableInitializerContext.class,0); } public VariableDeclaratorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableDeclarator; } } public final VariableDeclaratorContext variableDeclarator() throws RecognitionException { VariableDeclaratorContext _localctx = new VariableDeclaratorContext(_ctx, getState()); enterRule(_localctx, 74, RULE_variableDeclarator); int _la; try { enterOuterAlt(_localctx, 1); { setState(542); variableDeclaratorId(); setState(545); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__26) { { setState(543); match(T__26); setState(544); variableInitializer(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstantDeclaratorsRestContext extends ParserRuleContext { public ConstantDeclaratorRestContext constantDeclaratorRest() { return getRuleContext(ConstantDeclaratorRestContext.class,0); } public List<ConstantDeclaratorContext> constantDeclarator() { return getRuleContexts(ConstantDeclaratorContext.class); } public ConstantDeclaratorContext constantDeclarator(int i) { return getRuleContext(ConstantDeclaratorContext.class,i); } public ConstantDeclaratorsRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constantDeclaratorsRest; } } public final ConstantDeclaratorsRestContext constantDeclaratorsRest() throws RecognitionException { ConstantDeclaratorsRestContext _localctx = new ConstantDeclaratorsRestContext(_ctx, getState()); enterRule(_localctx, 76, RULE_constantDeclaratorsRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(547); constantDeclaratorRest(); setState(552); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(548); match(T__16); setState(549); constantDeclarator(); } } setState(554); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstantDeclaratorRestContext extends ParserRuleContext { public VariableInitializerContext variableInitializer() { return getRuleContext(VariableInitializerContext.class,0); } public ConstantDeclaratorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constantDeclaratorRest; } } public final ConstantDeclaratorRestContext constantDeclaratorRest() throws RecognitionException { ConstantDeclaratorRestContext _localctx = new ConstantDeclaratorRestContext(_ctx, getState()); enterRule(_localctx, 78, RULE_constantDeclaratorRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(559); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__22) { { { setState(555); match(T__22); setState(556); match(T__23); } } setState(561); _errHandler.sync(this); _la = _input.LA(1); } setState(562); match(T__26); setState(563); variableInitializer(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableDeclaratorIdContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public VariableDeclaratorIdContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableDeclaratorId; } } public final VariableDeclaratorIdContext variableDeclaratorId() throws RecognitionException { VariableDeclaratorIdContext _localctx = new VariableDeclaratorIdContext(_ctx, getState()); enterRule(_localctx, 80, RULE_variableDeclaratorId); int _la; try { enterOuterAlt(_localctx, 1); { setState(565); match(Identifier); setState(570); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__22) { { { setState(566); match(T__22); setState(567); match(T__23); } } setState(572); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableInitializerContext extends ParserRuleContext { public ArrayInitializerContext arrayInitializer() { return getRuleContext(ArrayInitializerContext.class,0); } public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public VariableInitializerContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableInitializer; } } public final VariableInitializerContext variableInitializer() throws RecognitionException { VariableInitializerContext _localctx = new VariableInitializerContext(_ctx, getState()); enterRule(_localctx, 82, RULE_variableInitializer); try { setState(575); _errHandler.sync(this); switch (_input.LA(1)) { case T__19: enterOuterAlt(_localctx, 1); { setState(573); arrayInitializer(); } break; case T__24: case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case T__40: case T__41: case T__44: case T__45: case T__46: case T__47: case T__65: case T__66: case T__67: case T__68: case T__69: case T__70: case T__71: case HexLiteral: case DecimalLiteral: case OctalLiteral: case FloatingPointLiteral: case CharacterLiteral: case StringLiteral: case Identifier: enterOuterAlt(_localctx, 2); { setState(574); expression(0); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ArrayInitializerContext extends ParserRuleContext { public List<VariableInitializerContext> variableInitializer() { return getRuleContexts(VariableInitializerContext.class); } public VariableInitializerContext variableInitializer(int i) { return getRuleContext(VariableInitializerContext.class,i); } public ArrayInitializerContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_arrayInitializer; } } public final ArrayInitializerContext arrayInitializer() throws RecognitionException { ArrayInitializerContext _localctx = new ArrayInitializerContext(_ctx, getState()); enterRule(_localctx, 84, RULE_arrayInitializer); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(577); match(T__19); setState(589); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(578); variableInitializer(); setState(583); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,55,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(579); match(T__16); setState(580); variableInitializer(); } } } setState(585); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,55,_ctx); } setState(587); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__16) { { setState(586); match(T__16); } } } } setState(591); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ModifierContext extends ParserRuleContext { public AnnotationContext annotation() { return getRuleContext(AnnotationContext.class,0); } public ModifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_modifier; } } public final ModifierContext modifier() throws RecognitionException { ModifierContext _localctx = new ModifierContext(_ctx, getState()); enterRule(_localctx, 86, RULE_modifier); try { setState(605); _errHandler.sync(this); switch (_input.LA(1)) { case T__48: enterOuterAlt(_localctx, 1); { setState(593); annotation(); } break; case T__9: enterOuterAlt(_localctx, 2); { setState(594); match(T__9); } break; case T__10: enterOuterAlt(_localctx, 3); { setState(595); match(T__10); } break; case T__11: enterOuterAlt(_localctx, 4); { setState(596); match(T__11); } break; case T__3: enterOuterAlt(_localctx, 5); { setState(597); match(T__3); } break; case T__12: enterOuterAlt(_localctx, 6); { setState(598); match(T__12); } break; case T__13: enterOuterAlt(_localctx, 7); { setState(599); match(T__13); } break; case T__27: enterOuterAlt(_localctx, 8); { setState(600); match(T__27); } break; case T__28: enterOuterAlt(_localctx, 9); { setState(601); match(T__28); } break; case T__29: enterOuterAlt(_localctx, 10); { setState(602); match(T__29); } break; case T__30: enterOuterAlt(_localctx, 11); { setState(603); match(T__30); } break; case T__14: enterOuterAlt(_localctx, 12); { setState(604); match(T__14); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class PackageOrTypeNameContext extends ParserRuleContext { public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } public PackageOrTypeNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_packageOrTypeName; } } public final PackageOrTypeNameContext packageOrTypeName() throws RecognitionException { PackageOrTypeNameContext _localctx = new PackageOrTypeNameContext(_ctx, getState()); enterRule(_localctx, 88, RULE_packageOrTypeName); try { enterOuterAlt(_localctx, 1); { setState(607); qualifiedName(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnumConstantNameContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public EnumConstantNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enumConstantName; } } public final EnumConstantNameContext enumConstantName() throws RecognitionException { EnumConstantNameContext _localctx = new EnumConstantNameContext(_ctx, getState()); enterRule(_localctx, 90, RULE_enumConstantName); try { enterOuterAlt(_localctx, 1); { setState(609); match(Identifier); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeNameContext extends ParserRuleContext { public QualifiedNameContext qualifiedName() { return getRuleContext(QualifiedNameContext.class,0); } public TypeNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeName; } } public final TypeNameContext typeName() throws RecognitionException { TypeNameContext _localctx = new TypeNameContext(_ctx, getState()); enterRule(_localctx, 92, RULE_typeName); try { enterOuterAlt(_localctx, 1); { setState(611); qualifiedName(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeContext extends ParserRuleContext { public ClassOrInterfaceTypeContext classOrInterfaceType() { return getRuleContext(ClassOrInterfaceTypeContext.class,0); } public PrimitiveTypeContext primitiveType() { return getRuleContext(PrimitiveTypeContext.class,0); } public TypeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_type; } } public final TypeContext type() throws RecognitionException { TypeContext _localctx = new TypeContext(_ctx, getState()); enterRule(_localctx, 94, RULE_type); try { int _alt; setState(629); _errHandler.sync(this); switch (_input.LA(1)) { case Identifier: enterOuterAlt(_localctx, 1); { setState(613); classOrInterfaceType(); setState(618); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,59,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(614); match(T__22); setState(615); match(T__23); } } } setState(620); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,59,_ctx); } } break; case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: enterOuterAlt(_localctx, 2); { setState(621); primitiveType(); setState(626); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,60,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(622); match(T__22); setState(623); match(T__23); } } } setState(628); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,60,_ctx); } } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassOrInterfaceTypeContext extends ParserRuleContext { public List<TerminalNode> Identifier() { return getTokens(JavaParser.Identifier); } public TerminalNode Identifier(int i) { return getToken(JavaParser.Identifier, i); } public List<TypeArgumentsContext> typeArguments() { return getRuleContexts(TypeArgumentsContext.class); } public TypeArgumentsContext typeArguments(int i) { return getRuleContext(TypeArgumentsContext.class,i); } public ClassOrInterfaceTypeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classOrInterfaceType; } } public final ClassOrInterfaceTypeContext classOrInterfaceType() throws RecognitionException { ClassOrInterfaceTypeContext _localctx = new ClassOrInterfaceTypeContext(_ctx, getState()); enterRule(_localctx, 96, RULE_classOrInterfaceType); try { int _alt; enterOuterAlt(_localctx, 1); { setState(631); match(Identifier); setState(633); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,62,_ctx) ) { case 1: { setState(632); typeArguments(); } break; } setState(642); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,64,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(635); match(T__4); setState(636); match(Identifier); setState(638); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { case 1: { setState(637); typeArguments(); } break; } } } } setState(644); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,64,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class PrimitiveTypeContext extends ParserRuleContext { public PrimitiveTypeContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_primitiveType; } } public final PrimitiveTypeContext primitiveType() throws RecognitionException { PrimitiveTypeContext _localctx = new PrimitiveTypeContext(_ctx, getState()); enterRule(_localctx, 98, RULE_primitiveType); int _la; try { enterOuterAlt(_localctx, 1); { setState(645); _la = _input.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38))) != 0)) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableModifierContext extends ParserRuleContext { public AnnotationContext annotation() { return getRuleContext(AnnotationContext.class,0); } public VariableModifierContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableModifier; } } public final VariableModifierContext variableModifier() throws RecognitionException { VariableModifierContext _localctx = new VariableModifierContext(_ctx, getState()); enterRule(_localctx, 100, RULE_variableModifier); try { setState(649); _errHandler.sync(this); switch (_input.LA(1)) { case T__13: enterOuterAlt(_localctx, 1); { setState(647); match(T__13); } break; case T__48: enterOuterAlt(_localctx, 2); { setState(648); annotation(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeArgumentsContext extends ParserRuleContext { public List<TypeArgumentContext> typeArgument() { return getRuleContexts(TypeArgumentContext.class); } public TypeArgumentContext typeArgument(int i) { return getRuleContext(TypeArgumentContext.class,i); } public TypeArgumentsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeArguments; } } public final TypeArgumentsContext typeArguments() throws RecognitionException { TypeArgumentsContext _localctx = new TypeArgumentsContext(_ctx, getState()); enterRule(_localctx, 102, RULE_typeArguments); int _la; try { enterOuterAlt(_localctx, 1); { setState(651); match(T__15); setState(652); typeArgument(); setState(657); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(653); match(T__16); setState(654); typeArgument(); } } setState(659); _errHandler.sync(this); _la = _input.LA(1); } setState(660); match(T__17); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TypeArgumentContext extends ParserRuleContext { public TypeContext type() { return getRuleContext(TypeContext.class,0); } public TypeArgumentContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_typeArgument; } } public final TypeArgumentContext typeArgument() throws RecognitionException { TypeArgumentContext _localctx = new TypeArgumentContext(_ctx, getState()); enterRule(_localctx, 104, RULE_typeArgument); int _la; try { setState(668); _errHandler.sync(this); switch (_input.LA(1)) { case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: enterOuterAlt(_localctx, 1); { setState(662); type(); } break; case T__39: enterOuterAlt(_localctx, 2); { setState(663); match(T__39); setState(666); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__7 || _la==T__40) { { setState(664); _la = _input.LA(1); if ( !(_la==T__7 || _la==T__40) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(665); type(); } } } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class QualifiedNameListContext extends ParserRuleContext { public List<QualifiedNameContext> qualifiedName() { return getRuleContexts(QualifiedNameContext.class); } public QualifiedNameContext qualifiedName(int i) { return getRuleContext(QualifiedNameContext.class,i); } public QualifiedNameListContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_qualifiedNameList; } } public final QualifiedNameListContext qualifiedNameList() throws RecognitionException { QualifiedNameListContext _localctx = new QualifiedNameListContext(_ctx, getState()); enterRule(_localctx, 106, RULE_qualifiedNameList); int _la; try { enterOuterAlt(_localctx, 1); { setState(670); qualifiedName(); setState(675); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(671); match(T__16); setState(672); qualifiedName(); } } setState(677); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class FormalParametersContext extends ParserRuleContext { public FormalParameterDeclsContext formalParameterDecls() { return getRuleContext(FormalParameterDeclsContext.class,0); } public FormalParametersContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_formalParameters; } } public final FormalParametersContext formalParameters() throws RecognitionException { FormalParametersContext _localctx = new FormalParametersContext(_ctx, getState()); enterRule(_localctx, 108, RULE_formalParameters); int _la; try { enterOuterAlt(_localctx, 1); { setState(678); match(T__41); setState(680); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__48))) != 0) || _la==Identifier) { { setState(679); formalParameterDecls(); } } setState(682); match(T__42); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class FormalParameterDeclsContext extends ParserRuleContext { public VariableModifiersContext variableModifiers() { return getRuleContext(VariableModifiersContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public FormalParameterDeclsRestContext formalParameterDeclsRest() { return getRuleContext(FormalParameterDeclsRestContext.class,0); } public FormalParameterDeclsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_formalParameterDecls; } } public final FormalParameterDeclsContext formalParameterDecls() throws RecognitionException { FormalParameterDeclsContext _localctx = new FormalParameterDeclsContext(_ctx, getState()); enterRule(_localctx, 110, RULE_formalParameterDecls); try { enterOuterAlt(_localctx, 1); { setState(684); variableModifiers(); setState(685); type(); setState(686); formalParameterDeclsRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class FormalParameterDeclsRestContext extends ParserRuleContext { public VariableDeclaratorIdContext variableDeclaratorId() { return getRuleContext(VariableDeclaratorIdContext.class,0); } public FormalParameterDeclsContext formalParameterDecls() { return getRuleContext(FormalParameterDeclsContext.class,0); } public FormalParameterDeclsRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_formalParameterDeclsRest; } } public final FormalParameterDeclsRestContext formalParameterDeclsRest() throws RecognitionException { FormalParameterDeclsRestContext _localctx = new FormalParameterDeclsRestContext(_ctx, getState()); enterRule(_localctx, 112, RULE_formalParameterDeclsRest); int _la; try { setState(695); _errHandler.sync(this); switch (_input.LA(1)) { case Identifier: enterOuterAlt(_localctx, 1); { setState(688); variableDeclaratorId(); setState(691); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__16) { { setState(689); match(T__16); setState(690); formalParameterDecls(); } } } break; case T__43: enterOuterAlt(_localctx, 2); { setState(693); match(T__43); setState(694); variableDeclaratorId(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class MethodBodyContext extends ParserRuleContext { public BlockContext block() { return getRuleContext(BlockContext.class,0); } public MethodBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_methodBody; } } public final MethodBodyContext methodBody() throws RecognitionException { MethodBodyContext _localctx = new MethodBodyContext(_ctx, getState()); enterRule(_localctx, 114, RULE_methodBody); try { enterOuterAlt(_localctx, 1); { setState(697); block(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstructorBodyContext extends ParserRuleContext { public ExplicitConstructorInvocationContext explicitConstructorInvocation() { return getRuleContext(ExplicitConstructorInvocationContext.class,0); } public List<BlockStatementContext> blockStatement() { return getRuleContexts(BlockStatementContext.class); } public BlockStatementContext blockStatement(int i) { return getRuleContext(BlockStatementContext.class,i); } public ConstructorBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constructorBody; } } public final ConstructorBodyContext constructorBody() throws RecognitionException { ConstructorBodyContext _localctx = new ConstructorBodyContext(_ctx, getState()); enterRule(_localctx, 116, RULE_constructorBody); int _la; try { enterOuterAlt(_localctx, 1); { setState(699); match(T__19); setState(701); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,73,_ctx) ) { case 1: { setState(700); explicitConstructorInvocation(); } break; } setState(706); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__6) | (1L << T__13) | (1L << T__19) | (1L << T__21) | (1L << T__24) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__51) | (1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (ASSERT - 66)) | (1L << (Identifier - 66)))) != 0)) { { { setState(703); blockStatement(); } } setState(708); _errHandler.sync(this); _la = _input.LA(1); } setState(709); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ExplicitConstructorInvocationContext extends ParserRuleContext { public ArgumentsContext arguments() { return getRuleContext(ArgumentsContext.class,0); } public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { return getRuleContext(NonWildcardTypeArgumentsContext.class,0); } public PrimaryContext primary() { return getRuleContext(PrimaryContext.class,0); } public ExplicitConstructorInvocationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_explicitConstructorInvocation; } } public final ExplicitConstructorInvocationContext explicitConstructorInvocation() throws RecognitionException { ExplicitConstructorInvocationContext _localctx = new ExplicitConstructorInvocationContext(_ctx, getState()); enterRule(_localctx, 118, RULE_explicitConstructorInvocation); int _la; try { setState(727); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,77,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(712); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(711); nonWildcardTypeArguments(); } } setState(714); _la = _input.LA(1); if ( !(_la==T__40 || _la==T__44) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(715); arguments(); setState(716); match(T__1); } break; case 2: enterOuterAlt(_localctx, 2); { setState(718); primary(); setState(719); match(T__4); setState(721); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(720); nonWildcardTypeArguments(); } } setState(723); match(T__40); setState(724); arguments(); setState(725); match(T__1); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class QualifiedNameContext extends ParserRuleContext { public List<TerminalNode> Identifier() { return getTokens(JavaParser.Identifier); } public TerminalNode Identifier(int i) { return getToken(JavaParser.Identifier, i); } public QualifiedNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_qualifiedName; } } public final QualifiedNameContext qualifiedName() throws RecognitionException { QualifiedNameContext _localctx = new QualifiedNameContext(_ctx, getState()); enterRule(_localctx, 120, RULE_qualifiedName); try { int _alt; enterOuterAlt(_localctx, 1); { setState(729); match(Identifier); setState(734); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,78,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(730); match(T__4); setState(731); match(Identifier); } } } setState(736); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,78,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class LiteralContext extends ParserRuleContext { public IntegerLiteralContext integerLiteral() { return getRuleContext(IntegerLiteralContext.class,0); } public TerminalNode FloatingPointLiteral() { return getToken(JavaParser.FloatingPointLiteral, 0); } public TerminalNode CharacterLiteral() { return getToken(JavaParser.CharacterLiteral, 0); } public TerminalNode StringLiteral() { return getToken(JavaParser.StringLiteral, 0); } public BooleanLiteralContext booleanLiteral() { return getRuleContext(BooleanLiteralContext.class,0); } public LiteralContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_literal; } } public final LiteralContext literal() throws RecognitionException { LiteralContext _localctx = new LiteralContext(_ctx, getState()); enterRule(_localctx, 122, RULE_literal); try { setState(743); _errHandler.sync(this); switch (_input.LA(1)) { case HexLiteral: case DecimalLiteral: case OctalLiteral: enterOuterAlt(_localctx, 1); { setState(737); integerLiteral(); } break; case FloatingPointLiteral: enterOuterAlt(_localctx, 2); { setState(738); match(FloatingPointLiteral); } break; case CharacterLiteral: enterOuterAlt(_localctx, 3); { setState(739); match(CharacterLiteral); } break; case StringLiteral: enterOuterAlt(_localctx, 4); { setState(740); match(StringLiteral); } break; case T__46: case T__47: enterOuterAlt(_localctx, 5); { setState(741); booleanLiteral(); } break; case T__45: enterOuterAlt(_localctx, 6); { setState(742); match(T__45); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class IntegerLiteralContext extends ParserRuleContext { public TerminalNode HexLiteral() { return getToken(JavaParser.HexLiteral, 0); } public TerminalNode OctalLiteral() { return getToken(JavaParser.OctalLiteral, 0); } public TerminalNode DecimalLiteral() { return getToken(JavaParser.DecimalLiteral, 0); } public IntegerLiteralContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_integerLiteral; } } public final IntegerLiteralContext integerLiteral() throws RecognitionException { IntegerLiteralContext _localctx = new IntegerLiteralContext(_ctx, getState()); enterRule(_localctx, 124, RULE_integerLiteral); int _la; try { enterOuterAlt(_localctx, 1); { setState(745); _la = _input.LA(1); if ( !(((((_la - 90)) & ~0x3f) == 0 && ((1L << (_la - 90)) & ((1L << (HexLiteral - 90)) | (1L << (DecimalLiteral - 90)) | (1L << (OctalLiteral - 90)))) != 0)) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class BooleanLiteralContext extends ParserRuleContext { public BooleanLiteralContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_booleanLiteral; } } public final BooleanLiteralContext booleanLiteral() throws RecognitionException { BooleanLiteralContext _localctx = new BooleanLiteralContext(_ctx, getState()); enterRule(_localctx, 126, RULE_booleanLiteral); int _la; try { enterOuterAlt(_localctx, 1); { setState(747); _la = _input.LA(1); if ( !(_la==T__46 || _la==T__47) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationsContext extends ParserRuleContext { public List<AnnotationContext> annotation() { return getRuleContexts(AnnotationContext.class); } public AnnotationContext annotation(int i) { return getRuleContext(AnnotationContext.class,i); } public AnnotationsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotations; } } public final AnnotationsContext annotations() throws RecognitionException { AnnotationsContext _localctx = new AnnotationsContext(_ctx, getState()); enterRule(_localctx, 128, RULE_annotations); int _la; try { enterOuterAlt(_localctx, 1); { setState(750); _errHandler.sync(this); _la = _input.LA(1); do { { { setState(749); annotation(); } } setState(752); _errHandler.sync(this); _la = _input.LA(1); } while ( _la==T__48 ); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationContext extends ParserRuleContext { public AnnotationNameContext annotationName() { return getRuleContext(AnnotationNameContext.class,0); } public ElementValuePairsContext elementValuePairs() { return getRuleContext(ElementValuePairsContext.class,0); } public ElementValueContext elementValue() { return getRuleContext(ElementValueContext.class,0); } public AnnotationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotation; } } public final AnnotationContext annotation() throws RecognitionException { AnnotationContext _localctx = new AnnotationContext(_ctx, getState()); enterRule(_localctx, 130, RULE_annotation); int _la; try { enterOuterAlt(_localctx, 1); { setState(754); match(T__48); setState(755); annotationName(); setState(762); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__41) { { setState(756); match(T__41); setState(759); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { case 1: { setState(757); elementValuePairs(); } break; case 2: { setState(758); elementValue(); } break; } setState(761); match(T__42); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationNameContext extends ParserRuleContext { public List<TerminalNode> Identifier() { return getTokens(JavaParser.Identifier); } public TerminalNode Identifier(int i) { return getToken(JavaParser.Identifier, i); } public AnnotationNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationName; } } public final AnnotationNameContext annotationName() throws RecognitionException { AnnotationNameContext _localctx = new AnnotationNameContext(_ctx, getState()); enterRule(_localctx, 132, RULE_annotationName); int _la; try { enterOuterAlt(_localctx, 1); { setState(764); match(Identifier); setState(769); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__4) { { { setState(765); match(T__4); setState(766); match(Identifier); } } setState(771); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ElementValuePairsContext extends ParserRuleContext { public List<ElementValuePairContext> elementValuePair() { return getRuleContexts(ElementValuePairContext.class); } public ElementValuePairContext elementValuePair(int i) { return getRuleContext(ElementValuePairContext.class,i); } public ElementValuePairsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_elementValuePairs; } } public final ElementValuePairsContext elementValuePairs() throws RecognitionException { ElementValuePairsContext _localctx = new ElementValuePairsContext(_ctx, getState()); enterRule(_localctx, 134, RULE_elementValuePairs); int _la; try { enterOuterAlt(_localctx, 1); { setState(772); elementValuePair(); setState(777); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(773); match(T__16); setState(774); elementValuePair(); } } setState(779); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ElementValuePairContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ElementValueContext elementValue() { return getRuleContext(ElementValueContext.class,0); } public ElementValuePairContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_elementValuePair; } } public final ElementValuePairContext elementValuePair() throws RecognitionException { ElementValuePairContext _localctx = new ElementValuePairContext(_ctx, getState()); enterRule(_localctx, 136, RULE_elementValuePair); try { enterOuterAlt(_localctx, 1); { setState(780); match(Identifier); setState(781); match(T__26); setState(782); elementValue(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ElementValueContext extends ParserRuleContext { public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public AnnotationContext annotation() { return getRuleContext(AnnotationContext.class,0); } public ElementValueArrayInitializerContext elementValueArrayInitializer() { return getRuleContext(ElementValueArrayInitializerContext.class,0); } public ElementValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_elementValue; } } public final ElementValueContext elementValue() throws RecognitionException { ElementValueContext _localctx = new ElementValueContext(_ctx, getState()); enterRule(_localctx, 138, RULE_elementValue); try { setState(787); _errHandler.sync(this); switch (_input.LA(1)) { case T__24: case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case T__40: case T__41: case T__44: case T__45: case T__46: case T__47: case T__65: case T__66: case T__67: case T__68: case T__69: case T__70: case T__71: case HexLiteral: case DecimalLiteral: case OctalLiteral: case FloatingPointLiteral: case CharacterLiteral: case StringLiteral: case Identifier: enterOuterAlt(_localctx, 1); { setState(784); expression(0); } break; case T__48: enterOuterAlt(_localctx, 2); { setState(785); annotation(); } break; case T__19: enterOuterAlt(_localctx, 3); { setState(786); elementValueArrayInitializer(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ElementValueArrayInitializerContext extends ParserRuleContext { public List<ElementValueContext> elementValue() { return getRuleContexts(ElementValueContext.class); } public ElementValueContext elementValue(int i) { return getRuleContext(ElementValueContext.class,i); } public ElementValueArrayInitializerContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_elementValueArrayInitializer; } } public final ElementValueArrayInitializerContext elementValueArrayInitializer() throws RecognitionException { ElementValueArrayInitializerContext _localctx = new ElementValueArrayInitializerContext(_ctx, getState()); enterRule(_localctx, 140, RULE_elementValueArrayInitializer); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(789); match(T__19); setState(798); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__19) | (1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(790); elementValue(); setState(795); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,86,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(791); match(T__16); setState(792); elementValue(); } } } setState(797); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,86,_ctx); } } } setState(801); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__16) { { setState(800); match(T__16); } } setState(803); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationTypeDeclarationContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public AnnotationTypeBodyContext annotationTypeBody() { return getRuleContext(AnnotationTypeBodyContext.class,0); } public AnnotationTypeDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationTypeDeclaration; } } public final AnnotationTypeDeclarationContext annotationTypeDeclaration() throws RecognitionException { AnnotationTypeDeclarationContext _localctx = new AnnotationTypeDeclarationContext(_ctx, getState()); enterRule(_localctx, 142, RULE_annotationTypeDeclaration); try { enterOuterAlt(_localctx, 1); { setState(805); match(T__48); setState(806); match(T__21); setState(807); match(Identifier); setState(808); annotationTypeBody(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationTypeBodyContext extends ParserRuleContext { public List<AnnotationTypeElementDeclarationContext> annotationTypeElementDeclaration() { return getRuleContexts(AnnotationTypeElementDeclarationContext.class); } public AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration(int i) { return getRuleContext(AnnotationTypeElementDeclarationContext.class,i); } public AnnotationTypeBodyContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationTypeBody; } } public final AnnotationTypeBodyContext annotationTypeBody() throws RecognitionException { AnnotationTypeBodyContext _localctx = new AnnotationTypeBodyContext(_ctx, getState()); enterRule(_localctx, 144, RULE_annotationTypeBody); int _la; try { enterOuterAlt(_localctx, 1); { setState(810); match(T__19); setState(814); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__3) | (1L << T__6) | (1L << T__9) | (1L << T__10) | (1L << T__11) | (1L << T__12) | (1L << T__13) | (1L << T__14) | (1L << T__21) | (1L << T__27) | (1L << T__28) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__48))) != 0) || _la==ENUM || _la==Identifier) { { { setState(811); annotationTypeElementDeclaration(); } } setState(816); _errHandler.sync(this); _la = _input.LA(1); } setState(817); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationTypeElementDeclarationContext extends ParserRuleContext { public ModifiersContext modifiers() { return getRuleContext(ModifiersContext.class,0); } public AnnotationTypeElementRestContext annotationTypeElementRest() { return getRuleContext(AnnotationTypeElementRestContext.class,0); } public AnnotationTypeElementDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationTypeElementDeclaration; } } public final AnnotationTypeElementDeclarationContext annotationTypeElementDeclaration() throws RecognitionException { AnnotationTypeElementDeclarationContext _localctx = new AnnotationTypeElementDeclarationContext(_ctx, getState()); enterRule(_localctx, 146, RULE_annotationTypeElementDeclaration); try { enterOuterAlt(_localctx, 1); { setState(819); modifiers(); setState(820); annotationTypeElementRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationTypeElementRestContext extends ParserRuleContext { public TypeContext type() { return getRuleContext(TypeContext.class,0); } public AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() { return getRuleContext(AnnotationMethodOrConstantRestContext.class,0); } public ClassDeclarationContext classDeclaration() { return getRuleContext(ClassDeclarationContext.class,0); } public NormalInterfaceDeclarationContext normalInterfaceDeclaration() { return getRuleContext(NormalInterfaceDeclarationContext.class,0); } public EnumDeclarationContext enumDeclaration() { return getRuleContext(EnumDeclarationContext.class,0); } public AnnotationTypeDeclarationContext annotationTypeDeclaration() { return getRuleContext(AnnotationTypeDeclarationContext.class,0); } public AnnotationTypeElementRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationTypeElementRest; } } public final AnnotationTypeElementRestContext annotationTypeElementRest() throws RecognitionException { AnnotationTypeElementRestContext _localctx = new AnnotationTypeElementRestContext(_ctx, getState()); enterRule(_localctx, 148, RULE_annotationTypeElementRest); int _la; try { setState(842); _errHandler.sync(this); switch (_input.LA(1)) { case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: enterOuterAlt(_localctx, 1); { setState(822); type(); setState(823); annotationMethodOrConstantRest(); setState(824); match(T__1); } break; case T__6: enterOuterAlt(_localctx, 2); { setState(826); classDeclaration(); setState(828); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__1) { { setState(827); match(T__1); } } } break; case T__21: enterOuterAlt(_localctx, 3); { setState(830); normalInterfaceDeclaration(); setState(832); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__1) { { setState(831); match(T__1); } } } break; case ENUM: enterOuterAlt(_localctx, 4); { setState(834); enumDeclaration(); setState(836); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__1) { { setState(835); match(T__1); } } } break; case T__48: enterOuterAlt(_localctx, 5); { setState(838); annotationTypeDeclaration(); setState(840); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__1) { { setState(839); match(T__1); } } } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationMethodOrConstantRestContext extends ParserRuleContext { public AnnotationMethodRestContext annotationMethodRest() { return getRuleContext(AnnotationMethodRestContext.class,0); } public AnnotationConstantRestContext annotationConstantRest() { return getRuleContext(AnnotationConstantRestContext.class,0); } public AnnotationMethodOrConstantRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationMethodOrConstantRest; } } public final AnnotationMethodOrConstantRestContext annotationMethodOrConstantRest() throws RecognitionException { AnnotationMethodOrConstantRestContext _localctx = new AnnotationMethodOrConstantRestContext(_ctx, getState()); enterRule(_localctx, 150, RULE_annotationMethodOrConstantRest); try { setState(846); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,95,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(844); annotationMethodRest(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(845); annotationConstantRest(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationMethodRestContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public DefaultValueContext defaultValue() { return getRuleContext(DefaultValueContext.class,0); } public AnnotationMethodRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationMethodRest; } } public final AnnotationMethodRestContext annotationMethodRest() throws RecognitionException { AnnotationMethodRestContext _localctx = new AnnotationMethodRestContext(_ctx, getState()); enterRule(_localctx, 152, RULE_annotationMethodRest); int _la; try { enterOuterAlt(_localctx, 1); { setState(848); match(Identifier); setState(849); match(T__41); setState(850); match(T__42); setState(852); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__49) { { setState(851); defaultValue(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class AnnotationConstantRestContext extends ParserRuleContext { public VariableDeclaratorsContext variableDeclarators() { return getRuleContext(VariableDeclaratorsContext.class,0); } public AnnotationConstantRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_annotationConstantRest; } } public final AnnotationConstantRestContext annotationConstantRest() throws RecognitionException { AnnotationConstantRestContext _localctx = new AnnotationConstantRestContext(_ctx, getState()); enterRule(_localctx, 154, RULE_annotationConstantRest); try { enterOuterAlt(_localctx, 1); { setState(854); variableDeclarators(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class DefaultValueContext extends ParserRuleContext { public ElementValueContext elementValue() { return getRuleContext(ElementValueContext.class,0); } public DefaultValueContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_defaultValue; } } public final DefaultValueContext defaultValue() throws RecognitionException { DefaultValueContext _localctx = new DefaultValueContext(_ctx, getState()); enterRule(_localctx, 156, RULE_defaultValue); try { enterOuterAlt(_localctx, 1); { setState(856); match(T__49); setState(857); elementValue(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class BlockContext extends ParserRuleContext { public List<BlockStatementContext> blockStatement() { return getRuleContexts(BlockStatementContext.class); } public BlockStatementContext blockStatement(int i) { return getRuleContext(BlockStatementContext.class,i); } public BlockContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_block; } } public final BlockContext block() throws RecognitionException { BlockContext _localctx = new BlockContext(_ctx, getState()); enterRule(_localctx, 158, RULE_block); int _la; try { enterOuterAlt(_localctx, 1); { setState(859); match(T__19); setState(863); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__6) | (1L << T__13) | (1L << T__19) | (1L << T__21) | (1L << T__24) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__51) | (1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (ASSERT - 66)) | (1L << (Identifier - 66)))) != 0)) { { { setState(860); blockStatement(); } } setState(865); _errHandler.sync(this); _la = _input.LA(1); } setState(866); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class BlockStatementContext extends ParserRuleContext { public LocalVariableDeclarationStatementContext localVariableDeclarationStatement() { return getRuleContext(LocalVariableDeclarationStatementContext.class,0); } public ClassDeclarationContext classDeclaration() { return getRuleContext(ClassDeclarationContext.class,0); } public InterfaceDeclarationContext interfaceDeclaration() { return getRuleContext(InterfaceDeclarationContext.class,0); } public StatementContext statement() { return getRuleContext(StatementContext.class,0); } public BlockStatementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_blockStatement; } } public final BlockStatementContext blockStatement() throws RecognitionException { BlockStatementContext _localctx = new BlockStatementContext(_ctx, getState()); enterRule(_localctx, 160, RULE_blockStatement); try { setState(872); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,98,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(868); localVariableDeclarationStatement(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(869); classDeclaration(); } break; case 3: enterOuterAlt(_localctx, 3); { setState(870); interfaceDeclaration(); } break; case 4: enterOuterAlt(_localctx, 4); { setState(871); statement(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class LocalVariableDeclarationStatementContext extends ParserRuleContext { public LocalVariableDeclarationContext localVariableDeclaration() { return getRuleContext(LocalVariableDeclarationContext.class,0); } public LocalVariableDeclarationStatementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_localVariableDeclarationStatement; } } public final LocalVariableDeclarationStatementContext localVariableDeclarationStatement() throws RecognitionException { LocalVariableDeclarationStatementContext _localctx = new LocalVariableDeclarationStatementContext(_ctx, getState()); enterRule(_localctx, 162, RULE_localVariableDeclarationStatement); try { enterOuterAlt(_localctx, 1); { setState(874); localVariableDeclaration(); setState(875); match(T__1); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class LocalVariableDeclarationContext extends ParserRuleContext { public VariableModifiersContext variableModifiers() { return getRuleContext(VariableModifiersContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public VariableDeclaratorsContext variableDeclarators() { return getRuleContext(VariableDeclaratorsContext.class,0); } public LocalVariableDeclarationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_localVariableDeclaration; } } public final LocalVariableDeclarationContext localVariableDeclaration() throws RecognitionException { LocalVariableDeclarationContext _localctx = new LocalVariableDeclarationContext(_ctx, getState()); enterRule(_localctx, 164, RULE_localVariableDeclaration); try { enterOuterAlt(_localctx, 1); { setState(877); variableModifiers(); setState(878); type(); setState(879); variableDeclarators(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class VariableModifiersContext extends ParserRuleContext { public List<VariableModifierContext> variableModifier() { return getRuleContexts(VariableModifierContext.class); } public VariableModifierContext variableModifier(int i) { return getRuleContext(VariableModifierContext.class,i); } public VariableModifiersContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_variableModifiers; } } public final VariableModifiersContext variableModifiers() throws RecognitionException { VariableModifiersContext _localctx = new VariableModifiersContext(_ctx, getState()); enterRule(_localctx, 166, RULE_variableModifiers); int _la; try { enterOuterAlt(_localctx, 1); { setState(884); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__13 || _la==T__48) { { { setState(881); variableModifier(); } } setState(886); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class StatementContext extends ParserRuleContext { public List<BlockContext> block() { return getRuleContexts(BlockContext.class); } public BlockContext block(int i) { return getRuleContext(BlockContext.class,i); } public TerminalNode ASSERT() { return getToken(JavaParser.ASSERT, 0); } public List<ExpressionContext> expression() { return getRuleContexts(ExpressionContext.class); } public ExpressionContext expression(int i) { return getRuleContext(ExpressionContext.class,i); } public ParExpressionContext parExpression() { return getRuleContext(ParExpressionContext.class,0); } public List<StatementContext> statement() { return getRuleContexts(StatementContext.class); } public StatementContext statement(int i) { return getRuleContext(StatementContext.class,i); } public ForControlContext forControl() { return getRuleContext(ForControlContext.class,0); } public CatchesContext catches() { return getRuleContext(CatchesContext.class,0); } public SwitchBlockContext switchBlock() { return getRuleContext(SwitchBlockContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public StatementExpressionContext statementExpression() { return getRuleContext(StatementExpressionContext.class,0); } public StatementContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_statement; } } public final StatementContext statement() throws RecognitionException { StatementContext _localctx = new StatementContext(_ctx, getState()); enterRule(_localctx, 168, RULE_statement); int _la; try { setState(964); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,106,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(887); block(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(888); match(ASSERT); setState(889); expression(0); setState(892); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__50) { { setState(890); match(T__50); setState(891); expression(0); } } setState(894); match(T__1); } break; case 3: enterOuterAlt(_localctx, 3); { setState(896); match(T__51); setState(897); parExpression(); setState(898); statement(); setState(901); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,101,_ctx) ) { case 1: { setState(899); match(T__52); setState(900); statement(); } break; } } break; case 4: enterOuterAlt(_localctx, 4); { setState(903); match(T__53); setState(904); match(T__41); setState(905); forControl(); setState(906); match(T__42); setState(907); statement(); } break; case 5: enterOuterAlt(_localctx, 5); { setState(909); match(T__54); setState(910); parExpression(); setState(911); statement(); } break; case 6: enterOuterAlt(_localctx, 6); { setState(913); match(T__55); setState(914); statement(); setState(915); match(T__54); setState(916); parExpression(); setState(917); match(T__1); } break; case 7: enterOuterAlt(_localctx, 7); { setState(919); match(T__56); setState(920); block(); setState(928); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,102,_ctx) ) { case 1: { setState(921); catches(); setState(922); match(T__57); setState(923); block(); } break; case 2: { setState(925); catches(); } break; case 3: { setState(926); match(T__57); setState(927); block(); } break; } } break; case 8: enterOuterAlt(_localctx, 8); { setState(930); match(T__58); setState(931); parExpression(); setState(932); switchBlock(); } break; case 9: enterOuterAlt(_localctx, 9); { setState(934); match(T__28); setState(935); parExpression(); setState(936); block(); } break; case 10: enterOuterAlt(_localctx, 10); { setState(938); match(T__59); setState(940); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(939); expression(0); } } setState(942); match(T__1); } break; case 11: enterOuterAlt(_localctx, 11); { setState(943); match(T__60); setState(944); expression(0); setState(945); match(T__1); } break; case 12: enterOuterAlt(_localctx, 12); { setState(947); match(T__61); setState(949); _errHandler.sync(this); _la = _input.LA(1); if (_la==Identifier) { { setState(948); match(Identifier); } } setState(951); match(T__1); } break; case 13: enterOuterAlt(_localctx, 13); { setState(952); match(T__62); setState(954); _errHandler.sync(this); _la = _input.LA(1); if (_la==Identifier) { { setState(953); match(Identifier); } } setState(956); match(T__1); } break; case 14: enterOuterAlt(_localctx, 14); { setState(957); match(T__1); } break; case 15: enterOuterAlt(_localctx, 15); { setState(958); statementExpression(); setState(959); match(T__1); } break; case 16: enterOuterAlt(_localctx, 16); { setState(961); match(Identifier); setState(962); match(T__50); setState(963); statement(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class CatchesContext extends ParserRuleContext { public List<CatchClauseContext> catchClause() { return getRuleContexts(CatchClauseContext.class); } public CatchClauseContext catchClause(int i) { return getRuleContext(CatchClauseContext.class,i); } public CatchesContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_catches; } } public final CatchesContext catches() throws RecognitionException { CatchesContext _localctx = new CatchesContext(_ctx, getState()); enterRule(_localctx, 170, RULE_catches); int _la; try { enterOuterAlt(_localctx, 1); { setState(966); catchClause(); setState(970); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__63) { { { setState(967); catchClause(); } } setState(972); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class CatchClauseContext extends ParserRuleContext { public FormalParameterContext formalParameter() { return getRuleContext(FormalParameterContext.class,0); } public BlockContext block() { return getRuleContext(BlockContext.class,0); } public CatchClauseContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_catchClause; } } public final CatchClauseContext catchClause() throws RecognitionException { CatchClauseContext _localctx = new CatchClauseContext(_ctx, getState()); enterRule(_localctx, 172, RULE_catchClause); try { enterOuterAlt(_localctx, 1); { setState(973); match(T__63); setState(974); match(T__41); setState(975); formalParameter(); setState(976); match(T__42); setState(977); block(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class FormalParameterContext extends ParserRuleContext { public VariableModifiersContext variableModifiers() { return getRuleContext(VariableModifiersContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public VariableDeclaratorIdContext variableDeclaratorId() { return getRuleContext(VariableDeclaratorIdContext.class,0); } public FormalParameterContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_formalParameter; } } public final FormalParameterContext formalParameter() throws RecognitionException { FormalParameterContext _localctx = new FormalParameterContext(_ctx, getState()); enterRule(_localctx, 174, RULE_formalParameter); try { enterOuterAlt(_localctx, 1); { setState(979); variableModifiers(); setState(980); type(); setState(981); variableDeclaratorId(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SwitchBlockContext extends ParserRuleContext { public List<SwitchBlockStatementGroupContext> switchBlockStatementGroup() { return getRuleContexts(SwitchBlockStatementGroupContext.class); } public SwitchBlockStatementGroupContext switchBlockStatementGroup(int i) { return getRuleContext(SwitchBlockStatementGroupContext.class,i); } public List<SwitchLabelContext> switchLabel() { return getRuleContexts(SwitchLabelContext.class); } public SwitchLabelContext switchLabel(int i) { return getRuleContext(SwitchLabelContext.class,i); } public SwitchBlockContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_switchBlock; } } public final SwitchBlockContext switchBlock() throws RecognitionException { SwitchBlockContext _localctx = new SwitchBlockContext(_ctx, getState()); enterRule(_localctx, 176, RULE_switchBlock); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(983); match(T__19); setState(987); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,108,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(984); switchBlockStatementGroup(); } } } setState(989); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,108,_ctx); } setState(993); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__49 || _la==T__64) { { { setState(990); switchLabel(); } } setState(995); _errHandler.sync(this); _la = _input.LA(1); } setState(996); match(T__20); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SwitchBlockStatementGroupContext extends ParserRuleContext { public List<SwitchLabelContext> switchLabel() { return getRuleContexts(SwitchLabelContext.class); } public SwitchLabelContext switchLabel(int i) { return getRuleContext(SwitchLabelContext.class,i); } public List<BlockStatementContext> blockStatement() { return getRuleContexts(BlockStatementContext.class); } public BlockStatementContext blockStatement(int i) { return getRuleContext(BlockStatementContext.class,i); } public SwitchBlockStatementGroupContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_switchBlockStatementGroup; } } public final SwitchBlockStatementGroupContext switchBlockStatementGroup() throws RecognitionException { SwitchBlockStatementGroupContext _localctx = new SwitchBlockStatementGroupContext(_ctx, getState()); enterRule(_localctx, 178, RULE_switchBlockStatementGroup); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(999); _errHandler.sync(this); _alt = 1; do { switch (_alt) { case 1: { { setState(998); switchLabel(); } } break; default: throw new NoViableAltException(this); } setState(1001); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,110,_ctx); } while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ); setState(1006); _errHandler.sync(this); _la = _input.LA(1); while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__1) | (1L << T__6) | (1L << T__13) | (1L << T__19) | (1L << T__21) | (1L << T__24) | (1L << T__28) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__51) | (1L << T__53) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__58) | (1L << T__59) | (1L << T__60) | (1L << T__61) | (1L << T__62))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (ASSERT - 66)) | (1L << (Identifier - 66)))) != 0)) { { { setState(1003); blockStatement(); } } setState(1008); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SwitchLabelContext extends ParserRuleContext { public ConstantExpressionContext constantExpression() { return getRuleContext(ConstantExpressionContext.class,0); } public EnumConstantNameContext enumConstantName() { return getRuleContext(EnumConstantNameContext.class,0); } public SwitchLabelContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_switchLabel; } } public final SwitchLabelContext switchLabel() throws RecognitionException { SwitchLabelContext _localctx = new SwitchLabelContext(_ctx, getState()); enterRule(_localctx, 180, RULE_switchLabel); try { setState(1019); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,112,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(1009); match(T__64); setState(1010); constantExpression(); setState(1011); match(T__50); } break; case 2: enterOuterAlt(_localctx, 2); { setState(1013); match(T__64); setState(1014); enumConstantName(); setState(1015); match(T__50); } break; case 3: enterOuterAlt(_localctx, 3); { setState(1017); match(T__49); setState(1018); match(T__50); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ForControlContext extends ParserRuleContext { public EnhancedForControlContext enhancedForControl() { return getRuleContext(EnhancedForControlContext.class,0); } public ForInitContext forInit() { return getRuleContext(ForInitContext.class,0); } public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public ForUpdateContext forUpdate() { return getRuleContext(ForUpdateContext.class,0); } public ForControlContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_forControl; } } public final ForControlContext forControl() throws RecognitionException { ForControlContext _localctx = new ForControlContext(_ctx, getState()); enterRule(_localctx, 182, RULE_forControl); int _la; try { setState(1033); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,116,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(1021); enhancedForControl(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(1023); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__13) | (1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1022); forInit(); } } setState(1025); match(T__1); setState(1027); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1026); expression(0); } } setState(1029); match(T__1); setState(1031); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1030); forUpdate(); } } } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ForInitContext extends ParserRuleContext { public LocalVariableDeclarationContext localVariableDeclaration() { return getRuleContext(LocalVariableDeclarationContext.class,0); } public ExpressionListContext expressionList() { return getRuleContext(ExpressionListContext.class,0); } public ForInitContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_forInit; } } public final ForInitContext forInit() throws RecognitionException { ForInitContext _localctx = new ForInitContext(_ctx, getState()); enterRule(_localctx, 184, RULE_forInit); try { setState(1037); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,117,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(1035); localVariableDeclaration(); } break; case 2: enterOuterAlt(_localctx, 2); { setState(1036); expressionList(); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class EnhancedForControlContext extends ParserRuleContext { public VariableModifiersContext variableModifiers() { return getRuleContext(VariableModifiersContext.class,0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public EnhancedForControlContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_enhancedForControl; } } public final EnhancedForControlContext enhancedForControl() throws RecognitionException { EnhancedForControlContext _localctx = new EnhancedForControlContext(_ctx, getState()); enterRule(_localctx, 186, RULE_enhancedForControl); try { enterOuterAlt(_localctx, 1); { setState(1039); variableModifiers(); setState(1040); type(); setState(1041); match(Identifier); setState(1042); match(T__50); setState(1043); expression(0); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ForUpdateContext extends ParserRuleContext { public ExpressionListContext expressionList() { return getRuleContext(ExpressionListContext.class,0); } public ForUpdateContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_forUpdate; } } public final ForUpdateContext forUpdate() throws RecognitionException { ForUpdateContext _localctx = new ForUpdateContext(_ctx, getState()); enterRule(_localctx, 188, RULE_forUpdate); try { enterOuterAlt(_localctx, 1); { setState(1045); expressionList(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ParExpressionContext extends ParserRuleContext { public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public ParExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_parExpression; } } public final ParExpressionContext parExpression() throws RecognitionException { ParExpressionContext _localctx = new ParExpressionContext(_ctx, getState()); enterRule(_localctx, 190, RULE_parExpression); try { enterOuterAlt(_localctx, 1); { setState(1047); match(T__41); setState(1048); expression(0); setState(1049); match(T__42); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ExpressionListContext extends ParserRuleContext { public List<ExpressionContext> expression() { return getRuleContexts(ExpressionContext.class); } public ExpressionContext expression(int i) { return getRuleContext(ExpressionContext.class,i); } public ExpressionListContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_expressionList; } } public final ExpressionListContext expressionList() throws RecognitionException { ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState()); enterRule(_localctx, 192, RULE_expressionList); int _la; try { enterOuterAlt(_localctx, 1); { setState(1051); expression(0); setState(1056); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__16) { { { setState(1052); match(T__16); setState(1053); expression(0); } } setState(1058); _errHandler.sync(this); _la = _input.LA(1); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class StatementExpressionContext extends ParserRuleContext { public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public StatementExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_statementExpression; } } public final StatementExpressionContext statementExpression() throws RecognitionException { StatementExpressionContext _localctx = new StatementExpressionContext(_ctx, getState()); enterRule(_localctx, 194, RULE_statementExpression); try { enterOuterAlt(_localctx, 1); { setState(1059); expression(0); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ConstantExpressionContext extends ParserRuleContext { public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public ConstantExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_constantExpression; } } public final ConstantExpressionContext constantExpression() throws RecognitionException { ConstantExpressionContext _localctx = new ConstantExpressionContext(_ctx, getState()); enterRule(_localctx, 196, RULE_constantExpression); try { enterOuterAlt(_localctx, 1); { setState(1061); expression(0); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ExpressionContext extends ParserRuleContext { public PrimaryContext primary() { return getRuleContext(PrimaryContext.class,0); } public List<ExpressionContext> expression() { return getRuleContexts(ExpressionContext.class); } public ExpressionContext expression(int i) { return getRuleContext(ExpressionContext.class,i); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public CreatorContext creator() { return getRuleContext(CreatorContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ExpressionListContext expressionList() { return getRuleContext(ExpressionListContext.class,0); } public ArgumentsContext arguments() { return getRuleContext(ArgumentsContext.class,0); } public ExplicitGenericInvocationContext explicitGenericInvocation() { return getRuleContext(ExplicitGenericInvocationContext.class,0); } public ExpressionContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_expression; } } public final ExpressionContext expression() throws RecognitionException { return expression(0); } private ExpressionContext expression(int _p) throws RecognitionException { ParserRuleContext _parentctx = _ctx; int _parentState = getState(); ExpressionContext _localctx = new ExpressionContext(_ctx, _parentState); ExpressionContext _prevctx = _localctx; int _startState = 198; enterRecursionRule(_localctx, 198, RULE_expression, _p); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(1076); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,119,_ctx) ) { case 1: { setState(1064); primary(); } break; case 2: { setState(1065); _la = _input.LA(1); if ( !(((((_la - 67)) & ~0x3f) == 0 && ((1L << (_la - 67)) & ((1L << (T__66 - 67)) | (1L << (T__67 - 67)) | (1L << (T__68 - 67)) | (1L << (T__69 - 67)))) != 0)) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(1066); expression(17); } break; case 3: { setState(1067); _la = _input.LA(1); if ( !(_la==T__70 || _la==T__71) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(1068); expression(16); } break; case 4: { setState(1069); match(T__41); setState(1070); type(); setState(1071); match(T__42); setState(1072); expression(15); } break; case 5: { setState(1074); match(T__65); setState(1075); creator(); } break; } _ctx.stop = _input.LT(-1); setState(1204); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,128,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( _parseListeners!=null ) triggerExitRuleEvent(); _prevctx = _localctx; { setState(1202); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,127,_ctx) ) { case 1: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1078); if (!(precpred(_ctx, 13))) throw new FailedPredicateException(this, "precpred(_ctx, 13)"); setState(1079); _la = _input.LA(1); if ( !(_la==T__5 || _la==T__72 || _la==T__73) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(1080); expression(14); } break; case 2: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1081); if (!(precpred(_ctx, 12))) throw new FailedPredicateException(this, "precpred(_ctx, 12)"); setState(1082); _la = _input.LA(1); if ( !(_la==T__68 || _la==T__69) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(1083); expression(13); } break; case 3: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1084); if (!(precpred(_ctx, 11))) throw new FailedPredicateException(this, "precpred(_ctx, 11)"); setState(1092); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,120,_ctx) ) { case 1: { setState(1085); match(T__15); setState(1086); match(T__15); } break; case 2: { setState(1087); match(T__17); setState(1088); match(T__17); setState(1089); match(T__17); } break; case 3: { setState(1090); match(T__17); setState(1091); match(T__17); } break; } setState(1094); expression(12); } break; case 4: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1095); if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)"); setState(1102); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,121,_ctx) ) { case 1: { setState(1096); match(T__15); setState(1097); match(T__26); } break; case 2: { setState(1098); match(T__17); setState(1099); match(T__26); } break; case 3: { setState(1100); match(T__17); } break; case 4: { setState(1101); match(T__15); } break; } setState(1104); expression(11); } break; case 5: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1105); if (!(precpred(_ctx, 8))) throw new FailedPredicateException(this, "precpred(_ctx, 8)"); setState(1106); _la = _input.LA(1); if ( !(_la==T__75 || _la==T__76) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } setState(1107); expression(9); } break; case 6: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1108); if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)"); setState(1109); match(T__18); setState(1110); expression(8); } break; case 7: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1111); if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)"); setState(1112); match(T__77); setState(1113); expression(7); } break; case 8: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1114); if (!(precpred(_ctx, 5))) throw new FailedPredicateException(this, "precpred(_ctx, 5)"); setState(1115); match(T__78); setState(1116); expression(6); } break; case 9: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1117); if (!(precpred(_ctx, 4))) throw new FailedPredicateException(this, "precpred(_ctx, 4)"); setState(1118); match(T__79); setState(1119); expression(5); } break; case 10: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1120); if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); setState(1121); match(T__80); setState(1122); expression(4); } break; case 11: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1123); if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); setState(1124); match(T__39); setState(1125); expression(0); setState(1126); match(T__50); setState(1127); expression(3); } break; case 12: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1129); if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); setState(1149); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,122,_ctx) ) { case 1: { setState(1130); match(T__81); } break; case 2: { setState(1131); match(T__82); } break; case 3: { setState(1132); match(T__83); } break; case 4: { setState(1133); match(T__84); } break; case 5: { setState(1134); match(T__85); } break; case 6: { setState(1135); match(T__86); } break; case 7: { setState(1136); match(T__87); } break; case 8: { setState(1137); match(T__26); } break; case 9: { setState(1138); match(T__17); setState(1139); match(T__17); setState(1140); match(T__26); } break; case 10: { setState(1141); match(T__17); setState(1142); match(T__17); setState(1143); match(T__17); setState(1144); match(T__26); } break; case 11: { setState(1145); match(T__15); setState(1146); match(T__15); setState(1147); match(T__26); } break; case 12: { setState(1148); match(T__88); } break; } setState(1151); expression(1); } break; case 13: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1152); if (!(precpred(_ctx, 26))) throw new FailedPredicateException(this, "precpred(_ctx, 26)"); setState(1153); match(T__4); setState(1154); match(Identifier); } break; case 14: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1155); if (!(precpred(_ctx, 25))) throw new FailedPredicateException(this, "precpred(_ctx, 25)"); setState(1156); match(T__4); setState(1157); match(T__44); } break; case 15: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1158); if (!(precpred(_ctx, 24))) throw new FailedPredicateException(this, "precpred(_ctx, 24)"); setState(1159); match(T__4); setState(1160); match(T__40); setState(1161); match(T__41); setState(1163); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1162); expressionList(); } } setState(1165); match(T__42); } break; case 16: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1166); if (!(precpred(_ctx, 23))) throw new FailedPredicateException(this, "precpred(_ctx, 23)"); setState(1167); match(T__4); setState(1168); match(T__65); setState(1169); match(Identifier); setState(1170); match(T__41); setState(1172); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1171); expressionList(); } } setState(1174); match(T__42); } break; case 17: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1175); if (!(precpred(_ctx, 22))) throw new FailedPredicateException(this, "precpred(_ctx, 22)"); setState(1176); match(T__4); setState(1177); match(T__40); setState(1178); match(T__4); setState(1179); match(Identifier); setState(1181); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,125,_ctx) ) { case 1: { setState(1180); arguments(); } break; } } break; case 18: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1183); if (!(precpred(_ctx, 21))) throw new FailedPredicateException(this, "precpred(_ctx, 21)"); setState(1184); match(T__4); setState(1185); explicitGenericInvocation(); } break; case 19: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1186); if (!(precpred(_ctx, 20))) throw new FailedPredicateException(this, "precpred(_ctx, 20)"); setState(1187); match(T__22); setState(1188); expression(0); setState(1189); match(T__23); } break; case 20: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1191); if (!(precpred(_ctx, 19))) throw new FailedPredicateException(this, "precpred(_ctx, 19)"); setState(1192); match(T__41); setState(1194); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1193); expressionList(); } } setState(1196); match(T__42); } break; case 21: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1197); if (!(precpred(_ctx, 18))) throw new FailedPredicateException(this, "precpred(_ctx, 18)"); setState(1198); _la = _input.LA(1); if ( !(_la==T__66 || _la==T__67) ) { _errHandler.recoverInline(this); } else { if ( _input.LA(1)==Token.EOF ) matchedEOF = true; _errHandler.reportMatch(this); consume(); } } break; case 22: { _localctx = new ExpressionContext(_parentctx, _parentState); pushNewRecursionContext(_localctx, _startState, RULE_expression); setState(1199); if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)"); setState(1200); match(T__74); setState(1201); type(); } break; } } } setState(1206); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,128,_ctx); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { unrollRecursionContexts(_parentctx); } return _localctx; } public static class PrimaryContext extends ParserRuleContext { public ExpressionContext expression() { return getRuleContext(ExpressionContext.class,0); } public LiteralContext literal() { return getRuleContext(LiteralContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public TypeContext type() { return getRuleContext(TypeContext.class,0); } public PrimaryContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_primary; } } public final PrimaryContext primary() throws RecognitionException { PrimaryContext _localctx = new PrimaryContext(_ctx, getState()); enterRule(_localctx, 200, RULE_primary); try { setState(1222); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,129,_ctx) ) { case 1: enterOuterAlt(_localctx, 1); { setState(1207); match(T__41); setState(1208); expression(0); setState(1209); match(T__42); } break; case 2: enterOuterAlt(_localctx, 2); { setState(1211); match(T__44); } break; case 3: enterOuterAlt(_localctx, 3); { setState(1212); match(T__40); } break; case 4: enterOuterAlt(_localctx, 4); { setState(1213); literal(); } break; case 5: enterOuterAlt(_localctx, 5); { setState(1214); match(Identifier); } break; case 6: enterOuterAlt(_localctx, 6); { setState(1215); type(); setState(1216); match(T__4); setState(1217); match(T__6); } break; case 7: enterOuterAlt(_localctx, 7); { setState(1219); match(T__24); setState(1220); match(T__4); setState(1221); match(T__6); } break; } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class CreatorContext extends ParserRuleContext { public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { return getRuleContext(NonWildcardTypeArgumentsContext.class,0); } public CreatedNameContext createdName() { return getRuleContext(CreatedNameContext.class,0); } public ClassCreatorRestContext classCreatorRest() { return getRuleContext(ClassCreatorRestContext.class,0); } public ArrayCreatorRestContext arrayCreatorRest() { return getRuleContext(ArrayCreatorRestContext.class,0); } public CreatorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_creator; } } public final CreatorContext creator() throws RecognitionException { CreatorContext _localctx = new CreatorContext(_ctx, getState()); enterRule(_localctx, 202, RULE_creator); try { setState(1233); _errHandler.sync(this); switch (_input.LA(1)) { case T__15: enterOuterAlt(_localctx, 1); { setState(1224); nonWildcardTypeArguments(); setState(1225); createdName(); setState(1226); classCreatorRest(); } break; case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case Identifier: enterOuterAlt(_localctx, 2); { setState(1228); createdName(); setState(1231); _errHandler.sync(this); switch (_input.LA(1)) { case T__22: { setState(1229); arrayCreatorRest(); } break; case T__41: { setState(1230); classCreatorRest(); } break; default: throw new NoViableAltException(this); } } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class CreatedNameContext extends ParserRuleContext { public ClassOrInterfaceTypeContext classOrInterfaceType() { return getRuleContext(ClassOrInterfaceTypeContext.class,0); } public PrimitiveTypeContext primitiveType() { return getRuleContext(PrimitiveTypeContext.class,0); } public CreatedNameContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_createdName; } } public final CreatedNameContext createdName() throws RecognitionException { CreatedNameContext _localctx = new CreatedNameContext(_ctx, getState()); enterRule(_localctx, 204, RULE_createdName); try { setState(1237); _errHandler.sync(this); switch (_input.LA(1)) { case Identifier: enterOuterAlt(_localctx, 1); { setState(1235); classOrInterfaceType(); } break; case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: enterOuterAlt(_localctx, 2); { setState(1236); primitiveType(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class InnerCreatorContext extends ParserRuleContext { public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ClassCreatorRestContext classCreatorRest() { return getRuleContext(ClassCreatorRestContext.class,0); } public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { return getRuleContext(NonWildcardTypeArgumentsContext.class,0); } public InnerCreatorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_innerCreator; } } public final InnerCreatorContext innerCreator() throws RecognitionException { InnerCreatorContext _localctx = new InnerCreatorContext(_ctx, getState()); enterRule(_localctx, 206, RULE_innerCreator); int _la; try { enterOuterAlt(_localctx, 1); { setState(1240); _errHandler.sync(this); _la = _input.LA(1); if (_la==T__15) { { setState(1239); nonWildcardTypeArguments(); } } setState(1242); match(Identifier); setState(1243); classCreatorRest(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ExplicitGenericInvocationContext extends ParserRuleContext { public NonWildcardTypeArgumentsContext nonWildcardTypeArguments() { return getRuleContext(NonWildcardTypeArgumentsContext.class,0); } public TerminalNode Identifier() { return getToken(JavaParser.Identifier, 0); } public ArgumentsContext arguments() { return getRuleContext(ArgumentsContext.class,0); } public ExplicitGenericInvocationContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_explicitGenericInvocation; } } public final ExplicitGenericInvocationContext explicitGenericInvocation() throws RecognitionException { ExplicitGenericInvocationContext _localctx = new ExplicitGenericInvocationContext(_ctx, getState()); enterRule(_localctx, 208, RULE_explicitGenericInvocation); try { enterOuterAlt(_localctx, 1); { setState(1245); nonWildcardTypeArguments(); setState(1246); match(Identifier); setState(1247); arguments(); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ArrayCreatorRestContext extends ParserRuleContext { public ArrayInitializerContext arrayInitializer() { return getRuleContext(ArrayInitializerContext.class,0); } public List<ExpressionContext> expression() { return getRuleContexts(ExpressionContext.class); } public ExpressionContext expression(int i) { return getRuleContext(ExpressionContext.class,i); } public ArrayCreatorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_arrayCreatorRest; } } public final ArrayCreatorRestContext arrayCreatorRest() throws RecognitionException { ArrayCreatorRestContext _localctx = new ArrayCreatorRestContext(_ctx, getState()); enterRule(_localctx, 210, RULE_arrayCreatorRest); int _la; try { int _alt; enterOuterAlt(_localctx, 1); { setState(1249); match(T__22); setState(1277); _errHandler.sync(this); switch (_input.LA(1)) { case T__23: { setState(1250); match(T__23); setState(1255); _errHandler.sync(this); _la = _input.LA(1); while (_la==T__22) { { { setState(1251); match(T__22); setState(1252); match(T__23); } } setState(1257); _errHandler.sync(this); _la = _input.LA(1); } setState(1258); arrayInitializer(); } break; case T__24: case T__31: case T__32: case T__33: case T__34: case T__35: case T__36: case T__37: case T__38: case T__40: case T__41: case T__44: case T__45: case T__46: case T__47: case T__65: case T__66: case T__67: case T__68: case T__69: case T__70: case T__71: case HexLiteral: case DecimalLiteral: case OctalLiteral: case FloatingPointLiteral: case CharacterLiteral: case StringLiteral: case Identifier: { setState(1259); expression(0); setState(1260); match(T__23); setState(1267); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,135,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(1261); match(T__22); setState(1262); expression(0); setState(1263); match(T__23); } } } setState(1269); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,135,_ctx); } setState(1274); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,136,_ctx); while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { { { setState(1270); match(T__22); setState(1271); match(T__23); } } } setState(1276); _errHandler.sync(this); _alt = getInterpreter().adaptivePredict(_input,136,_ctx); } } break; default: throw new NoViableAltException(this); } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ClassCreatorRestContext extends ParserRuleContext { public ArgumentsContext arguments() { return getRuleContext(ArgumentsContext.class,0); } public ClassBodyContext classBody() { return getRuleContext(ClassBodyContext.class,0); } public ClassCreatorRestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_classCreatorRest; } } public final ClassCreatorRestContext classCreatorRest() throws RecognitionException { ClassCreatorRestContext _localctx = new ClassCreatorRestContext(_ctx, getState()); enterRule(_localctx, 212, RULE_classCreatorRest); try { enterOuterAlt(_localctx, 1); { setState(1279); arguments(); setState(1281); _errHandler.sync(this); switch ( getInterpreter().adaptivePredict(_input,138,_ctx) ) { case 1: { setState(1280); classBody(); } break; } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class NonWildcardTypeArgumentsContext extends ParserRuleContext { public TypeListContext typeList() { return getRuleContext(TypeListContext.class,0); } public NonWildcardTypeArgumentsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_nonWildcardTypeArguments; } } public final NonWildcardTypeArgumentsContext nonWildcardTypeArguments() throws RecognitionException { NonWildcardTypeArgumentsContext _localctx = new NonWildcardTypeArgumentsContext(_ctx, getState()); enterRule(_localctx, 214, RULE_nonWildcardTypeArguments); try { enterOuterAlt(_localctx, 1); { setState(1283); match(T__15); setState(1284); typeList(); setState(1285); match(T__17); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ArgumentsContext extends ParserRuleContext { public ExpressionListContext expressionList() { return getRuleContext(ExpressionListContext.class,0); } public ArgumentsContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_arguments; } } public final ArgumentsContext arguments() throws RecognitionException { ArgumentsContext _localctx = new ArgumentsContext(_ctx, getState()); enterRule(_localctx, 216, RULE_arguments); int _la; try { enterOuterAlt(_localctx, 1); { setState(1287); match(T__41); setState(1289); _errHandler.sync(this); _la = _input.LA(1); if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__24) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__40) | (1L << T__41) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (T__70 - 66)) | (1L << (T__71 - 66)) | (1L << (HexLiteral - 66)) | (1L << (DecimalLiteral - 66)) | (1L << (OctalLiteral - 66)) | (1L << (FloatingPointLiteral - 66)) | (1L << (CharacterLiteral - 66)) | (1L << (StringLiteral - 66)) | (1L << (Identifier - 66)))) != 0)) { { setState(1288); expressionList(); } } setState(1291); match(T__42); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { case 99: return expression_sempred((ExpressionContext)_localctx, predIndex); } return true; } private boolean expression_sempred(ExpressionContext _localctx, int predIndex) { switch (predIndex) { case 0: return precpred(_ctx, 13); case 1: return precpred(_ctx, 12); case 2: return precpred(_ctx, 11); case 3: return precpred(_ctx, 10); case 4: return precpred(_ctx, 8); case 5: return precpred(_ctx, 7); case 6: return precpred(_ctx, 6); case 7: return precpred(_ctx, 5); case 8: return precpred(_ctx, 4); case 9: return precpred(_ctx, 3); case 10: return precpred(_ctx, 2); case 11: return precpred(_ctx, 1); case 12: return precpred(_ctx, 26); case 13: return precpred(_ctx, 25); case 14: return precpred(_ctx, 24); case 15: return precpred(_ctx, 23); case 16: return precpred(_ctx, 22); case 17: return precpred(_ctx, 21); case 18: return precpred(_ctx, 20); case 19: return precpred(_ctx, 19); case 20: return precpred(_ctx, 18); case 21: return precpred(_ctx, 9); } return true; } public static final String _serializedATN = "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3g\u0510\4\2\t\2\4"+ "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ "k\4l\tl\4m\tm\4n\tn\3\2\5\2\u00de\n\2\3\2\7\2\u00e1\n\2\f\2\16\2\u00e4"+ "\13\2\3\2\7\2\u00e7\n\2\f\2\16\2\u00ea\13\2\3\2\3\2\3\3\3\3\3\3\3\3\3"+ "\4\3\4\5\4\u00f4\n\4\3\4\3\4\3\4\5\4\u00f9\n\4\3\4\3\4\3\5\7\5\u00fe\n"+ "\5\f\5\16\5\u0101\13\5\3\5\3\5\3\5\5\5\u0106\n\5\3\5\5\5\u0109\n\5\3\6"+ "\3\6\3\6\5\6\u010e\n\6\3\6\3\6\5\6\u0112\n\6\3\6\3\6\5\6\u0116\n\6\3\6"+ "\3\6\3\7\3\7\3\7\3\7\5\7\u011e\n\7\3\7\3\7\3\b\3\b\5\b\u0124\n\b\3\t\3"+ "\t\3\t\3\t\3\t\3\t\3\t\3\t\5\t\u012e\n\t\3\n\7\n\u0131\n\n\f\n\16\n\u0134"+ "\13\n\3\13\3\13\3\13\3\13\7\13\u013a\n\13\f\13\16\13\u013d\13\13\3\13"+ "\3\13\3\f\3\f\3\f\5\f\u0144\n\f\3\r\3\r\3\r\7\r\u0149\n\r\f\r\16\r\u014c"+ "\13\r\3\16\3\16\5\16\u0150\n\16\3\16\5\16\u0153\n\16\3\16\5\16\u0156\n"+ "\16\3\16\3\16\3\17\3\17\3\17\7\17\u015d\n\17\f\17\16\17\u0160\13\17\3"+ "\20\5\20\u0163\n\20\3\20\3\20\5\20\u0167\n\20\3\20\5\20\u016a\n\20\3\21"+ "\3\21\7\21\u016e\n\21\f\21\16\21\u0171\13\21\3\22\3\22\3\22\5\22\u0176"+ "\n\22\3\22\3\22\5\22\u017a\n\22\3\22\3\22\3\23\3\23\3\23\7\23\u0181\n"+ "\23\f\23\16\23\u0184\13\23\3\24\3\24\7\24\u0188\n\24\f\24\16\24\u018b"+ "\13\24\3\24\3\24\3\25\3\25\7\25\u0191\n\25\f\25\16\25\u0194\13\25\3\25"+ "\3\25\3\26\3\26\5\26\u019a\n\26\3\26\3\26\3\26\3\26\5\26\u01a0\n\26\3"+ "\27\3\27\3\27\3\27\3\27\3\27\5\27\u01a8\n\27\3\30\3\30\3\30\3\30\3\30"+ "\7\30\u01af\n\30\f\30\16\30\u01b2\13\30\3\30\3\30\3\30\3\30\3\30\3\30"+ "\3\30\5\30\u01bb\n\30\3\31\3\31\5\31\u01bf\n\31\3\31\3\31\5\31\u01c3\n"+ "\31\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\34\5\34\u01cd\n\34\3\34\3\34"+ "\3\34\3\34\5\34\u01d3\n\34\3\34\3\34\3\35\3\35\3\35\3\35\5\35\u01db\n"+ "\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36\5\36\u01e4\n\36\3\37\3\37\3\37"+ "\3\37\3 \3 \3 \3 \5 \u01ee\n \3!\3!\3!\5!\u01f3\n!\3!\3!\5!\u01f7\n!\3"+ "\"\3\"\3\"\7\"\u01fc\n\"\f\"\16\"\u01ff\13\"\3\"\3\"\5\"\u0203\n\"\3\""+ "\3\"\3#\3#\3#\5#\u020a\n#\3#\3#\3#\3$\3$\3$\5$\u0212\n$\3$\3$\3%\3%\3"+ "%\3&\3&\3&\7&\u021c\n&\f&\16&\u021f\13&\3\'\3\'\3\'\5\'\u0224\n\'\3(\3"+ "(\3(\7(\u0229\n(\f(\16(\u022c\13(\3)\3)\7)\u0230\n)\f)\16)\u0233\13)\3"+ ")\3)\3)\3*\3*\3*\7*\u023b\n*\f*\16*\u023e\13*\3+\3+\5+\u0242\n+\3,\3,"+ "\3,\3,\7,\u0248\n,\f,\16,\u024b\13,\3,\5,\u024e\n,\5,\u0250\n,\3,\3,\3"+ "-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\5-\u0260\n-\3.\3.\3/\3/\3\60\3\60\3"+ "\61\3\61\3\61\7\61\u026b\n\61\f\61\16\61\u026e\13\61\3\61\3\61\3\61\7"+ "\61\u0273\n\61\f\61\16\61\u0276\13\61\5\61\u0278\n\61\3\62\3\62\5\62\u027c"+ "\n\62\3\62\3\62\3\62\5\62\u0281\n\62\7\62\u0283\n\62\f\62\16\62\u0286"+ "\13\62\3\63\3\63\3\64\3\64\5\64\u028c\n\64\3\65\3\65\3\65\3\65\7\65\u0292"+ "\n\65\f\65\16\65\u0295\13\65\3\65\3\65\3\66\3\66\3\66\3\66\5\66\u029d"+ "\n\66\5\66\u029f\n\66\3\67\3\67\3\67\7\67\u02a4\n\67\f\67\16\67\u02a7"+ "\13\67\38\38\58\u02ab\n8\38\38\39\39\39\39\3:\3:\3:\5:\u02b6\n:\3:\3:"+ "\5:\u02ba\n:\3;\3;\3<\3<\5<\u02c0\n<\3<\7<\u02c3\n<\f<\16<\u02c6\13<\3"+ "<\3<\3=\5=\u02cb\n=\3=\3=\3=\3=\3=\3=\3=\5=\u02d4\n=\3=\3=\3=\3=\5=\u02da"+ "\n=\3>\3>\3>\7>\u02df\n>\f>\16>\u02e2\13>\3?\3?\3?\3?\3?\3?\5?\u02ea\n"+ "?\3@\3@\3A\3A\3B\6B\u02f1\nB\rB\16B\u02f2\3C\3C\3C\3C\3C\5C\u02fa\nC\3"+ "C\5C\u02fd\nC\3D\3D\3D\7D\u0302\nD\fD\16D\u0305\13D\3E\3E\3E\7E\u030a"+ "\nE\fE\16E\u030d\13E\3F\3F\3F\3F\3G\3G\3G\5G\u0316\nG\3H\3H\3H\3H\7H\u031c"+ "\nH\fH\16H\u031f\13H\5H\u0321\nH\3H\5H\u0324\nH\3H\3H\3I\3I\3I\3I\3I\3"+ "J\3J\7J\u032f\nJ\fJ\16J\u0332\13J\3J\3J\3K\3K\3K\3L\3L\3L\3L\3L\3L\5L"+ "\u033f\nL\3L\3L\5L\u0343\nL\3L\3L\5L\u0347\nL\3L\3L\5L\u034b\nL\5L\u034d"+ "\nL\3M\3M\5M\u0351\nM\3N\3N\3N\3N\5N\u0357\nN\3O\3O\3P\3P\3P\3Q\3Q\7Q"+ "\u0360\nQ\fQ\16Q\u0363\13Q\3Q\3Q\3R\3R\3R\3R\5R\u036b\nR\3S\3S\3S\3T\3"+ "T\3T\3T\3U\7U\u0375\nU\fU\16U\u0378\13U\3V\3V\3V\3V\3V\5V\u037f\nV\3V"+ "\3V\3V\3V\3V\3V\3V\5V\u0388\nV\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V"+ "\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\3V\5V\u03a3\nV\3V\3V\3V\3V\3V\3V\3V"+ "\3V\3V\3V\5V\u03af\nV\3V\3V\3V\3V\3V\3V\3V\5V\u03b8\nV\3V\3V\3V\5V\u03bd"+ "\nV\3V\3V\3V\3V\3V\3V\3V\3V\5V\u03c7\nV\3W\3W\7W\u03cb\nW\fW\16W\u03ce"+ "\13W\3X\3X\3X\3X\3X\3X\3Y\3Y\3Y\3Y\3Z\3Z\7Z\u03dc\nZ\fZ\16Z\u03df\13Z"+ "\3Z\7Z\u03e2\nZ\fZ\16Z\u03e5\13Z\3Z\3Z\3[\6[\u03ea\n[\r[\16[\u03eb\3["+ "\7[\u03ef\n[\f[\16[\u03f2\13[\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\\3\\"+ "\5\\\u03fe\n\\\3]\3]\5]\u0402\n]\3]\3]\5]\u0406\n]\3]\3]\5]\u040a\n]\5"+ "]\u040c\n]\3^\3^\5^\u0410\n^\3_\3_\3_\3_\3_\3_\3`\3`\3a\3a\3a\3a\3b\3"+ "b\3b\7b\u0421\nb\fb\16b\u0424\13b\3c\3c\3d\3d\3e\3e\3e\3e\3e\3e\3e\3e"+ "\3e\3e\3e\3e\3e\5e\u0437\ne\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e"+ "\5e\u0447\ne\3e\3e\3e\3e\3e\3e\3e\3e\5e\u0451\ne\3e\3e\3e\3e\3e\3e\3e"+ "\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e"+ "\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\5e\u0480\ne\3e\3e\3e\3e"+ "\3e\3e\3e\3e\3e\3e\3e\3e\5e\u048e\ne\3e\3e\3e\3e\3e\3e\3e\5e\u0497\ne"+ "\3e\3e\3e\3e\3e\3e\3e\5e\u04a0\ne\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\3e\5e"+ "\u04ad\ne\3e\3e\3e\3e\3e\3e\7e\u04b5\ne\fe\16e\u04b8\13e\3f\3f\3f\3f\3"+ "f\3f\3f\3f\3f\3f\3f\3f\3f\3f\3f\5f\u04c9\nf\3g\3g\3g\3g\3g\3g\3g\5g\u04d2"+ "\ng\5g\u04d4\ng\3h\3h\5h\u04d8\nh\3i\5i\u04db\ni\3i\3i\3i\3j\3j\3j\3j"+ "\3k\3k\3k\3k\7k\u04e8\nk\fk\16k\u04eb\13k\3k\3k\3k\3k\3k\3k\3k\7k\u04f4"+ "\nk\fk\16k\u04f7\13k\3k\3k\7k\u04fb\nk\fk\16k\u04fe\13k\5k\u0500\nk\3"+ "l\3l\5l\u0504\nl\3m\3m\3m\3m\3n\3n\5n\u050c\nn\3n\3n\3n\2\3\u00c8o\2\4"+ "\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNP"+ "RTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a\u008c\u008e"+ "\u0090\u0092\u0094\u0096\u0098\u009a\u009c\u009e\u00a0\u00a2\u00a4\u00a6"+ "\u00a8\u00aa\u00ac\u00ae\u00b0\u00b2\u00b4\u00b6\u00b8\u00ba\u00bc\u00be"+ "\u00c0\u00c2\u00c4\u00c6\u00c8\u00ca\u00cc\u00ce\u00d0\u00d2\u00d4\u00d6"+ "\u00d8\u00da\2\r\3\2\")\4\2\n\n++\4\2++//\3\2\\^\3\2\61\62\3\2EH\3\2I"+ "J\4\2\b\bKL\3\2GH\3\2NO\3\2EF\2\u058b\2\u00dd\3\2\2\2\4\u00ed\3\2\2\2"+ "\6\u00f1\3\2\2\2\b\u0108\3\2\2\2\n\u010a\3\2\2\2\f\u0119\3\2\2\2\16\u0123"+ "\3\2\2\2\20\u012d\3\2\2\2\22\u0132\3\2\2\2\24\u0135\3\2\2\2\26\u0140\3"+ "\2\2\2\30\u0145\3\2\2\2\32\u014d\3\2\2\2\34\u0159\3\2\2\2\36\u0162\3\2"+ "\2\2 \u016b\3\2\2\2\"\u0172\3\2\2\2$\u017d\3\2\2\2&\u0185\3\2\2\2(\u018e"+ "\3\2\2\2*\u019f\3\2\2\2,\u01a7\3\2\2\2.\u01ba\3\2\2\2\60\u01be\3\2\2\2"+ "\62\u01c4\3\2\2\2\64\u01c7\3\2\2\2\66\u01cc\3\2\2\28\u01da\3\2\2\2:\u01e3"+ "\3\2\2\2<\u01e5\3\2\2\2>\u01ed\3\2\2\2@\u01ef\3\2\2\2B\u01f8\3\2\2\2D"+ "\u0206\3\2\2\2F\u020e\3\2\2\2H\u0215\3\2\2\2J\u0218\3\2\2\2L\u0220\3\2"+ "\2\2N\u0225\3\2\2\2P\u0231\3\2\2\2R\u0237\3\2\2\2T\u0241\3\2\2\2V\u0243"+ "\3\2\2\2X\u025f\3\2\2\2Z\u0261\3\2\2\2\\\u0263\3\2\2\2^\u0265\3\2\2\2"+ "`\u0277\3\2\2\2b\u0279\3\2\2\2d\u0287\3\2\2\2f\u028b\3\2\2\2h\u028d\3"+ "\2\2\2j\u029e\3\2\2\2l\u02a0\3\2\2\2n\u02a8\3\2\2\2p\u02ae\3\2\2\2r\u02b9"+ "\3\2\2\2t\u02bb\3\2\2\2v\u02bd\3\2\2\2x\u02d9\3\2\2\2z\u02db\3\2\2\2|"+ "\u02e9\3\2\2\2~\u02eb\3\2\2\2\u0080\u02ed\3\2\2\2\u0082\u02f0\3\2\2\2"+ "\u0084\u02f4\3\2\2\2\u0086\u02fe\3\2\2\2\u0088\u0306\3\2\2\2\u008a\u030e"+ "\3\2\2\2\u008c\u0315\3\2\2\2\u008e\u0317\3\2\2\2\u0090\u0327\3\2\2\2\u0092"+ "\u032c\3\2\2\2\u0094\u0335\3\2\2\2\u0096\u034c\3\2\2\2\u0098\u0350\3\2"+ "\2\2\u009a\u0352\3\2\2\2\u009c\u0358\3\2\2\2\u009e\u035a\3\2\2\2\u00a0"+ "\u035d\3\2\2\2\u00a2\u036a\3\2\2\2\u00a4\u036c\3\2\2\2\u00a6\u036f\3\2"+ "\2\2\u00a8\u0376\3\2\2\2\u00aa\u03c6\3\2\2\2\u00ac\u03c8\3\2\2\2\u00ae"+ "\u03cf\3\2\2\2\u00b0\u03d5\3\2\2\2\u00b2\u03d9\3\2\2\2\u00b4\u03e9\3\2"+ "\2\2\u00b6\u03fd\3\2\2\2\u00b8\u040b\3\2\2\2\u00ba\u040f\3\2\2\2\u00bc"+ "\u0411\3\2\2\2\u00be\u0417\3\2\2\2\u00c0\u0419\3\2\2\2\u00c2\u041d\3\2"+ "\2\2\u00c4\u0425\3\2\2\2\u00c6\u0427\3\2\2\2\u00c8\u0436\3\2\2\2\u00ca"+ "\u04c8\3\2\2\2\u00cc\u04d3\3\2\2\2\u00ce\u04d7\3\2\2\2\u00d0\u04da\3\2"+ "\2\2\u00d2\u04df\3\2\2\2\u00d4\u04e3\3\2\2\2\u00d6\u0501\3\2\2\2\u00d8"+ "\u0505\3\2\2\2\u00da\u0509\3\2\2\2\u00dc\u00de\5\4\3\2\u00dd\u00dc\3\2"+ "\2\2\u00dd\u00de\3\2\2\2\u00de\u00e2\3\2\2\2\u00df\u00e1\5\6\4\2\u00e0"+ "\u00df\3\2\2\2\u00e1\u00e4\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e2\u00e3\3\2"+ "\2\2\u00e3\u00e8\3\2\2\2\u00e4\u00e2\3\2\2\2\u00e5\u00e7\5\b\5\2\u00e6"+ "\u00e5\3\2\2\2\u00e7\u00ea\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e8\u00e9\3\2"+ "\2\2\u00e9\u00eb\3\2\2\2\u00ea\u00e8\3\2\2\2\u00eb\u00ec\7\2\2\3\u00ec"+ "\3\3\2\2\2\u00ed\u00ee\7\3\2\2\u00ee\u00ef\5z>\2\u00ef\u00f0\7\4\2\2\u00f0"+ "\5\3\2\2\2\u00f1\u00f3\7\5\2\2\u00f2\u00f4\7\6\2\2\u00f3\u00f2\3\2\2\2"+ "\u00f3\u00f4\3\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u00f8\5z>\2\u00f6\u00f7"+ "\7\7\2\2\u00f7\u00f9\7\b\2\2\u00f8\u00f6\3\2\2\2\u00f8\u00f9\3\2\2\2\u00f9"+ "\u00fa\3\2\2\2\u00fa\u00fb\7\4\2\2\u00fb\7\3\2\2\2\u00fc\u00fe\5\20\t"+ "\2\u00fd\u00fc\3\2\2\2\u00fe\u0101\3\2\2\2\u00ff\u00fd\3\2\2\2\u00ff\u0100"+ "\3\2\2\2\u0100\u0105\3\2\2\2\u0101\u00ff\3\2\2\2\u0102\u0106\5\n\6\2\u0103"+ "\u0106\5\16\b\2\u0104\u0106\5\f\7\2\u0105\u0102\3\2\2\2\u0105\u0103\3"+ "\2\2\2\u0105\u0104\3\2\2\2\u0106\u0109\3\2\2\2\u0107\u0109\7\4\2\2\u0108"+ "\u00ff\3\2\2\2\u0108\u0107\3\2\2\2\u0109\t\3\2\2\2\u010a\u010b\7\t\2\2"+ "\u010b\u010d\7d\2\2\u010c\u010e\5\24\13\2\u010d\u010c\3\2\2\2\u010d\u010e"+ "\3\2\2\2\u010e\u0111\3\2\2\2\u010f\u0110\7\n\2\2\u0110\u0112\5`\61\2\u0111"+ "\u010f\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0115\3\2\2\2\u0113\u0114\7\13"+ "\2\2\u0114\u0116\5$\23\2\u0115\u0113\3\2\2\2\u0115\u0116\3\2\2\2\u0116"+ "\u0117\3\2\2\2\u0117\u0118\5&\24\2\u0118\13\3\2\2\2\u0119\u011a\7b\2\2"+ "\u011a\u011d\7d\2\2\u011b\u011c\7\13\2\2\u011c\u011e\5$\23\2\u011d\u011b"+ "\3\2\2\2\u011d\u011e\3\2\2\2\u011e\u011f\3\2\2\2\u011f\u0120\5\32\16\2"+ "\u0120\r\3\2\2\2\u0121\u0124\5\"\22\2\u0122\u0124\5\u0090I\2\u0123\u0121"+ "\3\2\2\2\u0123\u0122\3\2\2\2\u0124\17\3\2\2\2\u0125\u012e\5\u0084C\2\u0126"+ "\u012e\7\f\2\2\u0127\u012e\7\r\2\2\u0128\u012e\7\16\2\2\u0129\u012e\7"+ "\17\2\2\u012a\u012e\7\6\2\2\u012b\u012e\7\20\2\2\u012c\u012e\7\21\2\2"+ "\u012d\u0125\3\2\2\2\u012d\u0126\3\2\2\2\u012d\u0127\3\2\2\2\u012d\u0128"+ "\3\2\2\2\u012d\u0129\3\2\2\2\u012d\u012a\3\2\2\2\u012d\u012b\3\2\2\2\u012d"+ "\u012c\3\2\2\2\u012e\21\3\2\2\2\u012f\u0131\5X-\2\u0130\u012f\3\2\2\2"+ "\u0131\u0134\3\2\2\2\u0132\u0130\3\2\2\2\u0132\u0133\3\2\2\2\u0133\23"+ "\3\2\2\2\u0134\u0132\3\2\2\2\u0135\u0136\7\22\2\2\u0136\u013b\5\26\f\2"+ "\u0137\u0138\7\23\2\2\u0138\u013a\5\26\f\2\u0139\u0137\3\2\2\2\u013a\u013d"+ "\3\2\2\2\u013b\u0139\3\2\2\2\u013b\u013c\3\2\2\2\u013c\u013e\3\2\2\2\u013d"+ "\u013b\3\2\2\2\u013e\u013f\7\24\2\2\u013f\25\3\2\2\2\u0140\u0143\7d\2"+ "\2\u0141\u0142\7\n\2\2\u0142\u0144\5\30\r\2\u0143\u0141\3\2\2\2\u0143"+ "\u0144\3\2\2\2\u0144\27\3\2\2\2\u0145\u014a\5`\61\2\u0146\u0147\7\25\2"+ "\2\u0147\u0149\5`\61\2\u0148\u0146\3\2\2\2\u0149\u014c\3\2\2\2\u014a\u0148"+ "\3\2\2\2\u014a\u014b\3\2\2\2\u014b\31\3\2\2\2\u014c\u014a\3\2\2\2\u014d"+ "\u014f\7\26\2\2\u014e\u0150\5\34\17\2\u014f\u014e\3\2\2\2\u014f\u0150"+ "\3\2\2\2\u0150\u0152\3\2\2\2\u0151\u0153\7\23\2\2\u0152\u0151\3\2\2\2"+ "\u0152\u0153\3\2\2\2\u0153\u0155\3\2\2\2\u0154\u0156\5 \21\2\u0155\u0154"+ "\3\2\2\2\u0155\u0156\3\2\2\2\u0156\u0157\3\2\2\2\u0157\u0158\7\27\2\2"+ "\u0158\33\3\2\2\2\u0159\u015e\5\36\20\2\u015a\u015b\7\23\2\2\u015b\u015d"+ "\5\36\20\2\u015c\u015a\3\2\2\2\u015d\u0160\3\2\2\2\u015e\u015c\3\2\2\2"+ "\u015e\u015f\3\2\2\2\u015f\35\3\2\2\2\u0160\u015e\3\2\2\2\u0161\u0163"+ "\5\u0082B\2\u0162\u0161\3\2\2\2\u0162\u0163\3\2\2\2\u0163\u0164\3\2\2"+ "\2\u0164\u0166\7d\2\2\u0165\u0167\5\u00dan\2\u0166\u0165\3\2\2\2\u0166"+ "\u0167\3\2\2\2\u0167\u0169\3\2\2\2\u0168\u016a\5&\24\2\u0169\u0168\3\2"+ "\2\2\u0169\u016a\3\2\2\2\u016a\37\3\2\2\2\u016b\u016f\7\4\2\2\u016c\u016e"+ "\5*\26\2\u016d\u016c\3\2\2\2\u016e\u0171\3\2\2\2\u016f\u016d\3\2\2\2\u016f"+ "\u0170\3\2\2\2\u0170!\3\2\2\2\u0171\u016f\3\2\2\2\u0172\u0173\7\30\2\2"+ "\u0173\u0175\7d\2\2\u0174\u0176\5\24\13\2\u0175\u0174\3\2\2\2\u0175\u0176"+ "\3\2\2\2\u0176\u0179\3\2\2\2\u0177\u0178\7\n\2\2\u0178\u017a\5$\23\2\u0179"+ "\u0177\3\2\2\2\u0179\u017a\3\2\2\2\u017a\u017b\3\2\2\2\u017b\u017c\5("+ "\25\2\u017c#\3\2\2\2\u017d\u0182\5`\61\2\u017e\u017f\7\23\2\2\u017f\u0181"+ "\5`\61\2\u0180\u017e\3\2\2\2\u0181\u0184\3\2\2\2\u0182\u0180\3\2\2\2\u0182"+ "\u0183\3\2\2\2\u0183%\3\2\2\2\u0184\u0182\3\2\2\2\u0185\u0189\7\26\2\2"+ "\u0186\u0188\5*\26\2\u0187\u0186\3\2\2\2\u0188\u018b\3\2\2\2\u0189\u0187"+ "\3\2\2\2\u0189\u018a\3\2\2\2\u018a\u018c\3\2\2\2\u018b\u0189\3\2\2\2\u018c"+ "\u018d\7\27\2\2\u018d\'\3\2\2\2\u018e\u0192\7\26\2\2\u018f\u0191\58\35"+ "\2\u0190\u018f\3\2\2\2\u0191\u0194\3\2\2\2\u0192\u0190\3\2\2\2\u0192\u0193"+ "\3\2\2\2\u0193\u0195\3\2\2\2\u0194\u0192\3\2\2\2\u0195\u0196\7\27\2\2"+ "\u0196)\3\2\2\2\u0197\u01a0\7\4\2\2\u0198\u019a\7\6\2\2\u0199\u0198\3"+ "\2\2\2\u0199\u019a\3\2\2\2\u019a\u019b\3\2\2\2\u019b\u01a0\5\u00a0Q\2"+ "\u019c\u019d\5\22\n\2\u019d\u019e\5,\27\2\u019e\u01a0\3\2\2\2\u019f\u0197"+ "\3\2\2\2\u019f\u0199\3\2\2\2\u019f\u019c\3\2\2\2\u01a0+\3\2\2\2\u01a1"+ "\u01a8\5\62\32\2\u01a2\u01a8\5.\30\2\u01a3\u01a8\5\64\33\2\u01a4\u01a8"+ "\5\66\34\2\u01a5\u01a8\5\16\b\2\u01a6\u01a8\5\n\6\2\u01a7\u01a1\3\2\2"+ "\2\u01a7\u01a2\3\2\2\2\u01a7\u01a3\3\2\2\2\u01a7\u01a4\3\2\2\2\u01a7\u01a5"+ "\3\2\2\2\u01a7\u01a6\3\2\2\2\u01a8-\3\2\2\2\u01a9\u01aa\5`\61\2\u01aa"+ "\u01ab\7d\2\2\u01ab\u01b0\5n8\2\u01ac\u01ad\7\31\2\2\u01ad\u01af\7\32"+ "\2\2\u01ae\u01ac\3\2\2\2\u01af\u01b2\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b0"+ "\u01b1\3\2\2\2\u01b1\u01b3\3\2\2\2\u01b2\u01b0\3\2\2\2\u01b3\u01b4\5\60"+ "\31\2\u01b4\u01bb\3\2\2\2\u01b5\u01b6\7\33\2\2\u01b6\u01b7\7d\2\2\u01b7"+ "\u01b8\5n8\2\u01b8\u01b9\5\60\31\2\u01b9\u01bb\3\2\2\2\u01ba\u01a9\3\2"+ "\2\2\u01ba\u01b5\3\2\2\2\u01bb/\3\2\2\2\u01bc\u01bd\7\34\2\2\u01bd\u01bf"+ "\5l\67\2\u01be\u01bc\3\2\2\2\u01be\u01bf\3\2\2\2\u01bf\u01c2\3\2\2\2\u01c0"+ "\u01c3\5t;\2\u01c1\u01c3\7\4\2\2\u01c2\u01c0\3\2\2\2\u01c2\u01c1\3\2\2"+ "\2\u01c3\61\3\2\2\2\u01c4\u01c5\5\24\13\2\u01c5\u01c6\5.\30\2\u01c6\63"+ "\3\2\2\2\u01c7\u01c8\5`\61\2\u01c8\u01c9\5J&\2\u01c9\u01ca\7\4\2\2\u01ca"+ "\65\3\2\2\2\u01cb\u01cd\5\24\13\2\u01cc\u01cb\3\2\2\2\u01cc\u01cd\3\2"+ "\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cf\7d\2\2\u01cf\u01d2\5n8\2\u01d0\u01d1"+ "\7\34\2\2\u01d1\u01d3\5l\67\2\u01d2\u01d0\3\2\2\2\u01d2\u01d3\3\2\2\2"+ "\u01d3\u01d4\3\2\2\2\u01d4\u01d5\5v<\2\u01d5\67\3\2\2\2\u01d6\u01d7\5"+ "\22\n\2\u01d7\u01d8\5:\36\2\u01d8\u01db\3\2\2\2\u01d9\u01db\7\4\2\2\u01da"+ "\u01d6\3\2\2\2\u01da\u01d9\3\2\2\2\u01db9\3\2\2\2\u01dc\u01e4\5<\37\2"+ "\u01dd\u01e4\5D#\2\u01de\u01df\7\33\2\2\u01df\u01e0\7d\2\2\u01e0\u01e4"+ "\5F$\2\u01e1\u01e4\5\16\b\2\u01e2\u01e4\5\n\6\2\u01e3\u01dc\3\2\2\2\u01e3"+ "\u01dd\3\2\2\2\u01e3\u01de\3\2\2\2\u01e3\u01e1\3\2\2\2\u01e3\u01e2\3\2"+ "\2\2\u01e4;\3\2\2\2\u01e5\u01e6\5`\61\2\u01e6\u01e7\7d\2\2\u01e7\u01e8"+ "\5> \2\u01e8=\3\2\2\2\u01e9\u01ea\5N(\2\u01ea\u01eb\7\4\2\2\u01eb\u01ee"+ "\3\2\2\2\u01ec\u01ee\5B\"\2\u01ed\u01e9\3\2\2\2\u01ed\u01ec\3\2\2\2\u01ee"+ "?\3\2\2\2\u01ef\u01f2\5n8\2\u01f0\u01f1\7\34\2\2\u01f1\u01f3\5l\67\2\u01f2"+ "\u01f0\3\2\2\2\u01f2\u01f3\3\2\2\2\u01f3\u01f6\3\2\2\2\u01f4\u01f7\5t"+ ";\2\u01f5\u01f7\7\4\2\2\u01f6\u01f4\3\2\2\2\u01f6\u01f5\3\2\2\2\u01f7"+ "A\3\2\2\2\u01f8\u01fd\5n8\2\u01f9\u01fa\7\31\2\2\u01fa\u01fc\7\32\2\2"+ "\u01fb\u01f9\3\2\2\2\u01fc\u01ff\3\2\2\2\u01fd\u01fb\3\2\2\2\u01fd\u01fe"+ "\3\2\2\2\u01fe\u0202\3\2\2\2\u01ff\u01fd\3\2\2\2\u0200\u0201\7\34\2\2"+ "\u0201\u0203\5l\67\2\u0202\u0200\3\2\2\2\u0202\u0203\3\2\2\2\u0203\u0204"+ "\3\2\2\2\u0204\u0205\7\4\2\2\u0205C\3\2\2\2\u0206\u0209\5\24\13\2\u0207"+ "\u020a\5`\61\2\u0208\u020a\7\33\2\2\u0209\u0207\3\2\2\2\u0209\u0208\3"+ "\2\2\2\u020a\u020b\3\2\2\2\u020b\u020c\7d\2\2\u020c\u020d\5B\"\2\u020d"+ "E\3\2\2\2\u020e\u0211\5n8\2\u020f\u0210\7\34\2\2\u0210\u0212\5l\67\2\u0211"+ "\u020f\3\2\2\2\u0211\u0212\3\2\2\2\u0212\u0213\3\2\2\2\u0213\u0214\7\4"+ "\2\2\u0214G\3\2\2\2\u0215\u0216\7d\2\2\u0216\u0217\5P)\2\u0217I\3\2\2"+ "\2\u0218\u021d\5L\'\2\u0219\u021a\7\23\2\2\u021a\u021c\5L\'\2\u021b\u0219"+ "\3\2\2\2\u021c\u021f\3\2\2\2\u021d\u021b\3\2\2\2\u021d\u021e\3\2\2\2\u021e"+ "K\3\2\2\2\u021f\u021d\3\2\2\2\u0220\u0223\5R*\2\u0221\u0222\7\35\2\2\u0222"+ "\u0224\5T+\2\u0223\u0221\3\2\2\2\u0223\u0224\3\2\2\2\u0224M\3\2\2\2\u0225"+ "\u022a\5P)\2\u0226\u0227\7\23\2\2\u0227\u0229\5H%\2\u0228\u0226\3\2\2"+ "\2\u0229\u022c\3\2\2\2\u022a\u0228\3\2\2\2\u022a\u022b\3\2\2\2\u022bO"+ "\3\2\2\2\u022c\u022a\3\2\2\2\u022d\u022e\7\31\2\2\u022e\u0230\7\32\2\2"+ "\u022f\u022d\3\2\2\2\u0230\u0233\3\2\2\2\u0231\u022f\3\2\2\2\u0231\u0232"+ "\3\2\2\2\u0232\u0234\3\2\2\2\u0233\u0231\3\2\2\2\u0234\u0235\7\35\2\2"+ "\u0235\u0236\5T+\2\u0236Q\3\2\2\2\u0237\u023c\7d\2\2\u0238\u0239\7\31"+ "\2\2\u0239\u023b\7\32\2\2\u023a\u0238\3\2\2\2\u023b\u023e\3\2\2\2\u023c"+ "\u023a\3\2\2\2\u023c\u023d\3\2\2\2\u023dS\3\2\2\2\u023e\u023c\3\2\2\2"+ "\u023f\u0242\5V,\2\u0240\u0242\5\u00c8e\2\u0241\u023f\3\2\2\2\u0241\u0240"+ "\3\2\2\2\u0242U\3\2\2\2\u0243\u024f\7\26\2\2\u0244\u0249\5T+\2\u0245\u0246"+ "\7\23\2\2\u0246\u0248\5T+\2\u0247\u0245\3\2\2\2\u0248\u024b\3\2\2\2\u0249"+ "\u0247\3\2\2\2\u0249\u024a\3\2\2\2\u024a\u024d\3\2\2\2\u024b\u0249\3\2"+ "\2\2\u024c\u024e\7\23\2\2\u024d\u024c\3\2\2\2\u024d\u024e\3\2\2\2\u024e"+ "\u0250\3\2\2\2\u024f\u0244\3\2\2\2\u024f\u0250\3\2\2\2\u0250\u0251\3\2"+ "\2\2\u0251\u0252\7\27\2\2\u0252W\3\2\2\2\u0253\u0260\5\u0084C\2\u0254"+ "\u0260\7\f\2\2\u0255\u0260\7\r\2\2\u0256\u0260\7\16\2\2\u0257\u0260\7"+ "\6\2\2\u0258\u0260\7\17\2\2\u0259\u0260\7\20\2\2\u025a\u0260\7\36\2\2"+ "\u025b\u0260\7\37\2\2\u025c\u0260\7 \2\2\u025d\u0260\7!\2\2\u025e\u0260"+ "\7\21\2\2\u025f\u0253\3\2\2\2\u025f\u0254\3\2\2\2\u025f\u0255\3\2\2\2"+ "\u025f\u0256\3\2\2\2\u025f\u0257\3\2\2\2\u025f\u0258\3\2\2\2\u025f\u0259"+ "\3\2\2\2\u025f\u025a\3\2\2\2\u025f\u025b\3\2\2\2\u025f\u025c\3\2\2\2\u025f"+ "\u025d\3\2\2\2\u025f\u025e\3\2\2\2\u0260Y\3\2\2\2\u0261\u0262\5z>\2\u0262"+ "[\3\2\2\2\u0263\u0264\7d\2\2\u0264]\3\2\2\2\u0265\u0266\5z>\2\u0266_\3"+ "\2\2\2\u0267\u026c\5b\62\2\u0268\u0269\7\31\2\2\u0269\u026b\7\32\2\2\u026a"+ "\u0268\3\2\2\2\u026b\u026e\3\2\2\2\u026c\u026a\3\2\2\2\u026c\u026d\3\2"+ "\2\2\u026d\u0278\3\2\2\2\u026e\u026c\3\2\2\2\u026f\u0274\5d\63\2\u0270"+ "\u0271\7\31\2\2\u0271\u0273\7\32\2\2\u0272\u0270\3\2\2\2\u0273\u0276\3"+ "\2\2\2\u0274\u0272\3\2\2\2\u0274\u0275\3\2\2\2\u0275\u0278\3\2\2\2\u0276"+ "\u0274\3\2\2\2\u0277\u0267\3\2\2\2\u0277\u026f\3\2\2\2\u0278a\3\2\2\2"+ "\u0279\u027b\7d\2\2\u027a\u027c\5h\65\2\u027b\u027a\3\2\2\2\u027b\u027c"+ "\3\2\2\2\u027c\u0284\3\2\2\2\u027d\u027e\7\7\2\2\u027e\u0280\7d\2\2\u027f"+ "\u0281\5h\65\2\u0280\u027f\3\2\2\2\u0280\u0281\3\2\2\2\u0281\u0283\3\2"+ "\2\2\u0282\u027d\3\2\2\2\u0283\u0286\3\2\2\2\u0284\u0282\3\2\2\2\u0284"+ "\u0285\3\2\2\2\u0285c\3\2\2\2\u0286\u0284\3\2\2\2\u0287\u0288\t\2\2\2"+ "\u0288e\3\2\2\2\u0289\u028c\7\20\2\2\u028a\u028c\5\u0084C\2\u028b\u0289"+ "\3\2\2\2\u028b\u028a\3\2\2\2\u028cg\3\2\2\2\u028d\u028e\7\22\2\2\u028e"+ "\u0293\5j\66\2\u028f\u0290\7\23\2\2\u0290\u0292\5j\66\2\u0291\u028f\3"+ "\2\2\2\u0292\u0295\3\2\2\2\u0293\u0291\3\2\2\2\u0293\u0294\3\2\2\2\u0294"+ "\u0296\3\2\2\2\u0295\u0293\3\2\2\2\u0296\u0297\7\24\2\2\u0297i\3\2\2\2"+ "\u0298\u029f\5`\61\2\u0299\u029c\7*\2\2\u029a\u029b\t\3\2\2\u029b\u029d"+ "\5`\61\2\u029c\u029a\3\2\2\2\u029c\u029d\3\2\2\2\u029d\u029f\3\2\2\2\u029e"+ "\u0298\3\2\2\2\u029e\u0299\3\2\2\2\u029fk\3\2\2\2\u02a0\u02a5\5z>\2\u02a1"+ "\u02a2\7\23\2\2\u02a2\u02a4\5z>\2\u02a3\u02a1\3\2\2\2\u02a4\u02a7\3\2"+ "\2\2\u02a5\u02a3\3\2\2\2\u02a5\u02a6\3\2\2\2\u02a6m\3\2\2\2\u02a7\u02a5"+ "\3\2\2\2\u02a8\u02aa\7,\2\2\u02a9\u02ab\5p9\2\u02aa\u02a9\3\2\2\2\u02aa"+ "\u02ab\3\2\2\2\u02ab\u02ac\3\2\2\2\u02ac\u02ad\7-\2\2\u02ado\3\2\2\2\u02ae"+ "\u02af\5\u00a8U\2\u02af\u02b0\5`\61\2\u02b0\u02b1\5r:\2\u02b1q\3\2\2\2"+ "\u02b2\u02b5\5R*\2\u02b3\u02b4\7\23\2\2\u02b4\u02b6\5p9\2\u02b5\u02b3"+ "\3\2\2\2\u02b5\u02b6\3\2\2\2\u02b6\u02ba\3\2\2\2\u02b7\u02b8\7.\2\2\u02b8"+ "\u02ba\5R*\2\u02b9\u02b2\3\2\2\2\u02b9\u02b7\3\2\2\2\u02bas\3\2\2\2\u02bb"+ "\u02bc\5\u00a0Q\2\u02bcu\3\2\2\2\u02bd\u02bf\7\26\2\2\u02be\u02c0\5x="+ "\2\u02bf\u02be\3\2\2\2\u02bf\u02c0\3\2\2\2\u02c0\u02c4\3\2\2\2\u02c1\u02c3"+ "\5\u00a2R\2\u02c2\u02c1\3\2\2\2\u02c3\u02c6\3\2\2\2\u02c4\u02c2\3\2\2"+ "\2\u02c4\u02c5\3\2\2\2\u02c5\u02c7\3\2\2\2\u02c6\u02c4\3\2\2\2\u02c7\u02c8"+ "\7\27\2\2\u02c8w\3\2\2\2\u02c9\u02cb\5\u00d8m\2\u02ca\u02c9\3\2\2\2\u02ca"+ "\u02cb\3\2\2\2\u02cb\u02cc\3\2\2\2\u02cc\u02cd\t\4\2\2\u02cd\u02ce\5\u00da"+ "n\2\u02ce\u02cf\7\4\2\2\u02cf\u02da\3\2\2\2\u02d0\u02d1\5\u00caf\2\u02d1"+ "\u02d3\7\7\2\2\u02d2\u02d4\5\u00d8m\2\u02d3\u02d2\3\2\2\2\u02d3\u02d4"+ "\3\2\2\2\u02d4\u02d5\3\2\2\2\u02d5\u02d6\7+\2\2\u02d6\u02d7\5\u00dan\2"+ "\u02d7\u02d8\7\4\2\2\u02d8\u02da\3\2\2\2\u02d9\u02ca\3\2\2\2\u02d9\u02d0"+ "\3\2\2\2\u02day\3\2\2\2\u02db\u02e0\7d\2\2\u02dc\u02dd\7\7\2\2\u02dd\u02df"+ "\7d\2\2\u02de\u02dc\3\2\2\2\u02df\u02e2\3\2\2\2\u02e0\u02de\3\2\2\2\u02e0"+ "\u02e1\3\2\2\2\u02e1{\3\2\2\2\u02e2\u02e0\3\2\2\2\u02e3\u02ea\5~@\2\u02e4"+ "\u02ea\7_\2\2\u02e5\u02ea\7`\2\2\u02e6\u02ea\7a\2\2\u02e7\u02ea\5\u0080"+ "A\2\u02e8\u02ea\7\60\2\2\u02e9\u02e3\3\2\2\2\u02e9\u02e4\3\2\2\2\u02e9"+ "\u02e5\3\2\2\2\u02e9\u02e6\3\2\2\2\u02e9\u02e7\3\2\2\2\u02e9\u02e8\3\2"+ "\2\2\u02ea}\3\2\2\2\u02eb\u02ec\t\5\2\2\u02ec\177\3\2\2\2\u02ed\u02ee"+ "\t\6\2\2\u02ee\u0081\3\2\2\2\u02ef\u02f1\5\u0084C\2\u02f0\u02ef\3\2\2"+ "\2\u02f1\u02f2\3\2\2\2\u02f2\u02f0\3\2\2\2\u02f2\u02f3\3\2\2\2\u02f3\u0083"+ "\3\2\2\2\u02f4\u02f5\7\63\2\2\u02f5\u02fc\5\u0086D\2\u02f6\u02f9\7,\2"+ "\2\u02f7\u02fa\5\u0088E\2\u02f8\u02fa\5\u008cG\2\u02f9\u02f7\3\2\2\2\u02f9"+ "\u02f8\3\2\2\2\u02f9\u02fa\3\2\2\2\u02fa\u02fb\3\2\2\2\u02fb\u02fd\7-"+ "\2\2\u02fc\u02f6\3\2\2\2\u02fc\u02fd\3\2\2\2\u02fd\u0085\3\2\2\2\u02fe"+ "\u0303\7d\2\2\u02ff\u0300\7\7\2\2\u0300\u0302\7d\2\2\u0301\u02ff\3\2\2"+ "\2\u0302\u0305\3\2\2\2\u0303\u0301\3\2\2\2\u0303\u0304\3\2\2\2\u0304\u0087"+ "\3\2\2\2\u0305\u0303\3\2\2\2\u0306\u030b\5\u008aF\2\u0307\u0308\7\23\2"+ "\2\u0308\u030a\5\u008aF\2\u0309\u0307\3\2\2\2\u030a\u030d\3\2\2\2\u030b"+ "\u0309\3\2\2\2\u030b\u030c\3\2\2\2\u030c\u0089\3\2\2\2\u030d\u030b\3\2"+ "\2\2\u030e\u030f\7d\2\2\u030f\u0310\7\35\2\2\u0310\u0311\5\u008cG\2\u0311"+ "\u008b\3\2\2\2\u0312\u0316\5\u00c8e\2\u0313\u0316\5\u0084C\2\u0314\u0316"+ "\5\u008eH\2\u0315\u0312\3\2\2\2\u0315\u0313\3\2\2\2\u0315\u0314\3\2\2"+ "\2\u0316\u008d\3\2\2\2\u0317\u0320\7\26\2\2\u0318\u031d\5\u008cG\2\u0319"+ "\u031a\7\23\2\2\u031a\u031c\5\u008cG\2\u031b\u0319\3\2\2\2\u031c\u031f"+ "\3\2\2\2\u031d\u031b\3\2\2\2\u031d\u031e\3\2\2\2\u031e\u0321\3\2\2\2\u031f"+ "\u031d\3\2\2\2\u0320\u0318\3\2\2\2\u0320\u0321\3\2\2\2\u0321\u0323\3\2"+ "\2\2\u0322\u0324\7\23\2\2\u0323\u0322\3\2\2\2\u0323\u0324\3\2\2\2\u0324"+ "\u0325\3\2\2\2\u0325\u0326\7\27\2\2\u0326\u008f\3\2\2\2\u0327\u0328\7"+ "\63\2\2\u0328\u0329\7\30\2\2\u0329\u032a\7d\2\2\u032a\u032b\5\u0092J\2"+ "\u032b\u0091\3\2\2\2\u032c\u0330\7\26\2\2\u032d\u032f\5\u0094K\2\u032e"+ "\u032d\3\2\2\2\u032f\u0332\3\2\2\2\u0330\u032e\3\2\2\2\u0330\u0331\3\2"+ "\2\2\u0331\u0333\3\2\2\2\u0332\u0330\3\2\2\2\u0333\u0334\7\27\2\2\u0334"+ "\u0093\3\2\2\2\u0335\u0336\5\22\n\2\u0336\u0337\5\u0096L\2\u0337\u0095"+ "\3\2\2\2\u0338\u0339\5`\61\2\u0339\u033a\5\u0098M\2\u033a\u033b\7\4\2"+ "\2\u033b\u034d\3\2\2\2\u033c\u033e\5\n\6\2\u033d\u033f\7\4\2\2\u033e\u033d"+ "\3\2\2\2\u033e\u033f\3\2\2\2\u033f\u034d\3\2\2\2\u0340\u0342\5\"\22\2"+ "\u0341\u0343\7\4\2\2\u0342\u0341\3\2\2\2\u0342\u0343\3\2\2\2\u0343\u034d"+ "\3\2\2\2\u0344\u0346\5\f\7\2\u0345\u0347\7\4\2\2\u0346\u0345\3\2\2\2\u0346"+ "\u0347\3\2\2\2\u0347\u034d\3\2\2\2\u0348\u034a\5\u0090I\2\u0349\u034b"+ "\7\4\2\2\u034a\u0349\3\2\2\2\u034a\u034b\3\2\2\2\u034b\u034d\3\2\2\2\u034c"+ "\u0338\3\2\2\2\u034c\u033c\3\2\2\2\u034c\u0340\3\2\2\2\u034c\u0344\3\2"+ "\2\2\u034c\u0348\3\2\2\2\u034d\u0097\3\2\2\2\u034e\u0351\5\u009aN\2\u034f"+ "\u0351\5\u009cO\2\u0350\u034e\3\2\2\2\u0350\u034f\3\2\2\2\u0351\u0099"+ "\3\2\2\2\u0352\u0353\7d\2\2\u0353\u0354\7,\2\2\u0354\u0356\7-\2\2\u0355"+ "\u0357\5\u009eP\2\u0356\u0355\3\2\2\2\u0356\u0357\3\2\2\2\u0357\u009b"+ "\3\2\2\2\u0358\u0359\5J&\2\u0359\u009d\3\2\2\2\u035a\u035b\7\64\2\2\u035b"+ "\u035c\5\u008cG\2\u035c\u009f\3\2\2\2\u035d\u0361\7\26\2\2\u035e\u0360"+ "\5\u00a2R\2\u035f\u035e\3\2\2\2\u0360\u0363\3\2\2\2\u0361\u035f\3\2\2"+ "\2\u0361\u0362\3\2\2\2\u0362\u0364\3\2\2\2\u0363\u0361\3\2\2\2\u0364\u0365"+ "\7\27\2\2\u0365\u00a1\3\2\2\2\u0366\u036b\5\u00a4S\2\u0367\u036b\5\n\6"+ "\2\u0368\u036b\5\16\b\2\u0369\u036b\5\u00aaV\2\u036a\u0366\3\2\2\2\u036a"+ "\u0367\3\2\2\2\u036a\u0368\3\2\2\2\u036a\u0369\3\2\2\2\u036b\u00a3\3\2"+ "\2\2\u036c\u036d\5\u00a6T\2\u036d\u036e\7\4\2\2\u036e\u00a5\3\2\2\2\u036f"+ "\u0370\5\u00a8U\2\u0370\u0371\5`\61\2\u0371\u0372\5J&\2\u0372\u00a7\3"+ "\2\2\2\u0373\u0375\5f\64\2\u0374\u0373\3\2\2\2\u0375\u0378\3\2\2\2\u0376"+ "\u0374\3\2\2\2\u0376\u0377\3\2\2\2\u0377\u00a9\3\2\2\2\u0378\u0376\3\2"+ "\2\2\u0379\u03c7\5\u00a0Q\2\u037a\u037b\7c\2\2\u037b\u037e\5\u00c8e\2"+ "\u037c\u037d\7\65\2\2\u037d\u037f\5\u00c8e\2\u037e\u037c\3\2\2\2\u037e"+ "\u037f\3\2\2\2\u037f\u0380\3\2\2\2\u0380\u0381\7\4\2\2\u0381\u03c7\3\2"+ "\2\2\u0382\u0383\7\66\2\2\u0383\u0384\5\u00c0a\2\u0384\u0387\5\u00aaV"+ "\2\u0385\u0386\7\67\2\2\u0386\u0388\5\u00aaV\2\u0387\u0385\3\2\2\2\u0387"+ "\u0388\3\2\2\2\u0388\u03c7\3\2\2\2\u0389\u038a\78\2\2\u038a\u038b\7,\2"+ "\2\u038b\u038c\5\u00b8]\2\u038c\u038d\7-\2\2\u038d\u038e\5\u00aaV\2\u038e"+ "\u03c7\3\2\2\2\u038f\u0390\79\2\2\u0390\u0391\5\u00c0a\2\u0391\u0392\5"+ "\u00aaV\2\u0392\u03c7\3\2\2\2\u0393\u0394\7:\2\2\u0394\u0395\5\u00aaV"+ "\2\u0395\u0396\79\2\2\u0396\u0397\5\u00c0a\2\u0397\u0398\7\4\2\2\u0398"+ "\u03c7\3\2\2\2\u0399\u039a\7;\2\2\u039a\u03a2\5\u00a0Q\2\u039b\u039c\5"+ "\u00acW\2\u039c\u039d\7<\2\2\u039d\u039e\5\u00a0Q\2\u039e\u03a3\3\2\2"+ "\2\u039f\u03a3\5\u00acW\2\u03a0\u03a1\7<\2\2\u03a1\u03a3\5\u00a0Q\2\u03a2"+ "\u039b\3\2\2\2\u03a2\u039f\3\2\2\2\u03a2\u03a0\3\2\2\2\u03a3\u03c7\3\2"+ "\2\2\u03a4\u03a5\7=\2\2\u03a5\u03a6\5\u00c0a\2\u03a6\u03a7\5\u00b2Z\2"+ "\u03a7\u03c7\3\2\2\2\u03a8\u03a9\7\37\2\2\u03a9\u03aa\5\u00c0a\2\u03aa"+ "\u03ab\5\u00a0Q\2\u03ab\u03c7\3\2\2\2\u03ac\u03ae\7>\2\2\u03ad\u03af\5"+ "\u00c8e\2\u03ae\u03ad\3\2\2\2\u03ae\u03af\3\2\2\2\u03af\u03b0\3\2\2\2"+ "\u03b0\u03c7\7\4\2\2\u03b1\u03b2\7?\2\2\u03b2\u03b3\5\u00c8e\2\u03b3\u03b4"+ "\7\4\2\2\u03b4\u03c7\3\2\2\2\u03b5\u03b7\7@\2\2\u03b6\u03b8\7d\2\2\u03b7"+ "\u03b6\3\2\2\2\u03b7\u03b8\3\2\2\2\u03b8\u03b9\3\2\2\2\u03b9\u03c7\7\4"+ "\2\2\u03ba\u03bc\7A\2\2\u03bb\u03bd\7d\2\2\u03bc\u03bb\3\2\2\2\u03bc\u03bd"+ "\3\2\2\2\u03bd\u03be\3\2\2\2\u03be\u03c7\7\4\2\2\u03bf\u03c7\7\4\2\2\u03c0"+ "\u03c1\5\u00c4c\2\u03c1\u03c2\7\4\2\2\u03c2\u03c7\3\2\2\2\u03c3\u03c4"+ "\7d\2\2\u03c4\u03c5\7\65\2\2\u03c5\u03c7\5\u00aaV\2\u03c6\u0379\3\2\2"+ "\2\u03c6\u037a\3\2\2\2\u03c6\u0382\3\2\2\2\u03c6\u0389\3\2\2\2\u03c6\u038f"+ "\3\2\2\2\u03c6\u0393\3\2\2\2\u03c6\u0399\3\2\2\2\u03c6\u03a4\3\2\2\2\u03c6"+ "\u03a8\3\2\2\2\u03c6\u03ac\3\2\2\2\u03c6\u03b1\3\2\2\2\u03c6\u03b5\3\2"+ "\2\2\u03c6\u03ba\3\2\2\2\u03c6\u03bf\3\2\2\2\u03c6\u03c0\3\2\2\2\u03c6"+ "\u03c3\3\2\2\2\u03c7\u00ab\3\2\2\2\u03c8\u03cc\5\u00aeX\2\u03c9\u03cb"+ "\5\u00aeX\2\u03ca\u03c9\3\2\2\2\u03cb\u03ce\3\2\2\2\u03cc\u03ca\3\2\2"+ "\2\u03cc\u03cd\3\2\2\2\u03cd\u00ad\3\2\2\2\u03ce\u03cc\3\2\2\2\u03cf\u03d0"+ "\7B\2\2\u03d0\u03d1\7,\2\2\u03d1\u03d2\5\u00b0Y\2\u03d2\u03d3\7-\2\2\u03d3"+ "\u03d4\5\u00a0Q\2\u03d4\u00af\3\2\2\2\u03d5\u03d6\5\u00a8U\2\u03d6\u03d7"+ "\5`\61\2\u03d7\u03d8\5R*\2\u03d8\u00b1\3\2\2\2\u03d9\u03dd\7\26\2\2\u03da"+ "\u03dc\5\u00b4[\2\u03db\u03da\3\2\2\2\u03dc\u03df\3\2\2\2\u03dd\u03db"+ "\3\2\2\2\u03dd\u03de\3\2\2\2\u03de\u03e3\3\2\2\2\u03df\u03dd\3\2\2\2\u03e0"+ "\u03e2\5\u00b6\\\2\u03e1\u03e0\3\2\2\2\u03e2\u03e5\3\2\2\2\u03e3\u03e1"+ "\3\2\2\2\u03e3\u03e4\3\2\2\2\u03e4\u03e6\3\2\2\2\u03e5\u03e3\3\2\2\2\u03e6"+ "\u03e7\7\27\2\2\u03e7\u00b3\3\2\2\2\u03e8\u03ea\5\u00b6\\\2\u03e9\u03e8"+ "\3\2\2\2\u03ea\u03eb\3\2\2\2\u03eb\u03e9\3\2\2\2\u03eb\u03ec\3\2\2\2\u03ec"+ "\u03f0\3\2\2\2\u03ed\u03ef\5\u00a2R\2\u03ee\u03ed\3\2\2\2\u03ef\u03f2"+ "\3\2\2\2\u03f0\u03ee\3\2\2\2\u03f0\u03f1\3\2\2\2\u03f1\u00b5\3\2\2\2\u03f2"+ "\u03f0\3\2\2\2\u03f3\u03f4\7C\2\2\u03f4\u03f5\5\u00c6d\2\u03f5\u03f6\7"+ "\65\2\2\u03f6\u03fe\3\2\2\2\u03f7\u03f8\7C\2\2\u03f8\u03f9\5\\/\2\u03f9"+ "\u03fa\7\65\2\2\u03fa\u03fe\3\2\2\2\u03fb\u03fc\7\64\2\2\u03fc\u03fe\7"+ "\65\2\2\u03fd\u03f3\3\2\2\2\u03fd\u03f7\3\2\2\2\u03fd\u03fb\3\2\2\2\u03fe"+ "\u00b7\3\2\2\2\u03ff\u040c\5\u00bc_\2\u0400\u0402\5\u00ba^\2\u0401\u0400"+ "\3\2\2\2\u0401\u0402\3\2\2\2\u0402\u0403\3\2\2\2\u0403\u0405\7\4\2\2\u0404"+ "\u0406\5\u00c8e\2\u0405\u0404\3\2\2\2\u0405\u0406\3\2\2\2\u0406\u0407"+ "\3\2\2\2\u0407\u0409\7\4\2\2\u0408\u040a\5\u00be`\2\u0409\u0408\3\2\2"+ "\2\u0409\u040a\3\2\2\2\u040a\u040c\3\2\2\2\u040b\u03ff\3\2\2\2\u040b\u0401"+ "\3\2\2\2\u040c\u00b9\3\2\2\2\u040d\u0410\5\u00a6T\2\u040e\u0410\5\u00c2"+ "b\2\u040f\u040d\3\2\2\2\u040f\u040e\3\2\2\2\u0410\u00bb\3\2\2\2\u0411"+ "\u0412\5\u00a8U\2\u0412\u0413\5`\61\2\u0413\u0414\7d\2\2\u0414\u0415\7"+ "\65\2\2\u0415\u0416\5\u00c8e\2\u0416\u00bd\3\2\2\2\u0417\u0418\5\u00c2"+ "b\2\u0418\u00bf\3\2\2\2\u0419\u041a\7,\2\2\u041a\u041b\5\u00c8e\2\u041b"+ "\u041c\7-\2\2\u041c\u00c1\3\2\2\2\u041d\u0422\5\u00c8e\2\u041e\u041f\7"+ "\23\2\2\u041f\u0421\5\u00c8e\2\u0420\u041e\3\2\2\2\u0421\u0424\3\2\2\2"+ "\u0422\u0420\3\2\2\2\u0422\u0423\3\2\2\2\u0423\u00c3\3\2\2\2\u0424\u0422"+ "\3\2\2\2\u0425\u0426\5\u00c8e\2\u0426\u00c5\3\2\2\2\u0427\u0428\5\u00c8"+ "e\2\u0428\u00c7\3\2\2\2\u0429\u042a\be\1\2\u042a\u0437\5\u00caf\2\u042b"+ "\u042c\t\7\2\2\u042c\u0437\5\u00c8e\23\u042d\u042e\t\b\2\2\u042e\u0437"+ "\5\u00c8e\22\u042f\u0430\7,\2\2\u0430\u0431\5`\61\2\u0431\u0432\7-\2\2"+ "\u0432\u0433\5\u00c8e\21\u0433\u0437\3\2\2\2\u0434\u0435\7D\2\2\u0435"+ "\u0437\5\u00ccg\2\u0436\u0429\3\2\2\2\u0436\u042b\3\2\2\2\u0436\u042d"+ "\3\2\2\2\u0436\u042f\3\2\2\2\u0436\u0434\3\2\2\2\u0437\u04b6\3\2\2\2\u0438"+ "\u0439\f\17\2\2\u0439\u043a\t\t\2\2\u043a\u04b5\5\u00c8e\20\u043b\u043c"+ "\f\16\2\2\u043c\u043d\t\n\2\2\u043d\u04b5\5\u00c8e\17\u043e\u0446\f\r"+ "\2\2\u043f\u0440\7\22\2\2\u0440\u0447\7\22\2\2\u0441\u0442\7\24\2\2\u0442"+ "\u0443\7\24\2\2\u0443\u0447\7\24\2\2\u0444\u0445\7\24\2\2\u0445\u0447"+ "\7\24\2\2\u0446\u043f\3\2\2\2\u0446\u0441\3\2\2\2\u0446\u0444\3\2\2\2"+ "\u0447\u0448\3\2\2\2\u0448\u04b5\5\u00c8e\16\u0449\u0450\f\f\2\2\u044a"+ "\u044b\7\22\2\2\u044b\u0451\7\35\2\2\u044c\u044d\7\24\2\2\u044d\u0451"+ "\7\35\2\2\u044e\u0451\7\24\2\2\u044f\u0451\7\22\2\2\u0450\u044a\3\2\2"+ "\2\u0450\u044c\3\2\2\2\u0450\u044e\3\2\2\2\u0450\u044f\3\2\2\2\u0451\u0452"+ "\3\2\2\2\u0452\u04b5\5\u00c8e\r\u0453\u0454\f\n\2\2\u0454\u0455\t\13\2"+ "\2\u0455\u04b5\5\u00c8e\13\u0456\u0457\f\t\2\2\u0457\u0458\7\25\2\2\u0458"+ "\u04b5\5\u00c8e\n\u0459\u045a\f\b\2\2\u045a\u045b\7P\2\2\u045b\u04b5\5"+ "\u00c8e\t\u045c\u045d\f\7\2\2\u045d\u045e\7Q\2\2\u045e\u04b5\5\u00c8e"+ "\b\u045f\u0460\f\6\2\2\u0460\u0461\7R\2\2\u0461\u04b5\5\u00c8e\7\u0462"+ "\u0463\f\5\2\2\u0463\u0464\7S\2\2\u0464\u04b5\5\u00c8e\6\u0465\u0466\f"+ "\4\2\2\u0466\u0467\7*\2\2\u0467\u0468\5\u00c8e\2\u0468\u0469\7\65\2\2"+ "\u0469\u046a\5\u00c8e\5\u046a\u04b5\3\2\2\2\u046b\u047f\f\3\2\2\u046c"+ "\u0480\7T\2\2\u046d\u0480\7U\2\2\u046e\u0480\7V\2\2\u046f\u0480\7W\2\2"+ "\u0470\u0480\7X\2\2\u0471\u0480\7Y\2\2\u0472\u0480\7Z\2\2\u0473\u0480"+ "\7\35\2\2\u0474\u0475\7\24\2\2\u0475\u0476\7\24\2\2\u0476\u0480\7\35\2"+ "\2\u0477\u0478\7\24\2\2\u0478\u0479\7\24\2\2\u0479\u047a\7\24\2\2\u047a"+ "\u0480\7\35\2\2\u047b\u047c\7\22\2\2\u047c\u047d\7\22\2\2\u047d\u0480"+ "\7\35\2\2\u047e\u0480\7[\2\2\u047f\u046c\3\2\2\2\u047f\u046d\3\2\2\2\u047f"+ "\u046e\3\2\2\2\u047f\u046f\3\2\2\2\u047f\u0470\3\2\2\2\u047f\u0471\3\2"+ "\2\2\u047f\u0472\3\2\2\2\u047f\u0473\3\2\2\2\u047f\u0474\3\2\2\2\u047f"+ "\u0477\3\2\2\2\u047f\u047b\3\2\2\2\u047f\u047e\3\2\2\2\u0480\u0481\3\2"+ "\2\2\u0481\u04b5\5\u00c8e\3\u0482\u0483\f\34\2\2\u0483\u0484\7\7\2\2\u0484"+ "\u04b5\7d\2\2\u0485\u0486\f\33\2\2\u0486\u0487\7\7\2\2\u0487\u04b5\7/"+ "\2\2\u0488\u0489\f\32\2\2\u0489\u048a\7\7\2\2\u048a\u048b\7+\2\2\u048b"+ "\u048d\7,\2\2\u048c\u048e\5\u00c2b\2\u048d\u048c\3\2\2\2\u048d\u048e\3"+ "\2\2\2\u048e\u048f\3\2\2\2\u048f\u04b5\7-\2\2\u0490\u0491\f\31\2\2\u0491"+ "\u0492\7\7\2\2\u0492\u0493\7D\2\2\u0493\u0494\7d\2\2\u0494\u0496\7,\2"+ "\2\u0495\u0497\5\u00c2b\2\u0496\u0495\3\2\2\2\u0496\u0497\3\2\2\2\u0497"+ "\u0498\3\2\2\2\u0498\u04b5\7-\2\2\u0499\u049a\f\30\2\2\u049a\u049b\7\7"+ "\2\2\u049b\u049c\7+\2\2\u049c\u049d\7\7\2\2\u049d\u049f\7d\2\2\u049e\u04a0"+ "\5\u00dan\2\u049f\u049e\3\2\2\2\u049f\u04a0\3\2\2\2\u04a0\u04b5\3\2\2"+ "\2\u04a1\u04a2\f\27\2\2\u04a2\u04a3\7\7\2\2\u04a3\u04b5\5\u00d2j\2\u04a4"+ "\u04a5\f\26\2\2\u04a5\u04a6\7\31\2\2\u04a6\u04a7\5\u00c8e\2\u04a7\u04a8"+ "\7\32\2\2\u04a8\u04b5\3\2\2\2\u04a9\u04aa\f\25\2\2\u04aa\u04ac\7,\2\2"+ "\u04ab\u04ad\5\u00c2b\2\u04ac\u04ab\3\2\2\2\u04ac\u04ad\3\2\2\2\u04ad"+ "\u04ae\3\2\2\2\u04ae\u04b5\7-\2\2\u04af\u04b0\f\24\2\2\u04b0\u04b5\t\f"+ "\2\2\u04b1\u04b2\f\13\2\2\u04b2\u04b3\7M\2\2\u04b3\u04b5\5`\61\2\u04b4"+ "\u0438\3\2\2\2\u04b4\u043b\3\2\2\2\u04b4\u043e\3\2\2\2\u04b4\u0449\3\2"+ "\2\2\u04b4\u0453\3\2\2\2\u04b4\u0456\3\2\2\2\u04b4\u0459\3\2\2\2\u04b4"+ "\u045c\3\2\2\2\u04b4\u045f\3\2\2\2\u04b4\u0462\3\2\2\2\u04b4\u0465\3\2"+ "\2\2\u04b4\u046b\3\2\2\2\u04b4\u0482\3\2\2\2\u04b4\u0485\3\2\2\2\u04b4"+ "\u0488\3\2\2\2\u04b4\u0490\3\2\2\2\u04b4\u0499\3\2\2\2\u04b4\u04a1\3\2"+ "\2\2\u04b4\u04a4\3\2\2\2\u04b4\u04a9\3\2\2\2\u04b4\u04af\3\2\2\2\u04b4"+ "\u04b1\3\2\2\2\u04b5\u04b8\3\2\2\2\u04b6\u04b4\3\2\2\2\u04b6\u04b7\3\2"+ "\2\2\u04b7\u00c9\3\2\2\2\u04b8\u04b6\3\2\2\2\u04b9\u04ba\7,\2\2\u04ba"+ "\u04bb\5\u00c8e\2\u04bb\u04bc\7-\2\2\u04bc\u04c9\3\2\2\2\u04bd\u04c9\7"+ "/\2\2\u04be\u04c9\7+\2\2\u04bf\u04c9\5|?\2\u04c0\u04c9\7d\2\2\u04c1\u04c2"+ "\5`\61\2\u04c2\u04c3\7\7\2\2\u04c3\u04c4\7\t\2\2\u04c4\u04c9\3\2\2\2\u04c5"+ "\u04c6\7\33\2\2\u04c6\u04c7\7\7\2\2\u04c7\u04c9\7\t\2\2\u04c8\u04b9\3"+ "\2\2\2\u04c8\u04bd\3\2\2\2\u04c8\u04be\3\2\2\2\u04c8\u04bf\3\2\2\2\u04c8"+ "\u04c0\3\2\2\2\u04c8\u04c1\3\2\2\2\u04c8\u04c5\3\2\2\2\u04c9\u00cb\3\2"+ "\2\2\u04ca\u04cb\5\u00d8m\2\u04cb\u04cc\5\u00ceh\2\u04cc\u04cd\5\u00d6"+ "l\2\u04cd\u04d4\3\2\2\2\u04ce\u04d1\5\u00ceh\2\u04cf\u04d2\5\u00d4k\2"+ "\u04d0\u04d2\5\u00d6l\2\u04d1\u04cf\3\2\2\2\u04d1\u04d0\3\2\2\2\u04d2"+ "\u04d4\3\2\2\2\u04d3\u04ca\3\2\2\2\u04d3\u04ce\3\2\2\2\u04d4\u00cd\3\2"+ "\2\2\u04d5\u04d8\5b\62\2\u04d6\u04d8\5d\63\2\u04d7\u04d5\3\2\2\2\u04d7"+ "\u04d6\3\2\2\2\u04d8\u00cf\3\2\2\2\u04d9\u04db\5\u00d8m\2\u04da\u04d9"+ "\3\2\2\2\u04da\u04db\3\2\2\2\u04db\u04dc\3\2\2\2\u04dc\u04dd\7d\2\2\u04dd"+ "\u04de\5\u00d6l\2\u04de\u00d1\3\2\2\2\u04df\u04e0\5\u00d8m\2\u04e0\u04e1"+ "\7d\2\2\u04e1\u04e2\5\u00dan\2\u04e2\u00d3\3\2\2\2\u04e3\u04ff\7\31\2"+ "\2\u04e4\u04e9\7\32\2\2\u04e5\u04e6\7\31\2\2\u04e6\u04e8\7\32\2\2\u04e7"+ "\u04e5\3\2\2\2\u04e8\u04eb\3\2\2\2\u04e9\u04e7\3\2\2\2\u04e9\u04ea\3\2"+ "\2\2\u04ea\u04ec\3\2\2\2\u04eb\u04e9\3\2\2\2\u04ec\u0500\5V,\2\u04ed\u04ee"+ "\5\u00c8e\2\u04ee\u04f5\7\32\2\2\u04ef\u04f0\7\31\2\2\u04f0\u04f1\5\u00c8"+ "e\2\u04f1\u04f2\7\32\2\2\u04f2\u04f4\3\2\2\2\u04f3\u04ef\3\2\2\2\u04f4"+ "\u04f7\3\2\2\2\u04f5\u04f3\3\2\2\2\u04f5\u04f6\3\2\2\2\u04f6\u04fc\3\2"+ "\2\2\u04f7\u04f5\3\2\2\2\u04f8\u04f9\7\31\2\2\u04f9\u04fb\7\32\2\2\u04fa"+ "\u04f8\3\2\2\2\u04fb\u04fe\3\2\2\2\u04fc\u04fa\3\2\2\2\u04fc\u04fd\3\2"+ "\2\2\u04fd\u0500\3\2\2\2\u04fe\u04fc\3\2\2\2\u04ff\u04e4\3\2\2\2\u04ff"+ "\u04ed\3\2\2\2\u0500\u00d5\3\2\2\2\u0501\u0503\5\u00dan\2\u0502\u0504"+ "\5&\24\2\u0503\u0502\3\2\2\2\u0503\u0504\3\2\2\2\u0504\u00d7\3\2\2\2\u0505"+ "\u0506\7\22\2\2\u0506\u0507\5$\23\2\u0507\u0508\7\24\2\2\u0508\u00d9\3"+ "\2\2\2\u0509\u050b\7,\2\2\u050a\u050c\5\u00c2b\2\u050b\u050a\3\2\2\2\u050b"+ "\u050c\3\2\2\2\u050c\u050d\3\2\2\2\u050d\u050e\7-\2\2\u050e\u00db\3\2"+ "\2\2\u008e\u00dd\u00e2\u00e8\u00f3\u00f8\u00ff\u0105\u0108\u010d\u0111"+ "\u0115\u011d\u0123\u012d\u0132\u013b\u0143\u014a\u014f\u0152\u0155\u015e"+ "\u0162\u0166\u0169\u016f\u0175\u0179\u0182\u0189\u0192\u0199\u019f\u01a7"+ "\u01b0\u01ba\u01be\u01c2\u01cc\u01d2\u01da\u01e3\u01ed\u01f2\u01f6\u01fd"+ "\u0202\u0209\u0211\u021d\u0223\u022a\u0231\u023c\u0241\u0249\u024d\u024f"+ "\u025f\u026c\u0274\u0277\u027b\u0280\u0284\u028b\u0293\u029c\u029e\u02a5"+ "\u02aa\u02b5\u02b9\u02bf\u02c4\u02ca\u02d3\u02d9\u02e0\u02e9\u02f2\u02f9"+ "\u02fc\u0303\u030b\u0315\u031d\u0320\u0323\u0330\u033e\u0342\u0346\u034a"+ "\u034c\u0350\u0356\u0361\u036a\u0376\u037e\u0387\u03a2\u03ae\u03b7\u03bc"+ "\u03c6\u03cc\u03dd\u03e3\u03eb\u03f0\u03fd\u0401\u0405\u0409\u040b\u040f"+ "\u0422\u0436\u0446\u0450\u047f\u048d\u0496\u049f\u04ac\u04b4\u04b6\u04c8"+ "\u04d1\u04d3\u04d7\u04da\u04e9\u04f5\u04fc\u04ff\u0503\u050b"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); } } }
4d05a7a3ecebe1f77344b12fafa3aebf104f14a5
8ec700cda7bec824ed7a955e788bbfcf9b902224
/app/src/main/java/com/example/andreadeoli/flixster/MovieDetailsActivity.java
05d033d0b6e39b97c0508d2e1ee52ee334c6b858
[ "Apache-2.0" ]
permissive
andreadeoli/FlixsterRepo
8e77f840677ca59fe87c05c2df6ae4665abb8765
0462cf1a6fe6e0ede4130021c7c29d9e5c7c8637
refs/heads/master
2021-01-21T14:17:11.827030
2017-06-23T23:54:45
2017-06-23T23:54:45
95,263,649
0
0
null
null
null
null
UTF-8
Java
false
false
1,622
java
package com.example.andreadeoli.flixster; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.widget.RatingBar; import android.widget.TextView; import com.example.andreadeoli.flixster.models.Movie; import org.parceler.Parcels; import butterknife.BindView; import butterknife.ButterKnife; public class MovieDetailsActivity extends AppCompatActivity { Movie movie; // view objects @BindView(R.id.tvTitle)TextView tvTitle; @BindView(R.id.tvOverview)TextView tvOverview; @BindView(R.id.rbVoteAverage)RatingBar rbVoteAverage; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_movie_details); //assigning view object fields ButterKnife.bind(this); /*tvTitle = (TextView) findViewById(R.id.tvTitle); tvOverview = (TextView) findViewById(R.id.tvOverview); rbVoteAverage = (RatingBar) findViewById(R.id.rbVoteAverage);*/ movie = (Movie) Parcels.unwrap(getIntent().getParcelableExtra(Movie.class.getSimpleName())); Log.d("MovieDetailsActivity", String.format("Showing details for '%s'", movie.getTitle())); // set the title and overview tvTitle.setText(movie.getTitle()); tvOverview.setText(movie.getOverview()); // vote average is 0..10, convert to 0..5 by dividing by 2 float voteAverage = movie.getVoteAverage().floatValue(); rbVoteAverage.setRating(voteAverage = voteAverage > 0 ? voteAverage / 2.0f : voteAverage); } }
38914729e4b9917417661d020863568ca76edde2
3356c28b68da5e91e66d6f613710e0b548f3e7da
/src/chapter03/TV.java
c68cf26c7ae5b50a08813d72e72a8dabd78c22c7
[]
no_license
planemirror/chapter03
ec1a8d66b79e46510aa75d6ad63358aaa466e2ad
4e686d5883d46f9caaba36b979d92c545d5eaa44
refs/heads/master
2020-09-10T08:03:07.137316
2019-11-25T12:48:24
2019-11-25T12:48:24
221,694,956
0
0
null
null
null
null
UTF-8
Java
false
false
1,341
java
package chapter03; public class TV { private int channel; // 1 ~ 255 까지 private int volume; // private boolean power; // 상속받은 자식관계인 SmartTV를 위해 부모인 TV클래스에 기본 생성자를 만듬 public TV() { } public TV (int channel, int volume, boolean power) { this.channel = channel; this.volume = volume; this.power = power; } public void status() { System.out.println("TV[channel = " + channel + ", volume = " + volume + ", power = " + (power ? "on":"off") + "]"); } public void power(boolean on) { this.power = on; } public void volume(int intvolume) { if (!power) { return; } this.volume = intvolume; } public void volume(boolean up) { // if (up) // { // volume(volume + 1); // } // else // { // volume(volume - 1); // } volume (volume + (up ? 1 : -1)); } public void channel(int channel) { if (!power) { return; } if (channel < 1) { this.channel = 255; } else if (channel > 255) { this.channel = 1; } this.channel = channel; } public void channel(boolean up) { // if (chupdown) // { // this.channel++; // } // else // { // this.channel--; // } channel (channel + (up ? 1 : -1)); } }
[ "BIT@DESKTOP-D7VRVOQ" ]
BIT@DESKTOP-D7VRVOQ
c45596d599b75e86c9c31376b5b77b9110c4db5d
37713af6e30a7f393948b6a3a58e34a662693614
/src/dk/brics/tajs/analysis/dom/event/EventTarget.java
f28f179f2961ebbbfadd7ebec1e42b9b7d27f304
[ "Apache-2.0" ]
permissive
CameronChambers93/codesmells
da4c4e566c955710d4089633c03e3ea852e24a26
afe9fe661147680b798fe936aa1487bed7b3b1ea
refs/heads/master
2021-10-25T22:55:43.491959
2019-04-08T04:14:04
2019-04-08T04:14:04
97,957,825
1
0
null
null
null
null
UTF-8
Java
false
false
4,947
java
/* * Copyright 2009-2016 Aarhus University * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package dk.brics.tajs.analysis.dom.event; import dk.brics.tajs.analysis.Conversion; import dk.brics.tajs.analysis.FunctionCalls; import dk.brics.tajs.analysis.NativeFunctions; import dk.brics.tajs.analysis.Solver; import dk.brics.tajs.analysis.dom.DOMEvents; import dk.brics.tajs.analysis.dom.DOMObjects; import dk.brics.tajs.analysis.dom.DOMWindow; import dk.brics.tajs.analysis.dom.core.DOMNode; import dk.brics.tajs.flowgraph.EventType; import dk.brics.tajs.lattice.State; import dk.brics.tajs.lattice.Value; import dk.brics.tajs.solver.Message.Severity; import static dk.brics.tajs.analysis.dom.DOMFunctions.createDOMFunction; /** * The EventTarget interface is implemented by all Nodes in an implementation * which supports the DOM Event Model. Therefore, this interface can be obtained * by using binding-specific casting methods on an instance of the Node * interface. The interface allows registration and removal of EventListeners on * an EventTarget and dispatch of events to that EventTarget. */ public class EventTarget { public static void build(Solver.SolverInterface c) { // Event target has no native object... see class comment. /* * Properties. */ // No properties. /* * Functions. */ createDOMFunction(DOMNode.PROTOTYPE, DOMObjects.EVENT_TARGET_ADD_EVENT_LISTENER, "addEventListener", 3, c); createDOMFunction(DOMNode.PROTOTYPE, DOMObjects.EVENT_TARGET_REMOVE_EVENT_LISTENER, "removeEventListener", 3, c); createDOMFunction(DOMNode.PROTOTYPE, DOMObjects.EVENT_TARGET_DISPATCH_EVENT, "dispatchEvent", 1, c); // DOM LEVEL 0 createDOMFunction(DOMWindow.WINDOW, DOMObjects.WINDOW_ADD_EVENT_LISTENER, "addEventListener", 3, c); createDOMFunction(DOMWindow.WINDOW, DOMObjects.WINDOW_REMOVE_EVENT_LISTENER, "removeEventListener", 3, c); } public static Value evaluate(DOMObjects nativeObject, FunctionCalls.CallInfo call, Solver.SolverInterface c) { State s = c.getState(); switch (nativeObject) { /* * Events added with useCapture = true must be removed * separately from events added with useCapture = false. Model this? */ case EVENT_TARGET_ADD_EVENT_LISTENER: case WINDOW_ADD_EVENT_LISTENER: { NativeFunctions.expectParameters(nativeObject, call, c, 2, 3); Value type = Conversion.toString(NativeFunctions.readParameter(call, s, 0), c); Value function = NativeFunctions.readParameter(call, s, 1); /* Value useCapture =*/ Conversion.toBoolean(NativeFunctions.readParameter(call, s, 2)); EventType kind; if (type.isMaybeSingleStr()) { kind = EventType.getEventHandlerTypeFromString(type.getStr()); } else { kind = EventType.UNKNOWN; } DOMEvents.addEventHandler(function, kind, c); return Value.makeUndef(); } case EVENT_TARGET_REMOVE_EVENT_LISTENER: case WINDOW_REMOVE_EVENT_LISTENER: { NativeFunctions.expectParameters(nativeObject, call, c, 2, 3); Value type = Conversion.toString(NativeFunctions.readParameter(call, s, 0), c); Value function = NativeFunctions.readParameter(call, s, 1); /* Value useCapture =*/ Conversion.toBoolean(NativeFunctions.readParameter(call, s, 2)); // FIXME: testUneval29 triggers this message. // sound to ignore these functions // c.getMonitoring().addMessage(call.getSourceNode(), Severity.HIGH, nativeObject + " not implemented"); return Value.makeUndef(); } case EVENT_TARGET_DISPATCH_EVENT: { NativeFunctions.expectParameters(nativeObject, call, c, 1, 1); c.getMonitoring().addMessage(call.getSourceNode(), Severity.HIGH, nativeObject + " not implemented"); return Value.makeUndef(); } default: { c.getMonitoring().addMessage(call.getSourceNode(), Severity.HIGH, nativeObject + " not implemented"); return Value.makeUndef(); } } } }
95d49069810a4878533f823a3c461fab14506fea
7192ad57ed18a6299d9a5cd8072474e6eb7f2519
/src/main/java/range_pixel/myComparator.java
1e329d1db1f9357d50430a6f8c14d7147cd77bb7
[]
no_license
huipingcao/GRAZETOOLS
9fad01792e61e30c89d3339bebb1a0445c012b29
62cbdc3133e19a54cba3cbdbf22d230403f6bf21
refs/heads/master
2023-04-26T05:21:30.439707
2021-05-26T05:06:41
2021-05-26T05:06:41
279,935,283
1
0
null
null
null
null
UTF-8
Java
false
false
2,057
java
package range_pixel; import org.apache.commons.lang3.tuple.Pair; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Comparator; import java.util.Date; public class myComparator { } class SortByTime implements Comparator<Pair<String, double[]>> { DateFormat TimeFormatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss a"); public int compare(Pair<String, double[]> n1, Pair<String, double[]> n2) { Date d1 = null; Date d2 = null; try { d1 = this.TimeFormatter.parse(n1.getKey()); d2 = this.TimeFormatter.parse(n2.getKey()); if (d1.before(d2)) { return -1; } else if (d1.after(d2)) { return 1; } else { return 0; } } catch (ParseException e) { System.out.println("There is something wrong with your time formation, please check it 1"); System.exit(0); } return 0; } } class SortByDate implements Comparator<String> { DateFormat TimeFormatter = new SimpleDateFormat("yyyy-MM-dd"); public int compare(String n1, String n2) { Date d1 = null; Date d2 = null; try { d1 = this.TimeFormatter.parse(n1); d2 = this.TimeFormatter.parse(n2); if (d1.before(d2)) { return -1; } else if (d1.after(d2)) { return 1; } else { return 0; } } catch (ParseException e) { System.out.println("There is something wrong with your time formation, please check it 2"); System.exit(0); } return 0; } } class SortByCowid implements Comparator<String> { public int compare(String n1, String n2) { if (Integer.valueOf(n1) < Integer.valueOf(n2)) { return -1; } else if (Integer.valueOf(n1) > Integer.valueOf(n2)) { return 1; } return 0; } }
e3755ee692f852ebdc60dc87e81b3681f6b219ef
7a246f6b7acffd6dba12f9474321086b9fe71651
/Blatt_7/Blatt07_4_Bildbearbeitung/SWBild.java
334cd3a84811274b44c5936f8b98201ac5762dd5
[]
no_license
jonabacke/programieren-1
c223403f2f337b66a53ee0d36c036b3c6d9c9ffb
1c6996c218aa0e694a9cfdc8827d0d41d711eacf
refs/heads/master
2020-03-07T10:50:29.488628
2018-06-19T09:30:14
2018-06-19T09:30:14
127,441,186
0
0
null
null
null
null
UTF-8
Java
false
false
10,824
java
/** * SWBild ist eine Klasse, die Graustufenbilder repraesentiert und * manipuliert. Die Implementierung erfolgt durch ein einfaches * Bildformat: Die Bildpunkte werden in einem zweidimensionalen * Array von 'short'-Werten gehalten. Jeder Feldeintrag kann einen * Wert zwischen 0 und 255 annehmen. Andere Werte sind unzulaessig. * Der Wertebereich [0..255] repraesentiert den Graustufenbereich: * 0 fuer Schwarz, 255 fuer Weiss und dazwischenliegende Werte fuer * die Grauabstufungen. * * Beispielmethode 'dunkler': Ein geladenes Bild kann um * ein gegebenes 'delta' abgedunkelt werden. * * @author Axel Schmolitzky, Petra Becker-Pechau * @version 2017 */ class SWBild { // die Bilddaten dieses Bildes private short[][] _bilddaten; // die Breite dieses Bildes private int _breite; // die Hoehe dieses Bildes private int _hoehe; // Leinwand zur Anzeige private Leinwand _leinwand; /** * Initialisiert ein Bild mit einer Bilddatei. Der Benutzer kann interaktiv mit * Hilfe eines Dateidialogs die zu ladende Datei auswaehlen. */ public SWBild() { _bilddaten = BildEinleser.liesBilddaten(); if (_bilddaten != null) { aktualisiereBildgroesse(_bilddaten); erzeugeLeinwand(); } } /** * Initialisiert ein Bild mit einer Bilddatei. Der Dateiname kann als absoluter * oder relativer Pfad uebergeben werden. * * @param bilddateiName * der Name der Bilddatei */ public SWBild(String bilddateiName) { _bilddaten = BildEinleser.liesBilddaten(bilddateiName); aktualisiereBildgroesse(_bilddaten); erzeugeLeinwand(); } /** * Dieses Bild um einen Wert abdunkeln. * * @param delta * Wert der Abdunkelung. Es wird mit dem Betrag von delta gerechnet, * deshalb darf der Parameter sowohl positiv als auch negativ sein. */ public void dunkler(int delta) { if (delta < 0) { delta = -delta; heller(delta); }else{ /** * Durch alle Bytes des Bildes gehen und jeden Wert dekrementieren */ for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { if ((_bilddaten[y][x] - delta) > 0) // Wert darf 0 nicht unterschreiten { _bilddaten[y][x] = (short) (_bilddaten[y][x] - delta); } else { _bilddaten[y][x] = 0; } } } // Neuzeichnen der Bildleinwand, basierend auf den Werten in _bilddaten: zeichneBild(); } } /** * Dieses Bild um einen Wert aufhellen. * * @param delta * Wert der Aufhellung. Es wird mit dem Betrag von delta gerechnet, * deshalb darf der Parameter sowohl positiv als auch negativ sein. */ public void heller(int delta) { if (delta < 0) { delta = -delta; dunkler(delta); }else{ /** * Durch alle Bytes des Bildes gehen und jeden Wert dekrementieren */ for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { if ((_bilddaten[y][x] + delta) < 255) // Wert darf 0 nicht unterschreiten { _bilddaten[y][x] = (short) (_bilddaten[y][x] + delta); } else { _bilddaten[y][x] = 255; } } } // Neuzeichnen der Bildleinwand, basierend auf den Werten in _bilddaten: zeichneBild(); } } /** * Dieses Bild invertieren. */ public void invertieren() { // Durch alle Bildpunkte des Bildes gehen und jeden Wert "invertieren" for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { _bilddaten[y][x] = (short) (255 - _bilddaten[y][x]); } } zeichneBild(); } /** * Dieses Bild horizontal spiegeln. */ public void horizontalSpiegeln() { // HIER FEHLT NOCH WAS short [][] neueBilddaten; neueBilddaten = new short [_hoehe][_breite]; for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { neueBilddaten[y][x] = _bilddaten[_hoehe - y - 1][x]; } } _bilddaten = neueBilddaten; zeichneBild(); } /** * Dieses Bild weichzeichnen. */ public void weichzeichnen() { // HIER FEHLT NOCH WAS // NIX FEHLT HIER !!! short [][] neueBilddaten; neueBilddaten = new short [_hoehe][_breite]; for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { //ecken if (y == 0 && x == 0){ neueBilddaten [y][x] = durchschnitt(_bilddaten[1][0], _bilddaten[0][1], _bilddaten[1][1]); }else if (y == _hoehe - 1 && x == 0){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y - 1][0], _bilddaten[y][x + 1], _bilddaten[y - 1][x + 1]); }else if (y == 0 && x == _breite - 1){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y][x - 1], _bilddaten[y + 1][x - 1], _bilddaten[y + 1][x]); }else if (y == _hoehe - 1 && x == _breite - 1){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y - 1][x], _bilddaten[y][x - 1], _bilddaten[y - 1][x - 1]); }else //raender if (y == _hoehe - 1){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y][x + 1], _bilddaten[y][x - 1], _bilddaten[y - 1][x + 1], _bilddaten[y - 1][x - 1], _bilddaten[y - 1][x]); }else if (y == 0){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y][x + 1], _bilddaten[y][x - 1], _bilddaten[y + 1][x + 1], _bilddaten[y + 1][x - 1], _bilddaten[y + 1][x]); }else if (x == _breite - 1){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y][x - 1], _bilddaten[y + 1][x - 1], _bilddaten[y - 1][x - 1], _bilddaten[y - 1][x], _bilddaten[y + 1][x]); }else if (x == 0){ neueBilddaten [y][x] = durchschnitt(_bilddaten[y][x + 1], _bilddaten[y + 1][x + 1], _bilddaten[y - 1][x + 1], _bilddaten[y - 1][x], _bilddaten[y + 1][x]); }else { neueBilddaten [y][x] = durchschnitt(_bilddaten[y + 1][x], _bilddaten[y + 1][x + 1], _bilddaten[y + 1][x - 1], _bilddaten[y][x + 1], _bilddaten[y][x - 1], _bilddaten[y - 1][x + 1], _bilddaten[y - 1][x - 1], _bilddaten[y - 1][x]); } } } _bilddaten = neueBilddaten; zeichneBild(); } private short durchschnitt(short... bild){ int bilder = 0; for(int i = 0; i < bild.length; i++){ bilder += bild[i]; } bilder = bilder / bild.length; return (short)bilder; } /** * Dieses Bild am Mittelpunkt spiegeln. */ public void punktSpiegeln() { // HIER FEHLT NOCH WAS short [][] neueBilddaten = new short [_hoehe][_breite]; for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { neueBilddaten [y][x] = _bilddaten [- y + _hoehe-1][- x + _breite-1]; } } _bilddaten = neueBilddaten; zeichneBild(); } /** * Erzeuge bei diesem Bild einen Spot mit Radius r, Mittelpunkt x0,y0 und * Beleuchtungsintensitaet i. Ausserhalb von r nimmt die Ausleuchtung linear ab. * Wie im wirklichen Leben... * * @param xo * x-Koordinate des Mittelpunktes * @param yo * y-Koordinate des Mittelpunktes * @param r * Radius * @param i * Beleuchtungsintesitaet */ public void spot(int x0, int y0, int r, short i) { // HIER FEHLT NOCH WAS short [][] neueBilddaten = new short [_hoehe][_breite]; int delta; for (int y = 0; y < _hoehe; y++) { for (int x = 0; x < _breite; x++) { delta = (int)(Math.sqrt(Math.pow(x - x0, 2) + Math.pow(y - y0, 2))); delta -= r; hilfsSpot(delta, y, x); } } _bilddaten = neueBilddaten; zeichneBild(); } private void hilfsSpot(int delta, int y, int x){ if(_bilddaten [y][x] - delta > 0){ _bilddaten [y][x] = (short)(_bilddaten [y][x] - delta); }else if(_bilddaten[y][x] - delta > 255){ _bilddaten [y][x] = 255; }else{ _bilddaten [y][x] = 0; } } /** * Gib den Wert eines einzelnen Bildpunktes zurueck. * * @param y * die y-Koordinate des Bildpunktes. * @param x * die x-Koordinate des Bildpunktes. * @return den Wert des angegebenen Bildpunktes. */ public short gibBildpunkt(int y, int x) { return _bilddaten[y][x]; } // ==== private Hilfsmethoden ==== /** * Zeichnet das Bild in _bilddaten neu */ private void zeichneBild() { _leinwand.sichtbarMachen(); _leinwand.zeichneBild(_bilddaten); } /** * Hoehe und Breite neu berechnen, nachdem die Bilddaten veraendert worden sind. */ private void aktualisiereBildgroesse(short[][] bilddaten) { _hoehe = bilddaten.length; if (_hoehe == 0) { _breite = 0; } else { _breite = bilddaten[0].length; } } /** * Erzeuge die Leinwand zur Darstellung und zeige sie an. */ private void erzeugeLeinwand() { _leinwand = new Leinwand("Bildbetrachter", _breite, _hoehe); zeichneBild(); } }
04740e6f25308b33d9ac0d71d8f631ba9615d5ce
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/synapse/1.1/org/apache/synapse/config/xml/XSLTMediatorFactory.java
7e9bfca260e8f5e6ddcc6129e63976288cc41cf5
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
3,522
java
package org.apache.synapse.config.xml; import org.apache.axiom.om.OMAttribute; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.xpath.AXIOMXPath; import org.apache.synapse.config.xml.OMElementUtils; import org.apache.synapse.Mediator; import org.apache.synapse.mediators.transform.XSLTMediator; import org.apache.synapse.config.xml.XMLConfigConstants; import org.apache.synapse.config.xml.AbstractMediatorFactory; import org.apache.synapse.config.xml.MediatorPropertyFactory; import org.jaxen.JaxenException; import javax.xml.namespace.QName; import java.util.Iterator; /** * Creates a XSLT mediator from the given XML * * <pre> * &lt;xslt key="property-key" [source="xpath"]&gt; * &lt;property name="string" (value="literal" | expression="xpath")/&gt;* * &lt;/transform&gt; * </pre> */ public class XSLTMediatorFactory extends AbstractMediatorFactory { private static final QName TAG_NAME = new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "xslt"); public QName getTagQName() { return TAG_NAME; } public Mediator createMediator(OMElement elem) { XSLTMediator transformMediator = new XSLTMediator(); OMAttribute attXslt = elem.getAttribute(ATT_KEY); OMAttribute attSource = elem.getAttribute(ATT_SOURCE); if (attXslt != null) { transformMediator.setXsltKey(attXslt.getAttributeValue()); } else { handleException("The 'key' attribute is required for the XSLT mediator"); } if (attSource != null) { try { transformMediator.setSourceXPathString(attSource.getAttributeValue()); AXIOMXPath xp = new AXIOMXPath(attSource.getAttributeValue()); OMElementUtils.addNameSpaces(xp, elem, log); transformMediator.setSource(xp); } catch (JaxenException e) { handleException("Invalid XPath specified for the source attribute : " + attSource.getAttributeValue()); } } processTraceState(transformMediator, elem); Iterator iter = elem.getChildrenWithName(FEATURE_Q); while (iter.hasNext()) { OMElement featureElem = (OMElement) iter.next(); OMAttribute attName = featureElem.getAttribute(ATT_NAME); OMAttribute attValue = featureElem.getAttribute(ATT_VALUE); if (attName != null && attValue != null) { String name = attName.getAttributeValue(); String value = attValue.getAttributeValue(); if (name != null && value != null) { if ("true".equals(value.trim())) { transformMediator.addFeature(name.trim(), true); } else if ("false".equals(value.trim())) { transformMediator.addFeature(name.trim(), false); } else { handleException("The feature must have value true or false"); } } else { handleException("The valid values for both of the name and value are need"); } } else { handleException("Both of the name and value attribute are required for a feature"); } } transformMediator.addAllProperties( MediatorPropertyFactory.getMediatorProperties(elem)); return transformMediator; } }
e21d31e977a496772a4d7ed2b874894d1bc3a1da
18f98448791a2b52be57a50bc2b2e8aa9ea3bb0a
/src/main/java/concurrent/spinlock/CLHLock.java
02da16128b7d134a1657775da6faee5802ce6f5b
[ "MIT" ]
permissive
qindongliang/Java-Note
27b85a1d31c70bfbc72198e4b18cf7abd0c8a1f4
539068105a28c959879c6507731295c8d834517f
refs/heads/master
2021-06-03T05:38:58.737551
2021-04-08T14:30:37
2021-04-08T14:30:37
138,539,248
16
8
MIT
2021-04-08T14:31:27
2018-06-25T03:29:07
Java
UTF-8
Java
false
false
2,595
java
package concurrent.spinlock; import java.util.concurrent.atomic.AtomicReference; /** * Created by qindongliang on 2018/8/5. */ public class CLHLock { class Node{ //false代表没人占用锁 volatile boolean locked=false; } //指向最后加入的线程 final AtomicReference<Node> tail=new AtomicReference<>(new Node()); //使用ThreadLocal保证每个线程副本内都有一个Node对象 final ThreadLocal<Node> current; public CLHLock(){ //初始化当前节点的node current=new ThreadLocal<Node>(){ @Override protected Node initialValue() { return new Node(); } }; } public void lock() throws InterruptedException { //得到当前线程的Node节点 Node own=current.get(); //修改为true,代表当前线程需要获取锁 own.locked=true; //设置当前线程去注册锁,注意在多线程下环境下,这个 //方法仍然能保持原子性,,并返回上一次的加锁节点(前驱节点) Node preNode=tail.getAndSet(own); //在前驱节点上自旋 while(preNode.locked){ System.out.println(Thread.currentThread().getName()+" 开始自旋.... "); Thread.sleep(2000); } } public void unlock(){ //当前线程如果释放锁,只要将占用状态改为false即可 //因为其他的线程会轮询自己,所以volatile布尔变量改变之后 //会保证下一个线程能立即看到变化,从而得到锁 current.get().locked=false; } public static void main(String[] args) throws InterruptedException { CLHLock lock=new CLHLock(); Runnable runnable=new Runnable() { @Override public void run() { try { lock.lock(); System.out.println(Thread.currentThread().getName()+" 获得锁 "); //前驱释放,do own work Thread.sleep(5000); System.out.println(Thread.currentThread().getName()+" 释放锁 "); lock.unlock(); } catch (InterruptedException e) { e.printStackTrace(); } } }; Thread t1=new Thread(runnable,"线程1"); Thread t2=new Thread(runnable,"线程2"); Thread t3=new Thread(runnable,"线程3"); t1.start(); t2.start(); t3.start(); } }
b1efc8e8189e9b45e258e2e0ada1bfe069a8f567
85a2fcd90994553e98e5da39388efd7e410b643b
/src/test/java/msz/javabasics/AppIT.java
06b1cdd157d0dee7daf08e2b3f7fe5d1ddf30eb9
[]
no_license
vacant78/javaBasics20150708
0060ab3cc66774d422ef0316941eb8204e948492
1dec6fe99289acf2e96d1455d408fec9817ac07b
refs/heads/master
2020-05-31T07:02:24.239980
2015-07-10T07:26:56
2015-07-10T07:26:56
38,775,490
0
0
null
null
null
null
UTF-8
Java
false
false
1,177
java
package msz.javabasics; import junit.framework.TestCase; import org.junit.After; import org.junit.Before; import org.junit.Test; import java.io.ByteArrayOutputStream; import java.io.PrintStream; import static org.hamcrest.CoreMatchers.equalTo; import static org.junit.Assert.assertThat; /** * Created by SzatanskiM on 09/07/2015. */ public class AppIT { private final ByteArrayOutputStream outContent = new ByteArrayOutputStream(); @Before public void before(){ System.setOut(new PrintStream(outContent)); } @After public void after(){ System.setOut(null); } @Test(expected = IllegalArgumentException.class) public void shouldThrowOnInvalidInput() { App.main(null); } @Test public void shouldCalculateAndPrintResultsToSystemOut() { App.main(new String[]{"Apple,Orange"}); assertThat(outContent.toString(), equalTo("£0.85")); } @Test public void shouldCalculateWithPromotionsAndPrintResultsToSystemOut() { App.main(new String[]{"Apple,Apple,Orange","buy1get1free:Apple,get3for2:Orange"}); assertThat(outContent.toString(), equalTo("£0.85")); } }
4986298b54e950048205695d197cbd63ef0cec49
8549c8692cf72e6bdb36a1c75b33fbd7cefb475f
/MTA Framewrok/datanucleus-rdbms/src/main/java/org/datanucleus/store/rdbms/valuegenerator/AbstractRDBMSGenerator.java
65500b06be5e9da9b2481ca021c46dd4d4aa8c04
[]
no_license
NCCUCS-PLSM/SaaS-Data
3e4d30a04b3f4b653d7ce1fb66a95d9206a7b675
577bbc54480927a8aa93c5182683304d22be34e0
refs/heads/master
2021-03-12T23:51:15.168140
2013-12-23T01:52:50
2013-12-23T01:52:50
11,502,003
1
0
null
null
null
null
UTF-8
Java
false
false
6,227
java
/********************************************************************** Copyright (c) 2006 Andy Jefferson and others. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Contributors: ... **********************************************************************/ package org.datanucleus.store.rdbms.valuegenerator; import java.util.Properties; import org.datanucleus.store.connection.ManagedConnection; import org.datanucleus.store.rdbms.RDBMSStoreManager; import org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator; import org.datanucleus.store.valuegenerator.ValueGenerationBlock; import org.datanucleus.store.valuegenerator.ValueGenerationException; import org.datanucleus.util.Localiser; import org.datanucleus.util.NucleusLogger; /** * Abstract representation of a ValueGenerator for RDBMS datastores. * Builds on the base AbstractValueGenerator, and providing datastore connection * and StoreManager information. */ public abstract class AbstractRDBMSGenerator extends AbstractDatastoreGenerator { /** Localiser for messages specific to RDBMS generators. */ protected static final Localiser LOCALISER_RDBMS = Localiser.getInstance( "org.datanucleus.store.rdbms.Localisation", RDBMSStoreManager.class.getClassLoader()); /** Connection to the datastore. */ protected ManagedConnection connection; /** * Constructor. * @param name Symbolic name for the generator * @param props Properties controlling the behaviour of the generator */ public AbstractRDBMSGenerator(String name, Properties props) { super(name, props); allocationSize = 1; } /** * Method to reply if the generator requires a connection. * @return Whether a connection is required. */ public boolean requiresConnection() { return true; } /** * Get a new PoidBlock with the specified number of ids. * @param number The number of additional ids required * @return the PoidBlock */ protected ValueGenerationBlock obtainGenerationBlock(int number) { ValueGenerationBlock block = null; // Try getting the block boolean repository_exists=true; // TODO Ultimately this can be removed when "repositoryExists()" is implemented try { if (requiresConnection()) { connection = connectionProvider.retrieveConnection(); } if (requiresRepository() && !repositoryExists) { // Make sure the repository is present before proceeding repositoryExists = repositoryExists(); if (!repositoryExists) { createRepository(); repositoryExists = true; } } try { if (number < 0) { block = reserveBlock(); } else { block = reserveBlock(number); } } catch (ValueGenerationException poidex) { NucleusLogger.VALUEGENERATION.info(LOCALISER.msg("040003", poidex.getMessage())); if (NucleusLogger.VALUEGENERATION.isDebugEnabled()) { NucleusLogger.VALUEGENERATION.debug("Caught exception", poidex); } // attempt to obtain the block of unique identifiers is invalid if (requiresRepository()) { repository_exists = false; } else { throw poidex; } } catch (RuntimeException ex) { NucleusLogger.VALUEGENERATION.info(LOCALISER.msg("040003", ex.getMessage())); if (NucleusLogger.VALUEGENERATION.isDebugEnabled()) { NucleusLogger.VALUEGENERATION.debug("Caught exception", ex); } // attempt to obtain the block of unique identifiers is invalid if (requiresRepository()) { repository_exists = false; } else { throw ex; } } } finally { if (connection != null && requiresConnection()) { connectionProvider.releaseConnection(); connection = null; } } // If repository didn't exist, try creating it and then get block if (!repository_exists) { try { if (requiresConnection()) { connection = connectionProvider.retrieveConnection(); } NucleusLogger.VALUEGENERATION.info(LOCALISER.msg("040005")); if (!createRepository()) { throw new ValueGenerationException(LOCALISER.msg("040002")); } else { if (number < 0) { block = reserveBlock(); } else { block = reserveBlock(number); } } } finally { if (requiresConnection()) { connectionProvider.releaseConnection(); connection = null; } } } return block; } }
e382be512f162c8516643b5e27c2585a41890428
e33e7ccfcd4e9cba4ac39e44a96e1385ee1a3de1
/Selenium/src/newTourAppLogin/BaseTest.java
b4022ce0d3e653cafbb3367d9de5d2fdf2aebe01
[]
no_license
aparna147/OrangrHRM
f1360d07feac3f2301ce55b559cf176bc14bf617
8e79509041c6e896daa2f9f602c87c51c400e015
refs/heads/master
2022-07-19T11:07:36.317805
2020-02-24T08:07:07
2020-02-24T08:07:07
237,152,394
0
0
null
2022-06-29T17:58:44
2020-01-30T06:23:33
JavaScript
UTF-8
Java
false
false
535
java
package newTourAppLogin; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.BeforeTest; public class BaseTest { WebDriver driver=null; String url="http://www.newtours.demoaut.com/"; @BeforeTest //@BeforeTest public void setUp() { System.setProperty("webdriver.chrome.driver", "C:\\Users\\colruyt\\Desktop\\Livetech\\Selenium\\Driver File\\chromedriver.exe"); driver=new ChromeDriver(); //driver.navigate().to(url); driver.navigate().to(url); } }
d81f7c173bac469507e7e19f1612c13edc7bdeaf
1a0bff868c54c311c3ff12ee8ecf80fb2a98fc7c
/colordetails/src/main/java/com/example/colordetails/service/WaterTypeService.java
2155fb83a8cfc5a0bef129385b64b67f402bfce8
[]
no_license
yuzi1588/MyRepository
59370a26f3e67b39cce093758e3e9ec7713c4ea3
47411fcfbcb75f1a0f76ecedaba244147b7e9e5f
refs/heads/master
2020-03-28T18:15:15.531981
2018-09-15T03:57:08
2018-09-15T03:57:08
148,865,289
0
0
null
null
null
null
UTF-8
Java
false
false
456
java
package com.example.colordetails.service; import com.example.colordetails.entity.WaterTypeInfo; import java.util.List; public interface WaterTypeService { //查全部水的类型 List<WaterTypeInfo> getAllWaterType(); //根据id删除类型 void deleteWaterTypeById(Integer id); //根据id查找类型 WaterTypeInfo getWaterTypeById(Integer id); //添加类型 WaterTypeInfo addWaterType(WaterTypeInfo waterTypeInfo); }
5d7fe722f2cf2bcdb37642920c15ed5e34568e97
92a9f25c5599b5c81029652a71f41ed887c6e424
/S01/S06.01-Exercise-LaunchSettingsActivity/app/src/main/java/com/example/android/sunshine/SettingsActivity.java
caf7dda2895713d942863b1b7453e40968d8fb29
[ "Apache-2.0" ]
permissive
emeruvia/Intermediate-Android-Google-Challenge
f40af162c5894427a51be4fb4107ce15ccbcf13e
9ebd005315b557726bd98ffa2cf65766d679972c
refs/heads/master
2021-05-12T05:12:31.964889
2018-03-22T19:32:36
2018-03-22T19:32:36
117,185,340
0
0
null
null
null
null
UTF-8
Java
false
false
350
java
package com.example.android.sunshine; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class SettingsActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings2); } }
5f1293945014dc8c51aac2132c5170f62ca1c1ac
c673d3e107bdcb7e986c5074d6f7fd587e7e44e3
/gmall-MBG/src/main/java/com/duheng/gmall/ums/service/impl/MemberStatisticsInfoServiceImpl.java
f687388dc9160a692e60c43d53a9541a48de53ff
[]
no_license
UserJustins/Gmalls
2f47a195b529fb1c10ac8d7248d314b90cf3dc08
7c7b28dcad50a842b805ea32999d4029a647afa5
refs/heads/master
2022-06-23T07:03:26.384770
2020-02-23T08:16:33
2020-02-23T08:16:33
234,525,787
0
0
null
2022-06-21T02:50:45
2020-01-17T10:26:25
Java
UTF-8
Java
false
false
616
java
package com.duheng.gmall.ums.service.impl; import com.duheng.gmall.ums.entity.MemberStatisticsInfo; import com.duheng.gmall.ums.mapper.MemberStatisticsInfoMapper; import com.duheng.gmall.ums.service.MemberStatisticsInfoService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.stereotype.Service; /** * <p> * 会员统计信息 服务实现类 * </p> * * @author DuHeng * @since 2020-01-20 */ @Service public class MemberStatisticsInfoServiceImpl extends ServiceImpl<MemberStatisticsInfoMapper, MemberStatisticsInfo> implements MemberStatisticsInfoService { }
95880fee8d429192dd288965d3f09ac17416b0a8
a140f0956c57e6080d6d0c7c8340a5d238e0b271
/src/main/java/com/wyzssw/distributedLock/DistributedLock.java
24798f0d5fe072da8cd032e0a0bf260f06e21bc3
[]
no_license
heianxing/DistributedLock
4846929400e467d8577861ce2facbc26f3f08d9f
0f67e1e0c057709490edb558092a78c3a237bbd3
refs/heads/master
2020-12-06T17:20:41.416265
2015-07-03T15:37:25
2015-07-03T15:37:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,619
java
package com.wyzssw.distributedLock; import org.apache.commons.lang3.StringUtils; import redis.clients.jedis.Jedis; /** * redis实现的distributedlock ,锁占用时间不宜过长 * @see http://www.jeffkit.info/2011/07/1000/ * @author wyzssw */ public class DistributedLock { private String host; private Integer port; //单位毫秒 private long lockTimeOut; /** * @return the lockTimeOut */ public long getLockTimeOut() { return lockTimeOut; } private long perSleep; /** * 得不到锁立即返回,得到锁返回设置的超时时间 * @param key * @return */ public long tryLock(String key){ //得到锁后设置的过期时间,未得到锁返回0 long expireTime = 0; Jedis jedis = null; jedis = new Jedis(host, port); expireTime = System.currentTimeMillis() + lockTimeOut +1; if (jedis.setnx(key, String.valueOf(expireTime)) == 1) { //得到了锁返回 return expireTime; }else { String curLockTimeStr = jedis.get(key); //判断是否过期 if (StringUtils.isBlank(curLockTimeStr) || System.currentTimeMillis() > Long.valueOf(curLockTimeStr)) { expireTime = System.currentTimeMillis() + lockTimeOut +1; curLockTimeStr = jedis.getSet(key, String.valueOf(expireTime)); //仍然过期,则得到锁 if (StringUtils.isBlank(curLockTimeStr) || System.currentTimeMillis() > Long.valueOf(curLockTimeStr)){ return expireTime; }else { return 0; } }else { return 0; } } } /** * 得到锁返回设置的超时时间,得不到锁等待 * @param key * @return * @throws InterruptedException */ public long lock(String key) throws InterruptedException{ long starttime = System.currentTimeMillis(); long sleep = (perSleep==0?lockTimeOut/10:perSleep); //得到锁后设置的过期时间,未得到锁返回0 long expireTime = 0; Jedis jedis = new Jedis(host, port); for (;;) { expireTime = System.currentTimeMillis() + lockTimeOut +1; if (jedis.setnx(key, String.valueOf(expireTime)) == 1) { //得到了锁返回 return expireTime; }else { String curLockTimeStr = jedis.get(key); //判断是否过期 if (StringUtils.isBlank(curLockTimeStr) || System.currentTimeMillis() > Long.valueOf(curLockTimeStr)) { expireTime = System.currentTimeMillis() + lockTimeOut +1; curLockTimeStr = jedis.getSet(key, String.valueOf(expireTime)); //仍然过期,则得到锁 if (StringUtils.isBlank(curLockTimeStr) || System.currentTimeMillis() > Long.valueOf(curLockTimeStr)){ return expireTime; }else { Thread.sleep(sleep); } }else { Thread.sleep(sleep); } } if (lockTimeOut > 0 && ((System.currentTimeMillis() - starttime) >= lockTimeOut)) { expireTime = 0; return expireTime; } } } /** * 先判断自己运行时间是否超过了锁设置时间,是则不用解锁 * @param key * @param expireTime */ public void unlock(String key,long expireTime){ if (System.currentTimeMillis()-expireTime>0) { return ; } Jedis jedis = new Jedis(host, port); String curLockTimeStr = jedis.get(key); if (StringUtils.isNotBlank(curLockTimeStr)&&Long.valueOf(curLockTimeStr)>System.currentTimeMillis()) { jedis.del(key); } } /** * @param host the host to set */ public void setHost(String host) { this.host = host; } /** * @param port the port to set */ public void setPort(Integer port) { this.port = port; } /** * @param lockTimeOut the lockTimeOut to set */ public void setLockTimeOut(long lockTimeOut) { this.lockTimeOut = lockTimeOut; } /** * @param perSleep the perSleep to set */ public void setPerSleep(long perSleep) { this.perSleep = perSleep; } }
789edef74cf67704d36ebd07f210703e1a3c511c
f27460e133c35eb38808f307d2fb1230819cbe12
/src/main/java/com/shiyu/demo/mapper/CommunityPostMapper.java
d1b915230e85850a939f3767478521b9536f1867
[]
no_license
laowanggit/-
02d6527fcbb7c0fae2602e1859b815adcec28be4
d93e69e1f9ad08201d89969c6a812d7be458c524
refs/heads/master
2022-06-24T10:40:54.489936
2019-07-16T01:09:26
2019-07-16T01:09:26
197,094,935
2
0
null
2022-06-21T01:27:24
2019-07-16T01:02:16
Java
UTF-8
Java
false
false
3,098
java
package com.shiyu.demo.mapper; import com.shiyu.demo.entity.CommunityPost; import com.shiyu.demo.entity.CommunityPostExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface CommunityPostMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int countByExample(CommunityPostExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int deleteByExample(CommunityPostExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int deleteByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int insert(CommunityPost record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int insertSelective(CommunityPost record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ List<CommunityPost> selectByExample(CommunityPostExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ CommunityPost selectByPrimaryKey(Integer id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int updateByExampleSelective(@Param("record") CommunityPost record, @Param("example") CommunityPostExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int updateByExample(@Param("record") CommunityPost record, @Param("example") CommunityPostExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int updateByPrimaryKeySelective(CommunityPost record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table community_post * * @mbggenerated Fri Apr 26 19:29:00 CST 2019 */ int updateByPrimaryKey(CommunityPost record); }