blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
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
684M
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
132 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
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
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)); } }
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); }
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); }
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()); } }
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(); }
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); } } }
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 + "】同步到京东商城"); } }
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); } }
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; } }
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..."); } }
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() ); } } }
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); } }
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; } }
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; } }
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); } } }
[ "" ]
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(); } }
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(); }
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; } }
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); }
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); } }
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;
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); } }
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); }
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); } }
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; } }
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; } }
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); } }
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(); }
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(); } } }); } }
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); } }
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); } } }
[ "" ]
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); } } }
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; } } }
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(); } } }
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<>(); } }
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); } }
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 { }
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; } }
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
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"); } }
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(); } }
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; } }
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); } } }
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."); } } }
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(); } } } }
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); } }
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(); } }
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); } }
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; } }
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
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"); } }
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); } }
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
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; } }
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); } } }
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); }
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; } }
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; } }
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); } }
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(); } }
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); } }
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")); } }
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); } }
4ff570106ae1dd945c8b42957c307185e7d8e72b
f4625b429364037d154a99739b827e1fb0b979e1
/build/app/generated/source/buildConfig/debug/com/example/calculadora_simples/BuildConfig.java
f35c9c24ae45fdb49bdf9d888e3978dc9b3c03f3
[]
no_license
gaabipacheco/trabalho3
3a00437283473578f824f167c7644150c2429703
2a1187669807906381fb847a49749dc55ecd1c4d
refs/heads/master
2023-06-25T13:12:04.876296
2021-07-24T20:14:46
2021-07-24T20:14:46
389,191,366
0
0
null
null
null
null
UTF-8
Java
false
false
429
java
/** * Automatically generated file. DO NOT MODIFY */ package com.example.calculadora_simples; public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String APPLICATION_ID = "com.example.calculadora_simples"; public static final String BUILD_TYPE = "debug"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0.0"; }
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; } }
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 { }
6fe760cb3bbcce9db9cca84dbc126294dbaabb86
7edc6fcdff878c9b9aa8448a34c03e5cd41eba49
/src/main/java/com/deng/o2o/service/impl/ShopServiceImpl.java
924f7b8c8f6907ed48b1dbc57cc2196305f1defd
[]
no_license
dengcong139/o2o
178cf255557dee9d23f3d499c5e776a449d5b462
9c3201226e98428a42c310d7a872d924f79c18ee
refs/heads/master
2020-03-24T20:23:10.895275
2018-07-31T07:01:16
2018-07-31T07:01:16
142,975,366
0
0
null
null
null
null
UTF-8
Java
false
false
5,660
java
package com.deng.o2o.service.impl; import java.util.Date; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.deng.o2o.dao.ShopDao; import com.deng.o2o.dto.ImageHolder; import com.deng.o2o.dto.ShopExecution; import com.deng.o2o.entity.Shop; import com.deng.o2o.enums.ShopStateEnum; import com.deng.o2o.exceptions.ProductCategoryOperationException; import com.deng.o2o.service.ShopService; import com.deng.o2o.util.ImageUtil; import com.deng.o2o.util.PageCalculator; import com.deng.o2o.util.PathUtil; @Service public class ShopServiceImpl implements ShopService { @Autowired private ShopDao shopDao; /*@Transactional//添加事务的相关操作 @Override public ShopExecution addShop(ShopRegisterVo shopRegisterVo, MultipartFile file, String fileName) throws Exception { //空值判断 if(!StringUtils.isEmpty(shopRegisterVo)) { return new ShopExecution(ShopStateEnum.NULL_SHOP);//将枚举类型作为参数进行传递,可以进行检查 } //String addShopImg = addShopImg(Long.parseLong(UUID.randomUUID().toString()), file.getInputStream(), fileName); //shopRegisterVo.setShopImg(addShopImg); shopDao.insertShop(shopRegisterVo); return new ShopExecution(ShopStateEnum.CHECK,new Shop()); }*/ @Override @Transactional//添加事务的相关操作 public ShopExecution addShop(Shop shop, ImageHolder thumbnail) {//添加店铺方法的返回值为dto中的一个具体类,可以收集相关信息 //空值判断 if(shop == null) { return new ShopExecution(ShopStateEnum.NULL_SHOP);//将枚举类型作为参数进行传递,可以进行检查 } try { //给店赋值初始值 shop.setEnableStatus(0);//0表示店铺审核中 shop.setCreateTime(new Date()); shop.setLastEditTime(new Date()); //1.添加店铺信息 int effectedNum=shopDao.insertShop(shop); //throw new ShopOperationException("店铺创建失败!"); /* * Spring默认对RuntimeException进行事务回滚 * 使用RuntimeException来维持事务的原子性, * 保证1.添加店铺信息;2.图片处理;3.处理完图片之后添加到店铺; * 这三个操作要么全部成功执行,要么全部执行失败 * */ if(effectedNum <=0) { throw new ProductCategoryOperationException("店铺创建失败!"); }else { if(thumbnail !=null) { //2.存储图片 try { addShopImg(shop, thumbnail ); }catch(Exception e) { throw new ProductCategoryOperationException("addShopImg error:" + e.getMessage()); } //3.更新店铺的图片地址 effectedNum=shopDao.updateShop(shop); if(effectedNum <=0) { throw new ProductCategoryOperationException("更新图片地址失败!"); } } } }catch(Exception e) { throw new ProductCategoryOperationException("addShop error:" + e.getMessage()); } return new ShopExecution(ShopStateEnum.CHECK,shop); }//除了shop的判断,还需要对category以及area等做判断(后期添加) private void addShopImg(Shop shop, ImageHolder thumbnail) { //获取shop图片目录的相对值路径 String dest = PathUtil.getShopImagePath(shop.getShopId()); String shopImgAddr =ImageUtil.generateThumbnail( thumbnail,dest); shop.setShopImg(shopImgAddr); } /*private String addShopImg(Long id, InputStream shopImgInputStream,String fileName) { //获取shop图片目录的相对值路径 String dest = PathUtil.getShopImagePath(id); return ImageUtil.generateThumbnail(shopImgInputStream, fileName,dest); }*/ /* * 通过id查找店铺信息 * */ @Override public Shop getByShopId(Long shopId) { return shopDao.queryByShopId(shopId); } /* * 根据传入的店铺信息,以及图片流来修改店铺信息 * */ @Override public ShopExecution modifyShop(Shop shop, ImageHolder thumbnail) throws ProductCategoryOperationException { if(shop ==null ||shop.getShopId() ==null) { return new ShopExecution(ShopStateEnum.NULL_SHOP); }else { //1.判断是否需要处理图片 try { if(thumbnail.getImage() !=null && thumbnail.getImageName() != null && !"" .equals(thumbnail.getImageName())) { //如果图片不为空先获取shop之前的地址 Shop tempShop = shopDao.queryByShopId(shop.getShopId()); if(tempShop.getShopImg() !=null) { //如果之前的图片地址不为空,需要使用工具类将之前的图片地址删除掉 ImageUtil.deleteFileOrPath(tempShop.getShopImg()); } //生成新的图片 addShopImg(shop, thumbnail); } //2.更新店铺信息 shop.setLastEditTime(new Date()); int effectedNum = shopDao.updateShop(shop); if(effectedNum <=0) { return new ShopExecution(ShopStateEnum.INNER_ERROR); }else { shop = shopDao.queryByShopId(shop.getShopId()); return new ShopExecution(ShopStateEnum.SUCCESS,shop); }}catch(Exception e) { throw new ProductCategoryOperationException("modifyShop error:" + e.getMessage()); } } } /* * 根据shopCondition分页返回相应店铺列表 * */ @Override public ShopExecution getShopList(Shop shopCondition, int pageIndex, int pageSize) { int rowIndex = PageCalculator.calculateRowIndex(pageIndex, pageSize); List<Shop> shopList = shopDao.queryShopList(shopCondition, rowIndex, pageSize); int count = shopDao.queryShopCount(shopCondition); ShopExecution se=new ShopExecution(); if(shopList!=null) { se.setShopList(shopList); se.setCount(count); }else { se.setState(ShopStateEnum.INNER_ERROR.getState()); } return se; } }
0947b7346c63bc525bb7a735c8c4fb008c50022d
01aeac2759b1990ddd505788ded8fd9d9a1423b5
/runner/src/test/java/com/frocate/taskrunner/AbstractTaskTest.java
8138d90b9cb36067bc1cb5bce28cc88f194f6d89
[]
no_license
dmitrymurashenkov/frocate
46fca89aee1f6834d89691521c5986202ba59f9a
823a67bcaad05bc1f26a149cba82804b1f393eff
refs/heads/master
2021-01-12T11:45:19.933604
2016-10-30T11:51:22
2016-10-30T11:51:22
72,290,449
0
0
null
null
null
null
UTF-8
Java
false
false
7,069
java
package com.frocate.taskrunner; import com.frocate.taskrunner.executable.Executable; import com.frocate.taskrunner.executable.ExecutableType; import com.frocate.taskrunner.junit.TaskProgress; import com.frocate.taskrunner.result.ProgressListener; import com.frocate.taskrunner.result.TestResult; import org.junit.Test; import java.io.File; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; public class AbstractTaskTest { @Test public void run_shouldAddErrorIfExceptionThrown() { try (Env env = new EnvImpl("build1")) { Task task = new StubTask() { @Override protected void runTests(Executable executableOnHost, Env env, ProgressListener listener) { progress = new TaskProgress(Arrays.asList( new TestResult("test1", true, null) ), new ArrayList<>(), 2, null, 0); throw new RuntimeException("Error"); } }; TaskResult result = task.run(buildExecutable(), env, ProgressListener.STUB); assertEquals(2, result.getTotalTests()); assertEquals(Arrays.asList( new TestResult("test1", true, null), new TestResult("Tests should finish without exceptions", false, "Unexpected exception: Error") ), result.getTests()); } } @Test public void run_shouldCreateEmptyLogFiles_ifNoneReturnedByTask() { try (Env env = new EnvImpl("build1")) { Task task = new StubTask(); TaskResult result = task.run(buildExecutable(), env, ProgressListener.STUB); assertEquals("", FileUtils.readContent(result.getExecutableLog())); assertEquals("", FileUtils.readContent(result.getTestLog())); } } @Test public void run_returnLogFilesSetByImpl() { try (Env env = new EnvImpl("build1")) { Task task = new StubTask() { @Override protected void runTests(Executable executableOnHost, Env env, ProgressListener listener) { executableLog = FileUtils.createTmpFileWithContent("executableLog"); testLog = FileUtils.createTmpFileWithContent("testLog"); } }; TaskResult result = task.run(buildExecutable(), env, ProgressListener.STUB); assertEquals("executableLog", FileUtils.readContent(result.getExecutableLog())); assertEquals("testLog", FileUtils.readContent(result.getTestLog())); } } @Test public void awaitTestsComplete_shouldReturnLastAvailableProgressFile() { try (Env env = new EnvImpl("build1")) { VM testVM = env.createVM("tests"); testVM.start(); ProcessFuture future = testVM.runCommand("sleep 0"); copyTaskProgressToVM(testVM, new TestResult("test1")); AbstractTask task = new StubTask(); Listener listener = new Listener(); TaskProgress progress = task.awaitTestsComplete(env, testVM, future, 1, listener); assertTrue(listener.progressList.size() > 0); assertEquals(Arrays.asList(new TestResult("test1")), progress.getTests()); assertEquals(1, progress.getTotalTests()); } } @Test public void awaitTestsComplete_shouldAddReturnErrorIfTimeout() { try (Env env = new EnvImpl("build1")) { VM testVM = env.createVM("tests"); testVM.start(); ProcessFuture future = testVM.runCommand("sleep 5"); copyTaskProgressToVM(testVM, new TestResult("test1")); AbstractTask task = new StubTask(); Listener listener = new Listener(); TaskProgress progress = task.awaitTestsComplete(env, testVM, future, 1, listener); assertTrue(listener.progressList.size() > 0); assertEquals(Arrays.asList( new TestResult("test1"), new TestResult("Tests should finish in 1 seconds", false, "Tests timed out") ), progress.getTests()); assertEquals(1, progress.getTotalTests()); } } @Test public void awaitTestsComplete_shouldAddReturnErrorIfNoProgressFileProduced() { try (Env env = new EnvImpl("build1")) { VM testVM = env.createVM("tests"); testVM.start(); ProcessFuture future = testVM.runCommand("sleep 0"); AbstractTask task = new StubTask(); Listener listener = new Listener(); TaskProgress progress = task.awaitTestsComplete(env, testVM, future, 1, listener); assertTrue(listener.progressList.size() > 0); assertEquals(Arrays.asList( new TestResult("Tests should finish without errors", false, "Tests failed to produce results, seems some internal error") ), progress.getTests()); assertEquals(0, progress.getTotalTests()); } } private Executable buildExecutable() { File jarPath = new File(System.getProperty("mock-executable-jar-path", JarRunnerTest.class.getProtectionDomain().getCodeSource().getLocation().getFile() + "../mock-jar/mock-executable.jar")); return new Executable(jarPath, ExecutableType.JAR); } private void copyTaskProgressToVM(VM vm, TestResult testResult) { TaskProgress progress = new TaskProgress(Arrays.asList(testResult), new ArrayList<>(), 1, null, 0); File tmp = FileUtils.createTmpFile(); progress.save(tmp); vm.copyFromHost(tmp, AbstractTask.PROGRESS_FILE_IN_VM); } static class Listener implements ProgressListener { private List<TaskProgress> progressList = new ArrayList<>(); @Override public void onProgress(String buildId, TaskProgress progress) { progressList.add(progress); } } static class StubTask extends AbstractTask { @Override protected void runTests(Executable executableOnHost, Env env, ProgressListener listener) { } @Override public String getId() { return null; } @Override public String getName() { return null; } @Override public String getShortDescription() { return null; } @Override public String getDescription() { return null; } @Override public Collection<String> getTags() { return null; } } }
09fab7f9b10ace5b3523ab6e45b12f441d46c73e
541b2c0ceac53b935d79fd2cab9ded8d82c09e03
/src/main/java/com/bbs/starter/interceptor/BeforeActionInterceptor.java
0006f0744e44abf8bf07bf57aa13bbd1f5320910
[]
no_license
wwwkim/Springboot-Mybatis-BBS
bb58def3e23dcc6c16cfdc280d7027e25355a407
b8918f55dcc712fcbbcabe0412de54e364834b33
refs/heads/master
2023-03-27T19:26:36.916729
2020-09-01T05:43:59
2020-09-01T05:43:59
280,653,803
0
0
null
2021-03-31T22:10:10
2020-07-18T12:39:31
CSS
UTF-8
Java
false
false
1,284
java
package com.bbs.starter.interceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import com.bbs.starter.dto.Member; import com.bbs.starter.service.MemberService; @Component("beforeActionInterceptor") public class BeforeActionInterceptor implements HandlerInterceptor { @Autowired MemberService memberService; public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { boolean isLogined = false; long loginedMemberId = 0; Member loginedMember = null; HttpSession session = request.getSession(); if (session.getAttribute("loginedMemberId") != null) { isLogined = true; loginedMemberId = (long) session.getAttribute("loginedMemberId"); loginedMember = memberService.getOne(loginedMemberId); } request.setAttribute("isLogined", isLogined); request.setAttribute("loginedMemberId", loginedMemberId); request.setAttribute("loginedMember", loginedMember); return HandlerInterceptor.super.preHandle(request, response, handler); } }
e90f62cad6ad9b44967dcc658a81311854c06429
3be625511c617eb28d9e73525a16e3ea08bdea5b
/auth-app/src/main/java/com/broad/security/auth/client/domain/OAuthToken.java
9d461c87d07120213fc0ae42f067c4618a8e13fc
[]
no_license
Yuedecky/auth-around
e6f0797b43f748e0a89d7d862b9773f0b9629d86
53c03ad70d4dddc2faed0bd17be1d409e2a66669
refs/heads/master
2020-04-20T07:04:43.315328
2019-07-04T14:29:32
2019-07-04T14:29:32
168,701,888
0
1
null
null
null
null
UTF-8
Java
false
false
421
java
package com.broad.security.auth.client.domain; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Data; @Data public class OAuthToken { @JsonProperty("access_token") private String accessToken; @JsonProperty("token_type") private String tokenType; @JsonProperty("expires_in") private String expiresIn; @JsonProperty("refresh_token") private String refreshToken; }
[ "yzy091633" ]
yzy091633
289c704b31b2b8afe34858981e0199978ed316bb
6de79f6ab24f48e37cdaa406df2f5ae0cc6bc674
/tree/NonEmptyTree.java
68f600efeee6a9443f998b061630b95dd9dacece
[]
no_license
Wllmgong/Object_oriented
72de509ed11f58a7d90135e1d5fbf0e8fe0c3b11
b5ea01416cef197783c35f4b6b2b14cee0844ae0
refs/heads/master
2021-01-23T10:44:04.784406
2017-05-31T21:57:52
2017-05-31T21:57:52
93,088,328
0
0
null
null
null
null
UTF-8
Java
false
false
8,626
java
package tree; /** * * @author William Gong Name:William * Gong Section:0303 ID:113510311 Directory * ID:wgong1 * Honor Code:I pledge on my honor that i have not give or * received any unauthorized assistance on this assignment * * The purpose of the project is to create a polymorphic tree that uses * a emptytree class and a nonempty class. When a subtree is empty, the * emptytree class is called, and when the tree is not empty, then * nonemptytree is called This is the NonEmptyTree class for the tree * interface. This class serves for the values that contains a key and a * value. Its a data storage that finds the value by matching the key it * finds. The empty tree acts like the base case that ends the recursion * calls in the methods The values stored in left are smaller than the * root, and the values stored in right are larger than the root * @param <K> * @param <V> */ @SuppressWarnings("unchecked") public class NonEmptyTree<K extends Comparable<K>, V> implements Tree<K, V> { private K key; // the key that points to the value private V value; // the value to be stored private Tree<K, V> left; // left subtree private Tree<K, V> right;// right subtree /** * the constructor for the nonemptytree class that creates a new * nonemptytree with the given key and value * * @param newKey * @param newVal */ public NonEmptyTree(K newKey, V newVal) { key = newKey; value = newVal; left = EmptyTree.getInstance();// set the left subtree as empty right = EmptyTree.getInstance();// set the right subtree as empty } /** * it adds a new nonempty tree to the original tree and either becomes the * root, left subtree or the right subtree if the key equals to an already * existing tree, the value is replaced */ public NonEmptyTree<K, V> add(K keyToAdd, V valueToAdd) { if (keyToAdd == null || valueToAdd == null) throw new NullPointerException(); // check for null if (key.equals(keyToAdd)) { value = valueToAdd;// when the key is equal already existing tree, // it replaces the new value return this; } if (key.compareTo(keyToAdd) > 0) { // if the keytoadd is less than the key, then its added to the left left = left.add(keyToAdd, valueToAdd); return this; } else { // if the keytoadd is more than the key, then its added to the right right = right.add(keyToAdd, valueToAdd); return this; } } /** * returns the size of the nonemptytree */ public int size() { return 1 + left.size() + right.size(); // adds the left subtree size and right subtree size // plus the current tree } /** * it goes through the tree and finds the key and returns the value the key * points to */ public V lookup(K keyToLookFor) { if (keyToLookFor == null) throw new NullPointerException(); // check if the keytolookfor is null and returns the null exception if // it is null if (key.equals(keyToLookFor)) return value; // finds the key in the tree and returns the value in that tree if (key.compareTo(keyToLookFor) > 0) return left.lookup(keyToLookFor); // if key to look for is less than the key, then to // looks in the left tree else return right.lookup(keyToLookFor); // if key to look for is more than the key, then to // looks in the right tree } /** * it returns the string form of the tree, which contains the key and the * value */ public String toString() { String str = ""; if (!left.toString().equals("")) { str = str + left.toString() + " "; } // first finds the left subtree's keys and values until it reaches to // the end, then it adds the string form of the subtree to string str = str + key.toString() + "+" + value.toString(); // adds the root key and value to the string if (!(right.toString().equals(""))) { str = str + " " + right.toString(); } // finds the right sub tree substring and adds to the string return str; } /** * this method copies a new tree of the current tree and returns the new * tree */ public Tree<K, V> copy() { NonEmptyTree<K, V> one = new NonEmptyTree<K, V>(key, value); // creates a new nonemptytree with the same values one.left = this.left.copy(); // copies the left subtree one.right = this.right.copy(); // copies the right subtree return (Tree<K, V>) one; // return the new tree } /** * this method copies the subtree that's below the given key */ public Tree<K, V> subTree(K keyOfSubTree) { if (keyOfSubTree == null) throw new NullPointerException(); if (key == keyOfSubTree) { return this.copy(); } // first finds the key, then create a copy of the subtree if (key.compareTo(keyOfSubTree) > 0) // finds the key by checking left if its less than the current return left.subTree(keyOfSubTree); else // finds the key by checking the right if its more than the current return right.subTree(keyOfSubTree); } /** * this method removes the subtree of the given key, it copies the tree * until it reaches the key, then it just set the subtree as empty trees */ public Tree<K, V> removeSubTree(K keyOfSubTree) { if (keyOfSubTree == null) throw new NullPointerException(); NonEmptyTree<K, V> one = new NonEmptyTree<K, V>(key, value); if (key.equals(keyOfSubTree)) return EmptyTree.getInstance(); // finds the keyofsubtree within the tree, then it sets it as a // emptytree one.left = this.left.removeSubTree(keyOfSubTree); // copies left subtree one.right = this.right.removeSubTree(keyOfSubTree); // copites right subtree return (Tree<K, V>) one; } /** * It finds the tree at the most left for the given level. I used a helper * method for this to create a counter that counts the level as the method * goes through every level */ public K leftMostAtLevel(int level) { return leftMostAtLevel(level, 0); } public K leftMostAtLevel(int level, int count) { if (level - 1 == count) return key; // finds the level and returns the key if (count > level) return null; // if the level goes past the given level, then null is returned if (left.leftMostAtLevel(level, count + 1) == null) // first check if going left reaches null, if it doesnt, keep going // left return right.leftMostAtLevel(level, count + 1); return left.leftMostAtLevel(level, count + 1); // if going left reaches null, then go right } /** * finds the max value, since the tree is sorted in order, the max value * should be at the end of right side */ public K max() throws EmptyTreeException { try { return right.max();// return the max value recursively } catch (EmptyTreeException k) { return key; } // it keeps going right until right before it reaches the end, since // the empty tree returns an exception } /** * finds the min value, since the tree is sorted in order, the min value * should be at the end of left side */ public K min() throws EmptyTreeException { try { return left.min();// return the min value recursively } catch (EmptyTreeException k) { return key; } } /** * the method deletes a leaf from the tree, and takes a value from the tree * to balance the tree after the leaf has been deleted.Then it deletes * recursively until the key is deleted and the tree has balanced by being * replaced. * */ public Tree<K, V> delete(K keyToDelete) { if (keyToDelete == null) throw new NullPointerException(); // checks for null if (key.compareTo(keyToDelete) > 0) left = left.delete(keyToDelete); // looks for the key in the tree, if its smaller than the current key // checks left first else if (key.compareTo(keyToDelete) < 0) right = right.delete(keyToDelete); // if its the current is greater than it checks right else // if the key is equal try { // this try block catches the exception from the max method value = lookup(left.max());// finds the value, and replaces the // current value key = left.max(); // replaces the key with max left = left.delete(key); // then recursively deletes until it reaches the end } catch (EmptyTreeException k) { try { value = lookup(right.min()); key = right.min(); right = right.delete(key); // same done previously except with right min } catch (EmptyTreeException e) { return EmptyTree.getInstance(); // if both max and min has an exception then it returns the // empty tree } } return this; // return the tree after it has been deteled } }
df0629b4a4b108b679a1b3e9723f365ecdba4ddc
ff5047c91cd445d61f0e6891ed40d5ee2a78f888
/PINApp/src/PINFrame1.java
51bff92643d8ce47f9ca5cb553be59784b6fa3db
[]
no_license
bmcveigh/Java
1bf604dd78e3fac9bc097082620c7c4bdd15a7bc
fe16fcf49819609311622aae9ddcaf314f3341d3
refs/heads/master
2020-04-06T05:25:50.834689
2014-07-31T20:09:46
2014-07-31T20:09:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,264
java
import javax.swing.JFrame; import javax.swing.JTextField; import java.awt.FlowLayout; import javax.swing.JLabel; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import javax.swing.JOptionPane; public class PINFrame1 extends JFrame { /** * */ private static final long serialVersionUID = -11240989827984138L; private JTextField pinField = new JTextField(4); private JLabel pinLabel = new JLabel("PIN:"); private String userPIN = ""; public PINFrame1() { super("PIN Entry"); setLayout(new FlowLayout()); add(pinLabel); add(pinField); PINListener listener = new PINListener(); pinField.addActionListener(listener); } private class PINListener implements ActionListener { public void actionPerformed(ActionEvent e) { userPIN = pinField.getText(); if (userPIN.equals("1234")) { JOptionPane.showMessageDialog( PINFrame1.this, "Correct PIN!"); } else { JOptionPane.showMessageDialog( PINFrame1.this, "Sorry, try again."); } } } }
8bf2709bf1585b45f4694e4baa58e590ebe8ab41
0706a1e05ca4177eb7ea51a8cbf1cf9e11eae8b7
/myboard/src/main/java/tommy/spring/web/common/BeforeAdvice.java
00f241fe2a96c391025b2a6b7789f27b5ee1a311
[]
no_license
woongpark-9/springExam2
bb75b4581899f81f57870bd81462b19f6406a7e3
8e0bacf3319e41990be002a4ec4f2bf7d7343809
refs/heads/master
2023-03-20T06:58:19.257439
2021-03-19T11:18:44
2021-03-19T11:18:44
347,916,664
0
0
null
null
null
null
UHC
Java
false
false
661
java
package tommy.spring.web.common; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Service; @Service @Aspect public class BeforeAdvice { @Pointcut("execution(* tommy.spring.web..*Impl.*(..))") public void allPointcut() { } @Before("allPointcut()") public void beforeLog(JoinPoint joinPoint) { String method = joinPoint.getSignature().getName(); Object[] args = joinPoint.getArgs(); // System.out.println("[사전처리] : "+method + "() 메서드의 args 정보 : "+args[0].toString()); } }
e58a33fb80c349948b7b4d4ca12a4e2eb1ed231f
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/b/g/i/e/Calc_1_2_16845.java
c41d07661c9e9f4d7bdd8675e0c887b56b5715f5
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package b.g.i.e; public class Calc_1_2_16845 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
deed1e08efad7b70727f54f0d06fe5393a565354
51f5beac483cada010f9a41f5718273450a697c1
/pushlibrary/src/main/java/com/believer/mypublisher/googlecode/mp4parser/boxes/mp4/objectdescriptors/DecoderSpecificInfo.java
5ffef8d95b9ae3f0853ea8041e529ce1904823b1
[]
no_license
zkbqhuang/streampusher
c24e9123faf0988c583307fb9174ee10e4c07dd0
ec7d21874c43392a25932caebbbf17148969ccb6
refs/heads/master
2021-09-14T07:06:51.827446
2018-05-09T08:42:36
2018-05-09T08:42:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,249
java
/* * Copyright 2011 castLabs, Berlin * * 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.believer.mypublisher.googlecode.mp4parser.boxes.mp4.objectdescriptors; import com.believer.mypublisher.coremedia.iso.Hex; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; /** * abstract class DecoderSpecificInfo extends BaseDescriptor : bit(8) * tag=DecSpecificInfoTag * { * // empty. To be filled by classes extending this class. * } */ @Descriptor(tags = 0x05) public class DecoderSpecificInfo extends BaseDescriptor { byte[] bytes; @Override public void parseDetail(ByteBuffer bb) throws IOException { if (sizeOfInstance > 0) { bytes = new byte[sizeOfInstance]; bb.get(bytes); } } public int serializedSize() { return bytes.length; } public ByteBuffer serialize() { ByteBuffer out = ByteBuffer.wrap(bytes); return out; } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("DecoderSpecificInfo"); sb.append("{bytes=").append(bytes == null ? "null" : Hex.encodeHex(bytes)); sb.append('}'); return sb.toString(); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DecoderSpecificInfo that = (DecoderSpecificInfo) o; if (!Arrays.equals(bytes, that.bytes)) { return false; } return true; } @Override public int hashCode() { return bytes != null ? Arrays.hashCode(bytes) : 0; } }
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); }
e1c0e4a6683b07698e349e9a9346158fb071fd91
d197d0cffd9ba7d7120ce73036d74d959a57e35b
/app/src/main/java/com/example/addresschangedialog/AddressItemView.java
bb773cdab01bd4e865f71be6a0e853cda9d82f52
[]
no_license
CasWen/AddressDialog
a38614599b7ba837c375148a8da2acdf03a15212
7a4e0a41658fc08c3fa9abd929611f367b514ca3
refs/heads/master
2020-07-06T16:53:28.765539
2019-08-19T02:59:04
2019-08-19T02:59:04
203,084,152
1
0
null
null
null
null
UTF-8
Java
false
false
122
java
package com.example.addresschangedialog; /** * Created by zhongwenjie on 2019/8/16. */ interface AddressItemView { }
3701eae8c4894145d82685561a97789a3deea01f
341048676cf6922f696e3e59b862f00f1b356f03
/android/src/main/java/com/lwansbrough/RCTCamera/RCTCameraViewFinder.java
a52048aab3048f5cae62d9acbc721e6b3ea2b93d
[ "MIT" ]
permissive
javiercf/react-cam-fd
95039fb5e7e6fc66942f9144654573556320d637
3d2147c5d3e3f305af3aafe79bd66a1fa93e136f
refs/heads/master
2021-01-22T13:30:35.067748
2017-08-18T03:30:19
2017-08-18T03:30:19
100,669,329
0
0
null
null
null
null
UTF-8
Java
false
false
6,834
java
/** * Created by Fabrice Armisen ([email protected]) on 1/3/16. */ package com.lwansbrough.RCTCamera; import android.content.Context; import android.graphics.SurfaceTexture; import android.graphics.Matrix; import android.graphics.RectF; import android.hardware.Camera; import android.util.Log; import android.view.TextureView; import android.util.DisplayMetrics; import com.facebook.react.bridge.Arguments; import com.facebook.react.bridge.ReactContext; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; import com.facebook.react.modules.core.DeviceEventManagerModule; import java.util.List; class RCTCameraViewFinder extends TextureView implements TextureView.SurfaceTextureListener { private int _cameraType; private SurfaceTexture _surfaceTexture; private boolean _isStarting; private boolean _isStopping; private Camera _camera; public RCTCameraViewFinder(Context context, int type) { super(context); this.setSurfaceTextureListener(this); this._cameraType = type; } @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { _surfaceTexture = surface; startCamera(); } @Override public void onSurfaceTextureSizeChanged(SurfaceTexture surface, int width, int height) { } @Override public boolean onSurfaceTextureDestroyed(SurfaceTexture surface) { _surfaceTexture = null; stopCamera(); return true; } @Override public void onSurfaceTextureUpdated(SurfaceTexture surface) { } private Camera.FaceDetectionListener faceDetectionListener = new Camera.FaceDetectionListener() { @Override public void onFaceDetection(Camera.Face[] faces, Camera camera) { if (faces.length > 0) { Matrix matrix = new Matrix(); boolean frontCamera = (getCameraType() == RCTCameraModule.RCT_CAMERA_TYPE_FRONT); int height = getHeight(); int width = getWidth(); matrix.setScale(frontCamera ? -1 : 1, 1); matrix.postRotate(RCTCamera.getInstance().getOrientation()); matrix.postScale(width / 2000f, height / 2000f); matrix.postTranslate(width / 2f, height / 2f); double pixelDensity = getPixelDensity(); for (Camera.Face face : faces) { RectF faceRect = new RectF(face.rect); matrix.mapRect(faceRect); WritableMap faceEvent; faceEvent = Arguments.createMap(); faceEvent.putInt("faceID", face.id); faceEvent.putBoolean("isFrontCamera", frontCamera); faceEvent.putDouble("x", faceRect.left / pixelDensity); faceEvent.putDouble("y", faceRect.top / pixelDensity); faceEvent.putDouble("h", faceRect.height() / pixelDensity); faceEvent.putDouble("w", faceRect.width() / pixelDensity); ((ReactContext) getContext()).getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit("CameraFaceDetected", faceEvent); } } } private int getCameraType() { return _cameraType; } }; public double getPixelDensity() { DisplayMetrics dm = getContext().getResources().getDisplayMetrics(); return dm.density; } public double getRatio() { int width = RCTCamera.getInstance().getPreviewWidth(this._cameraType); int height = RCTCamera.getInstance().getPreviewHeight(this._cameraType); return ((float) width) / ((float) height); } public void setCameraType(final int type) { if (this._cameraType == type) { return; } new Thread(new Runnable() { @Override public void run() { stopPreview(); _cameraType = type; startPreview(); } }).start(); } public void setCaptureQuality(String captureQuality) { RCTCamera.getInstance().setCaptureQuality(_cameraType, captureQuality); } public void setTorchMode(int torchMode) { RCTCamera.getInstance().setTorchMode(_cameraType, torchMode); } public void setFlashMode(int flashMode) { RCTCamera.getInstance().setTorchMode(_cameraType, flashMode); } private void startPreview() { if (_surfaceTexture != null) { startCamera(); } } private void stopPreview() { if (_camera != null) { stopCamera(); } } synchronized private void startCamera() { if (!_isStarting) { _isStarting = true; try { _camera = RCTCamera.getInstance().acquireCameraInstance(_cameraType); Camera.Parameters parameters = _camera.getParameters(); // set autofocus List<String> focusModes = parameters.getSupportedFocusModes(); if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) { parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); } // set picture size // defaults to max available size Camera.Size optimalPictureSize = RCTCamera.getInstance().getBestPictureSize(_cameraType, Integer.MAX_VALUE, Integer.MAX_VALUE); parameters.setPictureSize(optimalPictureSize.width, optimalPictureSize.height); _camera.setParameters(parameters); _camera.setPreviewTexture(_surfaceTexture); _camera.startPreview(); if(parameters.getMaxNumDetectedFaces() > 0) { _camera.setFaceDetectionListener(faceDetectionListener); _camera.startFaceDetection(); } } catch (NullPointerException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); stopCamera(); } finally { _isStarting = false; } } } synchronized private void stopCamera() { if (!_isStopping) { _isStopping = true; try { if (_camera != null) { _camera.stopPreview(); RCTCamera.getInstance().releaseCameraInstance(_cameraType); _camera = null; } } catch (Exception e) { e.printStackTrace(); } finally { _isStopping = false; } } } }
df8c081c36732c2d4208c1c34290cf5ae4e1214f
e3d52991a192a58fd3096947ccddbb9529521a8b
/app/src/main/java/com/example/woojinkim/pushnotitest/MyFirebaseInstanceIDService.java
f0fd39cfff68c775b95ea7635910f4cc7e97b105
[]
no_license
94imain/PushNoti_test
803a710bcda204f2a5ac3ec6b61c0aa2e9310c66
327bccfa5bdcdf1ff073f598a9dfbc5493c98daa
refs/heads/master
2021-07-15T12:14:00.346294
2017-10-19T09:00:52
2017-10-19T09:00:52
105,349,359
0
0
null
null
null
null
UTF-8
Java
false
false
857
java
package com.example.woojinkim.pushnotitest; import android.util.Log; import com.google.firebase.iid.FirebaseInstanceId; import com.google.firebase.iid.FirebaseInstanceIdService; public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService { private static final String TAG = "MyFirebaseIIDService"; @Override public void onTokenRefresh() { // Get updated InstanceID token. String refreshedToken = FirebaseInstanceId.getInstance().getToken(); Log.d(TAG, "Refreshed token: " + refreshedToken); sendRegistrationToServer(refreshedToken); } private void sendRegistrationToServer(String token) { // 내 푸쉬 서버로 토컨을 보내서 저장해 둔다. 실 서비스 시 직접 코딩을 해야 된다. // 테스트 시에는비워 놔도 동작 확인이 된다. } }
01ef9c627889cf592c16f413ac8e39dec20c7f53
79b2f1664f8896507fce63e0ec9f5057c02cecb8
/src/main/java/com/spring/starter/exception/GlobalExceptionHandler.java
d6f2d829ce5b308c353cb8d1b6e6b567ad5327fd
[]
no_license
mattruddy/SpringAuthStarter
5947ab948e7a749a49686a59c59a18665816f46f
39e57b3409d65ee7f3a79bd7804f2c3ed2bb51f8
refs/heads/master
2021-04-13T23:51:20.927770
2020-03-22T14:23:05
2020-03-22T14:23:05
249,195,854
2
0
null
null
null
null
UTF-8
Java
false
false
1,424
java
package com.spring.starter.exception; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.context.request.WebRequest; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; @ControllerAdvice public class GlobalExceptionHandler extends ResponseEntityExceptionHandler { @ExceptionHandler(ServiceException.class) protected ResponseEntity<Error> handleServiceException(ServiceException e) { Error error = createError(e.getMessage(), e.code); return new ResponseEntity<>(error, HttpStatus.BAD_REQUEST); } @Override protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { Error error = createError(ex.getBindingResult().getFieldError().getDefaultMessage(), 400); return new ResponseEntity<>(error, HttpStatus.BAD_REQUEST); } private Error createError(String message, int code) { Error error = new Error(); error.setCode(code); error.setMessage(message); return error; } }
49e5ae96c001f2f03fd940de373a2adf02f081d5
4bb83687710716d91b5da55054c04f430474ee52
/dsrc/sku.0/sys.server/compiled/game/script/conversation/padawan_the_ring_02.java
49254e9d762ed4b448701eb66c3265347aad7505
[]
no_license
geralex/SWG-NGE
0846566a44f4460c32d38078e0a1eb115a9b08b0
fa8ae0017f996e400fccc5ba3763e5bb1c8cdd1c
refs/heads/master
2020-04-06T11:18:36.110302
2018-03-19T15:42:32
2018-03-19T15:42:32
157,411,938
1
0
null
2018-11-13T16:35:01
2018-11-13T16:35:01
null
UTF-8
Java
false
false
24,330
java
package script.conversation; import script.*; import script.base_class.*; import script.combat_engine.*; import java.util.Arrays; import java.util.Hashtable; import java.util.Vector; import script.base_script; import script.library.ai_lib; import script.library.chat; import script.library.jedi_trials; import script.library.utils; public class padawan_the_ring_02 extends script.base_script { public padawan_the_ring_02() { } public static String c_stringFile = "conversation/padawan_the_ring_02"; public boolean padawan_the_ring_02_condition__defaultCondition(obj_id player, obj_id npc) throws InterruptedException { return true; } public boolean padawan_the_ring_02_condition_isTrialPlayer(obj_id player, obj_id npc) throws InterruptedException { obj_id trialPlayer = getObjIdObjVar(npc, jedi_trials.PADAWAN_TRIAL_PLAYER_OBJVAR); if (player == trialPlayer) { String trialName = jedi_trials.getJediTrialName(player); if (trialName != null && trialName.equals("the_ring")) { return !hasObjVar(player, "jedi_trials.padawan_trials.temp.spokeToTarget_01"); } } return false; } public void padawan_the_ring_02_action_spokeToNpc(obj_id player, obj_id npc) throws InterruptedException { setObjVar(player, "jedi_trials.padawan_trials.temp.spokeToTarget_01", true); stopCombat(npc); setInvulnerable(npc, true); messageTo(player, "handleSetBeginLoc", null, 1, false); return; } public void padawan_the_ring_02_action_npcAttacks(obj_id player, obj_id npc) throws InterruptedException { dictionary webster = new dictionary(); webster.put("player", player); messageTo(npc, "handleQuestStartAttack", webster, 1, false); return; } public int padawan_the_ring_02_handleBranch1(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_711691ff")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "wave_on_dismissing"); string_id message = new string_id(c_stringFile, "s_83f28a20"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_443c85ef"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 2); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } if (response.equals("s_21")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "point_accusingly"); string_id message = new string_id(c_stringFile, "s_f42e101f"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_24"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 10); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch2(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_443c85ef")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "laugh"); string_id message = new string_id(c_stringFile, "s_4f77458a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_e4815789"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch3(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_e4815789")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "flex_biceps"); string_id message = new string_id(c_stringFile, "s_80764fc6"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_d38d76e0"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_157b6369"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 4); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch4(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_d38d76e0")) { doAnimationAction(player, "shake_head_no"); if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "rub_chin_thoughtful"); string_id message = new string_id(c_stringFile, "s_cdc241bf"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_759ab6bb"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 5); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } if (response.equals("s_157b6369")) { doAnimationAction(player, "threaten_combat"); if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "slit_throat"); padawan_the_ring_02_action_npcAttacks(player, npc); string_id message = new string_id(c_stringFile, "s_19"); utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch5(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_759ab6bb")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "shake_head_disgust"); string_id message = new string_id(c_stringFile, "s_860ae378"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_8514b7c5"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_36ab201c"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 6); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch6(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_8514b7c5")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "belly_laugh"); padawan_the_ring_02_action_spokeToNpc(player, npc); string_id message = new string_id(c_stringFile, "s_cd72f93"); utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); return SCRIPT_CONTINUE; } } if (response.equals("s_36ab201c")) { doAnimationAction(player, "threaten_combat"); if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "slit_throat"); padawan_the_ring_02_action_npcAttacks(player, npc); string_id message = new string_id(c_stringFile, "s_77a2c8a3"); utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch10(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_24")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { string_id message = new string_id(c_stringFile, "s_26"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_cec4328"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 11); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int padawan_the_ring_02_handleBranch11(obj_id player, obj_id npc, string_id response) throws InterruptedException { if (response.equals("s_cec4328")) { if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "laugh"); string_id message = new string_id(c_stringFile, "s_4f77458a"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_e4815789"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 3); npcSpeak(player, message); npcSetConversationResponses(player, responses); } else { utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); chat.chat(npc, player, message); npcEndConversation(player); } return SCRIPT_CONTINUE; } } return SCRIPT_DEFAULT; } public int OnInitialize(obj_id self) throws InterruptedException { if ((!isMob(self)) || (isPlayer(self))) { detachScript(self, "conversation.padawan_the_ring_02"); } setCondition(self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } public int OnAttach(obj_id self) throws InterruptedException { setCondition(self, CONDITION_CONVERSABLE); return SCRIPT_CONTINUE; } public int OnObjectMenuRequest(obj_id self, obj_id player, menu_info menuInfo) throws InterruptedException { if (!isIncapacitated(self)) { int menu = menuInfo.addRootMenu(menu_info_types.CONVERSE_START, null); menu_info_data menuInfoData = menuInfo.getMenuItemById(menu); menuInfoData.setServerNotify(false); setCondition(self, CONDITION_CONVERSABLE); } else { clearCondition(self, CONDITION_CONVERSABLE); } return SCRIPT_CONTINUE; } public int OnIncapacitated(obj_id self, obj_id killer) throws InterruptedException { clearCondition(self, CONDITION_CONVERSABLE); detachScript(self, "conversation.padawan_the_ring_02"); return SCRIPT_CONTINUE; } public boolean npcStartConversation(obj_id player, obj_id npc, String convoName, string_id greetingId, prose_package greetingProse, string_id[] responses) throws InterruptedException { Object[] objects = new Object[responses.length]; System.arraycopy(responses, 0, objects, 0, responses.length); return npcStartConversation(player, npc, convoName, greetingId, greetingProse, objects); } public int OnStartNpcConversation(obj_id self, obj_id player) throws InterruptedException { obj_id npc = self; if (ai_lib.isInCombat(npc) || ai_lib.isInCombat(player)) { return SCRIPT_OVERRIDE; } if (padawan_the_ring_02_condition_isTrialPlayer(player, npc)) { doAnimationAction(npc, "threaten"); string_id message = new string_id(c_stringFile, "s_6a1562ad"); int numberOfResponses = 0; boolean hasResponse = false; boolean hasResponse0 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse0 = true; } boolean hasResponse1 = false; if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { ++numberOfResponses; hasResponse = true; hasResponse1 = true; } if (hasResponse) { int responseIndex = 0; string_id responses[] = new string_id[numberOfResponses]; if (hasResponse0) { responses[responseIndex++] = new string_id(c_stringFile, "s_711691ff"); } if (hasResponse1) { responses[responseIndex++] = new string_id(c_stringFile, "s_21"); } utils.setScriptVar(player, "conversation.padawan_the_ring_02.branchId", 1); npcStartConversation(player, npc, "padawan_the_ring_02", message, responses); } else { chat.chat(npc, player, message); } return SCRIPT_CONTINUE; } if (padawan_the_ring_02_condition__defaultCondition(player, npc)) { doAnimationAction(npc, "threaten"); string_id message = new string_id(c_stringFile, "s_ce804243"); chat.chat(npc, player, message); return SCRIPT_CONTINUE; } chat.chat(npc, "Error: All conditions for OnStartNpcConversation were false."); return SCRIPT_CONTINUE; } public int OnNpcConversationResponse(obj_id self, String conversationId, obj_id player, string_id response) throws InterruptedException { if (!conversationId.equals("padawan_the_ring_02")) { return SCRIPT_CONTINUE; } obj_id npc = self; int branchId = utils.getIntScriptVar(player, "conversation.padawan_the_ring_02.branchId"); if (branchId == 1 && padawan_the_ring_02_handleBranch1(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 2 && padawan_the_ring_02_handleBranch2(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 3 && padawan_the_ring_02_handleBranch3(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 4 && padawan_the_ring_02_handleBranch4(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 5 && padawan_the_ring_02_handleBranch5(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 6 && padawan_the_ring_02_handleBranch6(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 10 && padawan_the_ring_02_handleBranch10(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } if (branchId == 11 && padawan_the_ring_02_handleBranch11(player, npc, response) == SCRIPT_CONTINUE) { return SCRIPT_CONTINUE; } chat.chat(npc, "Error: Fell through all branches and responses for OnNpcConversationResponse."); utils.removeScriptVar(player, "conversation.padawan_the_ring_02.branchId"); return SCRIPT_CONTINUE; } }
85b22ff504c9e7f63b524c3c596815ccfb816733
2439358c701013d381ab8b74305c56c5628d79db
/src/NodeWindow.java
262e66dbd2338140f3489482b672dc0a734a8a3f
[]
no_license
JordanTFA/Jordans-Sound-Control
ab45d0f92b627831eaca04b5138d21b4a8758c64
bd89c4013f111f64207402f915112bb5cf6ae0d3
refs/heads/master
2018-11-08T15:49:10.887513
2018-10-15T22:36:47
2018-10-15T22:36:47
125,776,389
0
0
null
null
null
null
UTF-8
Java
false
false
2,050
java
import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.ColorPicker; import javafx.scene.control.Label; import javafx.scene.control.TextField; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.stage.Modality; import javafx.stage.Stage; public class NodeWindow { public static void display(){ Stage window = new Stage(); window.initModality(Modality.APPLICATION_MODAL); window.setTitle("Node Selection"); window.setMinWidth(250); window.setMinHeight(355); window.setResizable(false); final Circle preview = new Circle(); final Label instr = new Label("Select a colour and a name for the node"); final ColorPicker colourPicker = new ColorPicker(Color.GREEN); final Button ok = new Button("Okay"); final TextField chooseName = new TextField(); final Label lbl = new Label(); preview.setFill(colourPicker.getValue()); preview.setRadius(75); VBox vbox = new VBox(preview, instr, chooseName, colourPicker, ok); vbox.setAlignment(Pos.CENTER); vbox.setPadding(new Insets(10,10,10,10)); colourPicker.setOnAction( e -> preview.setFill(colourPicker.getValue()) ); chooseName.textProperty().addListener((observable) -> { StackPane stack = new StackPane(); lbl.setText(""); String content = chooseName.getText(); if(content.length() < 3){ lbl.setText(content.substring(0,content.length())); }else{ lbl.setText(content.substring(0,3)); } lbl.setStyle("-fx-font:56 arial;"); stack.getChildren().addAll(preview, lbl); vbox.getChildren().add(0, stack); }); ok.setOnAction(e -> { // Get name & Colour then create node Node node = new Node(lbl.getText(), colourPicker.getValue(), 0.0, 0.0, 0.0, ""); Main.addNode(node); window.close(); }); Scene scene = new Scene(vbox); window.setScene(scene); window.showAndWait(); } }
57eb43904f7aa8fcb8ac58327332e749bcc0b8f0
5d4220ff341263d00b89aad6acbd270dd58e9b46
/src/main/java/com/lhp/spring5_demo19/bean/User.java
62ddb3c640129585d8f55f9d64739166564de79c
[]
no_license
peng-ge/spring5_demo
6881e2cce557675011c749b7f884de21079f10aa
371d720abb23e7aed0c2e42f4f9e28e052deb346
refs/heads/master
2023-03-19T09:59:47.771088
2021-03-10T15:36:41
2021-03-10T15:36:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
java
package com.lhp.spring5_demo19.bean; /** * @author 53137 */ public class User { private int id; private String name; private String sex; public User() { } public User(int id, String name, String sex) { this.id = id; this.name = name; this.sex = sex; } public User(int id) { this.id = id; } public User(int id, String name) { this.id = id; this.name = name; } public User(String name, String sex) { this.name = name; this.sex = sex; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public int getId() { return id; } public void setId(int id) { this.id = id; } @Override public String toString() { return "User{" + "id=" + id + ", name='" + name + '\'' + ", sex='" + sex + '\'' + '}'; } }
4b2249409fab0777b3ddc1f403d04a9672ebb10b
8a75472e8144e3823d5e6764b17d62ad1da72dd7
/src/cn/it/shop/model/Sorder.java
be9cb4d94c5c960b66393bf1965cb5d229667d4f
[]
no_license
berrong-chen/MyStoryshop
a6255286f815126e005e5e4db80f8aba50413063
df927c296e6d11c140833fe95c0bea35c9b5ea37
refs/heads/master
2021-01-23T05:15:06.465146
2017-03-27T04:35:10
2017-03-27T04:35:10
86,291,718
0
0
null
null
null
null
UTF-8
Java
false
false
2,061
java
package cn.it.shop.model; import java.math.BigDecimal; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity public class Sorder implements java.io.Serializable { // Fields private Integer id; private Forder forder; private Product product; private String name; private BigDecimal price; private Integer number; // Constructors /** default constructor */ public Sorder() { } /** minimal constructor */ public Sorder(Integer number) { this.number = number; } /** full constructor */ public Sorder(Forder forder, Product product, String name, BigDecimal price, Integer number) { this.forder = forder; this.product = product; this.name = name; this.price = price; this.number = number; } // Property accessors @Id @GeneratedValue @Column(name = "id", unique = true, nullable = false) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "fid") public Forder getForder() { return this.forder; } public void setForder(Forder forder) { this.forder = forder; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "pid") public Product getProduct() { return this.product; } public void setProduct(Product product) { this.product = product; } @Column(name = "name", length = 20) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "price", precision = 8) public BigDecimal getPrice() { return this.price; } public void setPrice(BigDecimal price) { this.price = price; } @Column(name = "number", nullable = false) public Integer getNumber() { return this.number; } public void setNumber(Integer number) { this.number = number; } }
f0c719f6ed8d6276ad6da7abe8a48abc956a83e1
f6e44733e10d0e9ac681c6e79e71f018381172a2
/app/src/androidTest/java/com/example/android/simpleblog/ApplicationTest.java
146787611808ab4872c628f7c5de16e0180f6d0e
[]
no_license
TingaZ/Simple_Blog
20edaf1f1ad25119333e274e76e62f7da2e678bb
1f7f9cd5601ddee04e6576c085025e416a1bb347
refs/heads/master
2020-06-15T14:00:53.191882
2016-12-01T11:42:18
2016-12-01T11:42:18
75,287,172
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.example.android.simpleblog; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
c254425b3693a33eea491abc5ff5e8f66776d2ea
d199c1810a953a35108d3cd205f9f1ff88dbd55a
/src/entidades/Terror.java
cea195c4a6de4d59a0e753b4159cc622748dd2ec
[]
no_license
sivianicast/2ParcialParte2
f31ac3e93ee7826b4cde0c1c06b9d6fa7970a3a4
85ce14674133cf3917cce74232b429d9826381b4
refs/heads/master
2020-11-26T19:36:37.380550
2019-12-20T04:09:20
2019-12-20T04:09:20
229,187,774
0
0
null
null
null
null
UTF-8
Java
false
false
2,170
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 entidades; import java.util.ArrayList; /** * * @author siviany */ public class Terror extends Pelicula { public Terror() { } public Terror(String id, String genero, String duracion, String director, String casa, String productor, String protagonistas) { super(id, genero, duracion, director, casa, productor, protagonistas); } @Override public String getCasa() { return casa; } @Override public void setCasa(String casa) { this.casa = casa; } @Override public String getId() { return id; } @Override public void setId(String id) { this.id = id; } @Override public String getGenero() { return genero; } @Override public void setGenero(String genero) { this.genero = genero; } @Override public double getPrecio() { return precio; } @Override public void setPrecio(double precio) { this.precio = precio+(precio*10/100); } @Override public String getDuracion() { return duracion; } @Override public void setDuracion(String duracion) { this.duracion = duracion; } @Override public String getDirector() { return director; } @Override public void setDirector(String director) { this.director = director; } @Override public String getProductor() { return productor; } @Override public void setProductor(String productor) { this.productor = productor; } @Override public String getProtagonistas() { return protagonistas; } @Override public void setProtagonistas(String protagonistas) { this.protagonistas = protagonistas; } @Override public ArrayList<Pelicula> getListaPeliculas() { return listaPeliculas; } @Override public void setListaPeliculas(Object x) { listaPeliculas.add((Pelicula)x); } }
3f7da4d1baa50c3686614e549e88a14c99fba844
ab7ff1ef7c3d4ca3ed82ed277eb5a3c0ceceab15
/BSP/src/main/java/com/mbs/bsp/exceptionhandler/ApiExceptionHandler.java
8bd2886df48172d3ea09dc00e5811fae22caab14
[]
no_license
sharmarvind/MSB
f27b3d96c38d3263ce6ecf325334a768fa644e23
7053db514d1707c6be9e08999a626060d7e01975
refs/heads/master
2020-03-19T02:52:20.891509
2018-06-01T05:19:01
2018-06-01T05:19:01
135,670,144
0
0
null
null
null
null
UTF-8
Java
false
false
1,306
java
package com.mbs.bsp.exceptionhandler; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.context.request.WebRequest; import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler; public class ApiExceptionHandler extends ResponseEntityExceptionHandler{ @Override protected ResponseEntity<Object> handleHttpMessageNotReadable(HttpMessageNotReadableException ex, HttpHeaders headers, HttpStatus status, WebRequest request) { String error = "Malformed JSON request"; return buildResponseEntity(new ApiError(HttpStatus.BAD_REQUEST, error, ex)); } @Override protected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex, HttpHeaders headers, HttpStatus status, WebRequest request ) { String error = "Invaild Request PAram"; return buildResponseEntity(new ApiError(HttpStatus.BAD_REQUEST, error, ex)); } private ResponseEntity<Object> buildResponseEntity(ApiError apierror) { return new ResponseEntity<>(apierror, apierror.getStatus()); } }
79bfbd82e53992a62b1a3636085d683f870b6ab5
2bcb01f53707121184e95b2bbadf6e7ae4f70469
/src/main/java/org/vertx/java/core/impl/BlockingAction.java
220b9dd97275e190faf88827100b2106db20defe
[ "Apache-2.0" ]
permissive
yeison/vert.x
14fff1084621bff55e4051eaf751dd3107d9122d
3cf2ffabaf2b01773b237c7f9b5ecd645329de31
refs/heads/master
2021-01-21T01:26:47.185308
2012-03-01T20:27:41
2012-03-01T20:27:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,904
java
/* * Copyright 2011-2012 the original author or 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 * * 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.vertx.java.core.impl; import org.vertx.java.core.logging.Logger; import org.vertx.java.core.logging.impl.LoggerFactory; /** * <p>Internal class used to run specific blocking actions on the worker pool.</p> * * <p>This class shouldn't be used directlty from user applications.</p> * * @author <a href="http://tfox.org">Tim Fox</a> */ public abstract class BlockingAction<T> extends SynchronousAction<T> { private static final Logger log = LoggerFactory.getLogger(BlockingAction.class); /** * Run the blocking action using a thread from the worker pool. */ protected void run() { final Context context = VertxInternal.instance.getContext(); Runnable runner = new Runnable() { public void run() { try { final T result = action(); context.execute(new Runnable() { public void run() { setResult(result); } }); } catch (final Exception e) { context.execute(new Runnable() { public void run() { setException(e); } }); } catch (Throwable t) { VertxInternal.instance.reportException(t); } } }; VertxInternal.instance.getBackgroundPool().execute(runner); } }
53959867ca335cb9a71d493298c23b5db8b1a6bf
6dc89699f9e02e6c3f7feec166ebaeb21e692ba0
/android/src/main/java/cn/waitwalker/flutter_socket_plugin/jt808_sdk/oksocket/core/iocore/interfaces/IStateSender.java
5484e7473e066a5340ed941c2d23420294b0ac36
[ "MIT" ]
permissive
waitwalker/flutter_socket_plugin
8ea06de03a5c87a9b875f4da1d76bc1466b5353c
2630ed27ccc8b7348f78dfbd679dcede40ec2cef
refs/heads/master
2023-07-06T06:23:53.668503
2023-06-29T01:11:03
2023-06-29T01:11:03
203,282,893
16
11
null
null
null
null
UTF-8
Java
false
false
302
java
package cn.waitwalker.flutter_socket_plugin.jt808_sdk.oksocket.core.iocore.interfaces; import java.io.Serializable; /** * Created by xuhao on 2017/5/17. */ public interface IStateSender { void sendBroadcast(String action, Serializable serializable); void sendBroadcast(String action); }
a589074752002b31a950d047dbf651446c591092
797075bb77f0766cc5d9664e40b1af765bedccde
/app/src/main/java/xoapit/controldev/About.java
145836d755fded84ce3cd29360f4151e3c6b9837
[]
no_license
xoapit/Control-Electric-Devices
2531587a280281258a3be91d9256ecd35f213d8a
38862a926468d0ed94ed6e11c9e2a1e4743e0b49
refs/heads/master
2021-07-16T19:03:35.446541
2017-04-18T11:39:46
2017-04-18T11:39:46
88,615,936
1
1
null
2021-06-21T20:09:51
2017-04-18T11:10:37
Java
UTF-8
Java
false
false
432
java
package xoapit.controldev; import android.app.Activity; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.Window; public class About extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.activity_about); } }
3b094f029554d2a6cfce12a3ef04444fcfa7c1ff
fbf7ad0dc9e5b7ac88aa99f77347c15ebe4b521a
/JavaWork/JSP06_ServletInitParam/src/com/lec/servlet/InitServlet.java
d80f6a5e0a321e1f3081de03554b53c806218c5d
[]
no_license
GoForWalk/JavaPractice
d86a361f20c9a4e085754814083233595e3bd0de
3d838769821193263d4c55195f069ddac67fe041
refs/heads/master
2023-05-14T03:01:14.406318
2020-06-22T05:21:34
2020-06-22T05:21:34
259,175,380
0
0
null
2021-06-07T18:48:41
2020-04-27T01:41:18
Java
UTF-8
Java
false
false
1,409
java
package com.lec.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebInitParam; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @WebServlet(urlPatterns = {"/initS"}, initParams = { @WebInitParam(name = "id", value = "test11"), @WebInitParam(name = "pw", value = "1000"), @WebInitParam(name = "local", value = "busan"), } ) public class InitServlet extends HttpServlet { private static final long serialVersionUID = 1L; public InitServlet() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // ServletConfig의 메소드를 사용합니다. String id = getInitParameter("id"); String pw = getInitParameter("pw"); String local = getInitParameter("local"); response.setContentType("text/html charset=utf-8"); PrintWriter out = response.getWriter(); out.println("id: " + id + "<br>"); out.println("pw: " + pw + "<br>"); out.println("local: " + local + "<br>"); out.close(); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
f93fc29894c93d472e9cd91c4e6e5c5fe4d33bed
8e1140921e1aa96005eda0cf00b83ad6fee929be
/Target/Leviathan/src/stuffplotter/signals/CalendarAuthorizedEvent.java
9a5544377067490ae4482192fc44c501b1ff81d5
[]
no_license
TylerPadfoot/CS410---TeamVersion
c1d11b5f950ae3566596b144c424b160807be94e
755bab253b0c94adc0a688d46515341facebbbc1
refs/heads/master
2021-01-23T18:12:32.395591
2014-11-04T05:04:50
2014-11-04T05:04:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package stuffplotter.signals; import com.google.gwt.event.shared.GwtEvent; /** * Event that gets fired when an google calendar is successfully authorized. */ public class CalendarAuthorizedEvent extends GwtEvent<CalendarAuthorizedEventHandler> { public static Type<CalendarAuthorizedEventHandler> TYPE = new Type<CalendarAuthorizedEventHandler>(); @Override public Type<CalendarAuthorizedEventHandler> getAssociatedType() { return TYPE; } @Override protected void dispatch(CalendarAuthorizedEventHandler handler) { handler.onCalendarAuthorized(this); } }
d9f37477d9ffb67271daafc38ca88118be3c4686
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_29986.java
e54e95c87254f313c5652b280d70a7545ea124fe
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
@AfterPermissionGranted(REQUEST_CODE_CAPTURE_IMAGE_PERMISSION) private void pickOrCaptureImage(){ if (mImageUris.size() >= Broadcast.MAX_IMAGES_SIZE) { ToastUtils.show(R.string.broadcast_send_add_image_too_many,getActivity()); return; } if (EffortlessPermissions.hasPermissions(this,PERMISSIONS_CAPTURE_IMAGE)) { pickOrCaptureImageWithPermission(); } else if (EffortlessPermissions.somePermissionPermanentlyDenied(this,PERMISSIONS_CAPTURE_IMAGE)) { ToastUtils.show(R.string.broadcast_send_capture_image_permission_permanently_denied_message,getActivity()); pickImage(); } else { EffortlessPermissions.requestPermissions(this,R.string.broadcast_send_capture_image_permission_request_message,REQUEST_CODE_CAPTURE_IMAGE_PERMISSION,PERMISSIONS_CAPTURE_IMAGE); } }
37f690f9dbaf54070acd1de953c29074941562ec
78b989e34803b9d53f1a43d0fae4e3d01f0bc7e0
/UWS-MPTT_dp-1.0.0/src/dataprotect/ui/multiRenderTable/MyDefaultTableModelForTabX1.java
2800a4173523effc533c7347957f05b914a8f8cb
[]
no_license
zhbaics/UWS-MTPP_dp
e2104c7e241a20f3f3ba9c6a26ab56177a46cbd6
11e7264ddfbd639016906bd29cac916b69b03860
refs/heads/master
2016-09-05T16:01:29.568782
2014-10-30T01:14:11
2014-10-30T01:14:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,135
java
/* * MyDefaultTableModelForTabX1.java * * Created on 2008/8�/�20, ��morning��11:46 * * To change this template, choose Tools | Options and locate the template under * the Source Creation and Management node. Right-click the template and choose * Open. You can then make changes to the template in the Source Editor. */ package dataprotect.ui.multiRenderTable; import javax.swing.table.*; /** * * @author Administrator */ public class MyDefaultTableModelForTabX1 extends DefaultTableModel{ Object[] label = null; public MyDefaultTableModelForTabX1(Object[] header,int colNum,Object[] _label ){ super( header,colNum ); label = _label; } public MyDefaultTableModelForTabX1( Object[][] data,Object[] header,Object[] _label ){ super( data,header ); label = _label; } @Override public Object getValueAt(int row, int col){ return super.getValueAt(row,col); } @Override public boolean isCellEditable(int row, int col){ if( col==0 ){ return true; }else{ return false; } } }
08298ca963ea477364fe49ec03e2e9b1ceafb883
c13c2a87ade0af685bbd882ea8f9d9ba1f04e180
/app/src/main/java/com/example/ril1/login1.java
05ba00f9b0fd2f25fe4116e14defb98efd303d98
[]
no_license
Abhilash-0111/RIL1
1dbedee6c2d4d99978e7e2100a1357450335bf46
9e9959ff8ec3b0fbf5c5138c3018bf5d2e724f6d
refs/heads/master
2023-06-05T15:54:14.793484
2021-06-22T08:31:39
2021-06-22T08:31:39
379,197,482
0
0
null
null
null
null
UTF-8
Java
false
false
1,944
java
package com.example.ril1; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; import android.widget.Toast; public class login1 extends AppCompatActivity implements AdapterView.OnItemSelectedListener { private String[] company = {"Company1","Company2","Company3"}; String selectedcomp = null ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login1); Button b1 = (Button)findViewById(R.id.b1) ; Spinner spin = (Spinner) findViewById(R.id.spin); spin.setOnItemSelectedListener(this); //Creating the ArrayAdapter instance having the country list ArrayAdapter aa = new ArrayAdapter(this,android.R.layout.simple_spinner_item,company); aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //Setting the ArrayAdapter data on the Spinner spin.setAdapter(aa); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(getApplicationContext(), Login2.class); intent.putExtra("name", selectedcomp); startActivity(intent); } }); } public void onItemSelected(AdapterView<?> arg0, View arg1, int position, long id) { Toast.makeText(getApplicationContext(),company[position] , Toast.LENGTH_LONG).show(); selectedcomp = company[position] ; } @Override public void onNothingSelected(AdapterView<?> arg0) { // TODO Auto-generated method stub } @Override public void onPointerCaptureChanged(boolean hasCapture) { } }
597ebc537fc77813179bc2e62390cbdab106ca4d
4bf68f8a687249c15bf14550b75a48a796517a0e
/src/PhotoQuiz.java
06df89bf71fdc65422341feb985d0f2c910ae78e
[]
no_license
LucasKhattar/EclipseLucasLvl1
b6ff986fc4a721830a76c93f1d2a2ac7f15d24c1
feffe6668df9b0a80a0006378aa3066afd12e79b
refs/heads/master
2020-04-04T07:19:29.047537
2017-08-04T02:56:39
2017-08-04T02:56:39
46,099,354
0
0
null
null
null
null
UTF-8
Java
false
false
1,722
java
// Copyright Wintriss Technical Schools 2013 import java.awt.Component; import java.awt.Frame; import java.net.MalformedURLException; import java.net.URL; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; public class PhotoQuiz { public static void main(String[] args) throws Exception { Frame quizWindow = new Frame(); quizWindow.setVisible(true); String guy = "http://www.corrie.net/kabin/archive/1999/briggs_johnny2.jpg"; Component image; image = createImage(guy); quizWindow.add(image); quizWindow.pack(); String name = JOptionPane.showInputDialog(null, "What is this mans name?"); if (name.equals("Mike Baldwin")) { System.out.println("Correct!"); } else { System.out.println("Incorrect!"); } quizWindow.remove(image); String starwars = "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6c/Star_Wars_Logo.svg/2000px-Star_Wars_Logo.svg.png"; image = createImage(starwars); quizWindow.add(image); quizWindow.pack(); String war = JOptionPane.showInputDialog(null, "What is the title of this new episode in the series?"); if (war.equalsIgnoreCase("The Force Awakens")) { JOptionPane.showMessageDialog(null, "Corrcet!"); } else { JOptionPane.showMessageDialog(null, "Incorrect!"); } } private static Component createImage(String imageUrl) throws MalformedURLException { URL url = new URL(imageUrl); Icon icon = new ImageIcon(url); JLabel imageLabel = new JLabel(icon); return imageLabel; } /* OPTIONAL */ // *14. add scoring to your quiz // *15. make something happen when mouse enters image (imageComponent.addMouseMotionListener()) }